Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.8
obs-server
obs-server-2.8-0019-dist-backend-Make-backend-l...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.8-0019-dist-backend-Make-backend-log-directory-configurable.patch of Package obs-server
From 2ca1ff64768f7d4807c9d9a5dcf983aae7decaa0 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Sun, 17 Jul 2016 00:45:23 +0100 Subject: [PATCH] [dist][backend] Make backend log directory configurable. This change adds OBS_BACKEND_LOG_DIR configuration parameter to Makefile.include that specifies directory where backend logs will be written. Some distributions (like Fedora) have giudelines stating that logs should be written in /var/log directory. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- Makefile.include | 1 + dist/Makefile | 3 +++ src/backend/Makefile | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/Makefile.include b/Makefile.include index d6c24d0..b6b3f4c 100644 --- a/Makefile.include +++ b/Makefile.include @@ -5,6 +5,7 @@ INITDDIR=/etc/init.d INSTALL=$(BINDIR)/install OBS_BACKEND_PREFIX=/usr/lib/obs/server OBS_BACKEND_DATA_DIR=/srv/obs +OBS_BACKEND_LOG_DIR=$(OBS_BACKEND_DATA_DIR)/log OBS_DOCUMENT_ROOT=/srv/www/obs OBS_API_PREFIX=$(OBS_DOCUMENT_ROOT)/api OBS_APIDOCS_PREFIX=$(OBS_DOCUMENT_ROOT)/docs diff --git a/dist/Makefile b/dist/Makefile index 9858a8d..f6a6f88 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -35,6 +35,7 @@ install_initscripts: system_dirs sed -i \ -e 's|wwwrun:www|$(APACHE_USER):$(APACHE_GROUP)|g' \ -e 's|/srv/www/obs/api|$(OBS_API_PREFIX)|g' \ + -e 's|/srv/obs/log|$(OBS_BACKEND_LOG_DIR)|g' \ -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|g' \ -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ -e 's|5252|$(OBS_REPOSERVER_PORT)|' \ @@ -50,6 +51,7 @@ install_logrotate: system_dirs sed -i \ -e 's| wwwrun www| $(APACHE_USER) $(APACHE_GROUP)|g' \ -e 's|/srv/www/obs/api|$(OBS_API_PREFIX)|g' \ + -e 's|/srv/obs/log|$(OBS_BACKEND_LOG_DIR)|g' \ -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|g' \ $(LOGROTATE_CONFIGS:%=$(DESTDIR)/etc/logrotate.d/%) @@ -57,6 +59,7 @@ install_fillups: system_dirs $(INSTALL) -m 0644 sysconfig.obs-server \ $(DESTDIR)$(OBS_FILLUP_DIR)/$(OBS_FILLUP_FILE) sed -i \ + -e 's|/srv/obs/log|$(OBS_BACKEND_LOG_DIR)|g' \ -e 's|/srv/obs|$(OBS_BACKEND_DATA_DIR)|g' \ -e 's|5352|$(OBS_SRCSERVER_PORT)|' \ -e 's|5252|$(OBS_REPOSERVER_PORT)|' \ diff --git a/src/backend/Makefile b/src/backend/Makefile index a08f45c..5b994d8 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -35,6 +35,11 @@ install_data_dirs: prepare_dirs $(foreach data_dir,$(OBS_BACKEND_DATA_SUBDIRS), \ $(shell $(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_DATA_DIR)/$(data_dir) ) \ ) +ifneq ($(OBS_BACKEND_LOG_DIR),$(OBS_BACKEND_DATA_DIR)/log) + $(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_LOG_DIR) + rmdir $(DESTDIR)$(OBS_BACKEND_DATA_DIR)/log + ln -s $(OBS_BACKEND_LOG_DIR) $(DESTDIR)$(OBS_BACKEND_DATA_DIR)/log +endif test_unit: bs_config clean_cover -- 2.9.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