]> git.pld-linux.org Git - packages/stunnel.git/commitdiff
- %userremove/%groupremove support
authorankry <ankry@pld-linux.org>
Wed, 15 Sep 2004 21:08:04 +0000 (21:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- some standardization

Changed files:
    stunnel.spec -> 1.79

stunnel.spec

index fae2506b3b4531a5b405109fcc5461125b292454..9b0aa2c702fde362a49cfd6c87af71a7f6d709d6 100644 (file)
@@ -21,17 +21,20 @@ URL:                http://www.stunnel.org/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libtool
+BuildRequires: libwrap-devel
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: openssl-tools >= 0.9.7d
-BuildRequires: libwrap-devel
+BuildRequires: rpmbuild(macros) >= 1.159
 PreReq:                rc-scripts
 Requires(pre): /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires(postun):      /usr/sbin/userdel
 Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
 Requires(post,preun):  /sbin/chkconfig
+Provides:      group(stunnel)
+Provides:      user(stunnel)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -110,27 +113,28 @@ install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/stunnel
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`getgid stunnel`" ]; then
-       if [ "`getgid stunnel`" != "130" ]; then
+if [ -n "`/usr/bin/getgid stunnel`" ]; then
+       if [ "`/usr/bin/getgid stunnel`" != "130" ]; then
                echo "Error: group stunnel doesn't have gid=130. Correct this before installing stunnel." 1>&2
                exit 1
        fi
 else
-       /usr/sbin/groupadd -g 130 -r -f stunnel
+       /usr/sbin/groupadd -g 130 stunnel 1>&2
 fi
-if [ -n "`id -u stunnel 2>/dev/null`" ]; then
-       if [ "`id -u stunnel`" != "130" ]; then
+if [ -n "`/bin/id -u stunnel 2>/dev/null`" ]; then
+       if [ "`/bin/id -u stunnel`" != "130" ]; then
                echo "Error: user stunnel doesn't have uid=130. Correct this before installing stunnel." 1>&2
                exit 1
        fi
 else
-       /usr/sbin/useradd -u 130 -r -d /var/run/stunnel -s /bin/false -c "stunnel User" -g stunnel stunnel 1>&2
+       /usr/sbin/useradd -u 130 -d /var/run/stunnel -s /bin/false \
+               -c "stunnel User" -g stunnel stunnel 1>&2
 fi
 
 %postun 
 if [ "$1" = "0" ]; then
-       /usr/sbin/userdel stunnel
-       /usr/sbin/groupdel stunnel
+       %userremove stunnel
+       %groupremove stunnel
 fi
 
 %post standalone
This page took 0.103271 seconds and 4 git commands to generate.