packages: nss_db/nss_db.spec - enable db on package install and removal (rf...
glen
glen at pld-linux.org
Thu Feb 9 21:11:51 CET 2012
Author: glen Date: Thu Feb 9 20:11:51 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- enable db on package install and removal (rfc which dbs exactly?); remove all when pkg removed
---- Files affected:
packages/nss_db:
nss_db.spec (1.43 -> 1.44)
---- Diffs:
================================================================
Index: packages/nss_db/nss_db.spec
diff -u packages/nss_db/nss_db.spec:1.43 packages/nss_db/nss_db.spec:1.44
--- packages/nss_db/nss_db.spec:1.43 Tue Feb 23 12:18:28 2010
+++ packages/nss_db/nss_db.spec Thu Feb 9 21:11:46 2012
@@ -1,4 +1,7 @@
# $Revision$, $Date$
+# TODO
+# - new usptream: http://sourceforge.net/projects/nssdb/
+# see http://www.linux-archive.org/development-discussions-related-fedora-devel-lists-fedoraproject-org/546891-nss_db.html
# 4.8 makes libpthread a hard requirement
# 4.7 has a heavier footprint
%define db_version 4.6.21
@@ -37,14 +40,15 @@
BuildRequires: autoconf
BuildRequires: automake >= 1.4
BuildRequires: db-devel
-# because of broken configure
-BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel >= 2.3
BuildRequires: libselinux-devel
+# because of broken configure
+BuildRequires: libstdc++-devel
BuildRequires: libtool
Requires: glibc >= 6:2.3
Requires: make
+Requires: sed >= 4.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# private symbols
@@ -172,6 +176,23 @@
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%post
+if [ -f %{_sysconfdir}/nsswitch.conf ]; then
+ %{__sed} -i -e '
+ /^\(passwd\|group\|hosts\):/ !b
+ /\<db\>/ b
+ s/[[:blank:]]*$/ db/
+ ' %{_sysconfdir}/nsswitch.conf
+fi
+
+%preun
+if [ "$1" -eq 0 -a -f %{_sysconfdir}/nsswitch.conf ] ; then
+ %{__sed} -i -e '
+ /^\(passwd\|group\|ethers\|protocols\|rpc\|services\|shadow\|netgroup\|hosts\):/ !b
+ s/[[:blank:]]\+db\>//
+ ' %{_sysconfdir}/nsswitch.conf
+fi
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README THANKS
@@ -189,6 +210,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.44 2012/02/09 20:11:46 glen
+- enable db on package install and removal (rfc which dbs exactly?); remove all when pkg removed
+
Revision 1.43 2010/02/23 11:18:28 glen
- link makedb with libnss_db.so.2, instead of linking again with libdb.a, seems working and baggins had nothing agains this change
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nss_db/nss_db.spec?r1=1.43&r2=1.44&f=u
More information about the pld-cvs-commit
mailing list