[packages/gitlab-ce] add function to move configs

glen glen at pld-linux.org
Sat Apr 23 12:02:44 CEST 2016


commit fb518a6fb49fa4c95ffbde8790938b088269a779
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Apr 23 13:02:28 2016 +0300

    add function to move configs

 gitlab-ce.spec | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/gitlab-ce.spec b/gitlab-ce.spec
index 487c081..327a401 100644
--- a/gitlab-ce.spec
+++ b/gitlab-ce.spec
@@ -17,7 +17,7 @@
 Summary:	A Web interface to create projects and repositories, manage access and do code reviews
 Name:		gitlab-ce
 Version:	8.6.7
-Release:	0.6
+Release:	0.8
 License:	MIT
 Group:		Applications/WWW
 # md5 deliberately omitted until this package is useful
@@ -125,6 +125,9 @@ fi
 
 cp -a$l . $RPM_BUILD_ROOT%{homedir}
 
+# rpm cruft from repackaging
+rm -f $RPM_BUILD_ROOT%{homedir}/debug*.list
+
 # nuke tests
 chmod -R u+w $RPM_BUILD_ROOT%{homedir}/vendor/bundle/ruby/gems/*/test
 rm -r $RPM_BUILD_ROOT%{homedir}/vendor/bundle/ruby/gems/*/test
@@ -136,11 +139,15 @@ rmdir $RPM_BUILD_ROOT%{homedir}/log
 ln -fs %{_localstatedir}/log/gitlab $RPM_BUILD_ROOT%{homedir}/log
 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/gitlab
 
+move_config() {
+	local source=$1 target=$2
+	mv $RPM_BUILD_ROOT$source $RPM_BUILD_ROOT$target
+	ln -s $target $RPM_BUILD_ROOT$source
+}
+
 # Install config files
 for f in gitlab.yml unicorn.rb database.yml; do
-	cp -p config/$f $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/$f
-	[ -f "$RPM_BUILD_ROOT%{homedir}/config/$f" ] && rm $RPM_BUILD_ROOT%{homedir}/config/$f
-	ln -fs %{_sysconfdir}/gitlab/$f $RPM_BUILD_ROOT%{homedir}/config/
+	move_config %{homedir}/config/$f %{_sysconfdir}/gitlab/$f
 done
 
 install -d $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}} \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ce.git/commitdiff/fb518a6fb49fa4c95ffbde8790938b088269a779



More information about the pld-cvs-commit mailing list