rpms/pinentry/devel pinentry-wrapper, 1.1, 1.2 pinentry.spec, 1.25, 1.26

Rex Dieter rdieter at fedoraproject.org
Wed Sep 16 17:25:58 UTC 2009


Author: rdieter

Update of /cvs/pkgs/rpms/pinentry/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32486

Modified Files:
	pinentry-wrapper pinentry.spec 
Log Message:
* Wed Sep 13 2009 Rex Dieter <rdieter at fedoraproject.org> - 0.7.6-3
- drop alternatives, use app-wrapper instead (borrowed from opensuse)
- -qt4 experimental subpkg, -qt includes qt3 version again  (#523488)



Index: pinentry-wrapper
===================================================================
RCS file: /cvs/pkgs/rpms/pinentry/devel/pinentry-wrapper,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- pinentry-wrapper	23 Jun 2009 15:28:41 -0000	1.1
+++ pinentry-wrapper	16 Sep 2009 17:25:57 -0000	1.2
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 Fedora Project
 # This file and all modifications and additions to the pristine
 # package are under the same license as the package itself.
 #
@@ -8,9 +9,12 @@
 #
 # Anna Bernathova <anicka at novell.com> 2006
 # Pavel Nemec <pnemec at novell.com> 2006
-# 
+# Rex Dieter <rdieter at fedoraproject.org> 2009
+#
 # use proper binary (pinentry-qt, pinentry-gtk-2 or pinentry-curses) 
 
+if [ -z "$PINENTRY_BINARY" ]; then
+
 kde_running=
 if [ -n "$KDE_FULL_SESSION" ]; then
     kde_running=1
@@ -40,15 +44,19 @@ else
 fi
 
 # if KDE is detected and pinentry-qt exists, use pinentry-qt
-if [ -n "$kde_running" -a -f /usr/bin/pinentry-qt ]
+if [ -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 [ -f /usr/bin/pinentry-gtk-2 ] 
+elif [ -x /usr/bin/pinentry-gtk-2 ] 
 then
 	export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2"
+# otherwise test if pinentry-qt4 is installed
+elif [ -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 [ -f /usr/bin/pinentry-qt ]
+elif [ -x /usr/bin/pinentry-qt ]
 then
 	export PINENTRY_BINARY="/usr/bin/pinentry-qt"
 # pinentry-curses is installed by default 
@@ -57,11 +65,13 @@ else
 	for opt in "$@"; do
 		if [ "x$opt" = "x--display" ]; then
 		        # should not happen because of package dependencies
-			echo "Please install pinentry-qt or pinentry-gtk2" >&2
+			echo "Please install pinentry-gui" >&2
 			exit 1
 		fi
 	done
 	export PINENTRY_BINARY="/usr/bin/pinentry-curses"
 		
 fi
+fi
+
 exec $PINENTRY_BINARY "$@"


Index: pinentry.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pinentry/devel/pinentry.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- pinentry.spec	26 Jul 2009 18:48:20 -0000	1.25
+++ pinentry.spec	16 Sep 2009 17:25:57 -0000	1.26
@@ -1,13 +1,14 @@
 
 %if 0%{?fedora} > 8 || 0%{?rhel} > 5
 %define _enable_pinentry_qt4 --enable-pinentry-qt4
+%define _enable_pinentry_qt --enable-pinentry-qt
 %else
 %define _enable_pinentry_qt --enable-pinentry-qt 
 %endif
 
 Name:    pinentry
 Version: 0.7.6
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Collection of simple PIN or passphrase entry dialogs
 
 Group:   Applications/System
@@ -17,6 +18,9 @@ Source0: ftp://ftp.gnupg.org/gcrypt/pine
 Source1: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.gz.sig
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# borrowed from opensuse
+Source10: pinentry-wrapper
+
 BuildRequires: gtk2-devel
 BuildRequires: libcap-devel
 BuildRequires: ncurses-devel
@@ -27,9 +31,8 @@ BuildRequires: qt-devel
 BuildRequires: qt4-devel
 %endif
 
-Requires(post): %{_sbindir}/update-alternatives
+Requires(pre): %{_sbindir}/update-alternatives
 Requires(post): /sbin/install-info
-Requires(postun): %{_sbindir}/update-alternatives
 Requires(preun): /sbin/install-info
 
 Provides: %{name}-curses = %{version}-%{release}
@@ -45,8 +48,6 @@ Summary: Passphrase/PIN entry dialog bas
 Group:   Applications/System
 Requires: %{name} = %{version}-%{release}
 Provides: %{name}-gui = %{version}-%{release}
-Requires(post): %{_sbindir}/update-alternatives
-Requires(postun): %{_sbindir}/update-alternatives
 %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
@@ -54,17 +55,27 @@ http://www.gnupg.org/aegypten/ for detai
 This package contains the GTK GUI based version of the PIN entry dialog.
 
 %package qt
-Summary: Passphrase/PIN entry dialog based on Qt
+Summary: Passphrase/PIN entry dialog based on Qt3
 Group:   Applications/System
 Requires: %{name} = %{version}-%{release}
 Provides: %{name}-gui = %{version}-%{release}
-Requires(post): %{_sbindir}/update-alternatives
-Requires(postun): %{_sbindir}/update-alternatives
 %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 Qt GUI based version of the PIN entry dialog.
+This package contains the Qt3 GUI based version of the PIN entry dialog.
+
+%package qt4
+Summary: Passphrase/PIN entry dialog based on Qt4
+Group:   Applications/System
+Requires: %{name} = %{version}-%{release}
+Provides: %{name}-gui = %{version}-%{release}
+%description qt4
+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.
+Support for Qt4 is new, and a bit experimental.
 
 
 %prep
@@ -100,12 +111,8 @@ make install DESTDIR=$RPM_BUILD_ROOT
 
 # Backwards compatibility
 ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk
-%if 0%{?_enable_pinentry_qt4:1}
-ln -s pinentry-qt4 $RPM_BUILD_ROOT%{_bindir}/pinentry-qt
-%endif
 
-# Dummy symlink for %%ghost
-ln -sf %{_sysconfdir}/alternatives/pinentry $RPM_BUILD_ROOT%{_bindir}/pinentry
+install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pinentry
 
 # unpackaged files
 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
@@ -115,63 +122,49 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 rm -rf $RPM_BUILD_ROOT
 
 
+# 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
 /sbin/install-info %{_infodir}/pinentry.info %{_infodir}/dir 
-%{_sbindir}/update-alternatives --install %{_bindir}/pinentry \
-  pinentry %{_bindir}/pinentry-curses %{?curses_priority}%{!?curses_priority:10} ||:
-
-%post gtk
-%{_sbindir}/update-alternatives --install %{_bindir}/pinentry \
-  pinentry %{_bindir}/pinentry-gtk %{?gtk_priority}%{!?gtk_priority:40} ||:
-
-%post qt
-%{_sbindir}/update-alternatives --install %{_bindir}/pinentry \
-  pinentry %{_bindir}/pinentry-qt %{?qt_priority}%{!?qt_priority:30} ||:
 
 %preun
 if [ $1 -eq 0 ] ; then
   /sbin/install-info --delete %{_infodir}/pinentry.info %{_infodir}/dir ||:
 fi
 
-%postun
-if [ $1 -eq 0 ] ; then
-  %{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-curses ||:
-fi
-
-%postun gtk
-if [ $1 -eq 0 ] ; then
-  %{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-gtk ||:
-fi
-
-%postun qt
-if [ $1 -eq 0 ] ; then
-  %{_sbindir}/update-alternatives --remove pinentry %{_bindir}/pinentry-qt ||:
-fi
-
 
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
 %{_bindir}/pinentry-curses
-%ghost %{_bindir}/pinentry
+%{_bindir}/pinentry
 %{_infodir}/pinentry.info*
 
 %files gtk
 %defattr(-,root,root,-)
 %{_bindir}/pinentry-gtk
 %{_bindir}/pinentry-gtk-2
-%ghost %{_bindir}/pinentry
 
 %files qt
 %defattr(-,root,root,-)
 %{_bindir}/pinentry-qt
+
 %if 0%{?_enable_pinentry_qt4:1}
+%files qt4
+%defattr(-,root,root,-)
 %{_bindir}/pinentry-qt4
 %endif
-%ghost %{_bindir}/pinentry
 
 
 %changelog
+* Wed Sep 13 2009 Rex Dieter <rdieter at fedoraproject.org> - 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 <rel-eng at lists.fedoraproject.org> - 0.7.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list