From c3a5a6aedeaa7ca1894abd44e9fc508cd3cf45ae Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 26 Jun 2023 01:02:08 +0200 Subject: [PATCH] Only run libwbclient %pre on upgrade, not fresh install This seems to be breaking live image build tests because the script is running before `rm` is installed. I do not know why it didn't fail the tests run *on the update itself*, but it's now causing tests of subsequent updates to fail, which is a problem. Probably an ordering issue. AFAIK, this script is meant to clean up stuff from earlier versions of the package, so it's not relevant on fresh installs, and we can just skip it and avoid any problems in the fresh install case. --- samba.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/samba.spec b/samba.spec index 4bb5af5..f53f676 100644 --- a/samba.spec +++ b/samba.spec @@ -138,7 +138,7 @@ %define samba_requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") %global samba_version 4.18.3 -%global baserelease 3 +%global baserelease 4 # This should be rc1 or %%nil %global pre_release %nil @@ -1568,9 +1568,11 @@ fi %if %{with libwbclient} %pre -n libwbclient -rm -rf %{_libdir}/samba/wbclient/ -rm -f /etc/alternatives/libwbclient.so* -rm -f /var/lib/alternatives/libwbclient.so* +if [ $1 -gt 1 ] ; then + rm -rf %{_libdir}/samba/wbclient/ + rm -f /etc/alternatives/libwbclient.so* + rm -f /var/lib/alternatives/libwbclient.so* +fi %{?ldconfig} #endif {with libwbclient} %endif @@ -4331,6 +4333,9 @@ fi %endif %changelog +* Mon Jun 26 2023 Adam Williamson - 4.18.3-4 +- Only run libwbclient %pre on upgrade, not fresh install + * Fri Jun 23 2023 Andreas Schneider - 4.18.3-3 - resolves: rhbz#2211577 - Fix libwbclient package upgrades