Hi *,

heres an update of pass(1) from 1.7.3 to 1.7.4.

While at it, also fix a POSIX basic RE for sed(1), which prevented
an optimization when re-encrypting to same key set. Now "make test" is
happy, too.

Should my mail program destroy the patch, here's a downloadable copy:
https://cloud.dahlberg.cologne/index.php/s/SS5BRNLRJyRDrSy

[repost due to missing recipient]
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/password-store/Makefile,v
retrieving revision 1.8
diff -u -p -u -r1.8 Makefile
--- Makefile	5 Oct 2020 19:46:18 -0000	1.8
+++ Makefile	22 Jul 2021 11:09:33 -0000
@@ -2,8 +2,7 @@
 
 COMMENT =	simple password store
 
-DISTNAME =	password-store-1.7.3
-REVISION =	0
+DISTNAME =	password-store-1.7.4
 
 CATEGORIES =	security
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/password-store/distinfo,v
retrieving revision 1.4
diff -u -p -u -r1.4 distinfo
--- distinfo	23 Aug 2018 08:19:02 -0000	1.4
+++ distinfo	22 Jul 2021 11:09:33 -0000
@@ -1,2 +1,2 @@
-SHA256 (password-store-1.7.3.tar.xz) = K2xlhG66zpoVoRhQPc0xtkQJSaMNO1KR37WxYVuZo/Q=
-SIZE (password-store-1.7.3.tar.xz) = 63416
+SHA256 (password-store-1.7.4.tar.xz) = z6n69lny7Ws456fD+0Phd9AO26zGJl5uMiFf9A43k8A=
+SIZE (password-store-1.7.4.tar.xz) = 65272
Index: patches/patch-src_password-store_sh
===================================================================
RCS file: /cvs/ports/security/password-store/patches/patch-src_password-store_sh,v
retrieving revision 1.5
diff -u -p -u -r1.5 patch-src_password-store_sh
--- patches/patch-src_password-store_sh	5 Oct 2020 19:46:18 -0000	1.5
+++ patches/patch-src_password-store_sh	22 Jul 2021 11:09:33 -0000
@@ -2,7 +2,16 @@ $OpenBSD: patch-src_password-store_sh,v 
 Index: src/password-store.sh
 --- src/password-store.sh.orig
 +++ src/password-store.sh
-@@ -324,7 +324,7 @@ cmd_init() {
+@@ -129,7 +129,7 @@ reencrypt_path() {
+ 			done
+ 			gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/^sub:[^idr:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)"
+ 		fi
+-		current_keys="$(LC_ALL=C $GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | sed -n 's/^gpg: public key is \([A-F0-9]\+\)$/\1/p' | LC_ALL=C sort -u)"
++		current_keys="$(LC_ALL=C $GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | sed -n 's/^gpg: public key is \([A-F0-9]\{1,\}\)$/\1/p' | LC_ALL=C sort -u)"
+ 
+ 		if [[ $gpg_keys != "$current_keys" ]]; then
+ 			echo "$passfile_display: reencrypting to ${gpg_keys//$'\n'/ }"
+@@ -344,7 +344,7 @@ cmd_init() {
  		fi
  		rmdir -p "${gpg_id%/*}" 2>/dev/null
  	else
@@ -11,24 +20,24 @@ Index: src/password-store.sh
  		printf "%s\n" "$@" > "$gpg_id"
  		local id_print="$(printf "%s, " "$@")"
  		echo "Password store initialized for ${id_print%, }${id_path:+ ($id_path)}"
-@@ -382,7 +382,10 @@ cmd_show() {
+@@ -402,7 +402,10 @@ cmd_show() {
  		else
  			echo "${path%\/}"
  		fi
--		tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors
+-		tree -N -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors
 +		# remove .gpg at end of line, but keep colors
-+		colortree -C -l --noreport "$PREFIX/$path" \
++		colortree -N -C -l --noreport "$PREFIX/$path" \
 +			| tail -n +2 \
 +			| sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
  	elif [[ -z $path ]]; then
  		die "Error: password store is empty. Try \"pass init\"."
  	else
-@@ -394,14 +397,16 @@ cmd_find() {
+@@ -414,14 +417,16 @@ cmd_find() {
  	[[ $# -eq 0 ]] && die "Usage: $PROGRAM $COMMAND pass-names..."
  	IFS="," eval 'echo "Search Terms: $*"'
  	local terms="*$(printf '%s*|*' "$@")"
--	tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
-+	colortree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" \
+-	tree -N -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
++	colortree -N -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" \
 +		| tail -n +2 \
 +		| sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
  }
@@ -42,7 +51,7 @@ Index: src/password-store.sh
  		[[ $? -ne 0 ]] && continue
  		passfile="${passfile%.gpg}"
  		passfile="${passfile#$PREFIX/}"
-@@ -433,7 +438,7 @@ cmd_insert() {
+@@ -453,7 +458,7 @@ cmd_insert() {
  
  	[[ $force -eq 0 && -e $passfile ]] && yesno "An entry already exists for $path. Overwrite it?"
  
@@ -51,7 +60,7 @@ Index: src/password-store.sh
  	set_gpg_recipients "$(dirname -- "$path")"
  
  	if [[ $multiline -eq 1 ]]; then
-@@ -467,7 +472,7 @@ cmd_edit() {
+@@ -487,7 +492,7 @@ cmd_edit() {
  
  	local path="${1%/}"
  	check_sneaky_paths "$path"
@@ -60,7 +69,7 @@ Index: src/password-store.sh
  	set_gpg_recipients "$(dirname -- "$path")"
  	local passfile="$PREFIX/$path.gpg"
  	set_git "$passfile"
-@@ -509,7 +514,7 @@ cmd_generate() {
+@@ -529,7 +534,7 @@ cmd_generate() {
  	check_sneaky_paths "$path"
  	[[ $length =~ ^[0-9]+$ ]] || die "Error: pass-length \"$length\" must be a number."
  	[[ $length -gt 0 ]] || die "Error: pass-length must be greater than zero."
@@ -69,7 +78,7 @@ Index: src/password-store.sh
  	set_gpg_recipients "$(dirname -- "$path")"
  	local passfile="$PREFIX/$path.gpg"
  	set_git "$passfile"
-@@ -598,7 +603,7 @@ cmd_copy_move() {
+@@ -618,7 +623,7 @@ cmd_copy_move() {
  	echo "$old_path"
  	[[ -e $old_path ]] || die "Error: $1 is not in the password store."
  

Reply via email to