From 223963400616fe68e32c7d5e50bce32e09562a80 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 22:36:12 +0100 Subject: [PATCH] add a pretrans script to fix upgrading dirs to symlinks in docs directory [release 1.8.5-2mamba;Fri Sep 30 2022] --- fwupd.spec | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/fwupd.spec b/fwupd.spec index 74ec3b3..04d3b74 100644 --- a/fwupd.spec +++ b/fwupd.spec @@ -1,6 +1,6 @@ Name: fwupd Version: 1.8.5 -Release: 1mamba +Release: 2mamba Summary: A simple daemon to allow session software to update firmware Group: System/Kernel and Hardware Vendor: openmamba @@ -83,6 +83,36 @@ This package contains libraries and header files for developing applications tha %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%pretrans -p +-- Define the path to directory being replaced below. +-- DO NOT add a trailing slash at the end. +path = "/usr/share/doc/fwupd/libfwupd" +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/share/doc/fwupd/libfwupdplugin" +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 + %preun %systemd_preun %{name} : @@ -194,6 +224,9 @@ This package contains libraries and header files for developing applications tha #%doc README.md %changelog +* Fri Sep 30 2022 Silvan Calarco 1.8.5-2mamba +- add a pretrans script to fix upgrading dirs to symlinks in docs directory + * Mon Sep 26 2022 Automatic Build System 1.8.5-1mamba - automatic version update by autodist