Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.10
obs-server
obs-server-2.10-0007-dist-Set-proper-Apache-use...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.10-0007-dist-Set-proper-Apache-user-group-when-installing-sc.patch of Package obs-server
From fb7ea4a0f0c07d77f61183abf1eabbd684e430cc Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Tue, 28 Jun 2016 02:07:45 +0100 Subject: [PATCH] [dist] Set proper Apache user/group when installing scripts. Edit appliance setup script and logrotate configuration file when installing them to contain proper Apache HTTPD user and group name as configured by APACHE_USER and APACHE_GROUP variables in Makefile.include file. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- dist/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dist/Makefile b/dist/Makefile index 3a23a334d6..ea26a51c1f 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -17,6 +17,9 @@ install: install_obsapisetup install_apache install_project_update install_logro install_obsapisetup: system_dirs $(INSTALL) -m 755 setup-appliance.sh $(DESTDIR)$(OBS_BACKEND_PREFIX)/setup-appliance.sh + sed -i \ + -e 's|wwwrun\.www|$(APACHE_USER).$(APACHE_GROUP)|g' \ + $(DESTDIR)$(OBS_BACKEND_PREFIX)/setup-appliance.sh install_apache: $(INSTALL) -d -m 755 $(DESTDIR)$(APACHE_CONIFGDIR_VHOST) @@ -26,6 +29,11 @@ install_systemd_services: system_dirs $(foreach target,$(SYSTEMD_TARGET_FILES),$(shell $(INSTALL) -m 644 ./systemd/$(target).target $(DESTDIR)$(UNITDIR)$(target).target) ) $(foreach service,$(SYSTEMD_SERVICE_FILES) $(SYSTEMD_SERVICE_FILES_WITHOUT_LINK),$(shell $(INSTALL) -m 644 ./systemd/$(service).service $(DESTDIR)$(UNITDIR)$(service).service) ) $(foreach service,$(SYSTEMD_TARGET_FILES) $(SYSTEMD_SERVICE_FILES),$(shell ln -sf /usr/sbin/service $(DESTDIR)/usr/sbin/rc$(service) ) ) + sed -i \ + -e 's|^\(User *= *\)wwwrun|\1$(APACHE_USER)|g' \ + -e 's|^\(Group *= *\)www|\1$(APACHE_GROUP)|g' \ + $(SYSTEMD_SERVICE_FILES:%=$(DESTDIR)$(UNITDIR)%.service) \ + $(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 @@ -33,6 +41,9 @@ install_project_update: system_dirs install_logrotate: system_dirs $(foreach config,$(LOGROTATE_CONFIGS),$(shell $(INSTALL) -m 644 $(config).logrotate $(DESTDIR)/etc/logrotate.d/$(config)) ) + sed -i \ + -e 's| wwwrun www| $(APACHE_USER) $(APACHE_GROUP)|g' \ + $(LOGROTATE_CONFIGS:%=$(DESTDIR)/etc/logrotate.d/%) install_fillups: system_dirs $(INSTALL) -m 0644 sysconfig.obs-server $(DESTDIR)$(FILLUPDIR) -- 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