Author: qboosh                       Date: Sun Feb 20 14:05:12 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- changed nscd server-user to nscd (pld patch), create nscd user/group in nscd 
pre

---- Files affected:
SPECS:
   glibc.spec (1.580 -> 1.581) 

---- Diffs:

================================================================
Index: SPECS/glibc.spec
diff -u SPECS/glibc.spec:1.580 SPECS/glibc.spec:1.581
--- SPECS/glibc.spec:1.580      Sun Feb 20 11:47:26 2005
+++ SPECS/glibc.spec    Sun Feb 20 15:05:06 2005
@@ -148,6 +148,7 @@
 BuildRequires: perl-base
 BuildRequires: rpm-build >= 4.3-0.20030610.28
 BuildRequires: rpm-perlprov
+BuildRequires: rpmbuild(macros) >= 1.159
 BuildRequires: sed >= 4.0.5
 BuildRequires: texinfo
 AutoReq:       false
@@ -386,9 +387,18 @@
 Summary(uk):   ëĹŰŐŔŢÉĘ ÄĹÍĎÎ ÓĹ×ŚÓŚ× ŚÍĹÎ
 Group:         Networking/Daemons
 PreReq:                rc-scripts >= 0.2.0
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
 Requires(post,preun):  /sbin/chkconfig
 Requires(post):        fileutils
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
 Requires:      %{name} = %{epoch}:%{version}-%{release}
+%{?with_selinux:Requires:      libselinux >= 1.18}
+Provides:      group(nscd)
+Provides:      user(nscd)
 
 %description -n nscd
 nscd caches name service lookups; it can dramatically improve
@@ -1119,6 +1129,24 @@
 %postun devel
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} 
>/dev/null 2>&1
 
+%pre -n nscd
+if [ -n "`/usr/bin/getgid nscd`" ]; then
+       if [ "`/usr/bin/getgid nscd`" != "144" ]; then
+               echo "Error: group nscd doesn't have gid=144. Correct this 
before installing nscd." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/groupadd -g 144 -r nscd
+fi
+if [ -n "`/bin/id -u nscd 2>/dev/null`" ]; then
+       if [ "`/bin/id -u nscd`" != "144" ]; then
+               echo "Error: user nscd doesn't have uid=144. Correct this 
before installing nscd." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 144 -r -d /tmp -s /bin/false -c "nscd" -g nscd 
nscd 1>&2
+fi
+
 %post -n nscd
 /sbin/chkconfig --add nscd
 touch /var/log/nscd
@@ -1139,6 +1167,12 @@
        /sbin/chkconfig --del nscd
 fi
 
+%postun -n nscd
+if [ "$1" = "0" ]; then
+       %userremove nscd
+       %groupremove nscd
+fi
+
 %ifarch amd64 ppc64 s390x sparc64
 %files -n glibc64
 %defattr(644,root,root,755)
@@ -1480,6 +1514,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.581  2005/02/20 14:05:06  qboosh
+- changed nscd server-user to nscd (pld patch), create nscd user/group in nscd 
pre
+
 Revision 1.580  2005/02/20 10:47:26  qboosh
 - added iconvconfig-nxstack patch (updated from pax_iconvconfig patch;
   not only PaX-specific - let iconvconfig have non-exec GNU_STACK)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/glibc.spec?r1=1.580&r2=1.581&f=u


_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to