]> git.pld-linux.org Git - packages/gitlab-shell.git/blob - gitlab-shell.spec
patch to allow disabling hooks setup
[packages/gitlab-shell.git] / gitlab-shell.spec
1 Summary:        GitLab ssh access and repository management
2 Name:           gitlab-shell
3 Version:        4.0.0
4 Release:        1
5 License:        MIT
6 Group:          Applications/Shells
7 Source0:        https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.bz2?ref=v%{version}&/%{name}-%{version}.tar.bz2
8 # Source0-md5:  54a8a5374007277982dea2f9f07a99d1
9 Patch0:         unvendor-redis.patch
10 Patch1:         skip_hooks_setup.patch
11 Patch2:         config.yml.patch
12 URL:            https://gitlab.com/gitlab-org/gitlab-shell
13 BuildRequires:  rpm-rubyprov
14 BuildRequires:  rpmbuild(macros) >= 1.665
15 BuildRequires:  sed >= 4.0
16 Requires:       git-core >= 2.7.3
17 Requires:       gitlab-common >= 8.12
18 Requires:       rsync
19 Requires:       ruby >= 1:2.0
20 Requires:       ruby-redis >= 3.3.0
21 Suggests:       redis-server
22 Conflicts:      gitlab-ce < 8.7.5-0.17
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
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
32 %setup -qc
33 mv %{name}-*/* .
34 %patch0 -p1
35 %patch1 -p1
36 cp -p config.yml.example config.yml
37 %patch2 -p1
38
39 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* hooks/*
40
41 mv lib/vendor .
42
43 # deprecated
44 rm support/rewrite-hooks.sh
45 # stupid script, rather not package it at all
46 rm support/truncate_repositories.sh*
47
48 # cleanup backups after patching
49 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
54 cp -a VERSION *.yml bin lib hooks support $RPM_BUILD_ROOT%{_datadir}/%{name}
55
56 install -d $RPM_BUILD_ROOT%{_sysconfdir}/gitlab
57 mv $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/gitlab-shell-config.yml
58 ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml
59
60 # it will attempt to symlink if it doesn't exist
61 # /var/lib/gitlab/config/initializers/gitlab_shell_secret_token.rb +18
62 touch $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/.gitlab_shell_secret
63 ln -s %{_sysconfdir}/gitlab/.gitlab_shell_secret $RPM_BUILD_ROOT%{_datadir}/%{name}/.gitlab_shell_secret
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 %banner -o -e %{name} <<EOF
70
71 To rebuild authorized_keys file, run:
72
73   # gitlab-rake gitlab:shell:setup
74
75 http://docs.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file
76
77 EOF
78
79 %files
80 %defattr(644,root,root,755)
81 %doc README.md CHANGELOG LICENSE
82 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
83 %attr(640,git,git) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gitlab/.gitlab_shell_secret
84 %dir %{_datadir}/%{name}
85 %{_datadir}/%{name}/lib
86 %dir %{_datadir}/%{name}/bin
87 %attr(755,root,root) %{_datadir}/%{name}/bin/*
88 %{_datadir}/%{name}/.gitlab_shell_secret
89 %{_datadir}/%{name}/config.yml
90 %{_datadir}/%{name}/VERSION
91 %dir %{_datadir}/%{name}/hooks
92 %attr(755,root,root) %{_datadir}/%{name}/hooks/*
This page took 0.027921 seconds and 3 git commands to generate.