From 515984c6976f65c4d145c153de6cbf7e9a5f6595 Mon Sep 17 00:00:00 2001 From: David King Date: Jun 14 2019 19:46:33 +0000 Subject: [PATCH 1/3] Use pkgconfig for BuildRequires https://docs.fedoraproject.org/en-US/packaging-guidelines/PkgConfigBuildRequires/ --- diff --git a/libcryptui.spec b/libcryptui.spec index 983a90d..65b24cc 100644 --- a/libcryptui.spec +++ b/libcryptui.spec @@ -1,6 +1,6 @@ Name: libcryptui Version: 3.12.2 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Interface components for OpenPGP License: LGPLv2+ @@ -8,17 +8,16 @@ URL: http://projects.gnome.org/seahorse/ Source0: http://download.gnome.org/sources/libcryptui/3.12/%{name}-%{version}.tar.xz Patch0: libcryptui-3.12.2-gpg22.patch -BuildRequires: dbus-glib-devel -BuildRequires: gnome-doc-utils BuildRequires: gnupg BuildRequires: gobject-introspection-devel BuildRequires: gpgme-devel -BuildRequires: gtk3-devel BuildRequires: intltool -BuildRequires: libgnome-keyring-devel -BuildRequires: libnotify-devel -BuildRequires: libSM-devel BuildRequires: libtool +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(gnome-keyring-1) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libnotify) +BuildRequires: pkgconfig(sm) %description libcryptui is a library used for prompting for PGP keys. @@ -70,6 +69,9 @@ find ${RPM_BUILD_ROOT} -type f -name "*.la" -delete %{_datadir}/gir-1.0/* %changelog +* Fri Jun 14 2019 David King - 3.12.2-17 +- Use pkgconfig for BuildRequires + * Fri Feb 01 2019 Fedora Release Engineering - 3.12.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 02d1ae8bd409c41fc3d03284219f3c67515147ed Mon Sep 17 00:00:00 2001 From: David King Date: Jun 14 2019 19:46:34 +0000 Subject: [PATCH 2/3] Improve man page glob https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages --- diff --git a/libcryptui.spec b/libcryptui.spec index 65b24cc..93dfa71 100644 --- a/libcryptui.spec +++ b/libcryptui.spec @@ -48,7 +48,7 @@ find ${RPM_BUILD_ROOT} -type f -name "*.la" -delete %license COPYING-LIBCRYPTUI %doc AUTHORS NEWS README %{_bindir}/* -%{_mandir}/man1/*.gz +%{_mandir}/man1/*.1* %{_datadir}/cryptui %{_libdir}/libcryptui.so.* %{_datadir}/dbus-1/services/* @@ -71,6 +71,7 @@ find ${RPM_BUILD_ROOT} -type f -name "*.la" -delete %changelog * Fri Jun 14 2019 David King - 3.12.2-17 - Use pkgconfig for BuildRequires +- Improve man page glob * Fri Feb 01 2019 Fedora Release Engineering - 3.12.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 9050779232a344ac04275a5fe04d5f6dc7c886b5 Mon Sep 17 00:00:00 2001 From: David King Date: Jun 14 2019 19:54:06 +0000 Subject: [PATCH 3/3] Use gcr instead of libgnome-keyring --- diff --git a/libcryptui-3.12.2-use-gcr.patch b/libcryptui-3.12.2-use-gcr.patch new file mode 100644 index 0000000..97d62d5 --- /dev/null +++ b/libcryptui-3.12.2-use-gcr.patch @@ -0,0 +1,154 @@ +From 728aceb6defd4e6e4f07fa49ca76f5e745230fee Mon Sep 17 00:00:00 2001 +From: Marc-Antoine Perennou +Date: Fri, 16 Sep 2016 11:46:55 +0200 +Subject: [PATCH] daemon: port to gcr-3 + +This removes the dependency on libgnome-keyring and adds a dependency +on libgcr instead. + +Signed-off-by: Marc-Antoine Perennou +Signed-off-by: Stef Walter + * Updated commit message + +https://bugzilla.gnome.org/show_bug.cgi?id=771522 +--- + configure.ac | 14 +++++++------- + daemon/seahorse-secure-buffer.c | 7 ++++--- + daemon/seahorse-secure-memory.c | 21 +++++++++++---------- + 3 files changed, 22 insertions(+), 20 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b621b236..4486e7b2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -252,18 +252,18 @@ if test "$enable_fatal_messages" = "yes" && test "$enable_debug" = "yes"; then + fi + + dnl **************************************************************************** +-dnl GNOME-KEYRING ++dnl GCR + dnl **************************************************************************** + +-PKG_CHECK_MODULES([GNOME_KEYRING], gnome-keyring-1 >= 2.25.5, +- [enable_gnome_keyring=yes],[enable_gnome_keyring=no]) ++PKG_CHECK_MODULES([GCR], gcr-3, ++ [enable_gcr=yes],[enable_gcr=no]) + +-if test "$enable_gnome_keyring" = "no"; then +- AC_MSG_ERROR([gnome-keyring library or headers not found.]) ++if test "$enable_gcr" = "no"; then ++ AC_MSG_ERROR([gcr library or headers not found.]) + fi + +-SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GNOME_KEYRING_CFLAGS" +-SEAHORSE_LIBS="$SEAHORSE_LIBS $GNOME_KEYRING_LIBS" ++SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GCR_CFLAGS" ++SEAHORSE_LIBS="$SEAHORSE_LIBS $GCR_LIBS" + + dnl **************************************************************************** + dnl LIBCRYPTUI +diff --git a/daemon/seahorse-secure-buffer.c b/daemon/seahorse-secure-buffer.c +index 0db87961..63f87cd3 100644 +--- a/daemon/seahorse-secure-buffer.c ++++ b/daemon/seahorse-secure-buffer.c +@@ -20,7 +20,8 @@ + #include "config.h" + + #include "seahorse-secure-buffer.h" +-#include ++#define GCR_API_SUBJECT_TO_CHANGE 1 ++#include + + #include + +@@ -92,7 +93,7 @@ seahorse_secure_buffer_real_insert_text (GtkEntryBuffer *buffer, guint position, + } + } + +- pv->text = gnome_keyring_memory_realloc (pv->text, pv->text_size); ++ pv->text = gcr_secure_memory_realloc (pv->text, pv->text_size); + } + + /* Actual text insertion */ +@@ -158,7 +159,7 @@ seahorse_secure_buffer_finalize (GObject *obj) + SeahorseSecureBufferPrivate *pv = self->priv; + + if (pv->text) { +- gnome_keyring_memory_free (pv->text); ++ gcr_secure_memory_free (pv->text); + pv->text = NULL; + pv->text_bytes = pv->text_size = 0; + pv->text_chars = 0; +diff --git a/daemon/seahorse-secure-memory.c b/daemon/seahorse-secure-memory.c +index 3d94a674..f201d1df 100644 +--- a/daemon/seahorse-secure-memory.c ++++ b/daemon/seahorse-secure-memory.c +@@ -23,7 +23,8 @@ + + #include + +-#include ++#define GCR_API_SUBJECT_TO_CHANGE 1 ++#include + + #include "seahorse-secure-memory.h" + +@@ -47,7 +48,7 @@ switch_malloc (gsize size) + if (size == 0) + return NULL; + if (seahorse_use_secure_mem) +- p = gnome_keyring_memory_try_alloc (size); ++ p = gcr_secure_memory_try_alloc (size); + else + p = malloc (size); + return p; +@@ -71,7 +72,7 @@ switch_calloc (gsize num, gsize size) + if (size == 0 || num == 0) + return NULL; + if (seahorse_use_secure_mem) +- p = gnome_keyring_memory_try_alloc (size * num); ++ p = gcr_secure_memory_try_alloc (size * num); + else + p = calloc (num, size); + return p; +@@ -99,11 +100,11 @@ switch_realloc (gpointer mem, gsize size) + + if (!mem) { + if (seahorse_use_secure_mem) +- p = gnome_keyring_memory_alloc (size); ++ p = gcr_secure_memory_alloc (size); + else + p = malloc (size); +- } else if (gnome_keyring_memory_is_secure (mem)) +- p = gnome_keyring_memory_try_realloc (mem, size); ++ } else if (gcr_secure_memory_is_secure (mem)) ++ p = gcr_secure_memory_try_realloc (mem, size); + else + p = realloc (mem, size); + return p; +@@ -120,8 +121,8 @@ static void + switch_free (gpointer mem) + { + if (mem) { +- if (gnome_keyring_memory_is_secure (mem)) +- gnome_keyring_memory_free (mem); ++ if (gcr_secure_memory_is_secure (mem)) ++ gcr_secure_memory_free (mem); + else + free (mem); + } +@@ -138,9 +139,9 @@ seahorse_try_gk_secure_memory () + { + gpointer p; + +- p = gnome_keyring_memory_try_alloc (10); ++ p = gcr_secure_memory_try_alloc (10); + if (p != NULL) { +- gnome_keyring_memory_free (p); ++ gcr_secure_memory_free (p); + return TRUE; + } + +-- +2.21.0 + diff --git a/libcryptui.spec b/libcryptui.spec index 93dfa71..7f6d4be 100644 --- a/libcryptui.spec +++ b/libcryptui.spec @@ -7,14 +7,16 @@ License: LGPLv2+ URL: http://projects.gnome.org/seahorse/ Source0: http://download.gnome.org/sources/libcryptui/3.12/%{name}-%{version}.tar.xz Patch0: libcryptui-3.12.2-gpg22.patch +Patch1: libcryptui-3.12.2-use-gcr.patch +BuildRequires: autoconf automake BuildRequires: gnupg BuildRequires: gobject-introspection-devel BuildRequires: gpgme-devel BuildRequires: intltool BuildRequires: libtool BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(gnome-keyring-1) +BuildRequires: pkgconfig(gcr-3) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(sm) @@ -32,6 +34,7 @@ documentation for the libcryptui library. %prep %autosetup -p1 +autoreconf --force --install %build %configure @@ -72,6 +75,7 @@ find ${RPM_BUILD_ROOT} -type f -name "*.la" -delete * Fri Jun 14 2019 David King - 3.12.2-17 - Use pkgconfig for BuildRequires - Improve man page glob +- Use gcr instead of libgnome-keyring * Fri Feb 01 2019 Fedora Release Engineering - 3.12.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild