From 74b13ddc4ad8c157e7db53277692bff18db6117e Mon Sep 17 00:00:00 2001 From: kink-guest Date: Tue, 28 Feb 2006 17:42:48 +0000 Subject: [PATCH] gpg-key2ps, keylookup: make them less dependent on specific installation paths and thus better portable outside of Debian (Closes: #354142). git-svn-id: svn://svn.debian.org/pgp-tools/trunk@264 b513b33f-fedd-0310-b452-c3deb5f4c849 --- debian/changelog | 7 +++++-- gpg-key2ps/README | 2 +- gpg-key2ps/gpg-key2ps | 4 ++-- keylookup/keylookup | 19 +++++++------------ 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index e9fb775..8da7cda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,17 @@ -signing-party (0.4.4-3) unstable; urgency=low +signing-party (0.4.5-1) UNRELEASED; urgency=low [ Thijs Kinkhorst ] * Upgrade debhelper compatibility to the recommended level 5. * Update FSF addresses. * caff: tweak documentation. + * gpg-key2ps, keylookup: make them less dependent on specific + installation paths and thus better portable outside of Debian + (Closes: #354142). [ Christoph Berg ] * caff: note that mailed keys are encrypted (suggested by Sune Vuorela). - -- Thijs Kinkhorst Tue, 28 Feb 2006 18:15:32 +0100 + -- Thijs Kinkhorst Tue, 28 Feb 2006 18:41:13 +0100 signing-party (0.4.4-2) unstable; urgency=low diff --git a/gpg-key2ps/README b/gpg-key2ps/README index 608740a..2f6b06c 100644 --- a/gpg-key2ps/README +++ b/gpg-key2ps/README @@ -25,7 +25,7 @@ Thijs Kinkhorst . COPYRIGHT & LICENSE ------------------- -Copyright (C) 2001-2005 Simon Richter and Thijs Kinkhorst +Copyright (C) 2001-2006 Simon Richter and Thijs Kinkhorst This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gpg-key2ps/gpg-key2ps b/gpg-key2ps/gpg-key2ps index e18dbc2..05c2bf5 100755 --- a/gpg-key2ps/gpg-key2ps +++ b/gpg-key2ps/gpg-key2ps @@ -2,7 +2,7 @@ # # gpg-key2ps: convert a PGP/GnuPG key into paper slips. # Copyright (C) 2001-2005 Simon Richter -# Copyright (C) 2005 Thijs Kinkhorst +# Copyright (C) 2005-2006 Thijs Kinkhorst # Copyright (C) 2005 Christoph Berg # Licenced under the GNU General Public License, # version 2 or later. @@ -78,7 +78,7 @@ usage(\*STDERR, 1) unless scalar @ARGV >= 1; # determine the paper size through the paperconf tool my $w; my $h; -if ( -x "/usr/bin/paperconf" ) { +if ( `which paperconf` && $? == 0 ) { $w=`paperconf -w`; $h=`paperconf -h`; chomp($w); diff --git a/keylookup/keylookup b/keylookup/keylookup index bdf5087..e069289 100755 --- a/keylookup/keylookup +++ b/keylookup/keylookup @@ -24,7 +24,7 @@ # svn://svn.debian.org/pgp-tools/trunk/ # http://svn.debian.org/wsvn/pgp-tools/trunk/ -delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV', 'PATH'}; +delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; $|=1; # Always flush buffers @@ -35,11 +35,6 @@ use Getopt::Long; my $version = '3.0 ($Id$)'; -# Where to find GnuPG's options file. -# Full path to the dialog and whiptail executeable. -my $Dialog = '/usr/bin/dialog'; -my $Whiptail = '/usr/bin/whiptail'; - # Strings to use in the dialog|whiptail frontend my $TITLE = 'Import Keys'; my $BACKTITLE = 'KeyLookup $Revision$'; @@ -232,14 +227,14 @@ sub selectKeys { $frontend = 'dialog' unless (defined $frontend); if ($frontend eq 'dialog') { - unless (-x $Dialog) { - warn("Dialog ($Dialog) not executeable/installed. Falling back to Whiptail\n"); + unless (`which dialog` && $? == 0) { + warn("Dialog not executeable/installed. Falling back to Whiptail\n"); $frontend = 'whiptail'; } }; if ($frontend eq 'whiptail') { - unless (-x $Whiptail ) { - warn("Whiptail ($Whiptail) not executeable/installed. Falling back to plain\n"); + unless (`which whiptail` && $? == 0 ) { + warn("Whiptail not executeable/installed. Falling back to plain\n"); $frontend = 'plain'; } }; @@ -247,7 +242,7 @@ sub selectKeys { if ( $frontend eq 'dialog' ) { calcDialogSize; my @ARGS = ( - $Dialog, + 'dialog', '--backtitle', $BACKTITLE, '--separate-output', @@ -261,7 +256,7 @@ sub selectKeys { } elsif ( $frontend eq 'whiptail' ) { calcDialogSize; my @ARGS = ( - $Whiptail, + 'whiptail', '--backtitle', $BACKTITLE, '--separate-output', -- 2.39.5