]> git.pld-linux.org Git - packages/gitlab-shell.git/blob - gitlab-shell.spec
84b416de2d3b122c2ff7652a14a20f0422634dfe
[packages/gitlab-shell.git] / gitlab-shell.spec
1 Summary:        GitLab ssh access and repository management
2 Name:           gitlab-shell
3 Version:        3.6.0
4 Release:        1
5 License:        MIT
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
17 Requires:       rsync
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
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
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
31 %setup -qc
32 mv %{name}-*/* .
33 cp -p config.yml.example config.yml
34 %patch0 -p1
35 %patch1 -p1
36
37 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* hooks/*
38
39 mv lib/vendor .
40
41 # deprecated
42 rm support/rewrite-hooks.sh
43 # stupid script, rather not package it at all
44 rm support/truncate_repositories.sh*
45
46 # cleanup backups after patching
47 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
48
49 %install
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}
53
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
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
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post
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
76
77 %files
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/*
This page took 0.062423 seconds and 2 git commands to generate.