From 13e793a6cd69900b84db7b944001d666f210bc0b Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 19 Mar 2024 09:46:18 +0100 Subject: [PATCH] 1.3.0-1 This migrates the package to Qt6, adds a new desktops file and takes the upstream patches to use gcr-4 --- .gitignore | 2 ++ pinentry-1.1.1-coverity.patch | 7 +--- pinentry-1.2.1-gcr4.patch | 68 ----------------------------------- pinentry.spec | 43 ++++++++++------------ sources | 4 +-- 5 files changed, 24 insertions(+), 100 deletions(-) delete mode 100644 pinentry-1.2.1-gcr4.patch diff --git a/.gitignore b/.gitignore index 05fd6e0..be906b1 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ pinentry-0.8.0.tar.gz.sig /pinentry-1.2.0.tar.bz2.sig /pinentry-1.2.1.tar.bz2 /pinentry-1.2.1.tar.bz2.sig +/pinentry-1.3.0.tar.bz2 +/pinentry-1.3.0.tar.bz2.sig diff --git a/pinentry-1.1.1-coverity.patch b/pinentry-1.1.1-coverity.patch index dc28637..6ce708a 100644 --- a/pinentry-1.1.1-coverity.patch +++ b/pinentry-1.1.1-coverity.patch @@ -2,14 +2,9 @@ commit a87d9e8f89f946a733c756c72bf5ec41e0a738b8 Author: Jakub Jelen Date: Wed Apr 14 15:51:27 2021 +0900 - core,emacs,tty,curses: Fix memory leaks, invalid accese, and mistake. + pinentry: Fix memory leaks - * pinentry/pinentry-curses.c (dialog_create): Free NEW. - [HAVE_NCURSESW] (dialog_run): Free OLD_CTYPE on error. * pinentry/pinentry.c (pinentry_inq_genpin): Free VALUE on error. - * tty/pinentry-tty.c (tty_cmd_handler): Don't access closed FDs. - * pinentry/pinentry-emacs.c (set_labels): Fix for ->default_cancel. - -- GnuPG-bug-id: 5384 diff --git a/pinentry-1.2.1-gcr4.patch b/pinentry-1.2.1-gcr4.patch deleted file mode 100644 index c74009e..0000000 --- a/pinentry-1.2.1-gcr4.patch +++ /dev/null @@ -1,68 +0,0 @@ -From: Yaakov Selkowitz via Gnupg-devel -Date: Mon, 11 Mar 2024 03:19:36 +0000 (-0400) -Subject: gnome3: prefer gcr-4 -X-Git-Url: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commitdiff_plain;h=069c2192234566c14840aefced795039d1f79137 - -gnome3: prefer gcr-4 - -Newer distributions are now using gcr-4, while older ones will still have -gcr-3. The APIs used by pinentry have not changed in between versions, -only the top-level header has changed. Also, for gcr-3, only gcr-base-3 -is required. - -(I have attempted to sign up for a dev.gnupg.org account, but am still -awaiting verification.) - -Signed-off-by: Yaakov Selkowitz ---- - -diff --git a/configure.ac b/configure.ac -index f9d090f..7dde8fb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -458,15 +458,24 @@ AM_CONDITIONAL(BUILD_PINENTRY_GTK_2, test "$pinentry_gtk_2" = "yes") - if test "$pinentry_gnome_3" != "no"; then - PKG_CHECK_MODULES( - GNOME3, -- [gcr-3,gcr-base-3], -+ [gcr-4], - [ - pinentry_gnome_3=yes - AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod]) -+ AC_DEFINE(GCR_API_4, 1, [GCR API version]) - ], -- [ -- AC_MSG_WARN([pkg-config could not find the module gcr-3,gcr-base-3]) -- pinentry_gnome_3=no -- ] -+ [PKG_CHECK_MODULES( -+ GNOME3, -+ [gcr-base-3], -+ [ -+ pinentry_gnome_3=yes -+ AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod]) -+ ], -+ [ -+ AC_MSG_WARN([pkg-config could not find the module gcr-4 or gcr-base-3]) -+ pinentry_gnome_3=no -+ ] -+ )] - ) - fi - -diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c -index 8a8fbed..7f21d6f 100644 ---- a/gnome3/pinentry-gnome3.c -+++ b/gnome3/pinentry-gnome3.c -@@ -23,7 +23,11 @@ - # include "config.h" - #endif - -+#ifdef GCR_API_4 -+#include -+#else - #include -+#endif - - #include - #include diff --git a/pinentry.spec b/pinentry.spec index b003d0b..987edec 100644 --- a/pinentry.spec +++ b/pinentry.spec @@ -1,11 +1,10 @@ %if 0%{?fedora} || 0%{?rhel} < 10 %bcond_without gtk2 -%bcond_without qt5 %endif Name: pinentry -Version: 1.2.1 -Release: 7%{?dist} +Version: 1.3.0 +Release: 1%{?dist} Summary: Collection of simple PIN or passphrase entry dialogs License: GPL-2.0-or-later @@ -14,8 +13,6 @@ Source0: https://gnupg.org/ftp/gcrypt/pinentry/%{name}-%{version}.tar.bz2 Source1: https://gnupg.org/ftp/gcrypt/pinentry/%{name}-%{version}.tar.bz2.sig Patch1: pinentry-1.1.1-coverity.patch -# port gnome3 binary to gcr-4 -Patch2: pinentry-1.2.1-gcr4.patch # borrowed from opensuse Source10: pinentry-wrapper @@ -32,9 +29,8 @@ BuildRequires: pkgconfig(libsecret-1) %if %{with gtk2} BuildRequires: pkgconfig(gtk+-2.0) %endif -%if %{with qt5} -BuildRequires: pkgconfig(Qt5Core) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) -%endif +BuildRequires: pkgconfig(Qt6Core) pkgconfig(Qt6Gui) pkgconfig(Qt6Widgets) +BuildRequires: desktop-file-utils Provides: %{name}-curses = %{version}-%{release} @@ -67,19 +63,18 @@ http://www.gnupg.org/aegypten/ for details. This package contains the GTK GUI based version of the PIN entry dialog. %endif -%if %{with qt5} %package qt -Summary: Passphrase/PIN entry dialog based on Qt5 +Summary: Passphrase/PIN entry dialog based on Qt6 Requires: %{name} = %{version}-%{release} Provides: %{name}-gui = %{version}-%{release} Obsoletes: pinentry-qt4 < 0.8.0-2 -Provides: pinentry-qt5 = %{version}-%{release} +Obsoletes: pinentry-qt5 < 1.2.1-7 +Provides: pinentry-qt6 = %{version}-%{release} %description qt Pinentry is a collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol as described by the aegypten project; see http://www.gnupg.org/aegypten/ for details. -This package contains the Qt4 GUI based version of the PIN entry dialog. -%endif +This package contains the Qt6 GUI based version of the PIN entry dialog. %package emacs Summary: Passphrase/PIN entry dialog based on emacs @@ -102,7 +97,6 @@ This package contains the tty version of the PIN entry dialog. %prep %setup -q %patch -P1 -p1 -b .coverity -%patch -P2 -p1 -b .gcr4 %build @@ -118,11 +112,7 @@ autoreconf -fiv %else --disable-pinentry-gtk2 \ %endif -%if %{with qt5} - --enable-pinentry-qt5 \ -%else - --disable-pinentry-qt5 \ -%endif + --enable-pinentry-qt6 \ --enable-pinentry-emacs \ --enable-pinentry-tty \ --enable-libsecret @@ -137,15 +127,16 @@ autoreconf -fiv %if %{with gtk2} ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk %endif -%if %{with qt5} ln -s pinentry-qt $RPM_BUILD_ROOT%{_bindir}/pinentry-qt4 -%endif install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry # unpackaged files rm -fv $RPM_BUILD_ROOT%{_infodir}/dir +desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnupg.pinentry-qt.desktop +desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnupg.pinentry-qt5.desktop + %files %license COPYING %doc AUTHORS ChangeLog NEWS README THANKS TODO @@ -163,12 +154,13 @@ rm -fv $RPM_BUILD_ROOT%{_infodir}/dir %{_bindir}/pinentry-gtk %endif -%if %{with qt5} %files qt %{_bindir}/pinentry-qt -# symlink for backward compatibility +# symlinks for backward compatibility %{_bindir}/pinentry-qt4 -%endif +%{_bindir}/pinentry-qt5 +%{_datadir}/applications/org.gnupg.pinentry-qt.desktop +%{_datadir}/applications/org.gnupg.pinentry-qt5.desktop %files emacs %{_bindir}/pinentry-emacs @@ -177,6 +169,9 @@ rm -fv $RPM_BUILD_ROOT%{_infodir}/dir %{_bindir}/pinentry-tty %changelog +* Tue Mar 19 2024 Jakub Jelen - 1.3.0-1 +- New upstream release (#2270095) + * Mon Mar 11 2024 Yaakov Selkowitz - 1.2.1-7 - Use gcr-4 in gnome3 binary diff --git a/sources b/sources index 43f1625..7f3a621 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pinentry-1.2.1.tar.bz2) = a665315628f4dcf07e16a22db3f3be15d7e7e93b3deec0546c7275b71b0e3bd65535a08af5e12d6339fd6595132df86529401d9d12bd17c428a3466e8dfafab6 -SHA512 (pinentry-1.2.1.tar.bz2.sig) = b14525f6ace3d1fc3dc9e1173de8821fa2a960b870876beb10b98f41222378c1e3f4f79481f3f3854c1753e8dc9a7eb92862ffa583c7be0788ec25045a4e1176 +SHA512 (pinentry-1.3.0.tar.bz2) = 1bbac81c6811cffc8969a46494e6daa6b8447802f47ff6fa3e4dc9ac244cf6e5f629834c9b6a60770d06bff6c9932ad4059f10d2fdf93fd9e26fd5d21c0e3732 +SHA512 (pinentry-1.3.0.tar.bz2.sig) = 77a61877adf241d67caeea3af4c12a2c7c13ddc423ac001fab79bcec463a5853d8806052d61504fae0c67e0a9d1edf6a12d24b560ff7b4083eea5e86f9b54a90