]>
Commit | Line | Data |
---|---|---|
26413cd7 ER |
1 | Summary: GitLab ssh access and repository management |
2 | Name: gitlab-shell | |
031c6d06 | 3 | Version: 5.9.4 |
8a8aa17c | 4 | Release: 1 |
26413cd7 ER |
5 | License: MIT |
6 | Group: Applications/Shells | |
42e67b07 | 7 | Source0: https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.bz2?ref=v%{version}&/%{name}-%{version}.tar.bz2 |
031c6d06 | 8 | # Source0-md5: bd383d50ee7299332f9e3ed6d900deb2 |
b532114f ER |
9 | Patch0: unvendor-redis.patch |
10 | Patch1: skip_hooks_setup.patch | |
11 | Patch2: config.yml.patch | |
7f95a39d | 12 | URL: https://gitlab.com/gitlab-org/gitlab-shell |
f9ba6ab0 ER |
13 | BuildRequires: rpm-rubyprov |
14 | BuildRequires: rpmbuild(macros) >= 1.665 | |
075858cd | 15 | BuildRequires: sed >= 4.0 |
b418b507 | 16 | Requires: git-core >= 2.7.3 |
4ae12a1a | 17 | Requires: gitlab-common >= 8.12 |
4ba6f8b0 | 18 | Requires: rsync |
47ac5429 | 19 | Requires: ruby >= 1:2.0 |
df52cff8 | 20 | Requires: ruby-redis >= 3.3.0 |
16fbd2d0 | 21 | Suggests: redis-server |
4ae12a1a | 22 | Conflicts: gitlab-ce < 8.7.5-0.17 |
aa3dd4a4 | 23 | BuildArch: noarch |
26413cd7 ER |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26413cd7 ER |
26 | %description |
27 | GitLab Shell is an application that allows you to execute git commands | |
28 | and provide ssh access to git repositories. It is not a Unix shell nor | |
29 | a replacement for Bash or Zsh. | |
30 | ||
31 | %prep | |
5d597017 ER |
32 | %setup -qc |
33 | mv %{name}-*/* . | |
26413cd7 | 34 | %patch0 -p1 |
485fccd3 | 35 | %patch1 -p1 |
b532114f ER |
36 | cp -p config.yml.example config.yml |
37 | %patch2 -p1 | |
26413cd7 | 38 | |
075858cd ER |
39 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* hooks/* |
40 | ||
485fccd3 ER |
41 | mv lib/vendor . |
42 | ||
2cc33408 ER |
43 | # add hook dirs |
44 | # https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/93 | |
45 | install -d hooks/{post-receive,pre-receive,update}.d | |
46 | ||
edb0101d ER |
47 | # deprecated |
48 | rm support/rewrite-hooks.sh | |
49 | # stupid script, rather not package it at all | |
50 | rm support/truncate_repositories.sh* | |
26413cd7 | 51 | |
26e883d6 ER |
52 | # cleanup backups after patching |
53 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
54 | ||
26413cd7 ER |
55 | %install |
56 | rm -rf $RPM_BUILD_ROOT | |
26e883d6 | 57 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name} |
8a08257b | 58 | cp -a VERSION *.yml bin lib hooks support $RPM_BUILD_ROOT%{_datadir}/%{name} |
26413cd7 | 59 | |
26413cd7 ER |
60 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/gitlab |
61 | mv $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/gitlab-shell-config.yml | |
62 | ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml | |
63 | ||
f9ba6ab0 ER |
64 | # it will attempt to symlink if it doesn't exist |
65 | # /var/lib/gitlab/config/initializers/gitlab_shell_secret_token.rb +18 | |
66 | touch $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/.gitlab_shell_secret | |
67 | ln -s %{_sysconfdir}/gitlab/.gitlab_shell_secret $RPM_BUILD_ROOT%{_datadir}/%{name}/.gitlab_shell_secret | |
68 | ||
26413cd7 ER |
69 | %clean |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
26413cd7 | 72 | %post |
fff2cd7a ER |
73 | %banner -o -e %{name} <<EOF |
74 | ||
75 | To rebuild authorized_keys file, run: | |
76 | ||
77 | # gitlab-rake gitlab:shell:setup | |
78 | ||
79 | http://docs.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file | |
80 | ||
81 | EOF | |
26413cd7 ER |
82 | |
83 | %files | |
84 | %defattr(644,root,root,755) | |
8a08257b | 85 | %doc README.md CHANGELOG LICENSE |
f9ba6ab0 | 86 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/gitlab-shell-config.yml |
4ae12a1a | 87 | %attr(640,git,git) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/.gitlab_shell_secret |
26e883d6 ER |
88 | %dir %{_datadir}/%{name} |
89 | %{_datadir}/%{name}/lib | |
90 | %dir %{_datadir}/%{name}/bin | |
91 | %attr(755,root,root) %{_datadir}/%{name}/bin/* | |
f9ba6ab0 | 92 | %{_datadir}/%{name}/.gitlab_shell_secret |
26e883d6 | 93 | %{_datadir}/%{name}/config.yml |
8a08257b | 94 | %{_datadir}/%{name}/VERSION |
2cc33408 | 95 | |
26e883d6 | 96 | %dir %{_datadir}/%{name}/hooks |
2cc33408 ER |
97 | %dir %{_datadir}/%{name}/hooks/post-receive.d |
98 | %dir %{_datadir}/%{name}/hooks/pre-receive.d | |
99 | %dir %{_datadir}/%{name}/hooks/update.d | |
100 | %attr(755,root,root) %{_datadir}/%{name}/hooks/post-receive | |
101 | %attr(755,root,root) %{_datadir}/%{name}/hooks/pre-receive | |
102 | %attr(755,root,root) %{_datadir}/%{name}/hooks/update |