summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2018-03-15 20:21:52 +0000
committerkhorben <khorben@pkgsrc.org>2018-03-15 20:21:52 +0000
commit7fb50fd817bf0936da8dd6ad3f763028582e452f (patch)
tree8d318cc9c2fa86fb6472ff6d293b8abbdf08db6f
parent4e7b670036fa3a9dd819c9bdedc54fcdc83665af (diff)
downloadpkgsrc-7fb50fd817bf0936da8dd6ad3f763028582e452f.tar.gz
Output signatures to the standard output for "-"
This is to reflect the behaviour documented in netpgp(1). Originally submitted on tech-pkg@ as: [PATCH 09/11] Output signatures to the standard output for "-" Only modified for consistency with the coding style; as also applied in NetBSD's src repository.
-rw-r--r--security/netpgp/Makefile4
-rw-r--r--security/netpgp/distinfo3
-rw-r--r--security/netpgp/patches/patch-src_lib_signature.c19
3 files changed, 23 insertions, 3 deletions
diff --git a/security/netpgp/Makefile b/security/netpgp/Makefile
index 0ccfde5778a..61faea58450 100644
--- a/security/netpgp/Makefile
+++ b/security/netpgp/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2018/03/15 20:14:14 khorben Exp $
+# $NetBSD: Makefile,v 1.29 2018/03/15 20:21:52 khorben Exp $
DISTNAME= netpgp-20140220
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_LOCAL}
diff --git a/security/netpgp/distinfo b/security/netpgp/distinfo
index 43ce9d6f0cf..7796fc7bf5e 100644
--- a/security/netpgp/distinfo
+++ b/security/netpgp/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2018/03/15 20:14:14 khorben Exp $
+$NetBSD: distinfo,v 1.23 2018/03/15 20:21:52 khorben Exp $
SHA1 (netpgp-20140220.tar.gz) = 815418cbae5d02a1385cd7947618303e5aa06d5c
RMD160 (netpgp-20140220.tar.gz) = 970f55292852d5dbfde3eb17a5fefd6a7c820c4e
@@ -6,4 +6,5 @@ SHA512 (netpgp-20140220.tar.gz) = ec6cfa0131cd50aee273b81cd64f448258121d7e9c8d49
Size (netpgp-20140220.tar.gz) = 1521820 bytes
SHA1 (patch-src_lib_keyring.c) = b924af4877aaab98e542425b5d9427830ddd5b75
SHA1 (patch-src_lib_reader.c) = 2ebaddebbc2f6f42f7391933ebfef39e3a73a367
+SHA1 (patch-src_lib_signature.c) = 7e1c71b5df48bba1d5213ec5ea946db9ed1ba8d4
SHA1 (patch-src_netpgp_netpgp.1) = a9b2345ced1d80ee14a4e100181fa34121543509
diff --git a/security/netpgp/patches/patch-src_lib_signature.c b/security/netpgp/patches/patch-src_lib_signature.c
new file mode 100644
index 00000000000..7fe2a78598f
--- /dev/null
+++ b/security/netpgp/patches/patch-src_lib_signature.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_lib_signature.c,v 1.1 2018/03/15 20:21:52 khorben Exp $
+
+Output signatures to the standard output for "-".
+
+--- src/lib/signature.c.orig 2012-03-05 02:20:18.000000000 +0000
++++ src/lib/signature.c
+@@ -903,7 +903,11 @@ open_output_file(pgp_output_t **output,
+
+ /* setup output file */
+ if (outname) {
+- fd = pgp_setup_file_write(output, outname, overwrite);
++ if (strcmp(outname, "-") == 0) {
++ fd = pgp_setup_file_write(output, NULL, overwrite);
++ } else {
++ fd = pgp_setup_file_write(output, outname, overwrite);
++ }
+ } else {
+ unsigned flen = (unsigned)(strlen(inname) + 4 + 1);
+ char *f = NULL;