Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.10:testing
obs-server
obs-server-2.10-0010-dist-Use-configuration-var...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.10-0010-dist-Use-configuration-variables-instead-of-hardcode.patch of Package obs-server
From 0f8786230734cfe14e50db26c5be2646a86d887d Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Tue, 28 Jun 2016 16:39:50 +0100 Subject: [PATCH] [dist] Use configuration variables instead of hardcoded paths. This change introduces BINDIR and SBINDIR configuration variables that are used instead of hardcoded "/usr/bin" and "/usr/sbin" paths to install user utilities, system utilities and init scripts. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- Makefile.include | 5 ++++- dist/Makefile | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile.include b/Makefile.include index a4278248bd..4c1a246715 100644 --- a/Makefile.include +++ b/Makefile.include @@ -1,4 +1,7 @@ -INSTALL=/usr/bin/install +BINDIR=/usr/bin +SBINDIR=/usr/sbin + +INSTALL=$(BINDIR)/install OBS_BACKEND_PREFIX=/usr/lib/obs/server OBS_BACKEND_DATA_DIR=/srv/obs OBS_DOCUMENT_ROOT=/srv/www/obs diff --git a/dist/Makefile b/dist/Makefile index 7fdea160a0..6275b29ae9 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -45,7 +45,7 @@ install_systemd_services: system_dirs $(SYSTEMD_SERVICE_FILES_WITHOUT_LINK:%=$(DESTDIR)$(UNITDIR)%.service) install_project_update: system_dirs - $(INSTALL) -m 0755 obs_project_update $(DESTDIR)/usr/sbin/obs_project_update + $(INSTALL) -m 0755 obs_project_update $(DESTDIR)$(SBINDIR)/obs_project_update install_logrotate: system_dirs @@ -67,12 +67,12 @@ install_slp: system_dirs $(INSTALL) -m 644 obs.repo_server.reg $(DESTDIR)/etc/slp.reg.d/ install_obs_bin: system_dirs - $(foreach script,$(OBS_BIN_SCRIPTS),$(shell $(INSTALL) -m 755 $(script) $(DESTDIR)/usr/bin/$(script)) ) - $(foreach script,$(OBS_SBIN_SCRIPTS),$(shell $(INSTALL) -m 755 $(script) $(DESTDIR)/usr/sbin/$(script)) ) + $(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' \ - $(OBS_BIN_SCRIPTS:%=$(DESTDIR)/usr/bin/%) \ - $(OBS_SBIN_SCRIPTS:%=$(DESTDIR)/usr/sbin/%) + $(OBS_BIN_SCRIPTS:%=$(DESTDIR)$(BINDIR)/%) \ + $(OBS_SBIN_SCRIPTS:%=$(DESTDIR)$(SBINDIR)/%) install_crontabs: $(INSTALL) -m 644 cleanup_scm_cache.cron $(DESTDIR)/etc/cron.d/cleanup_scm_cache @@ -86,8 +86,8 @@ system_dirs: $(INSTALL) -d -m 755 $(DESTDIR)/etc/logrotate.d/ $(INSTALL) -d -m 755 $(DESTDIR)/etc/slp.reg.d/ $(INSTALL) -d -m 755 $(DESTDIR)/etc/cron.d/ - $(INSTALL) -d -m 755 $(DESTDIR)/usr/bin/ - $(INSTALL) -d -m 755 $(DESTDIR)/usr/sbin/ + $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ + $(INSTALL) -d -m 755 $(DESTDIR)$(SBINDIR)/ $(INSTALL) -d -m 755 $(DESTDIR)$(FILLUPDIR) $(INSTALL) -d -m 755 $(DESTDIR)/usr/lib/obs/tests/appliance $(INSTALL) -d -m 755 $(DESTDIR)$(UNITDIR) -- 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