1 Summary: GitLab ssh access and repository management
6 Group: Applications/Shells
7 Source0: https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz
8 # Source0-md5: e863a2b6e978b5da886842822861e327
9 Patch0: config.yml.patch
10 Patch1: unvendor-redis.patch
11 URL: https://gitlab.com/gitlab-org/gitlab-shell
12 BuildRequires: rpm-rubyprov
13 BuildRequires: rpmbuild(macros) >= 1.665
14 BuildRequires: sed >= 4.0
15 Requires: git-core >= 2.7.3
16 Requires: gitlab-common >= 8.12
18 Requires: ruby >= 1:2.0
19 Requires: ruby-redis >= 3.3.0
20 Suggests: redis-server
21 Conflicts: gitlab-ce < 8.7.5-0.17
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 GitLab Shell is an application that allows you to execute git commands
27 and provide ssh access to git repositories. It is not a Unix shell nor
28 a replacement for Bash or Zsh.
33 cp -p config.yml.example config.yml
37 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* hooks/*
42 rm support/rewrite-hooks.sh
43 # stupid script, rather not package it at all
44 rm support/truncate_repositories.sh*
46 # cleanup backups after patching
47 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
52 cp -a VERSION *.yml bin lib hooks support $RPM_BUILD_ROOT%{_datadir}/%{name}
54 install -d $RPM_BUILD_ROOT%{_sysconfdir}/gitlab
55 mv $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/gitlab-shell-config.yml
56 ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml
58 # it will attempt to symlink if it doesn't exist
59 # /var/lib/gitlab/config/initializers/gitlab_shell_secret_token.rb +18
60 touch $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/.gitlab_shell_secret
61 ln -s %{_sysconfdir}/gitlab/.gitlab_shell_secret $RPM_BUILD_ROOT%{_datadir}/%{name}/.gitlab_shell_secret
64 rm -rf $RPM_BUILD_ROOT
67 %banner -o -e %{name} <<EOF
69 To rebuild authorized_keys file, run:
71 # gitlab-rake gitlab:shell:setup
73 http://docs.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file
78 %defattr(644,root,root,755)
79 %doc README.md CHANGELOG LICENSE
80 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
81 %attr(640,git,git) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/.gitlab_shell_secret
82 %dir %{_datadir}/%{name}
83 %{_datadir}/%{name}/lib
84 %dir %{_datadir}/%{name}/bin
85 %attr(755,root,root) %{_datadir}/%{name}/bin/*
86 %{_datadir}/%{name}/.gitlab_shell_secret
87 %{_datadir}/%{name}/config.yml
88 %{_datadir}/%{name}/VERSION
89 %dir %{_datadir}/%{name}/hooks
90 %attr(755,root,root) %{_datadir}/%{name}/hooks/*