From owner-cvs-all Tue Jan 22 1:23:52 2002 Delivered-To: cvs-all@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 1091A37B404; Tue, 22 Jan 2002 01:23:37 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 7716F532C; Tue, 22 Jan 2002 10:23:35 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Murray Stokely Cc: Jun Kuriyama , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: doc/en_US.ISO8859-1/books/handbook/pgpkeys chapter.sgml References: <200201211616.g0LGGFH54977@freefall.freebsd.org> <20020122054120.GT21973@freebsdmall.com> From: Dag-Erling Smorgrav Date: 22 Jan 2002 10:23:34 +0100 In-Reply-To: <20020122054120.GT21973@freebsdmall.com> Message-ID: Lines: 19 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= Murray Stokely writes: > On Mon, Jan 21, 2002 at 09:59:58PM +0100, Dag-Erling Smorgrav wrote: > > Things would be so much easier if we just placed the keys in separate > > files and used to suck them into the SGML code. > Or we could just use CDATA sections. Or we could do both - have them in CDATA sections in separate files. The advantage to having them in separate files is that chapter.sgml becomes much easier to navigate, and adding new keys can (almost) be automated. Patch attached for your enjoyment (look, Ma, no Perl!) If you like this solution, I'll take care of moving those keys already present out of the SGML file. DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=pgpkeys.diff Index: book.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/book.sgml,v retrieving revision 1.120 diff -u -r1.120 book.sgml --- book.sgml 1 Jan 2002 09:43:37 -0000 1.120 +++ book.sgml 22 Jan 2002 09:04:24 -0000 @@ -50,6 +50,7 @@ + %pgpkeys; ]> Index: pgpkeys/addkey.sh =================================================================== RCS file: pgpkeys/addkey.sh diff -N pgpkeys/addkey.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pgpkeys/addkey.sh 22 Jan 2002 09:13:14 -0000 @@ -0,0 +1,73 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +me="$1" +id="$2" +gpg=$(which gpg) + +if [ -z "${me}" ]; then + echo "Usage: addkey []" >/dev/stderr + exit 1 +fi + +if [ -z "${id}" ]; then + id="${me}@freebsd.org" +fi + +if [ ! -x "${gpg}" ]; then + echo "GnuPG does not seem to be installed" >/dev/stderr + exit 1 +fi + +echo "Retrieving key..." +keylist=$(gpg --list-keys "${id}") +id=$(echo "${keylist}" | awk '/^pub/ { print $2 }' | sed 's%.*/%%') +if [ "${#id}" -lt 8 ]; then + echo "Invalid key ID." >/dev/stderr + exit 1 +elif [ "${#id}" -gt 8 ]; then + echo "${keylist}" + echo + echo "Multiple keys, please specify key ID on command line." >/dev/stderr + exit 1 +fi +fp=$(gpg --fingerprint "${id}") +[ $? -eq 0 ] || exit 1 +key=$(gpg --export --armor "${id}") +[ $? -eq 0 ] || exit 1 + +keyfile="${me}.key" +echo "Generating ${keyfile}..." +( + echo '' + echo '' + echo '' + echo '' +) >"${keyfile}" + +echo "Adding key to entity list..." +mv pgpkeys.ent pgpkeys.ent.orig || exit 1 +( + cat pgpkeys.ent.orig + printf '' 16 "${me}" "${keyfile}" +) | sort -u >pgpkeys.ent + +echo +echo "Unless you are already listed there, you should now add the" +echo "following text to chapter.sgml in the appropriate position in" +echo "the developer section (unless this is a role key or you are a" +echo "core member.) Remember to keep the list sorted by last name!" +echo +echo " " +echo " &a.${me};" +echo " &pgpkey.${me};" +echo " " +echo +echo "Don't forget to 'cvs add ${keyfile}' if this is a new entry," +echo "and check your diffs before committing!" Index: pgpkeys/pgpkeys.ent =================================================================== RCS file: pgpkeys/pgpkeys.ent diff -N pgpkeys/pgpkeys.ent --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pgpkeys/pgpkeys.ent 22 Jan 2002 09:13:55 -0000 @@ -0,0 +1 @@ + --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message