File obs-server-2.9-0004-api-Use-OBS_API_PREFIX-instead-of-explicit-pathname-.patch of Package obs-server
From eabc69d93e5c7935d49d81f5f6d250af62732c6b Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Tue, 28 Jun 2016 01:09:26 +0100
Subject: [PATCH] [api] Use $OBS_API_PREFIX instead of explicit pathname for
installing.
This allows installing OBS API correctly when OBS_API_PREFIX variable
defined in Makefile.include has value different than "/srv/www/obs/api".
Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
src/api/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/api/Makefile b/src/api/Makefile
index c404a5eae6..5adcc1b577 100644
--- a/src/api/Makefile
+++ b/src/api/Makefile
@@ -48,10 +48,10 @@ log_files:
$(foreach logfile,$(OBS_API_LOGS),$(shell touch $(DESTDIR)$(OBS_API_PREFIX)/log/$(logfile) ))
build: config
- $(shell [ -d $(DESTDIR)/srv/www/obs/api/.bundle ] && rm -rf $(DESTDIR)/srv/www/obs/api/.bundle)
+ $(shell [ -d $(DESTDIR)$(OBS_API_PREFIX)/.bundle ] && rm -rf $(DESTDIR)$(OBS_API_PREFIX)/.bundle)
# we need to have *something* as secret key
- echo "" | sha256sum| cut -d\ -f 1 > $(DESTDIR)/srv/www/obs/api/config/secret.key
- cd $(DESTDIR)/srv/www/obs/api ;\
+ echo "" | sha256sum| cut -d\ -f 1 > $(DESTDIR)$(OBS_API_PREFIX)/config/secret.key
+ cd $(DESTDIR)$(OBS_API_PREFIX) ;\
bundle.ruby2.5 exec rake.ruby2.5 assets:precompile RAILS_ENV=production RAILS_GROUPS=assets || exit 1 ;\
rm -rf tmp/cache/sass tmp/cache/assets config/secret.key ;\
bundle.ruby2.5 config --local frozen 1 || exit 1 ;\
--
2.20.1