]>
Commit | Line | Data |
---|---|---|
26413cd7 ER |
1 | Summary: GitLab ssh access and repository management |
2 | Name: gitlab-shell | |
990c70c1 | 3 | Version: 3.6.6 |
8a8aa17c | 4 | Release: 1 |
26413cd7 ER |
5 | License: MIT |
6 | Group: Applications/Shells | |
5d597017 | 7 | Source0: https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz |
990c70c1 | 8 | # Source0-md5: 94fd70cb6fd38c8fd7cd9c4ccc371d7e |
26413cd7 | 9 | Patch0: config.yml.patch |
485fccd3 | 10 | Patch1: unvendor-redis.patch |
7f95a39d | 11 | URL: https://gitlab.com/gitlab-org/gitlab-shell |
f9ba6ab0 ER |
12 | BuildRequires: rpm-rubyprov |
13 | BuildRequires: rpmbuild(macros) >= 1.665 | |
075858cd | 14 | BuildRequires: sed >= 4.0 |
b418b507 | 15 | Requires: git-core >= 2.7.3 |
4ae12a1a | 16 | Requires: gitlab-common >= 8.12 |
4ba6f8b0 | 17 | Requires: rsync |
47ac5429 | 18 | Requires: ruby >= 1:2.0 |
df52cff8 | 19 | Requires: ruby-redis >= 3.3.0 |
16fbd2d0 | 20 | Suggests: redis-server |
4ae12a1a | 21 | Conflicts: gitlab-ce < 8.7.5-0.17 |
aa3dd4a4 | 22 | BuildArch: noarch |
26413cd7 ER |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
26413cd7 ER |
25 | %description |
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. | |
29 | ||
30 | %prep | |
5d597017 ER |
31 | %setup -qc |
32 | mv %{name}-*/* . | |
edb0101d | 33 | cp -p config.yml.example config.yml |
26413cd7 | 34 | %patch0 -p1 |
485fccd3 | 35 | %patch1 -p1 |
26413cd7 | 36 | |
075858cd ER |
37 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* hooks/* |
38 | ||
485fccd3 ER |
39 | mv lib/vendor . |
40 | ||
edb0101d ER |
41 | # deprecated |
42 | rm support/rewrite-hooks.sh | |
43 | # stupid script, rather not package it at all | |
44 | rm support/truncate_repositories.sh* | |
26413cd7 | 45 | |
26e883d6 ER |
46 | # cleanup backups after patching |
47 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
48 | ||
26413cd7 ER |
49 | %install |
50 | rm -rf $RPM_BUILD_ROOT | |
26e883d6 | 51 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name} |
8a08257b | 52 | cp -a VERSION *.yml bin lib hooks support $RPM_BUILD_ROOT%{_datadir}/%{name} |
26413cd7 | 53 | |
26413cd7 ER |
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 | |
57 | ||
f9ba6ab0 ER |
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 | |
62 | ||
26413cd7 ER |
63 | %clean |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
26413cd7 | 66 | %post |
fff2cd7a ER |
67 | %banner -o -e %{name} <<EOF |
68 | ||
69 | To rebuild authorized_keys file, run: | |
70 | ||
71 | # gitlab-rake gitlab:shell:setup | |
72 | ||
73 | http://docs.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file | |
74 | ||
75 | EOF | |
26413cd7 ER |
76 | |
77 | %files | |
78 | %defattr(644,root,root,755) | |
8a08257b | 79 | %doc README.md CHANGELOG LICENSE |
f9ba6ab0 | 80 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/gitlab-shell-config.yml |
4ae12a1a | 81 | %attr(640,git,git) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/.gitlab_shell_secret |
26e883d6 ER |
82 | %dir %{_datadir}/%{name} |
83 | %{_datadir}/%{name}/lib | |
84 | %dir %{_datadir}/%{name}/bin | |
85 | %attr(755,root,root) %{_datadir}/%{name}/bin/* | |
f9ba6ab0 | 86 | %{_datadir}/%{name}/.gitlab_shell_secret |
26e883d6 | 87 | %{_datadir}/%{name}/config.yml |
8a08257b | 88 | %{_datadir}/%{name}/VERSION |
26e883d6 ER |
89 | %dir %{_datadir}/%{name}/hooks |
90 | %attr(755,root,root) %{_datadir}/%{name}/hooks/* |