Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.7
obs-server
obs-server-2.7.1-0023-dist-api-backend-Make-bac...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.7.1-0023-dist-api-backend-Make-backend-ports-configurable.patch of Package obs-server
From 0b52f03b7ea8cc8dc581e822bd6fac46cbb4d9eb Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Thu, 14 Jul 2016 13:37:47 +0100 Subject: [PATCH 23/29] [dist][api][backend] Make backend ports configurable. This change adds the following configuration parameters to Makefile.include: * OBS_SRCSERVER_PORT - source server port, * OBS_REPOSERVER_PORT - repository server port, * OBS_SERVICESERVER_PORT - service server port. These parameters specify deafult ports to be used after installation instead of hardcoded values of 5352, 5252 and 5152 respectively. This is needed because some distributions can have these port numbers reserved for something else. For example, Fedora uses port 5252 for milter-greylist. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- Makefile.include | 3 +++ dist/Makefile | 11 +++++++++++ src/api/Makefile | 4 ++++ src/backend/Makefile | 3 +++ 4 files changed, 21 insertions(+) diff --git a/Makefile.include b/Makefile.include index efa4ff1..d6c24d0 100644 --- a/Makefile.include +++ b/Makefile.include @@ -11,6 +11,9 @@ OBS_APIDOCS_PREFIX=$(OBS_DOCUMENT_ROOT)/docs OBS_FILLUP_DIR=/var/adm/fillup-templates OBS_FILLUP_FILE=sysconfig.obs-server OBS_DEVEL_DOC_DIR=/usr/share/doc/packages/obs-devel +OBS_SRCSERVER_PORT=5352 +OBS_REPOSERVER_PORT=5252 +OBS_SERVICESERVER_PORT=5152 # TODO: find fix for RH in spec/Makefile # This here is preparation for multi distro support diff --git a/dist/Makefile b/dist/Makefile index 32951cb..0eebd97 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -36,6 +36,9 @@ install_initscripts: system_dirs -e 's|wwwrun:www|$(APACHE_USER):$(APACHE_GROUP)|g' \ -e 's|/srv/www/obs/api|$(OBS_API_PREFIX)|g' \ -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|g' \ + -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ + -e 's|5252|$(OBS_REPOSERVER_PORT)|' \ + -e 's|5152|$(OBS_SERVICESERVER_PORT)|' \ $(INIT_SCRIPTS:%=$(DESTDIR)$(INITDDIR)/%) install_project_update: system_dirs @@ -55,11 +58,19 @@ install_fillups: system_dirs $(DESTDIR)$(OBS_FILLUP_DIR)/$(OBS_FILLUP_FILE) sed -i \ -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|g' \ + -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ + -e 's|5252|$(OBS_REPOSERVER_PORT)|' \ + -e 's|5152|$(OBS_SERVICESERVER_PORT)|' \ $(DESTDIR)$(OBS_FILLUP_DIR)/$(OBS_FILLUP_FILE) install_slp: system_dirs $(INSTALL) -m 644 obs.source_server.reg $(DESTDIR)/etc/slp.reg.d/ $(INSTALL) -m 644 obs.repo_server.reg $(DESTDIR)/etc/slp.reg.d/ + sed -i \ + -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ + -e 's|5252|$(OBS_REPOSERVER_PORT)|' \ + $(DESTDIR)/etc/slp.reg.d/obs.source_server.reg \ + $(DESTDIR)/etc/slp.reg.d/obs.repo_server.reg install_obs_bin: system_dirs $(foreach script,$(OBS_BIN_SCRIPTS),$(shell $(INSTALL) -m 755 $(script) $(DESTDIR)$(BINDIR)/$(script)) ) diff --git a/src/api/Makefile b/src/api/Makefile index a94d13c..6730437 100644 --- a/src/api/Makefile +++ b/src/api/Makefile @@ -43,6 +43,10 @@ config: prepare_dirs echo "# This is to prevent fdupes from hardlinking" >> $(DESTDIR)$(OBS_API_PREFIX)/config/database.yml echo "# This is to prevent fdupes from hardlinking" >> $(DESTDIR)$(OBS_API_PREFIX)/config/options.yml echo "# This is to prevent fdupes from hardlinking" >> $(DESTDIR)$(OBS_API_PREFIX)/config/thinking_sphinx.yml + sed -i \ + -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ + $(DESTDIR)$(OBS_API_PREFIX)/config/options.yml \ + $(DESTDIR)$(OBS_API_PREFIX)/config/options.yml.example log_files: $(foreach logfile,$(OBS_API_LOGS),$(shell touch $(DESTDIR)$(OBS_API_PREFIX)/log/$(logfile) )) diff --git a/src/backend/Makefile b/src/backend/Makefile index 91f3cc4..7ab4bee 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -23,6 +23,9 @@ install: prepare_dirs install_data_dirs bs_config sed -i \ -e 's|/srv/www/obs/api|$(OBS_API_PREFIX)|' \ -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|' \ + -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ + -e 's|5252|$(OBS_REPOSERVER_PORT)|' \ + -e 's|5152|$(OBS_SERVICESERVER_PORT)|' \ $(DESTDIR)$(OBS_BACKEND_PREFIX)/bs_* \ $(DESTDIR)$(OBS_BACKEND_PREFIX)/*.pm \ $(DESTDIR)$(OBS_BACKEND_PREFIX)/*.pm.template \ -- 2.7.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor