Rebase to latest upstream version

Resolves: #RHEL-110760
This commit is contained in:
Richard Hughes 2025-10-13 14:17:40 +01:00
parent c8349d25cb
commit f30020eeb2
No known key found for this signature in database
GPG Key ID: 17ACBA8DFA970E17
3 changed files with 123 additions and 126 deletions

3
.gitignore vendored
View File

@ -139,3 +139,6 @@
/DBXUpdate-20241101-x64.cab
/fwupd-1.9.31.tar.xz
/DBXUpdate-20250507-legacy-x64.cab
/fwupd-2.0.16.tar.xz
/40d3a4630619b83026f66bc64d97a582bbd9223ad53aa3f519ff5e2121d11ca6-DBXUpdate-20250507-x64.cab
/fwupd-2.0.19.tar.xz

View File

@ -1,11 +1,17 @@
%global glib2_version 2.45.8
%global glib2_version 2.68.0
%global libxmlb_version 0.1.3
%global libgusb_version 0.3.5
%global libusb_version 1.0.9
%global libcurl_version 7.62.0
%global libjcat_version 0.1.0
%global systemd_version 231
%global systemd_version 249
%global json_glib_version 1.1.1
# to use this feature use `rpmbuild -ba fwupd.spec --with=libfwupdcompat`
%bcond_with libfwupdcompat
%if %{with libfwupdcompat} || 0%{?rhel}
%global libfwupd_19x_version 31
%endif
# although we ship a few tiny python files these are utilities that 99.99%
# of users do not need -- use this to avoid dragging python onto CoreOS
%global __requires_exclude ^%{python3}$
@ -14,19 +20,17 @@
%ifnarch ppc64le
%global enable_tests 1
%endif
%global __meson_wrap_mode nodownload
%global enable_dummy 1
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 10
%global have_gi_docgen 1
%endif
# fwupd.efi is only available on these arches
%ifarch x86_64 aarch64 riscv64
%global have_uefi 1
%endif
# gpio.h is only available on these arches
%ifarch x86_64 aarch64
%global have_gpio 1
%endif
# flashrom is only available on these arches
%ifarch i686 x86_64 armv7hl aarch64 ppc64le riscv64
%global have_flashrom 1
@ -36,75 +40,71 @@
%global have_msr 1
%endif
# Until we actually have seen it outside x86
%ifarch i686 x86_64
%global have_thunderbolt 1
%endif
# only available recently
%if 0%{?fedora} >= 30
%global have_modem_manager 1
%endif
%if 0%{?fedora}
%global have_passim 1
%endif
Summary: Firmware update daemon
Name: fwupd
Version: 1.9.31
Version: 2.0.19
Release: %autorelease
License: LGPL-2.1-or-later
URL: https://github.com/fwupd/fwupd
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
%if 0%{?libfwupd_19x_version}
Source2: https://github.com/fwupd/%{name}/releases/download/1.9.%{libfwupd_19x_version}/%{name}-1.9.%{libfwupd_19x_version}.tar.xz
%endif
Source10: http://people.redhat.com/rhughes/dbx/DBXUpdate-20100307-x64.cab
Source11: http://people.redhat.com/rhughes/dbx/DBXUpdate-20140413-x64.cab
Source12: http://people.redhat.com/rhughes/dbx/DBXUpdate-20160809-x64.cab
Source13: http://people.redhat.com/rhughes/dbx/DBXUpdate-20200729-aa64.cab
Source14: http://people.redhat.com/rhughes/dbx/DBXUpdate-20200729-ia32.cab
Source15: http://people.redhat.com/rhughes/dbx/DBXUpdate-20200729-x64.cab
Source16: http://people.redhat.com/rhughes/dbx/DBXUpdate-20210429-x64.cab
Source17: http://people.redhat.com/rhughes/dbx/DBXUpdate-20220812-aa64.cab
Source18: http://people.redhat.com/rhughes/dbx/DBXUpdate-20220812-ia32.cab
Source19: http://people.redhat.com/rhughes/dbx/DBXUpdate-20220812-x64.cab
Source20: http://people.redhat.com/rhughes/dbx/DBXUpdate-20230509-aa64.cab
Source21: http://people.redhat.com/rhughes/dbx/DBXUpdate-20230509-ia32.cab
Source22: http://people.redhat.com/rhughes/dbx/DBXUpdate-20230509-x64.cab
Source23: http://people.redhat.com/rhughes/dbx/DBXUpdate-20241101-x64.cab
Source24: http://people.redhat.com/rhughes/dbx/DBXUpdate-20250507-legacy-x64.cab
Source24: https://fwupd.org/downloads/40d3a4630619b83026f66bc64d97a582bbd9223ad53aa3f519ff5e2121d11ca6-DBXUpdate-20250507-x64.cab
BuildRequires: gettext
BuildRequires: hwdata
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: libxmlb-devel >= %{libxmlb_version}
BuildRequires: libgudev1-devel
BuildRequires: libgusb-devel >= %{libgusb_version}
BuildRequires: libusb1-devel >= %{libusb_version}
BuildRequires: libcurl-devel >= %{libcurl_version}
BuildRequires: libjcat-devel >= %{libjcat_version}
BuildRequires: polkit-devel >= 0.103
BuildRequires: protobuf-c-devel
BuildRequires: python3-packaging
BuildRequires: python3-jinja2
BuildRequires: sqlite-devel
BuildRequires: systemd >= %{systemd_version}
BuildRequires: systemd-devel
BuildRequires: libarchive-devel
BuildRequires: libcbor-devel
BuildRequires: libblkid-devel
BuildRequires: readline-devel
BuildRequires: libmnl-devel
%if 0%{?have_passim}
BuildRequires: passim-devel
%endif
BuildRequires: gobject-introspection-devel
%ifarch %{valgrind_arches}
BuildRequires: valgrind
BuildRequires: valgrind-devel
%endif
%if 0%{?have_gi_docgen}
BuildRequires: gi-docgen
%endif
BuildRequires: gnutls-devel
BuildRequires: gnutls-utils
BuildRequires: meson
BuildRequires: json-glib-devel >= %{json_glib_version}
BuildRequires: vala
%if 0%{?fedora} >= 41
BuildRequires: bash-completion-devel
%else
BuildRequires: bash-completion
%endif
BuildRequires: pkgconfig(bash-completion)
BuildRequires: git-core
%if 0%{?have_flashrom}
BuildRequires: flashrom-devel >= 1.2-2
%endif
BuildRequires: libdrm-devel
# For fu-polkit-test
BuildRequires: polkit
%if 0%{?have_modem_manager}
BuildRequires: ModemManager-glib-devel >= 1.10.0
@ -128,15 +128,33 @@ Requires(postun): systemd
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: libxmlb%{?_isa} >= %{libxmlb_version}
Requires: libgusb%{?_isa} >= %{libgusb_version}
Requires: shared-mime-info
# deliberately has no _isa as libusbx in RHEL-9 does not include it
Requires: libusb1 >= %{libusb_version}
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
Recommends: python3
%endif
Obsoletes: dbxtool < 9
Provides: dbxtool
%if 0%{?rhel} > 7
Obsoletes: fwupdate < 11-4
Obsoletes: fwupdate-efi < 11-4
Provides: fwupdate
Provides: fwupdate-efi
%endif
# optional, but a really good idea
Recommends: udisks2
Recommends: bluez
Recommends: jq
%if 0%{?have_passim}
Recommends: passim
%endif
%if 0%{?have_modem_manager}
Recommends: %{name}-plugin-modem-manager
@ -203,10 +221,37 @@ or server machines.
%prep
%autosetup -p1
# and the old version for libfwupd1
%if 0%{?libfwupd_19x_version}
tar xfs %{SOURCE2}
%endif
%build
%if 0%{?libfwupd_19x_version}
cd fwupd-1.9.%{libfwupd_19x_version}
%meson \
-Dbuild=library \
-Ddocs=disabled \
-Dcbor=disabled \
-Dpolkit=disabled \
-Dtests=false \
-Dbash_completion=false \
-Dplugin_msr=disabled \
-Dintrospection=disabled \
-Dlaunchd=disabled
%meson_build
cd -
%endif
%meson \
-Dsupported_build=enabled \
-Dumockdev_tests=disabled \
%if 0%{?have_gi_docgen}
-Ddocs=enabled \
%else
-Ddocs=disabled \
%endif
%if 0%{?enable_tests}
-Dtests=true \
%else
@ -217,49 +262,21 @@ or server machines.
%else
-Dplugin_flashrom=disabled \
%endif
%if 0%{?have_msr}
-Dplugin_msr=enabled \
%else
-Dplugin_msr=disabled \
%endif
%if 0%{?have_gpio}
-Dplugin_gpio=enabled \
%else
-Dplugin_gpio=disabled \
%endif
%if 0%{?have_uefi}
-Dplugin_uefi_capsule=enabled \
-Dplugin_uefi_pk=enabled \
-Dplugin_tpm=enabled \
-Defi_binary=false \
-Defi_os_dir=%{efi_vendor} \
%else
-Dplugin_uefi_capsule=disabled \
-Dplugin_uefi_pk=disabled \
-Dplugin_tpm=disabled \
%endif
%if 0%{?have_modem_manager}
-Dplugin_modem_manager=enabled \
%else
-Dplugin_modem_manager=disabled \
%endif
-Dbluez=disabled \
-Dcbor=disabled \
-Dlaunchd=disabled \
-Dlvfs=disabled \
-Dman=true \
%if 0%{?have_passim}
-Dpassim=enabled \
%else
-Dpassim=disabled \
-Dplugin_android_boot=disabled \
-Dplugin_cfu=disabled \
-Dplugin_igsc=disabled \
-Dplugin_intel_me=disabled \
-Dplugin_logitech_bulkcontroller=disabled \
-Dplugin_logitech_scribe=disabled \
-Dplugin_mtd=disabled \
-Dplugin_powerd=disabled \
-Dplugin_uf2=disabled \
-Dsupported_build=enabled \
-Dsystemd_unit_user=""
%endif
-Dman=true \
-Dsystemd_unit_user="" \
-Dbluez=enabled
%meson_build
@ -269,14 +286,18 @@ or server machines.
%endif
%install
%if 0%{?libfwupd_19x_version}
cd fwupd-1.9.%{libfwupd_19x_version}
%meson_install
cd -
%endif
%meson_install
# on RHEL the LVFS is disabled by default
mkdir -p %{buildroot}/%{_datadir}/dbxtool
install \
%{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} \
%{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE20} %{SOURCE21} \
%{SOURCE22} %{SOURCE23} %{SOURCE24} \
%{SOURCE24} \
%{buildroot}/%{_datadir}/fwupd/remotes.d/vendor/firmware/
mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg
@ -289,13 +310,6 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%post
%systemd_post fwupd.service fwupd-refresh.timer
# change vendor-installed remotes to use the default keyring type
for fn in /etc/fwupd/remotes.d/*.conf; do
if grep -q "Keyring=gpg" "$fn"; then
sed -i 's/Keyring=gpg/#Keyring=pkcs/g' "$fn";
fi
done
%preun
%systemd_preun fwupd.service fwupd-refresh.timer
@ -315,8 +329,9 @@ systemctl --no-reload preset fwupd-refresh.timer &>/dev/null || :
%ifarch x86_64
%{_libexecdir}/fwupd/fwupd-detect-cet
%endif
%{_libexecdir}/fwupd/fwupdoffline
%if 0%{?have_uefi}
%{_bindir}/dbxtool
%endif
%{_bindir}/fwupdmgr
%{_bindir}/fwupdtool
%dir %{_sysconfdir}/fwupd
@ -331,6 +346,7 @@ systemctl --no-reload preset fwupd-refresh.timer &>/dev/null || :
%if 0%{?have_msr}
/usr/lib/modules-load.d/fwupd-msr.conf
%endif
/usr/lib/modules-load.d/fwupd-i2c.conf
%{_datadir}/dbus-1/system.d/org.freedesktop.fwupd.conf
%{_datadir}/bash-completion/completions/fwupdmgr
%{_datadir}/bash-completion/completions/fwupdtool
@ -341,39 +357,43 @@ systemctl --no-reload preset fwupd-refresh.timer &>/dev/null || :
%dir %{_datadir}/fwupd/remotes.d
%dir %{_datadir}/fwupd/remotes.d/vendor
%dir %{_datadir}/fwupd/remotes.d/vendor/firmware
%{_datadir}/fwupd/remotes.d/vendor/firmware/README.md
%{_datadir}/fwupd/remotes.d/vendor/firmware/*.cab
%{_datadir}/fwupd/remotes.d/vendor/firmware/README.md
%{_datadir}/dbus-1/interfaces/org.freedesktop.fwupd.xml
%{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
%{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
%{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
%{_mandir}/man1/fwupdtool.1*
%if 0%{?have_uefi}
%{_mandir}/man1/dbxtool.*
%endif
%{_mandir}/man1/fwupdmgr.1*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
%{_datadir}/icons/hicolor/scalable/apps/org.freedesktop.fwupd.svg
%{_datadir}/icons/hicolor/*/apps/org.freedesktop.fwupd.*
%{_datadir}/fwupd/firmware_packager.py
%{_datadir}/fwupd/simple_client.py
%{_datadir}/fwupd/add_capsule_header.py
%{_datadir}/fwupd/install_dell_bios_exe.py
%{_unitdir}/fwupd-offline-update.service
%{_unitdir}/fwupd.service
%{_unitdir}/fwupd-refresh.service
%{_unitdir}/fwupd-refresh.timer
%{_unitdir}/system-update.target.wants/
%dir %{_localstatedir}/lib/fwupd
%dir %{_localstatedir}/cache/fwupd
%dir %{_datadir}/fwupd/quirks.d
%{_datadir}/fwupd/quirks.d/builtin.quirk.gz
%if 0%{?have_gi_docgen}
%{_datadir}/doc/fwupd/*.html
%endif
%if 0%{?have_uefi}
%config(noreplace)%{_sysconfdir}/grub.d/35_fwupd
%endif
%if 0%{?libfwupd_19x_version}
%{_libdir}/libfwupd.so.2*
%endif
%{_libdir}/libfwupd.so.3*
%{_libdir}/girepository-1.0/Fwupd-2.0.typelib
/usr/lib/udev/rules.d/*.rules
/usr/lib/systemd/system-shutdown/fwupd.shutdown
%dir %{_libdir}/fwupd-%{version}
%{_libdir}/fwupd-%{version}/libfwupd*.so
@ -394,38 +414,25 @@ systemctl --no-reload preset fwupd-refresh.timer &>/dev/null || :
%files devel
%{_datadir}/gir-1.0/Fwupd-2.0.gir
%if 0%{?have_gi_docgen}
%{_datadir}/doc/fwupd/libfwupdplugin
%{_datadir}/doc/fwupd/libfwupd
%{_datadir}/doc/libfwupdplugin
%{_datadir}/doc/libfwupd
%endif
%{_datadir}/vala/vapi
%if 0%{?libfwupd_19x_version}
%{_includedir}/fwupd-1
%{_libdir}/libfwupd*.so
%endif
%{_includedir}/fwupd-3
%{_libdir}/libfwupd.so
%{_libdir}/pkgconfig/fwupd.pc
%files tests
%if 0%{?enable_tests}
%{_datadir}/fwupd/host-emulate.d/*.json.gz
%dir %{_datadir}/installed-tests/fwupd
%{_datadir}/installed-tests/fwupd/tests/*
%{_datadir}/installed-tests/fwupd/fwupd-tests.xml
%{_datadir}/installed-tests/fwupd/*.test
%{_datadir}/installed-tests/fwupd/*.cab
%{_datadir}/installed-tests/fwupd/fakedevice124.jcat
%{_datadir}/installed-tests/fwupd/fakedevice124.bin
%{_datadir}/installed-tests/fwupd/fakedevice124.metainfo.xml
%{_datadir}/installed-tests/fwupd/*.sh
%{_datadir}/installed-tests/fwupd/*.zip
%if 0%{?have_uefi}
%{_datadir}/installed-tests/fwupd/efi
%endif
%{_datadir}/installed-tests/fwupd/chassis_type
%{_datadir}/installed-tests/fwupd/sys_vendor
# libgusb >= 0.4.5
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
%{_datadir}/fwupd/device-tests/*.json
%endif
%{_libexecdir}/installed-tests/fwupd/*
%{_datadir}/installed-tests/fwupd
%{_libexecdir}/installed-tests/fwupd
%{_datadir}/fwupd/remotes.d/fwupd-tests.conf
%endif

17
sources
View File

@ -1,16 +1,3 @@
SHA512 (fwupd-2.0.19.tar.xz) = a4db6a776cbbedc54cd929899e9df7029f7ca9931a82c5a7661f48bcdc60c7dd18c926254b1b90e1fad225269fbe81f5323cba7ab37624b044c888648dce1944
SHA512 (fwupd-1.9.31.tar.xz) = ce9cd5129d0bcbedade6ba11f661fd3350445557d3116f479a8628376e9e8d6a933e6d2632ac3576d47ad9dbf0eafd54480d2765be86f776e8f04f689287ec80
SHA512 (DBXUpdate-20100307-x64.cab) = f8ad56cf015f4cdc5c305856ff1f7a8589c25a2a671708c61883f427f38eb9b6a7abd3f2c8d79ef9d5076222255e42585917f8705a2a4b13f860bad4e02ec409
SHA512 (DBXUpdate-20140413-x64.cab) = 75771876a2309fa8ca083c2e76520173d434229b7cacf1e7636bd9b1bc4f871d745c348b9792bfb65fd9f40ef54c25bb427b1431151e817e7050b7829456731a
SHA512 (DBXUpdate-20160809-x64.cab) = c27c564999ae84515540f1a598cd0fd9ef3a80cdfaaf439f1c4cb04eaee0e73074548b6d76c21ca3af1ba9c4c0625907e821582998eb5617e33ecd412e6c8a13
SHA512 (DBXUpdate-20200729-aa64.cab) = 7a0cea13ed9b645fd9f1d5e3410a451d83643a75f5dc603272b0771b093f2c012f9a19419160403631c250cf64127ad2ce1c8fa2079b04064af73fe85b9add33
SHA512 (DBXUpdate-20200729-ia32.cab) = 578ec9cccf2001b8bfa54b66809a1662269677050e74bd3225536fbd2be56a8162c48669bd16ea553723580195df1693a28dc01fc1cf62ff06e36a2c5568f74f
SHA512 (DBXUpdate-20200729-x64.cab) = b8b195167d286a3f16aaa7c89149a0d5b4c8f53080e3265758b912f250fa655533c603359b7d1c989ebad6953ce443809b3317ec1d00f750326945ee0537e43b
SHA512 (DBXUpdate-20210429-x64.cab) = 7bc5e7780d105da89da367fbde7c33427bed6c37752b0ae6933793dfe96121c87e49629f14c3b762fc138b10e5c5b6db821dbdc56039ab761e3dca977fc7f817
SHA512 (DBXUpdate-20220812-aa64.cab) = 422ebd0b9d15a26ad12b98798229615a1f5e272a95993934de0cd9d4e4e75589b41eae6366b52b4e25e8766bd7cf74f95d220b719649b1f3864603e46c18c193
SHA512 (DBXUpdate-20220812-ia32.cab) = 09094cc747f865e21fc815199d6ad5b6d3b1c9e19621497e3fe7cdfc4b96e144e721673bdff9ea6204dd465e8a8e2da1cc2b4a4badfd1f4f82c54eace11acb42
SHA512 (DBXUpdate-20220812-x64.cab) = 03dde66a31241ccaa562c57bd9b6b824f2a6b5a1d10affe32ee5a0452056609c981f8f7633bfc65fd0c7da79455b071dd9e02b6af7c880fb1c4a6ffdf577bcdc
SHA512 (DBXUpdate-20230509-aa64.cab) = 259f2373d6ab4cd031fe8b993825ba4cf922306afb3da1617d7b4e9d4ac918018b463135f58ace884a2ceec01789f3b2b31aaf63e63501503e4efbcf46ce567b
SHA512 (DBXUpdate-20230509-ia32.cab) = e9983039fa5283bf8357c75874842d06ac76a36e90c76406ab864a2b76f557f9649e84be3eb20ab473486cd60a08847ece0ef4015145357969067561338a7977
SHA512 (DBXUpdate-20230509-x64.cab) = b2893b431adc3b155335a07e035979a2bf08b7c06975bde7c5561f5e5c1d8ed55f337e7a4782e6ad5c4c50c286cf474a1be356991784c88c23315c467fca30bb
SHA512 (DBXUpdate-20241101-x64.cab) = 0a2883908e15c405c2b8b3adf84b3c322f3ddcb9cae8658bbe4ef99a2b575865654339a3b901db7bb2088b7a669a335be04c50134e7e2168871fc397e1a096b6
SHA512 (DBXUpdate-20250507-legacy-x64.cab) = 12e2a24582be6b6653d68b6c99f8c667165883c79bada6d8f3b01b4867b4574343b75e88b014b37a4479a9bed9ae9542c59cbd084fdb44facf0f8b2efda9fec6
SHA512 (40d3a4630619b83026f66bc64d97a582bbd9223ad53aa3f519ff5e2121d11ca6-DBXUpdate-20250507-x64.cab) = f94e4f44a62621fc0a032a99613df81452bfc8eefc41f473708a43502fb298b477ed9d902166c833278397303a166d29ed891d797fe8e3b3afece5d6bc9645f2