From 6a235fcd35741f106a4091f11719037533ac318db953a812c2c44f292d22658c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 2 Jul 2020 13:06:58 +0000 Subject: [PATCH 1/4] - Don't build with hidapi support to fix issues with Yubikey 5Ci https://github.com/Yubico/libfido2/issues/190 OBS-URL: https://build.opensuse.org/package/show/security/libfido2?expand=0&rev=26 --- libfido2.changes | 6 ++++++ libfido2.spec | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libfido2.changes b/libfido2.changes index 17f31a5..664c085 100644 --- a/libfido2.changes +++ b/libfido2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 2 13:03:31 UTC 2020 - Ismail Dönmez + +- Don't build with hidapi support to fix issues with Yubikey 5Ci + https://github.com/Yubico/libfido2/issues/190 + ------------------------------------------------------------------- Mon May 25 08:11:27 UTC 2020 - Ismail Dönmez diff --git a/libfido2.spec b/libfido2.spec index f732ae9..38ea7e5 100644 --- a/libfido2.spec +++ b/libfido2.spec @@ -28,11 +28,11 @@ Source0: https://developers.yubico.com/libfido2/Releases/%{name}-%{versio Source1: https://developers.yubico.com/libfido2/Releases/%{name}-%{version}.tar.gz.sig BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: libhidapi-devel BuildRequires: libopenssl-1_1-devel BuildRequires: ninja BuildRequires: pkgconfig BuildRequires: pkgconfig(libcbor) +BuildRequires: pkgconfig(libudev) %description Provides library functionality for communicating with a FIDO device @@ -76,7 +76,7 @@ This package contains utilities to use FIDO U2F and FIDO 2.0 protocols. %define __builder ninja %cmake \ -DCBOR_LIBRARY_DIRS=%{_libdir} \ - -DUSE_HIDAPI=1 + -DUSE_HIDAPI=0 %cmake_build %install From 3c9be2f3ea46c9bb16e7299417db5af3e66e97bea5f8b2e597ec8c2c0ff7568f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Fri, 3 Jul 2020 09:13:54 +0000 Subject: [PATCH 2/4] - Install the udev rule OBS-URL: https://build.opensuse.org/package/show/security/libfido2?expand=0&rev=27 --- libfido2.changes | 5 +++++ libfido2.spec | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/libfido2.changes b/libfido2.changes index 664c085..9cd1b3d 100644 --- a/libfido2.changes +++ b/libfido2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 3 09:11:31 UTC 2020 - Ismail Dönmez + +- Install the udev rule + ------------------------------------------------------------------- Thu Jul 2 13:03:31 UTC 2020 - Ismail Dönmez diff --git a/libfido2.spec b/libfido2.spec index 38ea7e5..cc892aa 100644 --- a/libfido2.spec +++ b/libfido2.spec @@ -82,15 +82,25 @@ This package contains utilities to use FIDO U2F and FIDO 2.0 protocols. %install %cmake_install +# u2f-host has the same udev rule, use a different name +mkdir -p %{buildroot}%{_udevrulesdir} +install -m 0644 udev/70-u2f.rules %{buildroot}%{_udevrulesdir}/70-fido2.rules + find %{buildroot} -type f -name "*.a" -delete -print -%post -n %{name}-%{sover} -p /sbin/ldconfig -%postun -n %{name}-%{sover} -p /sbin/ldconfig +%post -n %{name}-%{sover} +/sbin/ldconfig +%{udev_rules_update} + +%postun -n %{name}-%{sover} +/sbin/ldconfig +%{udev_rules_update} %files -n %{name}-%{sover} %license LICENSE %doc README.adoc %{_libdir}/%{name}.so.* +%{_udevrulesdir}/70-fido2.rules %files -n %{name}-devel %{_includedir}/*.h From 9626d4761ed986adbbffb963da7dd9458fe47eb3ef0b09fc6dc6d3c8abd37615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Fri, 3 Jul 2020 10:54:17 +0000 Subject: [PATCH 3/4] - Create a udev subpackage and ship the udev rule OBS-URL: https://build.opensuse.org/package/show/security/libfido2?expand=0&rev=28 --- libfido2.changes | 2 +- libfido2.spec | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/libfido2.changes b/libfido2.changes index 9cd1b3d..63a3f36 100644 --- a/libfido2.changes +++ b/libfido2.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Fri Jul 3 09:11:31 UTC 2020 - Ismail Dönmez -- Install the udev rule +- Create a udev subpackage and ship the udev rule ------------------------------------------------------------------- Thu Jul 2 13:03:31 UTC 2020 - Ismail Dönmez diff --git a/libfido2.spec b/libfido2.spec index cc892aa..e516792 100644 --- a/libfido2.spec +++ b/libfido2.spec @@ -22,7 +22,6 @@ Version: 1.4.0 Release: 0 Summary: FIDO U2F and FIDO 2.0 protocols License: BSD-2-Clause -Group: Productivity/Networking/Security URL: https://developers.yubico.com/ Source0: https://developers.yubico.com/libfido2/Releases/%{name}-%{version}.tar.gz Source1: https://developers.yubico.com/libfido2/Releases/%{name}-%{version}.tar.gz.sig @@ -40,7 +39,7 @@ over USB as well as verifying attestation and assertion signatures. %package -n %{name}-%{sover} Summary: FIDO U2F and FIDO 2.0 protocols -Group: System/Libraries +Requires: %{name}-udev Provides: %{name} = %{version} Obsoletes: %{name} < %{version} @@ -51,9 +50,7 @@ Client-to-Authenticator Protocol (CTAP 1 and 2). %package -n %{name}-devel Summary: Development files for FIDO U2F and FIDO 2.0 protocols -Group: Development/Libraries/C and C++ Requires: %{name}-%{sover} = %{version} -Requires: libhidapi-devel Requires: libopenssl-1_1-devel Conflicts: libfido2-0_4_0 @@ -63,12 +60,19 @@ use FIDO U2F and FIDO 2.0 protocols. %package -n %{name}-utils Summary: Utility programs making use of libfido2, a library for FIDO U2F and FIDO 2.0 -Group: Development/Tools/Other Conflicts: libfido2-0_4_0 %description -n %{name}-utils This package contains utilities to use FIDO U2F and FIDO 2.0 protocols. +%package udev +Summary: Utility programs making use of libfido2, a library for FIDO U2F and FIDO 2.0 +Conflicts: libfido2-0_4_0 + +%description udev +This package contains the udev rules for FIDO2 compatible devices. + + %prep %setup -q @@ -88,19 +92,19 @@ install -m 0644 udev/70-u2f.rules %{buildroot}%{_udevrulesdir}/70-fido2.rules find %{buildroot} -type f -name "*.a" -delete -print -%post -n %{name}-%{sover} -/sbin/ldconfig +%post -n %{name}-%{sover} -p /sbin/ldconfig +%postun -n %{name}-%{sover} -p /sbin/ldconfig + +%post udev %{udev_rules_update} -%postun -n %{name}-%{sover} -/sbin/ldconfig +%postun udev %{udev_rules_update} %files -n %{name}-%{sover} %license LICENSE %doc README.adoc %{_libdir}/%{name}.so.* -%{_udevrulesdir}/70-fido2.rules %files -n %{name}-devel %{_includedir}/*.h @@ -110,6 +114,9 @@ find %{buildroot} -type f -name "*.a" -delete -print %{_mandir}/man3/* %{_libdir}/pkgconfig/* +%files udev +%{_udevrulesdir}/70-fido2.rules + %files -n %{name}-utils %{_bindir}/fido2-* %{_mandir}/man1/* From c8673b128553ec6f7153bf1eb70ed1f42105a76042b851b2e8a6e8cbbe1547fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Fri, 3 Jul 2020 11:05:10 +0000 Subject: [PATCH 4/4] - OBS-URL: https://build.opensuse.org/package/show/security/libfido2?expand=0&rev=29 --- libfido2.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/libfido2.spec b/libfido2.spec index e516792..b0743eb 100644 --- a/libfido2.spec +++ b/libfido2.spec @@ -67,12 +67,10 @@ This package contains utilities to use FIDO U2F and FIDO 2.0 protocols. %package udev Summary: Utility programs making use of libfido2, a library for FIDO U2F and FIDO 2.0 -Conflicts: libfido2-0_4_0 %description udev This package contains the udev rules for FIDO2 compatible devices. - %prep %setup -q