update to 13.17.0 [release 13.17.0-1mamba;Sun Mar 28 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 23:04:49 +01:00
parent 17148b98be
commit 2a763a9834
4 changed files with 138 additions and 52 deletions

View File

@ -1,31 +0,0 @@
--- gitlab-shell-1.9.5/config.yml.example.orig 2014-06-02 04:45:01.891389227 +0200
+++ gitlab-shell-1.9.5/config.yml.example 2014-06-02 04:44:18.214779888 +0200
@@ -1,5 +1,5 @@
# GitLab user. git by default
-user: git
+user: gitlab
# Url to gitlab instance. Used for api calls. Should end with a slash.
gitlab_url: "http://localhost/"
@@ -15,10 +15,10 @@
# Give the canonicalized absolute pathname,
# REPOS_PATH MUST NOT CONTAIN ANY SYMLINK!!!
# Check twice that none of the components is a symlink, including "/home".
-repos_path: "/home/git/repositories"
+repos_path: "/var/lib/gitlab/repositories"
# File used as authorized_keys for gitlab user
-auth_file: "/home/git/.ssh/authorized_keys"
+auth_file: "/var/lib/gitlab/.ssh/authorized_keys"
# Redis settings used for pushing commit notices to gitlab
redis:
@@ -30,7 +30,7 @@
# Log file.
# Default is gitlab-shell.log in the root directory.
-# log_file: "/home/git/gitlab-shell/gitlab-shell.log"
+log_file: "/var/lib/gitlab/log/gitlab-shell.log"
# Log level. INFO by default
log_level: INFO

View File

@ -0,0 +1,65 @@
commit 91264d5a92bbc464f77fac14e3076e7264cf6513
Author: Anatol Pomozov <anatol.pomozov@gmail.com>
Date: Tue May 26 00:39:46 2020 -0700
Patch config files with Arch Linux specific locations
Arch uses upstream's default config files as a base for its configs.
But directory structure at Arch is completely different from the default
one specified by gitlab project.
We used to have a lot of seds expressions to adjust the files but as
complexity of configs grew 'sed' makes it easy to miss a changed/added
option.
Track set of diffs as a patch. If upstream modifies config file then it
will cause a conflict that needs to be reviewed manually.
diff --git a/config.yml.example b/config.yml.example
index 645cb88..b99e965 100644
--- a/config.yml.example
+++ b/config.yml.example
@@ -4,7 +4,7 @@
#
# GitLab user. git by default
-user: git
+user: gitlab
# URL to GitLab instance, used for API calls. Default: http://localhost:8080.
# For relative URL support read http://doc.gitlab.com/ce/install/relative_url.html
@@ -13,7 +13,7 @@ user: git
# only listen on a Unix domain socket. For Unix domain sockets use
# "http+unix://<urlquoted-path-to-socket>", e.g.
# "http+unix://%2Fpath%2Fto%2Fsocket"
-gitlab_url: "http+unix://%2Fhome%2Fgit%2Fgitlab%2Ftmp%2Fsockets%2Fgitlab-workhorse.socket"
+gitlab_url: "http+unix://%2Frun%2Fgitlab%2Fgitlab-workhorse.socket"
# When a http+unix:// is used in gitlab_url, this is the relative URL root to GitLab.
# Not used if gitlab_url is http:// or https://.
@@ -29,7 +29,7 @@ http_settings:
self_signed_cert: false
# File used as authorized_keys for gitlab user
-auth_file: "/home/git/.ssh/authorized_keys"
+auth_file: "/var/lib/gitlab/.ssh/authorized_keys"
# SSL certificate dir where custom certificates can be placed
# https://golang.org/pkg/crypto/x509/
@@ -37,7 +37,7 @@ auth_file: "/home/git/.ssh/authorized_keys"
# File that contains the secret key for verifying access to GitLab.
# Default is .gitlab_shell_secret in the gitlab-shell directory.
-# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
+secret_file: "/var/lib/gitlab/gitlab-shell/.gitlab_shell_secret"
#
# The secret field supersedes the secret_file, and if set that
# file will not be read.
@@ -45,7 +45,7 @@ auth_file: "/home/git/.ssh/authorized_keys"
# Log file.
# Default is gitlab-shell.log in the root directory.
-# log_file: "/home/git/gitlab-shell/gitlab-shell.log"
+log_file: "/var/log/gitlab/gitlab-shell.log"
# Log level. INFO by default
log_level: INFO

12
gitlab-shell.gitconfig Normal file
View File

@ -0,0 +1,12 @@
[user]
name = GitLab
email = gitlab@localhost
[core]
autocrlf = input
fsyncObjectFiles = true
[receive]
advertisePushOptions = true
[gc]
auto = 0
[repack]
writeBitmaps = true

View File

@ -3,7 +3,7 @@
%define homedir %{_localstatedir}/lib/gitlab %define homedir %{_localstatedir}/lib/gitlab
Name: gitlab-shell Name: gitlab-shell
Version: 1.9.5 Version: 13.17.0
Release: 1mamba Release: 1mamba
Summary: GitLab ssh access and repository management Summary: GitLab ssh access and repository management
Group: Applications/Development Group: Applications/Development
@ -11,40 +11,65 @@ Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/gitlabhq/gitlab-shell URL: https://github.com/gitlabhq/gitlab-shell
## GITSOURCE https://github.com/gitlabhq/gitlab-shell.git v1.7.0 Source: https://gitlab.com/gitlab-org/gitlab-shell/-/archive/v%{version}/gitlab-shell-v%{version}.tar.gz
Source: https://github.com/gitlabhq/gitlab-shell.git/v%{version}/gitlab-shell-%{version}.tar.bz2 Source1: gitlab-shell.gitconfig
Patch0: gitlab-shell-1.9.5-config.yml.patch Patch0: gitlab-shell-configs.patch
License: MIT License: MIT
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
Requires: ruby-bundler BuildRequires: go
Requires: redis Requires: git
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %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. 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.
%debug_package
%prep %prep
%setup -q %setup -q -n gitlab-shell-v%{version}
#-D -T
#:<< _EOF
%patch0 -p1 %patch0 -p1
%build %build
mv config.yml.example config.yml #:<< _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
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d -m0755 %{buildroot}%{homedir}/{.ssh,satellites}
install -d -m0755 %{buildroot}%{_localstatedir}/log/gitlab
install -d -m0755 %{buildroot}%{_datadir}/gitlab-shell install -d -m0755 %{buildroot}%{_datadir}/gitlab-shell
cp -a * %{buildroot}%{_datadir}/gitlab-shell
install -d -m0700 %{buildroot}%{homedir}/.ssh # .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}/
# Compatibility for FS#64251
ln -s gitlab-shell %{buildroot}%{_datadir}/gitlab-shell/bin/gitlab-shell-ruby
install -d -m770 %{buildroot}%{homedir}/repositories
touch %{buildroot}%{homedir}/.ssh/authorized_keys touch %{buildroot}%{homedir}/.ssh/authorized_keys
install -d -m0770 %{buildroot}%{homedir}/repositories
install -d -m0755 %{buildroot}%{_sysconfdir}/gitlab
mv %{buildroot}%{_datadir}/gitlab-shell/config.yml %{buildroot}%{_sysconfdir}/gitlab/gitlab-shell-config.yml
ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml %{buildroot}%{_datadir}/gitlab-shell/config.yml
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -52,27 +77,42 @@ ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml %{buildroot}%{_datadir}/git
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
/usr/sbin/groupadd gitlab -g %{gitlab_gid} 2>/dev/null /usr/sbin/groupadd gitlab -g %{gitlab_gid} 2>/dev/null
/usr/sbin/useradd -u %{gitlab_uid} -c 'Gitlab user' -d %{homedir} -g gitlab \ /usr/sbin/useradd -u %{gitlab_uid} -c 'Gitlab user' -d %{homedir} -g gitlab \
-s /bin/false gitlab 2>/dev/null -s %{_datadir}/gitlab-shell/bin/gitlab-shell gitlab 2>/dev/null
fi fi
: :
%post %post
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
echo "INFO: after installing gitlab run:" echo "Configure gitlab-shell in /etc/gitlab/gitlab-shell-config.yml"
echo " sudo -u gitlab -H bundle exec rake gitlab:shell:setup RAILS_ENV=production" 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"
fi fi
: :
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/gitlab-shell
%config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-config.yml %config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
%config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-secret
%config(noreplace) %{_sysconfdir}/gitlab/gitconfig
%dir %{_datadir}/gitlab-shell
%{_datadir}/gitlab-shell/* %{_datadir}/gitlab-shell/*
%{_datadir}/gitlab-shell/.gitlab_shell_secret
%dir %attr(0750,gitlab,gitlab) %{homedir}
%dir %attr(0700,gitlab,gitlab) %{homedir}/.ssh %dir %attr(0700,gitlab,gitlab) %{homedir}/.ssh
%config(noreplace) %attr(0600,gitlab,gitlab) %{homedir}/.ssh/authorized_keys %config(noreplace) %attr(0600,gitlab,gitlab) %{homedir}/.ssh/authorized_keys
%dir %attr(0750,gitlab,gitlab) %{homedir}/satellites
%dir %attr(2770,gitlab,gitlab) %{homedir}/repositories %dir %attr(2770,gitlab,gitlab) %{homedir}/repositories
%{homedir}/.gitconfig
%{homedir}/gitlab-shell
%attr(0770,gitlab,root) %dir %{_localstatedir}/log/gitlab
%doc LICENSE %doc LICENSE
%changelog %changelog
* Sun Mar 28 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 13.17.0-1mamba
- update to 13.17.0
* Mon Jun 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.5-1mamba * Mon Jun 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.5-1mamba
- package created using the webbuild interface - package created using the webbuild interface