summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-02-13 23:29:59 +0000
committerColin Watson <cjwatson@debian.org>2022-02-13 23:37:33 +0000
commit188c3d86aeef48ae7ac13f75e087c3904d10b4f0 (patch)
treee8cafe248431ad1f6f5d5202add4dc43208cc969
parentc053f99cd93cee4159936273e64663378e61f72c (diff)
parent7453f40c3f6491a48566869d1f4fffe386d2cd81 (diff)
Ensure compatibility with tree 2.0
Closes: #1005550
-rw-r--r--debian/.git-dpm4
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/tree-2.0-compat.patch41
-rwxr-xr-xsrc/password-store.sh4
5 files changed, 48 insertions, 4 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm
index f5f3073..2310456 100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@ -1,6 +1,6 @@
# see git-dpm(1) from git-dpm package
-700a274526f02cc1cf2bb81a808ee36648e2110f
-700a274526f02cc1cf2bb81a808ee36648e2110f
+7453f40c3f6491a48566869d1f4fffe386d2cd81
+7453f40c3f6491a48566869d1f4fffe386d2cd81
10800f9d7423e9c61703b50ece39b7331bf3a4c6
10800f9d7423e9c61703b50ece39b7331bf3a4c6
password-store_1.7.4.orig.tar.xz
diff --git a/debian/changelog b/debian/changelog
index a382155..bfbe9d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
password-store (1.7.4-5) UNRELEASED; urgency=medium
* Simplify debian/rules using dh-sequence-{elpa,vim-addon}.
+ * Cherry-pick from upstream:
+ - Ensure compatibility with tree 2.0 (closes: #1005550).
-- Colin Watson <cjwatson@debian.org> Wed, 29 Dec 2021 02:34:59 +0000
diff --git a/debian/patches/series b/debian/patches/series
index c40028c..1468e2d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ editor.patch
gnupg1-support.patch
test-reencryption-c-locale.patch
temporary-gnupghome.patch
+tree-2.0-compat.patch
diff --git a/debian/patches/tree-2.0-compat.patch b/debian/patches/tree-2.0-compat.patch
new file mode 100644
index 0000000..32f889b
--- /dev/null
+++ b/debian/patches/tree-2.0-compat.patch
@@ -0,0 +1,41 @@
+From 7453f40c3f6491a48566869d1f4fffe386d2cd81 Mon Sep 17 00:00:00 2001
+From: Marius Bakke <marius@gnu.org>
+Date: Mon, 17 Jan 2022 17:54:32 +0100
+Subject: Ensure compatibility with tree 2.0
+
+Tree 2.0 and later will unconditionally ignore all options and write
+JSON data on file descriptor 3 when available, which causes problems
+for the test harness and other scripts that use FD 3. Work around by
+closing descriptor 3 for the 'tree' command.
+
+Origin: upstream, https://git.zx2c4.com/password-store/commit/?id=eea24967a002a2a81ae9b97a1fe972b5287f3a09
+Bug-Debian: https://bugs.debian.org/1005550
+Last-Update: 2022-02-13
+
+Patch-Name: tree-2.0-compat.patch
+---
+ src/password-store.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/password-store.sh b/src/password-store.sh
+index 6f9d2d5..e0fc984 100755
+--- a/src/password-store.sh
++++ b/src/password-store.sh
+@@ -402,7 +402,7 @@ cmd_show() {
+ else
+ echo "${path%\/}"
+ fi
+- 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
++ tree -N -C -l --noreport "$PREFIX/$path" 3>&- | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors
+ elif [[ -z $path ]]; then
+ die "Error: password store is empty. Try \"pass init\"."
+ else
+@@ -414,7 +414,7 @@ cmd_find() {
+ [[ $# -eq 0 ]] && die "Usage: $PROGRAM $COMMAND pass-names..."
+ IFS="," eval 'echo "Search Terms: $*"'
+ local terms="*$(printf '%s*|*' "$@")"
+- 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'
++ tree -N -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" 3>&- | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
+ }
+
+ cmd_grep() {
diff --git a/src/password-store.sh b/src/password-store.sh
index 6f9d2d5..e0fc984 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -402,7 +402,7 @@ cmd_show() {
else
echo "${path%\/}"
fi
- 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
+ tree -N -C -l --noreport "$PREFIX/$path" 3>&- | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors
elif [[ -z $path ]]; then
die "Error: password store is empty. Try \"pass init\"."
else
@@ -414,7 +414,7 @@ cmd_find() {
[[ $# -eq 0 ]] && die "Usage: $PROGRAM $COMMAND pass-names..."
IFS="," eval 'echo "Search Terms: $*"'
local terms="*$(printf '%s*|*' "$@")"
- 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'
+ tree -N -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" 3>&- | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
}
cmd_grep() {