[packages/gitlab-common] fix userremove

glen glen at pld-linux.org
Sun Sep 25 02:25:22 CEST 2016


commit 18cd010ac27fcc3a1a385c10bfd03a2911678876
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Sep 25 03:25:16 2016 +0300

    fix userremove

 gitlab-common.spec | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gitlab-common.spec b/gitlab-common.spec
index c6c9454..4693c9f 100644
--- a/gitlab-common.spec
+++ b/gitlab-common.spec
@@ -38,7 +38,13 @@ rm -rf $RPM_BUILD_ROOT
 
 %pre
 %groupadd -g %{gitlab_gid} -r %{gitlab_group}
-%useradd -u %{gitlab_uid} -g %{gitlab_group} -s /bin/sh -r -c "GitLab" -d %{home_dir} %{gitlab_user}
+%useradd -u %{gitlab_uid} -g %{gitlab_group} -s /bin/sh -r -c "GitLab" -d %{git_dir} %{gitlab_user}
+
+%postun
+if [ "$1" = "0" ]; then
+	%userremove %{gitlab_user}
+	%groupremove %{gitlab_group}
+fi
 
 %files
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitlab-common.git/commitdiff/18cd010ac27fcc3a1a385c10bfd03a2911678876



More information about the pld-cvs-commit mailing list