Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package stlink for openSUSE:Factory checked 
in at 2022-03-11 21:41:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/stlink (Old)
 and      /work/SRC/openSUSE:Factory/.stlink.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "stlink"

Fri Mar 11 21:41:11 2022 rev:9 rq:960951 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/stlink/stlink.changes    2021-06-04 
22:43:47.943144884 +0200
+++ /work/SRC/openSUSE:Factory/.stlink.new.25692/stlink.changes 2022-03-11 
21:41:20.458074048 +0100
@@ -1,0 +2,5 @@
+Fri Mar  4 20:07:21 UTC 2022 - Martin Wilck <mwi...@suse.com>
+
+- Install modprobe.conf files to %_modprobedir (bsc#1196275, jsc#SLE-20639) 
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ stlink.spec ++++++
--- /var/tmp/diff_new_pack.avK6u9/_old  2022-03-11 21:41:20.970074441 +0100
+++ /var/tmp/diff_new_pack.avK6u9/_new  2022-03-11 21:41:20.974074443 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package stlink
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -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 stlink_v1.conf
+
 %define         sover 1
 
 Name:           stlink
@@ -66,6 +72,7 @@
 
 %build
 %cmake -DSTLINK_UDEV_RULES_DIR="%_udevrulesdir" \
+       -DSTLINK_MODPROBED_DIR="%_modprobedir" \
        -DCMAKE_EXE_LINKER_FLAGS="-pie"
 
 %cmake_build
@@ -78,6 +85,20 @@
 
 %suse_update_desktop_file -r stlink-gui Development Debugger
 
+%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
+
 %post -n libstlink%{sover} -p /sbin/ldconfig
 
 %postun -n libstlink%{sover} -p /sbin/ldconfig
@@ -87,7 +108,8 @@
 %license LICENSE.md
 %{_bindir}/st-*
 %{_udevrulesdir}/49-stlink*
-%config %{_sysconfdir}/modprobe.d/stlink_v1.conf
+%dir %{_modprobedir}
+%{_modprobedir}/stlink_v1.conf
 %{_mandir}/man1/st-flash.1*
 %{_mandir}/man1/st-info.1*
 %{_mandir}/man1/st-util.1*

Reply via email to