[packages/fwupd] Up to 2.1.10

arekm arekm at pld-linux.org
Thu Nov 19 22:52:40 CET 2026


commit 4bc797782cfd21f96f37dac48a20a8eb9406d6db
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Nov 19 22:50:02 2026 +0100

    Up to 2.1.10
    
    Renumber a fwupd-refresh account created by systemd-sysusers with
    a dynamic id to 366 in %pre, and pin the id in sysusers.d.

 fwupd-sysusers-fixed-id.patch |  6 ++++++
 fwupd.spec                    | 21 +++++++++++++++------
 2 files changed, 21 insertions(+), 6 deletions(-)
---
diff --git a/fwupd.spec b/fwupd.spec
index ab05607..a563743 100644
--- a/fwupd.spec
+++ b/fwupd.spec
@@ -1,5 +1,3 @@
-# TODO: fwupd-refresh user
-#
 # Conditional build:
 %bcond_without	apidocs
 %bcond_without	modemmanager	# modem_manager plugin
@@ -16,14 +14,15 @@
 Summary:	System daemon for installing device firmware
 Summary(pl.UTF-8):	Demon systemowy do instalowania firmware'u urządzeń
 Name:		fwupd
-Version:	2.1.8
+Version:	2.1.10
 Release:	1
 License:	LGPL v2.1+
 Group:		Applications/System
 #Source0Download: https://github.com/fwupd/fwupd/releases
 Source0:	https://github.com/fwupd/fwupd/releases/download/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	5d67e87d1dd7057d6e850af60c72bc17
+# Source0-md5:	f354c8d5631d855220343d364c5be607
 Patch0:		%{name}-arch-independent-docs.patch
+Patch1:		%{name}-sysusers-fixed-id.patch
 URL:		https://github.com/fwupd/fwupd
 %{?with_modemmanager:BuildRequires:	ModemManager-devel >= 1.22.0}
 BuildRequires:	bash-completion-devel >= 1:2.0
@@ -44,7 +43,8 @@ BuildRequires:	libdrm-devel >= 2.4.113
 %{?with_modemmanager:BuildRequires:	libmbim-devel >= 1.28.0}
 %{?with_modemmanager:BuildRequires:	libqmi-devel >= 1.32.0}
 BuildRequires:	libmnl-devel
-BuildRequires:	libusb-devel >= 1.0
+# libusb_init_context() is required for the daemon
+BuildRequires:	libusb-devel >= 1.0.27
 BuildRequires:	libxmlb-devel >= 0.3.19
 # for <linux/nvme_ioctl.h>
 BuildRequires:	linux-libc-headers >= 7:4.4
@@ -84,7 +84,9 @@ Requires(postun):	/usr/sbin/userdel
 Requires(pre):	/bin/id
 Requires(pre):	/usr/bin/getgid
 Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/groupmod
 Requires(pre):	/usr/sbin/useradd
+Requires(pre):	/usr/sbin/usermod
 Requires:	%{name}-libs = %{version}-%{release}
 %{?with_modemmanager:Requires:	libmbim >= 1.28.0}
 %{?with_modemmanager:Requires:	libqmi >= 1.32.0}
@@ -210,6 +212,7 @@ API języka Vala do biblioteki fwupd.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python3$,%{__python3},' contrib/firmware_packager/*.py
 
@@ -278,6 +281,13 @@ install -d $RPM_BUILD_ROOT/lib
 rm -rf $RPM_BUILD_ROOT
 
 %pre
+# systemd-sysusers may already have created the account with a dynamic id
+if [ -n "`/usr/bin/getgid fwupd-refresh 2>/dev/null`" ] && [ "`/usr/bin/getgid fwupd-refresh`" != "366" ]; then
+	/usr/sbin/groupmod -g 366 fwupd-refresh || exit 1
+fi
+if [ -n "`/bin/id -u fwupd-refresh 2>/dev/null`" ] && [ "`/bin/id -u fwupd-refresh`" != "366" ]; then
+	/usr/sbin/usermod -u 366 -g 366 fwupd-refresh || exit 1
+fi
 %groupadd -g 366 fwupd-refresh
 %useradd -u 366 -d /var/lib/fwupd -g fwupd-refresh -c "Firmware update daemon" fwupd-refresh
 
@@ -335,7 +345,6 @@ fi
 %{systemdunitdir}/fwupd.service
 %{systemdunitdir}/fwupd-refresh.service
 %{systemdunitdir}/fwupd-refresh.timer
-%attr(754,root,root) /lib/systemd/system-shutdown/fwupd.shutdown
 %{_prefix}/lib/sysusers.d/fwupd.conf
 %{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
 %{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
diff --git a/fwupd-sysusers-fixed-id.patch b/fwupd-sysusers-fixed-id.patch
new file mode 100644
index 0000000..9150f4e
--- /dev/null
+++ b/fwupd-sysusers-fixed-id.patch
@@ -0,0 +1,6 @@
+# keep systemd-sysusers on the PLD-registered id used by %pre (uid/gid 366)
+--- a/data/motd/fwupd.sysusers
++++ b/data/motd/fwupd.sysusers
+@@ -1 +1 @@
+-u @systemd_unit_user@ - "Firmware update daemon" @localstatedir@/lib/fwupd
++u @systemd_unit_user@ 366 "Firmware update daemon" @localstatedir@/lib/fwupd
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fwupd.git/commitdiff/4bc797782cfd21f96f37dac48a20a8eb9406d6db



More information about the pld-cvs-commit mailing list