From d914df62bd8e532fc2f3476ff350efb84bf2f87e Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov Date: Thu, 12 Sep 2024 09:14:03 +0200 Subject: [PATCH] SPEC: don't fail uninstallation if 'alternatives' fails This is seen on rpm-ostree based system during uninstall: ``` Running scriptlet: sssd-client-2.9.5-4.el9.x86_64 9/9 admindir /var/lib/alternatives invalid error: %preun(sssd-client-2.9.5-4.el9.x86_64) scriptlet failed, exit status 2 ``` This should be fixed by https://github.com/fedora-sysv/chkconfig/pull/135 but let's avoid hard failing here anyway. --- contrib/sssd.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index 4edabce5694..7f1c3a9ba72 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -1167,7 +1167,7 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us %preun client if [ $1 -eq 0 ] ; then - /usr/sbin/alternatives --remove cifs-idmap-plugin %{_libdir}/cifs-utils/cifs_idmap_sss.so + /usr/sbin/alternatives --remove cifs-idmap-plugin %{_libdir}/cifs-utils/cifs_idmap_sss.so || true fi %posttrans common