From a858664cc30cb9103a9818cdb97a20879ab8cfb5 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 11 Dec 2023 06:09:12 +0900 Subject: [PATCH] Use GnuTLS as the default crypto backend libsecret applications typically use glib-networking for TLS, which loads GnuTLS for encryption. This is to limit the number of cryptographic libraries loaded at run-time. Signed-off-by: Daiki Ueno --- ...ve-unnecessary-inclusion-of-gcrypt.h.patch | 26 +++++++++++++++++++ libsecret.spec | 22 ++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 0001-tests-Remove-unnecessary-inclusion-of-gcrypt.h.patch diff --git a/0001-tests-Remove-unnecessary-inclusion-of-gcrypt.h.patch b/0001-tests-Remove-unnecessary-inclusion-of-gcrypt.h.patch new file mode 100644 index 0000000..57c2b0e --- /dev/null +++ b/0001-tests-Remove-unnecessary-inclusion-of-gcrypt.h.patch @@ -0,0 +1,26 @@ +From 7f31c832306c10f4e92ac31124e144abff282e46 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Mon, 11 Dec 2023 08:39:58 +0900 +Subject: [PATCH] tests: Remove unnecessary inclusion of + +Signed-off-by: Daiki Ueno +--- + egg/test-hkdf.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/egg/test-hkdf.c b/egg/test-hkdf.c +index 289e702..d90233c 100644 +--- a/egg/test-hkdf.c ++++ b/egg/test-hkdf.c +@@ -32,8 +32,6 @@ + #include "egg/egg-secure-memory.h" + #include "egg/egg-testing.h" + +-#include +- + #undef G_DISABLE_ASSERT + + EGG_SECURE_DEFINE_GLIB_GLOBALS (); +-- +2.43.0 + diff --git a/libsecret.spec b/libsecret.spec index b3f2c79..47caa23 100644 --- a/libsecret.spec +++ b/libsecret.spec @@ -5,14 +5,18 @@ %global has_valgrind 1 %endif +%bcond_without gnutls + Name: libsecret Version: 0.21.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for storing and retrieving passwords and other secrets License: LGPLv2+ URL: https://wiki.gnome.org/Projects/Libsecret Source0: https://download.gnome.org/sources/libsecret/%{release_version}/libsecret-%{version}.tar.xz +# https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/133 +Patch: 0001-tests-Remove-unnecessary-inclusion-of-gcrypt.h.patch BuildRequires: docbook-style-xsl BuildRequires: gettext @@ -21,7 +25,11 @@ BuildRequires: meson BuildRequires: vala BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) +%if %{with gnutls} +BuildRequires: pkgconfig(gnutls) >= 3.8.2 +%else BuildRequires: pkgconfig(libgcrypt) >= 1.2.2 +%endif BuildRequires: /usr/bin/xsltproc %if 0%{?has_valgrind} BuildRequires: valgrind-devel @@ -54,7 +62,14 @@ rm -rf build/valgrind/ %build -%meson +%meson \ +%if %{with gnutls} +-Dcrypto=gnutls \ +%else +-Dcrypto=libgcrypt \ +%endif +%{nil} + %meson_build @@ -89,6 +104,9 @@ rm -rf build/valgrind/ %changelog +* Sun Dec 10 2023 Daiki Ueno - 0.21.2-2 +- Use GnuTLS as the default crypto backend + * Sat Dec 09 2023 Kalev Lember - 0.21.2-1 - Update to 0.21.2