Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bbswitch for openSUSE:Factory 
checked in at 2022-12-14 14:12:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bbswitch (Old)
 and      /work/SRC/openSUSE:Factory/.bbswitch.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bbswitch"

Wed Dec 14 14:12:53 2022 rev:12 rq:1042901 version:0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/bbswitch/bbswitch.changes        2022-06-15 
00:32:01.102501706 +0200
+++ /work/SRC/openSUSE:Factory/.bbswitch.new.1835/bbswitch.changes      
2022-12-14 14:12:53.860079434 +0100
@@ -8,0 +9,11 @@
+Mon Mar  7 16:36:07 UTC 2022 - Martin Wilck <mwi...@suse.com>
+
+- Add code for safe modprobe.d migration
+  (https://en.opensuse.org/openSUSE:Packaging_UsrEtc) 
+
+-------------------------------------------------------------------
+Fri Mar  4 17:37:59 UTC 2022 - Martin Wilck <mwi...@suse.com>
+
+- Install modprobe.conf files to %_modprobedir (bsc#1196275, jsc#SLE-20639) 
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bbswitch.spec ++++++
--- /var/tmp/diff_new_pack.CVhXIh/_old  2022-12-14 14:12:54.336081883 +0100
+++ /var/tmp/diff_new_pack.CVhXIh/_new  2022-12-14 14:12:54.340081903 +0100
@@ -16,6 +16,12 @@
 #
 
 
+%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150300
+# systemd-rpm-macros is wrong in 15.3 and below
+%define _modprobedir /lib/modprobe.d
+%endif
+%global modprobe_d_files 50-bbswitch.conf
+
 Name:           bbswitch
 Version:        0.8
 Release:        0
@@ -73,13 +79,27 @@
 done
 install -dm755 %{buildroot}%{_prefix}/lib/modules-load.d
 echo "bbswitch" >> %{buildroot}%{_prefix}/lib/modules-load.d/bbswitch.conf
-install -dm755 %{buildroot}%{_sysconfdir}/modprobe.d/
-echo "options bbswitch load_state=0 unload_state=1" >> 
%{buildroot}%{_sysconfdir}/modprobe.d/50-bbswitch.conf
+install -dm755 %{buildroot}%{_modprobedir}/
+echo "options bbswitch load_state=0 unload_state=1" >> 
%{buildroot}%{_modprobedir}/50-bbswitch.conf
+
+%pre
+# Avoid restoring outdated stuff in posttrans
+for _f in %{?modprobe_d_files}; do
+    [ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
+        mv -f "/etc/modprobe.d/${_f}.rpmsave" 
"/etc/modprobe.d/${_f}.rpmsave.old" || :
+done
+
+%posttrans
+# Migration of modprobe.conf files to _modprobedir
+for _f in %{?modprobe_d_files}; do
+    [ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
+        mv -fv "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}" || :
+done
 
 %files
 %doc source/COPYING source/README.md source/NEWS
 %dir %{_prefix}/lib/modules-load.d
 %{_prefix}/lib/modules-load.d/bbswitch.conf
-%config %{_sysconfdir}/modprobe.d/50-bbswitch.conf
+%{_modprobedir}/50-bbswitch.conf
 
 %changelog

Reply via email to