From 523baa7bf781233de56f414676612df9a600f6fcea6d308d344d9e1bb4167ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Sun, 13 Oct 2013 18:40:03 +0000 Subject: [PATCH 1/3] Accepting request 203042 from home:jengelh:branches:devel:libraries:c_c++ forward to factory && 13.1: - Add update-alternatives rules to db48-utils (bnc#840738) OBS-URL: https://build.opensuse.org/request/show/203042 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=36 --- libdb-4_8.changes | 5 +++++ libdb-4_8.spec | 33 +++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/libdb-4_8.changes b/libdb-4_8.changes index 62a845f..a544bca 100644 --- a/libdb-4_8.changes +++ b/libdb-4_8.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 8 16:27:57 UTC 2013 - jengelh@inai.de + +- Add update-alternatives rules to db48-utils (bnc#840738) + ------------------------------------------------------------------- Tue Jul 23 07:30:46 UTC 2013 - coolo@suse.com diff --git a/libdb-4_8.spec b/libdb-4_8.spec index 260a9d1..4ef0f2e 100644 --- a/libdb-4_8.spec +++ b/libdb-4_8.spec @@ -52,8 +52,9 @@ This package contains the necessary runtime libraries. %package -n db48-utils Summary: Command Line tools for Managing Berkeley DB Databases Group: Productivity/Databases/Tools -Provides: db-utils = %{version} -Obsoletes: db-utils < %{version} +Provides: db-utils +Obsoletes: db-utils +PreReq: update-alternatives %description -n db48-utils The Berkeley DB Database is a programmatic toolkit that provides @@ -173,8 +174,8 @@ mv %{buildroot}/%{docdir}/collections/tutorial %{buildroot}/%{docdir}/ rm -rf %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_libdir}/tls/*.la -for i in archive checkpoint deadlock dump hotbackup load printlog \ - recover sql stat upgrade verify; do +%define util_list archive checkpoint deadlock dump hotbackup load printlog recover sql stat upgrade verify +for i in %util_list; do mv "%buildroot/%_bindir/db_$i" "%buildroot/%_bindir/db48_$i" done @@ -185,6 +186,17 @@ done %postun -p /sbin/ldconfig +%post -n db48-utils +for i in %util_list; do + "%_sbindir/update-alternatives" --install "%_bindir/db_$i" \ + "db_$i" "%_bindir/db48_$i" 48 +done + +%postun -n db48-utils +for i in %util_list; do + "%_sbindir/update-alternatives" --remove "db_$i" "%_bindir/db_$i" +done + %files %defattr(-,root,root) %{_libdir}/libdb-%{major}.%{minor}.so @@ -208,18 +220,7 @@ done %files -n db48-utils %defattr(-,root,root) -%{_bindir}/db48_archive -%{_bindir}/db48_checkpoint -%{_bindir}/db48_deadlock -%{_bindir}/db48_dump -%{_bindir}/db48_hotbackup -%{_bindir}/db48_load -%{_bindir}/db48_printlog -%{_bindir}/db48_recover -%{_bindir}/db48_sql -%{_bindir}/db48_stat -%{_bindir}/db48_upgrade -%{_bindir}/db48_verify +%_bindir/db48_* %files devel %defattr(-,root,root) From 440ccfde070f600b32466bb0dfa59b3918b5a3128a43e5812b09686a04c0855c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 21 Oct 2013 13:06:21 +0000 Subject: [PATCH 2/3] - fix update-alternatives usage OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=37 --- libdb-4_8.changes | 5 +++++ libdb-4_8.spec | 20 +++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/libdb-4_8.changes b/libdb-4_8.changes index a544bca..579be04 100644 --- a/libdb-4_8.changes +++ b/libdb-4_8.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 21 13:05:38 UTC 2013 - coolo@suse.com + +- fix update-alternatives usage + ------------------------------------------------------------------- Tue Oct 8 16:27:57 UTC 2013 - jengelh@inai.de diff --git a/libdb-4_8.spec b/libdb-4_8.spec index 4ef0f2e..f5decdd 100644 --- a/libdb-4_8.spec +++ b/libdb-4_8.spec @@ -174,9 +174,14 @@ mv %{buildroot}/%{docdir}/collections/tutorial %{buildroot}/%{docdir}/ rm -rf %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_libdir}/tls/*.la +mkdir -p %{buildroot}%{_sysconfdir}/alternatives + %define util_list archive checkpoint deadlock dump hotbackup load printlog recover sql stat upgrade verify for i in %util_list; do - mv "%buildroot/%_bindir/db_$i" "%buildroot/%_bindir/db48_$i" + # dummy + touch "%{buildroot}%{_sysconfdir}/alternatives/db_$i" + mv "%buildroot/%_bindir/db_$i" "%buildroot/%_bindir/db48_$i" + ln -s "%{_sysconfdir}/alternatives/db_$i" "%{buildroot}%_bindir/db_$i" done %fdupes %{buildroot}%{_libdir} @@ -221,6 +226,19 @@ done %files -n db48-utils %defattr(-,root,root) %_bindir/db48_* +%ghost %{_sysconfdir}/alternatives/db_archive +%ghost %{_sysconfdir}/alternatives/db_checkpoint +%ghost %{_sysconfdir}/alternatives/db_deadlock +%ghost %{_sysconfdir}/alternatives/db_dump +%ghost %{_sysconfdir}/alternatives/db_hotbackup +%ghost %{_sysconfdir}/alternatives/db_load +%ghost %{_sysconfdir}/alternatives/db_printlog +%ghost %{_sysconfdir}/alternatives/db_recover +%ghost %{_sysconfdir}/alternatives/db_sql +%ghost %{_sysconfdir}/alternatives/db_stat +%ghost %{_sysconfdir}/alternatives/db_upgrade +%ghost %{_sysconfdir}/alternatives/db_verify +%_bindir/db_* %files devel %defattr(-,root,root) From 1c4611eed5e4c049df1ef8fa9175e1ed48d751751402abd295dae179db4643ec Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 21 Oct 2013 13:07:16 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=38 --- libdb-4_8.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdb-4_8.spec b/libdb-4_8.spec index f5decdd..76a4537 100644 --- a/libdb-4_8.spec +++ b/libdb-4_8.spec @@ -52,8 +52,8 @@ This package contains the necessary runtime libraries. %package -n db48-utils Summary: Command Line tools for Managing Berkeley DB Databases Group: Productivity/Databases/Tools -Provides: db-utils -Obsoletes: db-utils +Provides: db-utils = %{version} +Obsoletes: db-utils < %{version} PreReq: update-alternatives %description -n db48-utils