From 4ae12a1a327f87db704a59e9b2210181dbbc7e7e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 25 Sep 2016 03:28:19 +0300 Subject: [PATCH] use gitlab-common for user and base dirs --- gitlab-shell.spec | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/gitlab-shell.spec b/gitlab-shell.spec index 420f136..84b416d 100644 --- a/gitlab-shell.spec +++ b/gitlab-shell.spec @@ -1,7 +1,3 @@ -%define uid 264 -%define gid 264 -%define uname git -%define gname git Summary: GitLab ssh access and repository management Name: gitlab-shell Version: 3.6.0 @@ -16,25 +12,16 @@ URL: https://gitlab.com/gitlab-org/gitlab-shell BuildRequires: rpm-rubyprov BuildRequires: rpmbuild(macros) >= 1.665 BuildRequires: sed >= 4.0 -Provides: group(%{gname}) -Provides: user(%{uname}) -Conflicts: gitlab-ce < 8.7.5-0.17 -Requires(postun): /usr/sbin/groupdel -Requires(postun): /usr/sbin/userdel -Requires(pre): /bin/id -Requires(pre): /usr/bin/getgid -Requires(pre): /usr/sbin/groupadd -Requires(pre): /usr/sbin/useradd Requires: git-core >= 2.7.3 +Requires: gitlab-common >= 8.12 Requires: rsync Requires: ruby >= 1:2.0 Requires: ruby-redis >= 3.3.0 Suggests: redis-server +Conflicts: gitlab-ce < 8.7.5-0.17 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%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 @@ -64,9 +51,6 @@ rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_datadir}/%{name} cp -a VERSION *.yml bin lib hooks support $RPM_BUILD_ROOT%{_datadir}/%{name} -install -d $RPM_BUILD_ROOT%{homedir}/{.ssh,repositories} -touch $RPM_BUILD_ROOT%{homedir}/.ssh/authorized_keys - 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 @@ -79,10 +63,6 @@ ln -s %{_sysconfdir}/gitlab/.gitlab_shell_secret $RPM_BUILD_ROOT%{_datadir}/%{na %clean rm -rf $RPM_BUILD_ROOT -%pre -%groupadd -g %{gid} %{gname} -%useradd -u %{uid} -c 'Git user' -d %{homedir} -g git -s /bin/false %{uname} - %post %banner -o -e %{name} <