]> git.pld-linux.org Git - packages/gitlab-shell.git/blame - gitlab-shell.spec
up to 5.9.4
[packages/gitlab-shell.git] / gitlab-shell.spec
CommitLineData
26413cd7
ER
1Summary: GitLab ssh access and repository management
2Name: gitlab-shell
031c6d06 3Version: 5.9.4
8a8aa17c 4Release: 1
26413cd7
ER
5License: MIT
6Group: Applications/Shells
42e67b07 7Source0: 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
9Patch0: unvendor-redis.patch
10Patch1: skip_hooks_setup.patch
11Patch2: config.yml.patch
7f95a39d 12URL: https://gitlab.com/gitlab-org/gitlab-shell
f9ba6ab0
ER
13BuildRequires: rpm-rubyprov
14BuildRequires: rpmbuild(macros) >= 1.665
075858cd 15BuildRequires: sed >= 4.0
b418b507 16Requires: git-core >= 2.7.3
4ae12a1a 17Requires: gitlab-common >= 8.12
4ba6f8b0 18Requires: rsync
47ac5429 19Requires: ruby >= 1:2.0
df52cff8 20Requires: ruby-redis >= 3.3.0
16fbd2d0 21Suggests: redis-server
4ae12a1a 22Conflicts: gitlab-ce < 8.7.5-0.17
aa3dd4a4 23BuildArch: noarch
26413cd7
ER
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26413cd7
ER
26%description
27GitLab Shell is an application that allows you to execute git commands
28and provide ssh access to git repositories. It is not a Unix shell nor
29a replacement for Bash or Zsh.
30
31%prep
5d597017
ER
32%setup -qc
33mv %{name}-*/* .
26413cd7 34%patch0 -p1
485fccd3 35%patch1 -p1
b532114f
ER
36cp -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
41mv lib/vendor .
42
2cc33408
ER
43# add hook dirs
44# https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/93
45install -d hooks/{post-receive,pre-receive,update}.d
46
edb0101d
ER
47# deprecated
48rm support/rewrite-hooks.sh
49# stupid script, rather not package it at all
50rm support/truncate_repositories.sh*
26413cd7 51
26e883d6
ER
52# cleanup backups after patching
53find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
54
26413cd7
ER
55%install
56rm -rf $RPM_BUILD_ROOT
26e883d6 57install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
8a08257b 58cp -a VERSION *.yml bin lib hooks support $RPM_BUILD_ROOT%{_datadir}/%{name}
26413cd7 59
26413cd7
ER
60install -d $RPM_BUILD_ROOT%{_sysconfdir}/gitlab
61mv $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/gitlab-shell-config.yml
62ln -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
66touch $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/.gitlab_shell_secret
67ln -s %{_sysconfdir}/gitlab/.gitlab_shell_secret $RPM_BUILD_ROOT%{_datadir}/%{name}/.gitlab_shell_secret
68
26413cd7
ER
69%clean
70rm -rf $RPM_BUILD_ROOT
71
26413cd7 72%post
fff2cd7a
ER
73%banner -o -e %{name} <<EOF
74
75To rebuild authorized_keys file, run:
76
77 # gitlab-rake gitlab:shell:setup
78
79http://docs.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file
80
81EOF
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
This page took 0.098841 seconds and 4 git commands to generate.