diff --git a/linux-firmware.spec b/linux-firmware.spec index 7e9f429d884aa96cfbf749e0e2a9074aedc1cba9..45ca5f46fd8572ceb0bb9511d3c560b32fa802d5 100644 --- a/linux-firmware.spec +++ b/linux-firmware.spec @@ -4,7 +4,7 @@ Name: linux-firmware Version: 20250708 -Release: 1 +Release: 2 Summary: Firmware files used by the Linux kernel License: GPL-1.0-or-later AND GPL-2.0-or-later AND MIT and Redistributable, no modification permitted URL: https://www.kernel.org/ @@ -158,6 +158,60 @@ rm -rf check_whence.py copy-firmware.sh rm -rf build_packages.py contrib popd +%pretrans -p +path = "/usr/lib/firmware/nvidia/ad103" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end +path = "/usr/lib/firmware/nvidia/ad104" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end +path = "/usr/lib/firmware/nvidia/ad106" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end +path = "/usr/lib/firmware/nvidia/ad107" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + %files %dir %{_lib_path} %license WHENCE @@ -216,6 +270,9 @@ popd %{_lib_path}/ti-connectivity %changelog +* Thu Jul 17 2025 Funda Wang - 20250708-2 +- Fix upgrade from previous version by replacing directory with symlink + * Fri Jul 11 2025 Funda Wang - 20250708-1 - update to 20250708 - fix broken symlinks