pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mhpgp: Import mhpgp-20070530 as wip/mhpgp



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu May 30 22:30:22 2019 +0200
Changeset:	9d5522fd362cd1385b5c928cf354e54ba7a9abd2

Modified Files:
	Makefile
Added Files:
	mhpgp/DESCR
	mhpgp/Makefile
	mhpgp/PLIST
	mhpgp/distinfo
	mhpgp/patches/patch-mhpgp
	mhpgp/patches/patch-mhsign

Log Message:
mhpgp: Import mhpgp-20070530 as wip/mhpgp

Script to assist using gnupg for signing, encrypting, verifying,
decrypting pgp mail with mh/nmh.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9d5522fd362cd1385b5c928cf354e54ba7a9abd2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                   |  1 +
 mhpgp/DESCR                |  2 ++
 mhpgp/Makefile             | 28 +++++++++++++++++++++
 mhpgp/PLIST                |  5 ++++
 mhpgp/distinfo             |  8 ++++++
 mhpgp/patches/patch-mhpgp  | 31 +++++++++++++++++++++++
 mhpgp/patches/patch-mhsign | 63 ++++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 138 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 2ba9b3dcce..588f8e96a1 100644
--- a/Makefile
+++ b/Makefile
@@ -2182,6 +2182,7 @@ SUBDIR+=	metalog
 SUBDIR+=	metasploit
 SUBDIR+=	mg-cvs
 SUBDIR+=	mg-lsh
+SUBDIR+=	mhpgp
 SUBDIR+=	mic-paren
 SUBDIR+=	microbiomeutil
 SUBDIR+=	microblog-purple
diff --git a/mhpgp/DESCR b/mhpgp/DESCR
new file mode 100644
index 0000000000..75639766d7
--- /dev/null
+++ b/mhpgp/DESCR
@@ -0,0 +1,2 @@
+Script to assist using gnupg for signing, encrypting, verifying,
+decrypting pgp mail with mh/nmh.
diff --git a/mhpgp/Makefile b/mhpgp/Makefile
new file mode 100644
index 0000000000..75bbe0b44d
--- /dev/null
+++ b/mhpgp/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD$
+
+# FIXME: DISTNAME should always have a version
+DISTNAME=	gnupg-scripts-for-mh
+PKGNAME=	mhpgp-20070530
+CATEGORIES=	mail
+MASTER_SITES=	http://faculty.cs.niu.edu/~rickert/mh/
+
+MAINTAINER=	leot%NetBSD.org@localhost
+HOMEPAGE=	http://faculty.cs.niu.edu/~rickert/mh/
+COMMENT=	MH scripts to assist PGP operations on emails
+LICENSE=	public-domain
+
+DEPENDS+=	gnupg2-[0-9]*:../../security/gnupg2
+
+USE_LANGUAGES=	# none
+
+NO_BUILD=	yes
+
+INSTALLATION_DIRS+=	bin ${PKGMANDIR}/man1
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/mhpgp ${DESTDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/mhpgp.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+	${INSTALL_SCRIPT} ${WRKSRC}/mhsign ${DESTDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/mhsign.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/mhpgp/PLIST b/mhpgp/PLIST
new file mode 100644
index 0000000000..a45444e292
--- /dev/null
+++ b/mhpgp/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD$
+bin/mhpgp
+bin/mhsign
+man/man1/mhpgp.1
+man/man1/mhsign.1
diff --git a/mhpgp/distinfo b/mhpgp/distinfo
new file mode 100644
index 0000000000..aebea89b13
--- /dev/null
+++ b/mhpgp/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (gnupg-scripts-for-mh.tar.gz) = 4d6d8204f418bb756ce78e3117340724317de060
+RMD160 (gnupg-scripts-for-mh.tar.gz) = 80c85b96308d177a326945c862f23fbe752eb36b
+SHA512 (gnupg-scripts-for-mh.tar.gz) = a4d153a25835a0517d9bc50ce6e4bd2f1e4cf4e5370a2742421dabf4ce4115c0b4a3ad5036c7cf77b6c2769b69befcef6947fbe8578ce6dbe2fda7b49f5b6a75
+Size (gnupg-scripts-for-mh.tar.gz) = 7736 bytes
+SHA1 (patch-mhpgp) = 7d89bc6dfbe3c27b273cce90c0d7da1afe85e947
+SHA1 (patch-mhsign) = 6a83e3aa4ec044b6853d01c024bd147f08aff98e
diff --git a/mhpgp/patches/patch-mhpgp b/mhpgp/patches/patch-mhpgp
new file mode 100644
index 0000000000..b47014444f
--- /dev/null
+++ b/mhpgp/patches/patch-mhpgp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Use gpg2.
+
+--- mhpgp.orig	2007-05-30 15:12:22.000000000 +0000
++++ mhpgp
+@@ -86,7 +86,7 @@ case "$mt" in
+  "")	echo "I can't find a PGP message there" >&2
+ 	exit 1 ;;
+  ms)	;;	## postpone this one
+- ps)	gpg --verify $FILE
++ ps)	gpg2 --verify $FILE
+ 	exit ;;
+  me|pe)	### we can cheat, and combine these
+ 	sed -n -e ':a
+@@ -99,7 +99,7 @@ case "$mt" in
+ 		b x
+ 		:y
+ 		n
+-		b y' $FILE | gpg --output $TEMP/msg --decrypt
++		b y' $FILE | gpg2 --output $TEMP/msg --decrypt
+ 	X=`tail -1c $TEMP/msg`
+ 	if [ "$X" != "" ] ; then echo >> $TEMP/msg ; fi # make sure trailing \n
+ 	if [ "$outfile" = "" ] ; then
+@@ -158,5 +158,5 @@ sed -e '/^--'"$xbdry"'[ 	]*$/,$d' \
+ sed -e '1,/^--'"$xbdry"'[ 	]*$/d' $TEMP/body |
+ 	sed -n -e '/BEGIN PGP /,/END PGP /p' > $TEMP/msg.asc
+ 
+-gpg --verify $TEMP/msg.asc
++gpg2 --verify $TEMP/msg.asc
+ 
diff --git a/mhpgp/patches/patch-mhsign b/mhpgp/patches/patch-mhsign
new file mode 100644
index 0000000000..464ce6aef9
--- /dev/null
+++ b/mhpgp/patches/patch-mhsign
@@ -0,0 +1,63 @@
+$NetBSD$
+
+Use gpg2.
+
+--- mhsign.orig	2007-05-30 15:12:22.000000000 +0000
++++ mhsign
+@@ -117,7 +117,7 @@ trap "rm -rf $TEMP" 0 1 2 15
+ 
+ 	### lookupkeyring address -- lookup one address in keyring
+ 	lookupkeyring(){
+-		key=`gpg --list-keys "$1" 2>/dev/null`
++		key=`gpg2 --list-keys "$1" 2>/dev/null`
+ 		if [ $? = 0 ] ; then
+ 			echo "$key" | sed -n -e "/^pub/s=^[^/]*/\([^ 	]*\).*=0x\1=p" |
+ 				head -1
+@@ -212,11 +212,11 @@ trap "rm -rf $TEMP" 0 1 2 15
+ 	detachsign(){
+ 		case "$mimefixbody" in
+ 		 y)
+-			gpg -u "$userid" --armor $pgp2opts --textmode \
++			gpg2 -u "$userid" --armor $pgp2opts --textmode \
+ 			 --detach-sign < $TEMP/body > $TEMP/body.asc
+ 			;;
+ 		 *)
+-			gpg -u "$userid" --armor $pgp2opts --no-textmode \
++			gpg2 -u "$userid" --armor $pgp2opts --no-textmode \
+ 			 --detach-sign < $TEMP/body > $TEMP/body.asc
+ 			;;
+ 		esac
+@@ -224,7 +224,7 @@ trap "rm -rf $TEMP" 0 1 2 15
+ 
+ 	### sign --- inline signature for $TEMP/body, output in $TEMP/body.asc
+ 	sign(){
+-		gpg -u "$userid" --armor $pgp2opts --textmode --clearsign \
++		gpg2 -u "$userid" --armor $pgp2opts --textmode --clearsign \
+ 			< $TEMP/body > $TEMP/body.asc
+ 	}
+ 
+@@ -238,19 +238,19 @@ trap "rm -rf $TEMP" 0 1 2 15
+ 
+ 		if [ "$keytype" = R ] ; then 	## pgp2 compatible
+ 		 status=1
+-		 gpg --no-options --no-secmem-warning --pgp2 -b \
++		 gpg2 --no-options --no-secmem-warning --pgp2 -b \
+ 			-u "$userid" $TEMP/body
+-		 gpg --store -z 0 --output $TEMP/body.lit $TEMP/body
++		 gpg2 --store -z 0 --output $TEMP/body.lit $TEMP/body
+ 		 cat $TEMP/body.sig $TEMP/body.lit |
+-		  gpg --no-options --no-literal --store \
++		  gpg2 --no-options --no-literal --store \
+ 		   --no-secmem-warning --compress-algo 1 \
+ 		   --output $TEMP/body.z
+-		 gpg --no-encrypt-to --pgp2 --cipher-algo idea --no-literal \
++		 gpg2 --no-encrypt-to --pgp2 --cipher-algo idea --no-literal \
+ 		  --always-trust --encrypt -r "$userid" $R \
+ 		  -o $TEMP/body.asc --armor $TEMP/body.z
+ 		 status=$?
+ 		else
+-		 gpg --no-encrypt-to --pgp6 -u "$userid" --armor --textmode \
++		 gpg2 --no-encrypt-to --pgp6 -u "$userid" --armor --textmode \
+ 		  --always-trust --output $TEMP/body.asc -r "$userid" $R \
+ 		  --sign --encrypt $TEMP/body
+ 		 status=$?


Home | Main Index | Thread Index | Old Index