[packages/gitlab-shell] package shell secret symlink

glen glen at pld-linux.org
Sun Apr 17 14:34:24 CEST 2016


commit f9ba6ab04624b9f23bca5702b3f02eb8b75e670c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Apr 17 15:26:11 2016 +0300

    package shell secret symlink
    
    gitlab rake will attempt to do that itself,
    but fails as dir is root owned

 gitlab-shell.spec | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/gitlab-shell.spec b/gitlab-shell.spec
index e8cbe5a..4da04e5 100644
--- a/gitlab-shell.spec
+++ b/gitlab-shell.spec
@@ -1,15 +1,16 @@
 Summary:	GitLab ssh access and repository management
 Name:		gitlab-shell
 Version:	2.6.12
-Release:	0.5
+Release:	0.6
 License:	MIT
 Group:		Applications/Shells
 Source0:	https://github.com/gitlabhq/gitlab-shell/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	730c60e3d3d14d0f0ce0e82ff3a88a23
-URL:		https://github.com/gitlabhq/gitlab-shell
 Patch0:		config.yml.patch
+URL:		https://github.com/gitlabhq/gitlab-shell
+BuildRequires:	rpm-rubyprov
+BuildRequires:	rpmbuild(macros) >= 1.665
 Suggests:	redis
-#Requires:	ruby-bundler
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -49,6 +50,11 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/gitlab
 mv $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/gitlab-shell-config.yml
 ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml
 
+# it will attempt to symlink if it doesn't exist
+# /var/lib/gitlab/config/initializers/gitlab_shell_secret_token.rb +18
+touch $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/.gitlab_shell_secret
+ln -s %{_sysconfdir}/gitlab/.gitlab_shell_secret $RPM_BUILD_ROOT%{_datadir}/%{name}/.gitlab_shell_secret
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -68,11 +74,13 @@ fi
 %defattr(644,root,root,755)
 %doc LICENSE
 %dir %{_sysconfdir}/gitlab
-%config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/.gitlab_shell_secret
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/lib
 %dir %{_datadir}/%{name}/bin
 %attr(755,root,root) %{_datadir}/%{name}/bin/*
+%{_datadir}/%{name}/.gitlab_shell_secret
 %{_datadir}/%{name}/[A-Z]*
 %{_datadir}/%{name}/config.yml
 %dir %{_datadir}/%{name}/hooks
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitlab-shell.git/commitdiff/47ac5429df27e9c24c8103f2e0f9e05d25c26215



More information about the pld-cvs-commit mailing list