Package: debsigs Version: 0.1.25 Severity: normal Tags: patch Dear Maintainer,
The debsigs utility uses a mix of fully-qualified and unqualified paths when invoking gpg. There's no need to explicitly run /usr/bin/gpg as perl will use execvp() to invoke the command (which searches PATH). Using the PATH to find gpg makes it easier to run debsigs on other, non-Debian platforms. The attached fix is also in gitlab as: https://gitlab.com/debsigs/debsigs/-/merge_requests/3 - todd -- System Information: Debian Release: 11.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-8-amd64 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages debsigs depends on: ii binutils 2.35.2-2 ii gnupg 2.2.27-2 ii perl 5.32.1-4+deb11u2 Versions of packages debsigs recommends: ii debsig-verify 0.23+b2 debsigs suggests no packages. -- no debconf information
commit b2dbd703b1b40d6e616b2246a84ef3b53e578497 Author: Todd C. Miller <todd.mil...@sudo.ws> Date: Sun Sep 26 19:51:18 2021 -0600 Do not hard-code the path to gpg. There's no need to do this as perl will use execvp() which searches PATH. diff --git a/debsigs b/debsigs index 25b5d44..dc12b02 100644 --- a/debsigs +++ b/debsigs @@ -100,7 +100,7 @@ sub cmd_sign($) { # Why doesn't this work? - # my $gpgout = forktools::forkboth($arfd, $sigfile, "/usr/bin/gpg", + # my $gpgout = forktools::forkboth($arfd, $sigfile, "gpg", #"--detach-sign"); my @cmdline = ("gpg", "--openpgp", "--detach-sign"); diff --git a/gpg.pm b/gpg.pm index c624b4e..d939f2c 100644 --- a/gpg.pm +++ b/gpg.pm @@ -28,9 +28,7 @@ our $VERSION = '1.06'; sub getkeyfromfd { my $forkfd = shift @_; - my ($gpgfd, $gpgpid) = forkreader($forkfd, - "/usr/bin/gpg", - "--list-packets"); + my ($gpgfd, $gpgpid) = forkreader($forkfd, "gpg", "--list-packets"); my ($keyid, $date); @@ -57,8 +55,7 @@ sub getkeyfromfd { sub getkeynamefromid { my $keyid = shift @_; - my ($gpgfd, $gpgpid) = forkreader(undef, "/usr/bin/gpg", - "--list-keys", $keyid); + my ($gpgfd, $gpgpid) = forkreader(undef, "gpg", "--list-keys", $keyid); my $line = <$gpgfd>; chomp $line;