2024-01-05 23:04:48 +01:00
|
|
|
%define gitlab_uid 65434
|
|
|
|
%define gitlab_gid 65434
|
|
|
|
%define homedir %{_localstatedir}/lib/gitlab
|
|
|
|
|
|
|
|
Name: gitlab-shell
|
2024-01-05 23:04:50 +01:00
|
|
|
Version: 14.10.0
|
2024-01-05 23:04:48 +01:00
|
|
|
Release: 1mamba
|
|
|
|
Summary: GitLab ssh access and repository management
|
|
|
|
Group: Applications/Development
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://github.com/gitlabhq/gitlab-shell
|
2024-01-05 23:04:49 +01:00
|
|
|
Source: https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v%{version}/gitlab-shell-v%{version}.tar.gz
|
|
|
|
Source1: gitlab-shell.gitconfig
|
|
|
|
Patch0: gitlab-shell-configs.patch
|
2024-01-05 23:04:48 +01:00
|
|
|
License: MIT
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
2024-01-05 23:04:49 +01:00
|
|
|
BuildRequires: glibc-devel
|
2024-01-05 23:04:48 +01:00
|
|
|
## AUTOBUILDREQ-END
|
2024-01-05 23:04:49 +01:00
|
|
|
BuildRequires: go
|
|
|
|
Requires: git
|
2024-01-05 23:04:48 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
GitLab Shell is an application that allows you to execute git commands and provide ssh access to git repositories. It is not a unix shell nor a replacement for Bash or Zsh.
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
%debug_package
|
|
|
|
|
2024-01-05 23:04:48 +01:00
|
|
|
%prep
|
2024-01-05 23:04:49 +01:00
|
|
|
%setup -q -n gitlab-shell-v%{version}
|
|
|
|
#-D -T
|
|
|
|
#:<< _EOF
|
2024-01-05 23:04:48 +01:00
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
%build
|
2024-01-05 23:04:49 +01:00
|
|
|
#:<< _EOF
|
|
|
|
export CGO_CPPFLAGS="%{optflags}"
|
|
|
|
export CGO_CFLAGS="%{optflags}"
|
|
|
|
export CGO_CXXFLAGS="%{optflags}"
|
|
|
|
#export CGO_LDFLAGS="${LDFLAGS}"
|
|
|
|
#export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
|
|
|
make build
|
2024-01-05 23:04:48 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-05 23:04:49 +01:00
|
|
|
|
|
|
|
install -d -m0755 %{buildroot}%{homedir}/{.ssh,satellites}
|
|
|
|
install -d -m0755 %{buildroot}%{_localstatedir}/log/gitlab
|
2024-01-05 23:04:48 +01:00
|
|
|
install -d -m0755 %{buildroot}%{_datadir}/gitlab-shell
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
# .gitconfig
|
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/gitlab/gitconfig
|
|
|
|
ln -fs %{_sysconfdir}/gitlab/gitconfig %{buildroot}%{homedir}/.gitconfig
|
|
|
|
|
|
|
|
# .gitlab_shell_secret
|
|
|
|
touch %{buildroot}%{_sysconfdir}/gitlab/gitlab-shell-secret
|
|
|
|
ln -fs %{_sysconfdir}/gitlab/gitlab-shell-secret %{buildroot}%{_datadir}/gitlab-shell/.gitlab_shell_secret
|
|
|
|
|
|
|
|
# config.yml
|
|
|
|
install -Dm644 config.yml.example %{buildroot}%{_sysconfdir}/gitlab/gitlab-shell-config.yml
|
|
|
|
ln -fs %{_sysconfdir}/gitlab/gitlab-shell-config.yml %{buildroot}%{_datadir}/gitlab-shell/config.yml
|
|
|
|
|
|
|
|
cp -r VERSION bin spec support %{buildroot}%{_datadir}/gitlab-shell/
|
|
|
|
ln -fs %{_datadir}/gitlab-shell %{buildroot}%{homedir}/
|
2024-01-05 23:04:48 +01:00
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
# Compatibility for FS#64251
|
|
|
|
ln -s gitlab-shell %{buildroot}%{_datadir}/gitlab-shell/bin/gitlab-shell-ruby
|
2024-01-05 23:04:48 +01:00
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
install -d -m770 %{buildroot}%{homedir}/repositories
|
|
|
|
|
|
|
|
touch %{buildroot}%{homedir}/.ssh/authorized_keys
|
2024-01-05 23:04:48 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%pre
|
|
|
|
if [ $1 -ge 1 ]; then
|
|
|
|
/usr/sbin/groupadd gitlab -g %{gitlab_gid} 2>/dev/null
|
|
|
|
/usr/sbin/useradd -u %{gitlab_uid} -c 'Gitlab user' -d %{homedir} -g gitlab \
|
2024-01-05 23:04:49 +01:00
|
|
|
-s %{_datadir}/gitlab-shell/bin/gitlab-shell gitlab 2>/dev/null
|
2024-01-05 23:04:48 +01:00
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
|
|
|
%post
|
|
|
|
if [ $1 -eq 1 ]; then
|
2024-01-05 23:04:49 +01:00
|
|
|
echo "Configure gitlab-shell in /etc/gitlab/gitlab-shell-config.yml"
|
|
|
|
echo "Put a secret bytestring to /etc/gitlab/gitlab-shell-secret"
|
|
|
|
fi
|
|
|
|
if [ $1 -gt 1 ]; then
|
|
|
|
echo "If you have previously installed gitlab-shell and now git pull fails on a repo, try changing the shell:"
|
|
|
|
echo "usermod -s /usr/share/gitlab-shell/bin/gitlab-shell gitlab"
|
2024-01-05 23:04:48 +01:00
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
|
2024-01-05 23:04:49 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-secret
|
|
|
|
%config(noreplace) %{_sysconfdir}/gitlab/gitconfig
|
|
|
|
%dir %{_datadir}/gitlab-shell
|
2024-01-05 23:04:48 +01:00
|
|
|
%{_datadir}/gitlab-shell/*
|
2024-01-05 23:04:49 +01:00
|
|
|
%{_datadir}/gitlab-shell/.gitlab_shell_secret
|
|
|
|
%dir %attr(0750,gitlab,gitlab) %{homedir}
|
2024-01-05 23:04:48 +01:00
|
|
|
%dir %attr(0700,gitlab,gitlab) %{homedir}/.ssh
|
|
|
|
%config(noreplace) %attr(0600,gitlab,gitlab) %{homedir}/.ssh/authorized_keys
|
2024-01-05 23:04:49 +01:00
|
|
|
%dir %attr(0750,gitlab,gitlab) %{homedir}/satellites
|
2024-01-05 23:04:48 +01:00
|
|
|
%dir %attr(2770,gitlab,gitlab) %{homedir}/repositories
|
2024-01-05 23:04:49 +01:00
|
|
|
%{homedir}/.gitconfig
|
|
|
|
%{homedir}/gitlab-shell
|
|
|
|
%attr(0770,gitlab,root) %dir %{_localstatedir}/log/gitlab
|
2024-01-05 23:04:48 +01:00
|
|
|
%doc LICENSE
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 23:04:50 +01:00
|
|
|
* Sat Jul 23 2022 Automatic Build System <autodist@mambasoft.it> 14.10.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:50 +01:00
|
|
|
* Wed Jun 22 2022 Automatic Build System <autodist@mambasoft.it> 14.7.4-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:50 +01:00
|
|
|
* Thu Jun 09 2022 Automatic Build System <autodist@mambasoft.it> 14.7.3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:50 +01:00
|
|
|
* Thu Jun 02 2022 Automatic Build System <autodist@mambasoft.it> 14.7.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:50 +01:00
|
|
|
* Thu May 26 2022 Automatic Build System <autodist@mambasoft.it> 14.3.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:50 +01:00
|
|
|
* Sat Apr 23 2022 Automatic Build System <autodist@mambasoft.it> 13.25.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:50 +01:00
|
|
|
* Tue Apr 19 2022 Automatic Build System <autodist@mambasoft.it> 13.25.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Sat Apr 02 2022 Automatic Build System <autodist@mambasoft.it> 13.24.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Tue Mar 29 2022 Automatic Build System <autodist@mambasoft.it> 13.24.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Wed Mar 09 2022 Automatic Build System <autodist@mambasoft.it> 13.24.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Wed Mar 02 2022 Automatic Build System <autodist@mambasoft.it> 13.23.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Wed Jan 26 2022 Automatic Build System <autodist@mambasoft.it> 13.22.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Sat Dec 04 2021 Automatic Build System <autodist@mambasoft.it> 13.22.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Wed Nov 24 2021 Automatic Build System <autodist@mambasoft.it> 13.22.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Mon Sep 27 2021 Automatic Build System <autodist@mambasoft.it> 13.21.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Fri Sep 24 2021 Automatic Build System <autodist@mambasoft.it> 13.21.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Tue Jul 27 2021 Automatic Build System <autodist@mambasoft.it> 13.20.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Tue Jun 22 2021 Automatic Build System <autodist@mambasoft.it> 13.19.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Tue May 11 2021 Automatic Build System <autodist@mambasoft.it> 13.18.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 23:04:49 +01:00
|
|
|
* Sun Mar 28 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 13.17.0-1mamba
|
|
|
|
- update to 13.17.0
|
|
|
|
|
2024-01-05 23:04:48 +01:00
|
|
|
* Mon Jun 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.5-1mamba
|
|
|
|
- package created using the webbuild interface
|