rpms/rpm/F-10 rpm.spec,1.308,1.309

Panu Matilainen pmatilai at fedoraproject.org
Sat Feb 7 07:26:15 UTC 2009


Author: pmatilai

Update of /cvs/pkgs/rpms/rpm/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15556

Modified Files:
	rpm.spec 
Log Message:
- change platform sharedstatedir to something more sensible (#185862)
- add rpmdb_foo links to db utils for documentation compatibility



Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/rpm.spec,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -r1.308 -r1.309
--- rpm.spec	12 Dec 2008 19:04:05 -0000	1.308
+++ rpm.spec	7 Feb 2009 07:25:44 -0000	1.309
@@ -44,7 +44,8 @@
 
 Requires(post): coreutils
 %if %{without int_bdb}
-Requires(post): compat-db45
+# normally db4-utils = %{bdbver} for the rpmdb_foo symlinks
+Requires: compat-db45
 %endif
 Requires: popt >= 1.10.2.1
 Requires: crontabs
@@ -191,6 +192,7 @@
     --prefix=%{_usr} \
     --sysconfdir=%{_sysconfdir} \
     --localstatedir=%{_var} \
+    --sharedstatedir=%{_var}/lib \
     --libdir=%{_libdir} \
     %{!?with_int_bdb: --with-external-db} \
     %{?with_sqlite: --enable-sqlite3} \
@@ -225,6 +227,18 @@
     touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi
 done
 
+# plant links to db utils as rpmdb_foo so existing documantion is usable
+%if %{without int_bdb}
+dbprefix=db45
+for dbutil in \
+    archive deadlock dump load printlog \
+    recover stat upgrade verify
+do
+    ln -s ../../bin/${dbprefix}_${dbutil} $RPM_BUILD_ROOT/%{rpmhome}/rpmdb_${dbutil}
+done
+ln -s ../../bin/berkeley_${dbprefix}_svc $RPM_BUILD_ROOT/%{rpmhome}/rpmdb_svc
+%endif
+
 %find_lang %{name}
 
 find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f
@@ -240,11 +254,7 @@
 
 %posttrans
 # XXX this is klunky and ugly, rpm itself should handle this
-%if %{with int_bdb}
 dbstat=/usr/lib/rpm/rpmdb_stat
-%else
-dbstat=%{_bindir}/db45_stat
-%endif
 if [ -x "$dbstat" ]; then
     if "$dbstat" -e -h /var/lib/rpm 2>&1 | grep -q "doesn't match environment version \| Invalid argument"; then
         rm -f /var/lib/rpm/__db.* 




More information about the scm-commits mailing list