Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.10:testing
obs-server
obs-server-2.10-0015-dist-api-backend-Make-back...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.10-0015-dist-api-backend-Make-backend-ports-configurable.patch of Package obs-server
From 4a0bc4b7c23ec69724eaaae7c3de768feadf8175 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Thu, 14 Jul 2016 13:37:47 +0100 Subject: [PATCH] [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 33a74356f9..d79a819f97 100644 --- a/Makefile.include +++ b/Makefile.include @@ -9,6 +9,9 @@ OBS_API_PREFIX=$(OBS_DOCUMENT_ROOT)/api OBS_APIDOCS_PREFIX=$(OBS_DOCUMENT_ROOT)/docs OBS_FILLUP_DIR=/var/adm/fillup-templates OBS_FILLUP_FILE=sysconfig.obs-server +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 384a48fed8..7efbb85281 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -61,17 +61,28 @@ install_fillups: system_dirs $(DESTDIR)$(FILLUPDIR)/$(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)$(FILLUPDIR)/$(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)) ) $(foreach script,$(OBS_SBIN_SCRIPTS),$(shell $(INSTALL) -m 755 $(script) $(DESTDIR)$(SBINDIR)/$(script)) ) 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)|' \ $(OBS_BIN_SCRIPTS:%=$(DESTDIR)$(BINDIR)/%) \ $(OBS_SBIN_SCRIPTS:%=$(DESTDIR)$(SBINDIR)/%) diff --git a/src/api/Makefile b/src/api/Makefile index 867483949d..2d5fee37cf 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 75380d337e..53a91bb48b 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.35.3
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