[packages/gitlab-shell] new, version 1.9.5
glen
glen at pld-linux.org
Tue Feb 23 18:31:55 CET 2016
commit 26413cd7657cfbffeaccab98ac7414023a687ae7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Feb 23 19:30:52 2016 +0200
new, version 1.9.5
based on openmamba src.rpm
https://www.openmamba.org/pub/openmamba/devel/SRPMS.base/gitlab-shell-1.9.5-1mamba.src.rpm
config.yml.patch | 31 +++++++++++++++++++++++++
gitlab-shell.spec | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
---
diff --git a/gitlab-shell.spec b/gitlab-shell.spec
new file mode 100644
index 0000000..a77bfb5
--- /dev/null
+++ b/gitlab-shell.spec
@@ -0,0 +1,67 @@
+Summary: GitLab ssh access and repository management
+Name: gitlab-shell
+Version: 1.9.5
+Release: 0.1
+License: MIT
+Group: Applications/Shells
+Source0: https://github.com/gitlabhq/gitlab-shell.git/v%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5: 155af9f2ad05d6e55c63737bf3497758
+URL: https://github.com/gitlabhq/gitlab-shell
+Patch0: config.yml.patch
+Requires: redis
+Requires: ruby-bundler
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define gitlab_uid 65434
+%define gitlab_gid 65434
+%define homedir %{_localstatedir}/lib/gitlab
+
+%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.
+
+%prep
+%setup -q
+%patch0 -p1
+
+mv config.yml.example config.yml
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/gitlab-shell
+cp -a * $RPM_BUILD_ROOT%{_datadir}/gitlab-shell
+
+install -d $RPM_BUILD_ROOT%{homedir}/.ssh
+touch $RPM_BUILD_ROOT%{homedir}/.ssh/authorized_keys
+
+install -d $RPM_BUILD_ROOT%{homedir}/repositories
+
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/gitlab
+mv $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml $RPM_BUILD_ROOT%{_sysconfdir}/gitlab/gitlab-shell-config.yml
+ln -sf %{_sysconfdir}/gitlab/gitlab-shell-config.yml $RPM_BUILD_ROOT%{_datadir}/gitlab-shell/config.yml
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+if [ $1 -ge 1 ]; then
+ %groupadd gitlab -g %{gitlab_gid}
+ %useradd -u %{gitlab_uid} -c 'Gitlab user' -d %{homedir} -g gitlab -s /bin/false gitlab
+fi
+
+%post
+if [ $1 -eq 1 ]; then
+ echo "INFO: after installing gitlab run:"
+ echo " sudo -u gitlab -H bundle exec rake gitlab:shell:setup RAILS_ENV=production"
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE
+%dir %{_datadir}/gitlab-shell
+%config(noreplace) %{_sysconfdir}/gitlab/gitlab-shell-config.yml
+%{_datadir}/gitlab-shell/*
+%dir %attr(700,gitlab,gitlab) %{homedir}/.ssh
+%config(noreplace) %attr(600,gitlab,gitlab) %{homedir}/.ssh/authorized_keys
+%dir %attr(2770,gitlab,gitlab) %{homedir}/repositories
diff --git a/config.yml.patch b/config.yml.patch
new file mode 100644
index 0000000..5a0a78b
--- /dev/null
+++ b/config.yml.patch
@@ -0,0 +1,31 @@
+--- 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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gitlab-shell.git/commitdiff/26413cd7657cfbffeaccab98ac7414023a687ae7
More information about the pld-cvs-commit
mailing list