From: Elan Ruusamäe Date: Sun, 1 May 2005 17:31:30 +0000 (+0000) Subject: - use %useradd/%groupadd macros X-Git-Tag: auto/ac/Zope-2_7_7-1~4 X-Git-Url: https://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=3cd19cbfa811c700a4d2ac9d03c219a054d2c7eb;p=packages%2FZope.git - use %useradd/%groupadd macros Changed files: Zope.spec -> 1.89 --- diff --git a/Zope.spec b/Zope.spec index 87d9b3c..403774f 100644 --- a/Zope.spec +++ b/Zope.spec @@ -34,7 +34,7 @@ Patch4: %{name}-python24.patch URL: http://www.zope.org/ BuildRequires: python-devel >= 1:2.3.3 BuildRequires: perl-base -BuildRequires: rpmbuild(macros) >= 1.159 +BuildRequires: rpmbuild(macros) >= 1.202 PreReq: rc-scripts Requires(pre): /bin/id Requires(pre): /usr/bin/getgid @@ -150,24 +150,8 @@ touch $RPM_BUILD_ROOT/var/log/zope/main/Z2.log rm -rf $RPM_BUILD_ROOT %pre -if [ -n "`/usr/bin/getgid zope`" ]; then - if [ "`/usr/bin/getgid zope`" != "112" ]; then - echo "Error: group zope doesn't have gid=112. Correct this before installing zope." 1>&2 - exit 1 - fi -else - echo "Making group zope" - /usr/sbin/groupadd -g 112 zope -fi -if [ -n "`/bin/id -u zope 2>/dev/null`" ]; then - if [ "`/bin/id -u zope`" != "112" ]; then - echo "Error: user zope doesn't have uid=112. Correct this before installing zope." 1>&2 - exit 1 - fi -else - echo "Making user zope" - /usr/sbin/useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope -fi +%groupadd -g 112 zope +%useradd -u 112 -d /var/lib/zope/main -s /bin/false -c "Zope User" -g zope zope %post /sbin/chkconfig --add zope