Accepting request 969767 from home:fstrba:branches:devel:libraries:c_c++
Revert libalternatives changes, since this is a ring0 package OBS-URL: https://build.opensuse.org/request/show/969767 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-4_8?expand=0&rev=63
This commit is contained in:
parent
4033db0798
commit
c956827613
@ -1,8 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 19 11:46:55 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Use libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 27 00:06:09 UTC 2019 - William Brown <william.brown@suse.com>
|
||||
|
||||
|
@ -16,12 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%define util_list archive checkpoint deadlock dump hotbackup load printlog recover sql stat upgrade verify
|
||||
%define generic_name db
|
||||
%define major 4
|
||||
@ -54,12 +48,7 @@ This package contains the necessary runtime libraries.
|
||||
%package -n db48-utils
|
||||
Summary: Command Line tools for Managing Berkeley DB Databases
|
||||
Group: Productivity/Databases/Tools
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
BuildRequires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
%endif
|
||||
Provides: db-utils = %{version}
|
||||
Obsoletes: db-utils < %{version}
|
||||
|
||||
@ -175,7 +164,6 @@ mv %{buildroot}/%{_docdir}/%{name}/collections/tutorial %{buildroot}/%{_docdir}/
|
||||
# Remove crappy *.la files
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
|
||||
for i in %{util_list}; do
|
||||
@ -185,30 +173,12 @@ for i in %{util_list}; do
|
||||
mv "%{buildroot}/%{_bindir}/db_$i" "%{buildroot}/%{_bindir}/db48_$i"
|
||||
ln -s "%{_sysconfdir}/alternatives/db_$i" "%{buildroot}%{_bindir}/db_$i"
|
||||
done
|
||||
%else
|
||||
for i in %{util_list}; do
|
||||
mv "%{buildroot}/%{_bindir}/db_$i" "%{buildroot}/%{_bindir}/db48_$i"
|
||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/db_$i
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/db_$i
|
||||
echo "binary=%{_bindir}/db48_$i" >%{buildroot}%{_datadir}/libalternatives/db_$i/48.conf
|
||||
done
|
||||
%endif
|
||||
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
for i in %{util_list}; do
|
||||
update-alternatives --remove "db_$i" "%{_bindir}/db_$i"
|
||||
done
|
||||
fi
|
||||
%else
|
||||
|
||||
%post -n db48-utils
|
||||
for i in %{util_list}; do
|
||||
update-alternatives --install "%{_bindir}/db_$i" \
|
||||
@ -219,7 +189,6 @@ done
|
||||
for i in %{util_list}; do
|
||||
update-alternatives --remove "db_$i" "%{_bindir}/db_$i"
|
||||
done
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{_libdir}/libdb-%{major}.%{minor}.so
|
||||
@ -242,7 +211,6 @@ done
|
||||
|
||||
%files -n db48-utils
|
||||
%{_bindir}/db48_*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %{_sysconfdir}/alternatives/db_archive
|
||||
%ghost %{_sysconfdir}/alternatives/db_checkpoint
|
||||
%ghost %{_sysconfdir}/alternatives/db_deadlock
|
||||
@ -255,33 +223,6 @@ done
|
||||
%ghost %{_sysconfdir}/alternatives/db_stat
|
||||
%ghost %{_sysconfdir}/alternatives/db_upgrade
|
||||
%ghost %{_sysconfdir}/alternatives/db_verify
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/db_archive
|
||||
%dir %{_datadir}/libalternatives/db_checkpoint
|
||||
%dir %{_datadir}/libalternatives/db_deadlock
|
||||
%dir %{_datadir}/libalternatives/db_dump
|
||||
%dir %{_datadir}/libalternatives/db_hotbackup
|
||||
%dir %{_datadir}/libalternatives/db_load
|
||||
%dir %{_datadir}/libalternatives/db_printlog
|
||||
%dir %{_datadir}/libalternatives/db_recover
|
||||
%dir %{_datadir}/libalternatives/db_sql
|
||||
%dir %{_datadir}/libalternatives/db_stat
|
||||
%dir %{_datadir}/libalternatives/db_upgrade
|
||||
%dir %{_datadir}/libalternatives/db_verify
|
||||
%{_datadir}/libalternatives/db_archive/*
|
||||
%{_datadir}/libalternatives/db_checkpoint/*
|
||||
%{_datadir}/libalternatives/db_deadlock/*
|
||||
%{_datadir}/libalternatives/db_dump/*
|
||||
%{_datadir}/libalternatives/db_hotbackup/*
|
||||
%{_datadir}/libalternatives/db_load/*
|
||||
%{_datadir}/libalternatives/db_printlog/*
|
||||
%{_datadir}/libalternatives/db_recover/*
|
||||
%{_datadir}/libalternatives/db_sql/*
|
||||
%{_datadir}/libalternatives/db_stat/*
|
||||
%{_datadir}/libalternatives/db_upgrade/*
|
||||
%{_datadir}/libalternatives/db_verify/*
|
||||
%endif
|
||||
%{_bindir}/db_*
|
||||
|
||||
%files devel
|
||||
|
Loading…
Reference in New Issue
Block a user