freebsd-ports/security/monkeysphere/files/patch-src_share_common
Vinícius Zavam b1d97de0ca security/monkeysphere: update 0.41 to 0.42
- Makefile

    adopt the port;
    pet portlint;
    remove comment about 'applying patches' on the post-patch stage;
    unmute post-patch.

  - files/*

    patch src/share/mh/revoke_keys, to use gpg2;
    move patch-gpg2 (410 lines), and split it to have separated patches;
    regen all patches using makepatch.

Approved by:	rene (mentor)
Differential Revision:	https://reviews.freebsd.org/D18871
2019-02-25 14:43:23 +00:00

69 lines
2.8 KiB
Text

--- src/share/common.orig 2018-10-16 16:24:55 UTC
+++ src/share/common
@@ -495,7 +495,7 @@ gpg2ssh() {
keyID="$1"
- gpg --export --no-armor "$keyID" | openpgp2ssh "$keyID" 2>/dev/null
+ gpg2 --export --no-armor "$keyID" | openpgp2ssh "$keyID" 2>/dev/null
}
# output known_hosts line from ssh key
@@ -601,7 +601,7 @@ gpg2authorized_keys() {
# script to determine if gpg version is equal to or greater than specified version
is_gpg_version_greater_equal() {
- local gpgVersion=$(gpg --version | head -1 | awk '{ print $3 }')
+ local gpgVersion=$(gpg2 --version | head -1 | awk '{ print $3 }')
local latest=$(printf '%s\n%s\n' "$1" "$gpgVersion" \
| tr '.' ' ' | sort -g -k1 -k2 -k3 \
| tail -1 | tr ' ' '.')
@@ -622,7 +622,7 @@ gpg_fetch_userid() {
log verbose " checking keyserver $KEYSERVER... "
foundkeyids="$(echo | \
- gpg --quiet --batch --with-colons \
+ gpg2 --quiet --batch --with-colons \
--command-fd 0 --keyserver "$KEYSERVER" \
--search ="$userID" 2>/dev/null)"
returnCode="$?"
@@ -637,7 +637,7 @@ $foundkeyids
foundkeyids="$(printf "%s" "$foundkeyids" | grep '^pub:' | cut -f2 -d: | sed 's/^/0x/')"
log verbose " Found keyids on keyserver: $(printf "%s" "$foundkeyids" | tr '\n' ' ')"
if [ -n "$foundkeyids" ]; then
- echo | gpg --quiet --batch --with-colons \
+ echo | gpg2 --quiet --batch --with-colons \
--command-fd 0 --keyserver "$KEYSERVER" \
--recv-keys $foundkeyids &>/dev/null
returnCode="$?"
@@ -693,7 +693,7 @@ process_user_id() {
gpg_fetch_userid "$userID"
# output gpg info for (exact) userid and store
- gpgOut=$(gpg --list-key --fixed-list-mode --with-colons \
+ gpgOut=$(gpg2 --list-key --fixed-list-mode --with-colons \
--with-fingerprint --with-fingerprint \
="$userID" 2>/dev/null) || returnCode="$?"
@@ -962,8 +962,8 @@ list_primary_fingerprints() {
rm -rf "$fake"
}
trap cleanup EXIT
- GNUPGHOME="$fake" gpg --no-tty --quiet --import --ignore-time-conflict 2>/dev/null
- GNUPGHOME="$fake" gpg --with-colons --fingerprint --list-keys | \
+ GNUPGHOME="$fake" gpg2 --no-tty --quiet --import --ignore-time-conflict 2>/dev/null
+ GNUPGHOME="$fake" gpg2 --with-colons --fingerprint --list-keys | \
awk -F: '/^fpr:/{ if (ok) { print $10 } ; ok=0 } /^pub:/{ ok=1 }'
trap - EXIT
cleanup
@@ -981,8 +981,8 @@ get_cert_info() {
fi
rm -rf "$fake"
}
- GNUPGHOME="$fake" gpg --no-tty --quiet --import --ignore-time-conflict 2>/dev/null
- GNUPGHOME="$fake" gpg --with-colons --fingerprint --fixed-list-mode --list-keys "$1"
+ GNUPGHOME="$fake" gpg2 --no-tty --quiet --import --ignore-time-conflict 2>/dev/null
+ GNUPGHOME="$fake" gpg2 --with-colons --fingerprint --fixed-list-mode --list-keys "$1"
trap - EXIT
cleanup
}