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