]> git.pld-linux.org Git - packages/gitlab-shell.git/commitdiff
new, version 1.9.5
authorElan Ruusamäe <glen@delfi.ee>
Tue, 23 Feb 2016 17:30:52 +0000 (19:30 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 23 Feb 2016 17:31:40 +0000 (19:31 +0200)
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 [new file with mode: 0644]
gitlab-shell.spec [new file with mode: 0644]

diff --git a/config.yml.patch b/config.yml.patch
new file mode 100644 (file)
index 0000000..5a0a78b
--- /dev/null
@@ -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
diff --git a/gitlab-shell.spec b/gitlab-shell.spec
new file mode 100644 (file)
index 0000000..a77bfb5
--- /dev/null
@@ -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
This page took 0.127345 seconds and 4 git commands to generate.