Accepting request 953024 from home:scabrero:branches:network:ldap

- Remove caches only when performing a package downgrade. The sssd
  daemon takes care of upgrading the database format when necessary
  (bsc#1195552)

OBS-URL: https://build.opensuse.org/request/show/953024
OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=260
This commit is contained in:
Jan Engelhardt 2022-02-10 16:12:31 +00:00 committed by Git OBS Bridge
parent 05c07b1b1e
commit f58a6368cb
2 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Feb 9 13:17:30 UTC 2022 - Samuel Cabrero <scabrero@suse.de>
- Remove caches only when performing a package downgrade. The sssd
daemon takes care of upgrading the database format when necessary
(bsc#1195552)
-------------------------------------------------------------------
Tue Jan 25 11:32:10 UTC 2022 - Jan Engelhardt <jengelh@inai.de>

View File

@ -437,9 +437,6 @@ update-alternatives --install %cifs_idmap_plugin %cifs_idmap_name %cifs_idmap_li
if [ "$1" = "0" -a -x "%_sbindir/pam-config" ]; then
"%_sbindir/pam-config" -d --sss || :
fi
# Clear caches, which may have an incompatible format afterwards
# (especially, downgrades)
rm -f /var/lib/sss/db/*.ldb
# del_postun includes a try-restart
%service_del_postun %services
@ -458,6 +455,15 @@ fi
%post -n libsss_simpleifp0 -p /sbin/ldconfig
%postun -n libsss_simpleifp0 -p /sbin/ldconfig
%triggerun -- %{name} < %{version}-%{release}
# sssd takes care of upgrading the database but it doesn't handle downgrades.
# Clear caches when downgrading the package, which may have an
# incompatible format afterwards preventing the daemon from startup.
if [ "$1" = "1" ] && [ "$2" = "2" ]; then
echo "Package downgrade detected, removing cache files which may have an incompatible format."
rm -f /var/lib/sss/db/*.ldb
fi
%pre dbus
%service_add_pre sssd-ifp.service