diff --git a/0001-Relax-the-certificate-time-checks-in-the-self-tests-.patch b/0001-Relax-the-certificate-time-checks-in-the-self-tests-.patch deleted file mode 100644 index 3f04fd8fbfcb71e4269e4bea49c37a0718723b54..0000000000000000000000000000000000000000 --- a/0001-Relax-the-certificate-time-checks-in-the-self-tests-.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b4627629cdaadd1a75d7c650b7c5973fcd18dfb0 Mon Sep 17 00:00:00 2001 -From: Richard Hughes -Date: Thu, 1 Aug 2019 09:45:25 +0100 -Subject: [PATCH] Relax the certificate time checks in the self tests for the - legacy certificate - -One test verifies a firmware with a signature from the old LVFS which was -hosted on secure-lvfs.rhcloud.com and used the original PKCS-7 key. This key -had a two year validity (expiring today, ohh the naivety...) rather than the -newer fwupd.org key which expires in the year 2058. - -For this specific test only, disable the certificate time checks to fix CI. - -Fixes https://github.com/hughsie/fwupd/issues/1264 ---- - src/fu-keyring-pkcs7.c | 10 +++++++++- - src/fu-keyring.h | 6 ++++-- - src/fu-self-test.c | 3 ++- - 3 files changed, 15 insertions(+), 4 deletions(-) - -diff --git a/src/fu-keyring-pkcs7.c b/src/fu-keyring-pkcs7.c -index 6dc944ed..a42feaa7 100644 ---- a/src/fu-keyring-pkcs7.c -+++ b/src/fu-keyring-pkcs7.c -@@ -642,6 +642,14 @@ fu_keyring_pkcs7_verify_data (FuKeyring *keyring, - for (gint i = 0; i < count; i++) { - gnutls_pkcs7_signature_info_st info; - gint64 signing_time = 0; -+ gnutls_certificate_verify_flags verify_flags = 0; -+ -+ /* use with care */ -+ if (flags & FU_KEYRING_VERIFY_FLAG_DISABLE_TIME_CHECKS) { -+ g_debug ("WARNING: disabling time checks"); -+ verify_flags |= GNUTLS_VERIFY_DISABLE_TIME_CHECKS; -+ verify_flags |= GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS; -+ } - - /* verify the data against the detached signature */ - if (flags & FU_KEYRING_VERIFY_FLAG_USE_CLIENT_CERT) { -@@ -652,7 +660,7 @@ fu_keyring_pkcs7_verify_data (FuKeyring *keyring, - 0, /* vdata_size */ - i, /* index */ - &datum, /* data */ -- 0); /* flags */ -+ verify_flags); - } - if (rc < 0) { - g_set_error (error, -diff --git a/src/fu-keyring.h b/src/fu-keyring.h -index 39819ca4..2f20e35e 100644 ---- a/src/fu-keyring.h -+++ b/src/fu-keyring.h -@@ -20,12 +20,14 @@ G_DECLARE_DERIVABLE_TYPE (FuKeyring, fu_keyring, FU, KEYRING, GObject) - * FuKeyringVerifyFlags: - * @FU_KEYRING_VERIFY_FLAG_NONE: No flags set - * @FU_KEYRING_VERIFY_FLAG_USE_CLIENT_CERT: Use client certificate to verify -+ * @FU_KEYRING_VERIFY_FLAG_DISABLE_TIME_CHECKS: Disable checking of validity periods - * - * The flags to use when interacting with a keyring - **/ - typedef enum { -- FU_KEYRING_VERIFY_FLAG_NONE = 0, -- FU_KEYRING_VERIFY_FLAG_USE_CLIENT_CERT = 1 << 1, -+ FU_KEYRING_VERIFY_FLAG_NONE = 0, -+ FU_KEYRING_VERIFY_FLAG_USE_CLIENT_CERT = 1 << 1, -+ FU_KEYRING_VERIFY_FLAG_DISABLE_TIME_CHECKS = 1 << 2, - /*< private >*/ - FU_KEYRING_VERIFY_FLAG_LAST - } FuKeyringVerifyFlags; -diff --git a/src/fu-self-test.c b/src/fu-self-test.c -index 363f644e..24b12110 100644 ---- a/src/fu-self-test.c -+++ b/src/fu-self-test.c -@@ -2628,7 +2628,8 @@ fu_keyring_pkcs7_func (void) - g_assert_no_error (error); - g_assert_nonnull (blob_sig); - result_pass = fu_keyring_verify_data (keyring, blob_pass, blob_sig, -- FU_KEYRING_VERIFY_FLAG_NONE, &error); -+ FU_KEYRING_VERIFY_FLAG_DISABLE_TIME_CHECKS, -+ &error); - g_assert_no_error (error); - g_assert_nonnull (result_pass); - g_assert_cmpint (fu_keyring_result_get_timestamp (result_pass), >= , 1502871248); --- -2.19.1 - diff --git a/Set-polling-self-tests-to-slow.patch b/Set-polling-self-tests-to-slow.patch deleted file mode 100644 index 70dc372775cd729faf994f3e202f4701204c67e2..0000000000000000000000000000000000000000 --- a/Set-polling-self-tests-to-slow.patch +++ /dev/null @@ -1,47 +0,0 @@ -From dd0b437d866878faa4672518b4b732e8ac00aa30 Mon Sep 17 00:00:00 2001 -From: Mario Limonciello -Date: Tue, 22 Oct 2019 09:29:41 -0500 -Subject: [PATCH] trivial: fu-self-test: set polling self tests to slow - -Currently the test runs for 100ms and looks to see that at least 8 times -the poll function callback hit. - -This normally works well enough, but during self tests it depends upon -too much timing and leads to failures sometimes: - -``` -** (/<>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.189: poll cnt=0 -*# DEBUG: poll cnt=1 -** (/<>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.199: poll cnt=1 -*** (/<>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.209: poll cnt=2 -** (/<>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.227: poll cnt=3 -*# DEBUG: poll cnt=4 -** (/<>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.255: poll cnt=4 -*# DEBUG: poll cnt=5 -** (/<>/obj-s390x-linux-gnu/src/fu-self-test:50432): DEBUG: 15:37:55.267: poll cnt=5 -Bail out! ERROR:../src/fu-self-test.c:3489:fu_device_poll_func: assertion failed (cnt >= 8): (6 >= 8) ---- stderr --- -** -ERROR:../src/fu-self-test.c:3489:fu_device_poll_func: assertion failed (cnt >= 8): (6 >= 8) -------- -``` - -Mark this as a slow test so that it doesn't cause CI failures. ---- - src/fu-self-test.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/fu-self-test.c b/src/fu-self-test.c -index 869b76fc5..2f4a83aa8 100644 ---- a/src/fu-self-test.c -+++ b/src/fu-self-test.c -@@ -4149,7 +4149,8 @@ main (int argc, char **argv) - g_test_add_func ("/fwupd/archive{cab}", fu_archive_cab_func); - g_test_add_func ("/fwupd/engine{requirements-other-device}", fu_engine_requirements_other_device_func); - g_test_add_func ("/fwupd/device{incorporate}", fu_device_incorporate_func); -- g_test_add_func ("/fwupd/device{poll}", fu_device_poll_func); -+ if (g_test_slow ()) -+ g_test_add_func ("/fwupd/device{poll}", fu_device_poll_func); - g_test_add_func ("/fwupd/device-locker{success}", fu_device_locker_func); - g_test_add_func ("/fwupd/device-locker{fail}", fu_device_locker_fail_func); - g_test_add_func ("/fwupd/device{metadata}", fu_device_metadata_func); diff --git a/fwupd-1.2.9.tar.xz b/fwupd-1.2.9.tar.xz deleted file mode 100644 index 3c7432b376eb9283461551fd2f1cdf655b7cdbb2..0000000000000000000000000000000000000000 Binary files a/fwupd-1.2.9.tar.xz and /dev/null differ diff --git a/fwupd-1.5.8.tar.xz b/fwupd-1.5.8.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..ee925afaa003a6110fb8dc4e79bfa293dde3b9be Binary files /dev/null and b/fwupd-1.5.8.tar.xz differ diff --git a/fwupd.spec b/fwupd.spec index ec8ee5df6567356829865d8098470aa66d4a3fff..ce6f289054e21d7f6d8335d6ca51afb57b21743e 100644 --- a/fwupd.spec +++ b/fwupd.spec @@ -8,18 +8,14 @@ %endif Name: fwupd -Version: 1.2.9 -Release: 3 +Version: 1.5.8 +Release: 1 Summary: Make updating firmware on Linux automatic, safe and reliable License: LGPLv2+ URL: https://github.com/fwupd/fwupd/releases Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz -#Self-tests are failing due to an expired cert #1264 -Patch0000: 0001-Relax-the-certificate-time-checks-in-the-self-tests-.patch -Patch6000: Set-polling-self-tests-to-slow.patch - -BuildRequires: gettext glib2-devel libxmlb-devel valgrind valgrind-devel libgcab1-devel +BuildRequires: gettext glib2-devel libxmlb-devel valgrind valgrind-devel libgcab1-devel procps-ng cmake BuildRequires: gpgme-devel libgudev1-devel libgusb-devel libsoup-devel polkit-devel sqlite-devel libxslt BuildRequires: gobject-introspection-devel libarchive-devel systemd gcab elfutils-libelf-devel BuildRequires: bash-completion json-glib-devel help2man vala meson gnutls-utils gnutls-devel gtk-doc @@ -63,7 +59,7 @@ This package contains the development and installed test files for %{name}. %autosetup -n %{name}-%{version} -p1 %build -%meson -Dtests=true -Dgtkdoc=true -Dplugin_dummy=true \ +%meson --wrap-mode=default -Dtests=true -Dgtkdoc=true -Dplugin_dummy=true \ %if %{with uefi} -Dplugin_uefi=true -Dplugin_nvme=true \ %else @@ -79,6 +75,7 @@ This package contains the development and installed test files for %{name}. %else -Dplugin_dell=false -Dplugin_synaptics=false \ %endif + -Dplugin_msr=false \ -Dman=true %meson_build @@ -121,53 +118,53 @@ mkdir -pm 0700 %{buildroot}%{_localstatedir}/lib/%{name}/gnupg %config(noreplace)%{_sysconfdir}/%{name}/remotes.d/*.conf %config(noreplace)%{_sysconfdir}/pki/%{name} %config(noreplace)%{_sysconfdir}/%{name}/daemon.conf +%config(noreplace)%{_sysconfdir}/%{name}/thunderbolt.conf +%config(noreplace)%{_sysconfdir}/%{name}/uefi_capsule.conf +%config(noreplace)%{_sysconfdir}/%{name}/upower.conf %{_sysconfdir}/pki/fwupd-metadata -%{_sysconfdir}/dbus-1/system.d/*.%{name}.conf +%{_datadir}/dbus-1/system.d/*.%{name}.conf %{_libexecdir}/%{name}/%{name} -%{_libexecdir}/%{name}/%{name}tool -%{_libexecdir}/%{name}/%{name}agent %{_libexecdir}/%{name}/%{name}offline %{_datadir}/bash-*/completions/* -%{_datadir}/%{name}/metainfo/*.metainfo.xml -%{_datadir}/%{name}/remotes.d/*/*/*.md %{_datadir}/metainfo/*.metainfo.xml -%{_datadir}/%{name}/firmware-packager %{_datadir}/dbus-1/interfaces/*.fwupd.xml %{_datadir}/dbus-1/system-services/*.service %{_datadir}/polkit-1/*/org.freedesktop* -%{_datadir}/%{name}/quirks.d/ +%{_datadir}/%{name}/ %{_datadir}/icons/hicolor/scalable/apps/*.%{name}.svg %{_localstatedir}/lib/%{name}/*/*.md %{_libdir}/lib%{name}*.so.* %{_libdir}/girepository-1.0/*.typelib -%{_prefix}/lib/udev/rules.d/*.rules -%{_prefix}/lib/systemd/system*/%{name}.shutdown %{_unitdir}/*.service %{_unitdir}/*.wants/ %{_libdir}/fwupd-plugins-3/*.so %ghost %{_localstatedir}/lib/fwupd/gnupg %if %{with uefi} -%config(noreplace)%{_sysconfdir}/%{name}/uefi.conf %{_libexecdir}/%{name}/efi/*.efi %{_libexecdir}/%{name}/efi/*.efi.signed -%{_libexecdir}/%{name}/fwupdate -%{_datadir}/*/*/LC_IMAGES/%{name}* %endif %if %{with redfish} %config(noreplace)%{_sysconfdir}/%{name}/redfish.conf %endif -%if %{with libsmbios} -%{_datadir}/%{name}/remotes.d/dell*/* +%{_presetdir}/fwupd-refresh.preset +/usr/lib/udev/rules.d/*.rules +/usr/lib/systemd/system-shutdown/fwupd.shutdown +%{_unitdir}/fwupd-refresh.timer +%ifarch x86_64 +%{_libexecdir}/fwupd/fwupd-detect-cet %endif +%{_datadir}/fish/vendor_completions.d/fwupdmgr.fish %files devel %{_libdir}/*.so %{_libdir}/*/*.pc %{_includedir}/* %{_datadir}/vala/* -%{_datadir}/gtk-doc/*/lib%{name} +%{_datadir}/gtk-doc/*/%{name} +%{_datadir}/doc/%{name} %{_datadir}/*/*.gir %{_datadir}/installed-tests/%{name} +%{_libexecdir}/installed-tests/%{name} %dir %{_sysconfdir}/%{name}/remotes.d %config(noreplace)%{_sysconfdir}/%{name}/remotes.d/%{name}-tests.conf @@ -175,6 +172,9 @@ mkdir -pm 0700 %{buildroot}%{_localstatedir}/lib/%{name}/gnupg %{_datadir}/man/man1/* %changelog +* Mon Mar 28 2022 lin zhang - 1.5.8-1 +- Upgrade to 1.5.8 + * Sun Jun 28 2020 huanghaitao - 1.2.9-3 - Solve build problem with check