Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.9:testing
obs-server
obs-server-2.9-0006-dist-Set-proper-Apache-user...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.9-0006-dist-Set-proper-Apache-user-group-when-installing-sc.patch of Package obs-server
From 8d892a764738838fcc8db79c521a500502c6e9c4 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 init scripts 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dist/Makefile b/dist/Makefile index 8ae1ecd3fb..4ec1b8c02f 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -15,6 +15,10 @@ install: install_obsapisetup install_apache install_initscripts install_project_ install_obsapisetup: system_dirs $(INSTALL) -m 755 obsapisetup $(DESTDIR)/etc/init.d/obsapisetup $(INSTALL) -m 755 setup-appliance.sh $(DESTDIR)$(OBS_BACKEND_PREFIX)/setup-appliance.sh + sed -i \ + -e 's|wwwrun\.www|$(APACHE_USER).$(APACHE_GROUP)|' \ + $(DESTDIR)/etc/init.d/obsapisetup \ + $(DESTDIR)$(OBS_BACKEND_PREFIX)/setup-appliance.sh install_apache: $(INSTALL) -d -m 755 $(DESTDIR)$(APACHE_CONIFGDIR_VHOST) @@ -24,6 +28,9 @@ install_apache: install_initscripts: system_dirs $(foreach script,$(INIT_SCRIPTS),$(shell $(INSTALL) -m 755 $(script) $(DESTDIR)/etc/init.d/$(script)) ) $(foreach script,$(INIT_SCRIPTS),$(shell ln -sf /etc/init.d/$(script) $(DESTDIR)/usr/sbin/rc$(script)) ) + sed -i \ + -e 's|wwwrun:www|$(APACHE_USER):$(APACHE_GROUP)|' \ + $(INIT_SCRIPTS:%=$(DESTDIR)/etc/init.d/%) install_systemd_services: system_dirs $(foreach service,$(SYSTEMD_SERVICE_FILES),$(shell $(INSTALL) -m 644 ./systemd/$(service).service $(DESTDIR)$(UNITDIR)$(service).service) ) @@ -35,6 +42,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)|' \ + $(LOGROTATE_CONFIGS:%=$(DESTDIR)/etc/logrotate.d/%) install_fillups: system_dirs $(INSTALL) -m 0644 sysconfig.obs-server $(DESTDIR)/var/adm/fillup-templates/ -- 2.20.1
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