From ed6e396465a551803b5dd3e2e3df33d979dda387 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gjadi@omecha.info>
Date: Thu, 31 May 2018 15:58:29 +0200
Subject: [PATCH] Update keyringer to 0.5.3
Most of the patches have been merged upstream.
---
security/keyringer/Makefile | 2 +-
security/keyringer/distinfo | 4 +-
security/keyringer/patches/patch-Makefile | 50 -------------------
.../patches/patch-lib_keyringer_actions_pwgen | 14 ------
.../patches/patch-lib_keyringer_functions | 57 +++-------------------
security/keyringer/pkg/PLIST | 2 +-
6 files changed, 12 insertions(+), 117 deletions(-)
delete mode 100644 security/keyringer/patches/patch-Makefile
delete mode 100644 security/keyringer/patches/patch-lib_keyringer_actions_pwgen
diff --git a/security/keyringer/Makefile b/security/keyringer/Makefile
index 7a77ddecb44..ad87672b2fe 100644
--- a/security/keyringer/Makefile
+++ b/security/keyringer/Makefile
@@ -2,7 +2,7 @@
COMMENT = manage and share secrets using GnuPG and Git
-DISTNAME = keyringer-0.5.2
+DISTNAME = keyringer-0.5.3
CATEGORIES = security
diff --git a/security/keyringer/distinfo b/security/keyringer/distinfo
index 57520b37829..000e9f3cd76 100644
--- a/security/keyringer/distinfo
+++ b/security/keyringer/distinfo
@@ -1,2 +1,2 @@
-SHA256 (keyringer-0.5.2.tar.bz2) = kiROVyUB98bKDEY2CPBngT7l5bIYRITrIezikU54oB4=
-SIZE (keyringer-0.5.2.tar.bz2) = 69869
+SHA256 (keyringer-0.5.3.tar.bz2) = ikpdp87ldzL9nXBWSZwAIKJi9r7N05cW24EXIucLerU=
+SIZE (keyringer-0.5.3.tar.bz2) = 78371
diff --git a/security/keyringer/patches/patch-Makefile b/security/keyringer/patches/patch-Makefile
deleted file mode 100644
index 15a07364bf3..00000000000
--- a/security/keyringer/patches/patch-Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.1.1.1 2018/04/24 10:01:24 jca Exp $
-
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -17,6 +17,7 @@
- PACKAGE = keyringer
- VERSION = $(shell ./keyringer | head -n 1 | cut -d ' ' -f 2)
- PREFIX ?= /usr/local
-+MANDIR ?=$(PREFIX)/share/man
- ARCHIVE ?= tarballs
- INSTALL = /usr/bin/install
-
-@@ -24,25 +25,25 @@ clean:
- find . -name *~ | xargs rm -f # clean local backups
-
- install_lib:
-- $(INSTALL) -D --mode=0755 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions
-- $(INSTALL) -D --mode=0755 -d lib/keyringer/actions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
-- $(INSTALL) -D --mode=0755 lib/keyringer/actions/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
-- $(INSTALL) -D --mode=0755 -d share/keyringer/editors $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
-- $(INSTALL) -D --mode=0644 share/keyringer/editors/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
-+ $(INSTALL) -D -m 0755 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions
-+ $(INSTALL) -D -m 0755 -d lib/keyringer/actions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
-+ $(INSTALL) -D -m 0755 lib/keyringer/actions/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
-+ $(INSTALL) -D -m 0755 -d share/keyringer/editors $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
-+ $(INSTALL) -D -m 0644 share/keyringer/editors/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/editors
-
- install_bin:
-- $(INSTALL) -D --mode=0755 keyringer $(DESTDIR)/$(PREFIX)/bin/keyringer
-+ $(INSTALL) -D -m 0755 keyringer $(DESTDIR)/$(PREFIX)/bin/keyringer
-
- install_doc:
-- $(INSTALL) -D --mode=0644 index.md $(DESTDIR)/$(PREFIX)/share/doc/$(PACKAGE)/README.md
-- $(INSTALL) -D --mode=0644 LICENSE $(DESTDIR)/$(PREFIX)/share/doc/$(PACKAGE)/LICENSE
-+ $(INSTALL) -D -m 0644 index.md $(DESTDIR)/$(PREFIX)/share/doc/$(PACKAGE)/README.md
-+ $(INSTALL) -D -m 0644 LICENSE $(DESTDIR)/$(PREFIX)/share/doc/$(PACKAGE)/LICENSE
-
- install_man:
-- $(INSTALL) -D --mode=0644 share/man/keyringer.1 $(DESTDIR)/$(PREFIX)/share/man/man1/keyringer.1
-+ $(INSTALL) -D -m 0644 share/man/keyringer.1 $(DESTDIR)/$(MANDIR)/man1/keyringer.1
-
- install_completion:
-- $(INSTALL) -D --mode=0644 lib/keyringer/completions/bash/keyringer $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/keyringer
-- $(INSTALL) -D --mode=0644 lib/keyringer/completions/zsh/_keyringer $(DESTDIR)/$(PREFIX)/share/zsh/vendor-completions/_keyringer
-+ $(INSTALL) -D -m 0644 lib/keyringer/completions/bash/keyringer $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/keyringer
-+ $(INSTALL) -D -m 0644 lib/keyringer/completions/zsh/_keyringer $(DESTDIR)/$(PREFIX)/share/zsh/vendor-completions/_keyringer
-
- install: clean
- @make install_lib install_bin install_doc install_man install_completion
diff --git a/security/keyringer/patches/patch-lib_keyringer_actions_pwgen b/security/keyringer/patches/patch-lib_keyringer_actions_pwgen
deleted file mode 100644
index 8b7c0804c95..00000000000
--- a/security/keyringer/patches/patch-lib_keyringer_actions_pwgen
+++ /dev/null
@@ -1,14 +0,0 @@
-$OpenBSD: patch-lib_keyringer_actions_pwgen,v 1.1.1.1 2018/04/24 10:01:24 jca Exp $
-
-Index: lib/keyringer/actions/pwgen
---- lib/keyringer/actions/pwgen.orig
-+++ lib/keyringer/actions/pwgen
-@@ -18,7 +18,7 @@ function keyringer_pwgen {
-
- # Strip possible newlines if output is wrapped.
- # Also strip trailing = signs as they add nothing to the password's entropy.
-- head -c $ENTROPY_BYTES $ENTROPY_SOURCE | base64 | tr -d '\n='
-+ dd bs=1 count=$ENTROPY_BYTES if=$ENTROPY_SOURCE | base64 | tr -d '\n='
- echo
- }
-
diff --git a/security/keyringer/patches/patch-lib_keyringer_functions b/security/keyringer/patches/patch-lib_keyringer_functions
index bc3034034dd..18b5b1fbc36 100644
--- a/security/keyringer/patches/patch-lib_keyringer_functions
+++ b/security/keyringer/patches/patch-lib_keyringer_functions
@@ -1,9 +1,6 @@
$OpenBSD: patch-lib_keyringer_functions,v 1.1.1.1 2018/04/24 10:01:24 jca Exp $
- no mount -l/tmpfs in OpenBSD
-- fix mktemp(1) template
-- use rm -P to delete secret files (or gshred if available)
-- cleanup empty directories when wiping
- use gpg2, upstream seems to rely on gpg being gpg2
Index: lib/keyringer/functions
@@ -14,49 +11,11 @@ Index: lib/keyringer/functions
# Ramdisk check
mount="`df "$path" | sed -n '$p' | awk '{ print $NF }'`"
- mount -l -t tmpfs | awk '{ print $3 }' | grep -q -e "^$mount$"
-+ mount -t mfs | awk '{ print $3 }' | grep -q -e "^$mount$"
++ mount -t mpfs | awk '{ print $3 }' | grep -q -e "^$mount$"
}
# Setup a temporary file
-@@ -161,7 +161,7 @@ function keyringer_set_tmpfile {
- if [ -z "$1" ]; then
- template="$tmp/keyringer.XXXXXXXXXX"
- else
-- template="$tmp/XXXXXXXXXX.$1"
-+ template="$tmp/keyringer.$1.XXXXXXXXXX"
- fi
-
- mkdir -p "$tmp"
-@@ -197,6 +197,10 @@ function keyringer_shred {
- tool="wipe"
- elif which shred &> /dev/null; then
- tool="shred"
-+ elif which gshred &> /dev/null; then
-+ tool="gshred"
-+ elif _F=$(mktemp); rm -P "${_F}" &> /dev/null; then
-+ tool="rm -P"
- else
- # Worst implementation
- message="WARNING $message"
-@@ -206,13 +210,14 @@ function keyringer_shred {
- echo "$message $path using $tool..."
-
- if [ -d "$path" ]; then
-- if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ]; then
-+ if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ] || [ "$tool" == "rm -P" ]; then
- $tool -rf $path
- else
-- find $path -exec $tool -uf {} \;
-+ find $path -type f -exec $tool -uf {} \;
-+ find -d $path -type d -exec rmdir {} \;
- fi
- else
-- if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ]; then
-+ if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ] || [ "$tool" == "rm -P" ]; then
- $tool -f "$path"
- else
- $tool -uf "$path"
-@@ -305,9 +310,9 @@ function keyringer_set_env {
+@@ -314,9 +314,9 @@ function keyringer_set_env {
fi
if [ ! -z "$KEYID" ]; then
@@ -68,7 +27,7 @@ Index: lib/keyringer/functions
fi
# Check keyring config version
-@@ -592,7 +597,7 @@ function keyringer_recv_keys {
+@@ -601,7 +601,7 @@ function keyringer_recv_keys {
local recipient="$1"
echo "Trying to receive missing key $recipient..."
@@ -77,7 +36,7 @@ Index: lib/keyringer/functions
}
# Refresh keys from keyserver
-@@ -602,7 +607,7 @@ function keyringer_refresh_keys {
+@@ -611,7 +611,7 @@ function keyringer_refresh_keys {
local recipient="$1"
echo "Trying to refresh key $recipient..."
@@ -86,7 +45,7 @@ Index: lib/keyringer/functions
}
# Check recipient size
-@@ -689,7 +694,7 @@ function keyringer_check_recipients {
+@@ -698,7 +698,7 @@ function keyringer_check_recipients {
function keyringer_check_recipient_key {
local recipient="$1"
@@ -95,7 +54,7 @@ Index: lib/keyringer/functions
if [ "$?" != "0" ]; then
if [ "$BASENAME" == "check" ]; then
refresh="no"
-@@ -718,7 +723,7 @@ function keyringer_check_expiration {
+@@ -727,7 +727,7 @@ function keyringer_check_expiration {
seconds="`date +%s`"
# Check the main key
@@ -104,7 +63,7 @@ Index: lib/keyringer/functions
# TODO: Time to expire can be configured via repository options.
ahead="$((86400 * 30 + $seconds))"
-@@ -745,7 +750,7 @@ function keyringer_check_expiration {
+@@ -754,7 +754,7 @@ function keyringer_check_expiration {
# Check the subkeys
local subkey=""
@@ -113,7 +72,7 @@ Index: lib/keyringer/functions
local expiry=$(cut -d : -f 7 <<< "$subkey")
if [[ -z "$expiry" ]]; then
-@@ -842,7 +847,7 @@ function keyringer_create_new_recipients {
+@@ -851,7 +851,7 @@ function keyringer_create_new_recipients {
recipient="`grep -e "^default-key" ~/.gnupg/gpg.conf | cut -d ' ' -f 2`"
if [ ! -z "$recipient" ]; then
diff --git a/security/keyringer/pkg/PLIST b/security/keyringer/pkg/PLIST
index 873af8c0ee8..54dae5a0467 100644
--- a/security/keyringer/pkg/PLIST
+++ b/security/keyringer/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.1.1.1 2018/04/24 10:01:24 jca Exp $
+@comment $OpenBSD: PLIST,v$
bin/keyringer
lib/keyringer/
lib/keyringer/actions/
--
2.16.2
Hello,
Here is a diff to update keyringer to 0.5.3. Most of the patches have
been merged upstream. The only patches left are:
- no mount -l/-t tmpfs on OpenBSD
- force the use of gpg2
I've checked the GPG signature of the package, though I haven't signed
the key of the maintainer, I've been mailing with him.
Best,
No comments:
Post a Comment