diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09d91de --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +pinentry-0.8.0.tar.gz +pinentry-0.8.0.tar.gz.sig +/pinentry-0.8.1.tar.gz +/pinentry-0.8.1.tar.gz.sig +/pinentry-0.8.3.tar.bz2 +/pinentry-0.8.3.tar.bz2.sig diff --git a/0001-Fix-qt4-pinentry-window-created-in-the-background.patch b/0001-Fix-qt4-pinentry-window-created-in-the-background.patch new file mode 100644 index 0000000..8f9faae --- /dev/null +++ b/0001-Fix-qt4-pinentry-window-created-in-the-background.patch @@ -0,0 +1,28 @@ +From c2ab12b3742c929a225c3753439438edc27bfa81 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Tue, 1 Feb 2011 14:42:27 +0100 +Subject: [PATCH] Fix qt4 pinentry window created in the background + +This is probably just a workaround. Proper fix is being investigated. +See: +https://bugzilla.redhat.com/show_bug.cgi?id=589532 +http://stackoverflow.com/questions/2788518/calling-activatewindow-on-qdialog-sends-window-to-background +--- + qt4/pinentrydialog.cpp | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp +index 541baf4..d634eb6 100644 +--- a/qt4/pinentrydialog.cpp ++++ b/qt4/pinentrydialog.cpp +@@ -69,7 +69,6 @@ void raiseWindow( QWidget* w ) + SetForegroundWindow( w->winId() ); + #endif + w->raise(); +- w->activateWindow(); + } + + QPixmap icon( QStyle::StandardPixmap which ) +-- +1.7.3.5 + diff --git a/dead.package b/dead.package deleted file mode 100644 index 95c5e17..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -now included in rhel5 diff --git a/pinentry-wrapper b/pinentry-wrapper new file mode 100755 index 0000000..281bc6b --- /dev/null +++ b/pinentry-wrapper @@ -0,0 +1,82 @@ +#!/bin/sh + +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 Fedora Project +# Copyright (c) 2014 Red Hat +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugzilla.redhat.com/ +# +# Anna Bernathova 2006 +# Pavel Nemec 2006 +# Rex Dieter 2009 +# Pavol Rusnak 2009 +# Boris Ranto 2014 +# +# use proper binary (pinentry-qt4, pinentry-qt, pinentry-gtk-2 or pinentry-curses) + +kde_running= +arg= +display= +# look for a --display option +for opt in "$@"; do + if [ "$opt" = "--display" ]; then + arg=1 + elif [ -n "$arg" ]; then + display="$opt" + else + arg= + fi +done + +# export DISPLAY if pinentry is meant to be run on a different display +# check the KDE_FULL_SESSION variable otherwise +if [ -n "$display" -a "$DISPLAY" != "$display" ]; then + export DISPLAY="$display" +elif [ -n "$KDE_FULL_SESSION" ]; then + kde_running=1 + kde_ver="$KDE_SESSION_VERSION" +fi + +# Check for presence of xprop binary +type xprop >/dev/null 2>/dev/null +XPROP=$? + +if [ -n "$DISPLAY" -a $XPROP -eq 0 ]; then + xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null + if test $? -eq 0; then + kde_running=1 + kde_ver="`xprop -root | sed -n 's/KDE_SESSION_VERSION(CARDINAL) = //p'`" 2>/dev/null + fi +fi + +# if a user supplied a pinentry binary, use it +if [ -n "$PINENTRY_BINARY" ]; +then + export PINENTRY_BINARY="$PINENTRY_BINARY" +# if KDE is detected and pinentry-qt4 exists, use pinentry-qt4 +elif [ -n "$kde_running" -a "$kde_ver"x = 4x -a -x /usr/bin/pinentry-qt4 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt4" +# if KDE is detected and pinentry-qt exists, use pinentry-qt +elif [ -n "$kde_running" -a -x /usr/bin/pinentry-qt ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt" +# otherwise test if pinentry-gtk-2 is installed +elif [ -n "$DISPLAY" -a -x /usr/bin/pinentry-gtk-2 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2" +# otherwise test if pinentry-qt4 exists although KDE is not detected +elif [ -n "$DISPLAY" -a -x /usr/bin/pinentry-qt4 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt4" +# otherwise test if pinentry-qt exists although KDE is not detected +elif [ -n "$DISPLAY" -a -x /usr/bin/pinentry-qt ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt" +# pinentry-curses is installed by default +else + export PINENTRY_BINARY="/usr/bin/pinentry-curses" +fi +exec $PINENTRY_BINARY "$@" diff --git a/pinentry.spec b/pinentry.spec new file mode 100644 index 0000000..f7f9580 --- /dev/null +++ b/pinentry.spec @@ -0,0 +1,293 @@ + +Name: pinentry +Version: 0.8.3 +Release: 7%{?dist} +Summary: Collection of simple PIN or passphrase entry dialogs + +# qt & qt4 subpackage have different license, see subpackage definitions +License: GPLv2+ +URL: http://www.gnupg.org/aegypten/ +Source0: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2 +Source1: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2.sig + +# borrowed from opensuse +Source10: pinentry-wrapper + +## Patches not yet in SVN +Patch53: 0001-Fix-qt4-pinentry-window-created-in-the-background.patch + +BuildRequires: gtk2-devel +BuildRequires: libcap-devel +BuildRequires: ncurses-devel +BuildRequires: qt4-devel + +Requires(pre): %{_sbindir}/update-alternatives +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info + +Provides: %{name}-curses = %{version}-%{release} + +%description +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 curses (text) based version of the PIN entry dialog. + +%package gtk +Summary: Passphrase/PIN entry dialog based on GTK+ +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +Provides: pinentry-gtk2 = %{version}-%{release} +%description gtk +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 GTK GUI based version of the PIN entry dialog. + +%package qt +Summary: Passphrase/PIN entry dialog based on Qt4 +# original code for secstring.cpp doesn't allow GPL versions higher than 3 to be +# used +License: GPLv2 or GPLv3 +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +Obsoletes: pinentry-qt4 < 0.8.0-2 +Provides: pinentry-qt4 = %{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. + + +%prep +%setup -q + +%patch53 -p1 -b .rhbug_589532 + + +%build +%configure \ + --disable-rpath \ + --disable-dependency-tracking \ + --disable-pinentry-gtk \ + --disable-pinentry-qt \ + --without-libcap \ + --enable-pinentry-gtk2 \ + --enable-pinentry-qt4 + +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +# Backwards compatibility +ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk +ln -s pinentry-qt4 $RPM_BUILD_ROOT%{_bindir}/pinentry-qt + +install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry + +# unpackaged files +rm -fv $RPM_BUILD_ROOT%{_infodir}/dir + + +# alternatives dropped at 0.7.6-3 (use %%trigger instead?) +%pre +%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-curses ||: +%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-gtk ||: +%{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-qt ||: + +%post +if [ -f %{_infodir}/pinentry.info* ]; then +/sbin/install-info %{_infodir}/pinentry.info %{_infodir}/dir ||: +fi + +%preun +if [ $1 -eq 0 -a -f %{_infodir}/pinentry.info* ] ; then + /sbin/install-info --delete %{_infodir}/pinentry.info %{_infodir}/dir ||: +fi + +%files +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc AUTHORS ChangeLog NEWS README THANKS TODO +%{_bindir}/pinentry-curses +%{_bindir}/pinentry +%{_infodir}/pinentry.info* + +%files gtk +%{_bindir}/pinentry-gtk +%{_bindir}/pinentry-gtk-2 + +%files qt +%{_bindir}/pinentry-qt +%{_bindir}/pinentry-qt4 + + +%changelog +* Sun Aug 17 2014 Fedora Release Engineering - 0.8.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Aug 12 2014 Boris Ranto - 0.8.3-6 +- fix bogus dates +- upgrade pinentry-wrapper to handle corner cases better + +* Wed Jul 30 2014 Tom Callaway - 0.8.3-5 +- fix license handling + +* Sat Jul 19 2014 Rex Dieter 0.8.3-4 +- /usr/bin/pinentry should not check if stderr is opened (#787775) + +* Sat Jul 19 2014 Rex Dieter - 0.8.3-3 +- .spec cleanup (drop support for old releases) +- -gtk: Provides: pinentry-gtk2 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Jan 30 2014 Stanislav Ochotnicky - 0.8.3-1 +- Update to latest upstream version (0.8.3) + +* Sun Aug 04 2013 Fedora Release Engineering - 0.8.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.8.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Nov 14 2012 Stanislav Ochotnicky - 0.8.1-9 +- Fix macros expansions so that conditionals work + +* Mon Nov 12 2012 Stanislav Ochotnicky - 0.8.1-8 +- Fix up licenses for qt and qt4 subpackages (#875875) + +* Sat Jul 21 2012 Fedora Release Engineering - 0.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0.8.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 14 2011 Adam Jackson 0.8.1-5 +- Rebuild for new libpng + +* Tue Jul 26 2011 Stanislav Ochotnicky - 0.8.1-4 +- Improve wrapper to fallback to curses even with DISPLAY set (#622077) + +* Fri Feb 18 2011 Stanislav Ochotnicky - 0.8.1-3 +- Fix pinentry-curses running as root by disabling capabilities (#677670) + +* Wed Feb 09 2011 Fedora Release Engineering - 0.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 1 2011 Stanislav Ochotnicky - 0.8.1-1 +- Updated to latest upstream version (0.8.1) + +* Fri May 7 2010 Stanislav Ochotnicky - 0.8.0-3 +- Fix X11 even race with gtk (#589998) +- Fix qt4 problems with creating window in the background (#589532) + +* Thu Apr 29 2010 Rex Dieter - 0.8.0-2 +- -qt: build as qt4 version, and drop qt3 support (f13+ only) + +* Tue Apr 27 2010 Stanislav Ochotnicky - 0.8.0-1 +- pinentry-0.8.0 +- pinentry-gtk keyboard grab fail results in SIGABRT (#585422) + +* Sun Apr 18 2010 Rex Dieter - 0.7.6-5 +- pinentry-gtk -g segfaults on focus change (#520236) + +* Sun Sep 13 2009 Rex Dieter - 0.7.6-4 +- Errors installing with --excludedocs (#515925) + +* Sun Sep 13 2009 Rex Dieter - 0.7.6-3 +- drop alternatives, use app-wrapper instead (borrowed from opensuse) +- -qt4 experimental subpkg, -qt includes qt3 version again (#523488) + +* Sun Jul 26 2009 Fedora Release Engineering - 0.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jun 22 2009 Rex Dieter - 0.7.6-1 +- pinentry-0.7.6 +- -qt switched qt4 version, where applicable (f9+, rhel6+) +- fixup scriptlets + +* Sat Apr 25 2009 Rex Dieter - 0.7.5-1 +- pinentry-0.7.5 + +* Thu Feb 26 2009 Fedora Release Engineering - 0.7.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Mar 25 2008 Rex Dieter - 0.7.4-5 +- pinentry failed massrebuild attempt for GCC 4.3 (#434400) + +* Tue Mar 25 2008 Rex Dieter - 0.7.4-4 +- s/qt-devel/qt3-devel/ (f9+) + +* Tue Feb 19 2008 Fedora Release Engineering - 0.7.4-3 +- Autorebuild for GCC 4.3 + +* Sun Feb 17 2008 Adam Tkac - 0.7.4-2 +- rebuild against new libcap + +* Sun Dec 09 2007 Rex Dieter - 0.7.4-1 +- pinentry-0.7.4 +- BR: libcap-devel + +* Sat Aug 25 2007 Rex Dieter - 0.7.3-2 +- respin (BuildID) + +* Sat Aug 11 2007 Rex Dieter - 0.7.3-1 +- pinentry-0.7.3 +- License: GPLv2+ + +* Thu May 10 2007 Rex Dieter - 0.7.2-15 +- respin (for ppc64) + +* Mon Dec 04 2006 Rex Dieter - 0.7.2-14 +- -14 respin (to help retire ATrpms pinentry pkg) + +* Mon Aug 28 2006 Rex Dieter - 0.7.2-3 +- fc6 respin + +* Wed Aug 09 2006 Rex Dieter - 0.7.2-2 +- fc6 respin + +* Wed Mar 01 2006 Rex Dieter +- fc5: gcc/glibc respin + +* Tue Oct 18 2005 Ville Skyttä - 0.7.2-1 +- 0.7.2, docs patch applied upstream. +- Switch to GTK2 in -gtk. +- Fine tune dependencies. +- Build with dependency tracking disabled. +- Clean up obsolete pre-FC2 support. + +* Thu Apr 7 2005 Michael Schwendt - 0.7.1-4 +- rebuilt + +* Wed Jun 30 2004 Ville Skyttä - 0:0.7.1-0.fdr.3 +- BuildRequires qt-devel >= 3.2. + +* Sat May 22 2004 Ville Skyttä - 0:0.7.1-0.fdr.2 +- Spec cleanups. + +* Sat Apr 24 2004 Ville Skyttä - 0:0.7.1-0.fdr.1 +- Update to 0.7.1. + +* Fri Dec 26 2003 Ville Skyttä - 0:0.7.0-0.fdr.1 +- Update to 0.7.0. +- Split GTK+ and QT dialogs into subpackages. + +* Thu Jul 10 2003 Ville Skyttä - 0:0.6.9-0.fdr.1 +- Update to 0.6.9. +- Smoother experience with --excludedocs. +- Don't change alternative priorities on upgrade. + +* Sat Mar 22 2003 Ville Skyttä - 0:0.6.8-0.fdr.1 +- Update to current Fedora guidelines. + +* Wed Feb 12 2003 Warren Togami 0.6.8-1.fedora.3 +- info/dir temporary workaround + +* Sat Feb 8 2003 Ville Skyttä - 0.6.8-1.fedora.1 +- First Fedora release. diff --git a/sources b/sources new file mode 100644 index 0000000..69e194e --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +2ae681cbca0d9fb774b2c90b11ebf56c pinentry-0.8.3.tar.bz2 +ceb97a29e3db6a44f83102fd610f8af8 pinentry-0.8.3.tar.bz2.sig