[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#775334: marked as done (unblock: password-store/1.6.3-3)



Your message dated Wed, 14 Jan 2015 21:35:09 +0100
with message-id <20150114203508.GO10424@ugent.be>
and subject line Re: Bug#775334: unblock: password-store/1.6.3-3
has caused the Debian Bug report #775334,
regarding unblock: password-store/1.6.3-3
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
775334: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775334
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock password-store 1.6.3-3.  This just fixes some ugly errors
in some cases from the zsh completion file.

diff -Nru password-store-1.6.3/debian/.git-dpm password-store-1.6.3/debian/.git-dpm
--- password-store-1.6.3/debian/.git-dpm	2014-07-09 17:45:52.000000000 +0100
+++ password-store-1.6.3/debian/.git-dpm	2015-01-14 11:05:33.000000000 +0000
@@ -1,6 +1,6 @@
 # see git-dpm(1) from git-dpm package
-3fda25587390bab6dc7d77b5b0361e01630248d8
-3fda25587390bab6dc7d77b5b0361e01630248d8
+072f0b597ed7d40d59749cd041f86f64f1c808bd
+072f0b597ed7d40d59749cd041f86f64f1c808bd
 a18bece2458931ab32ee863e6fb917da1d5de0c8
 a18bece2458931ab32ee863e6fb917da1d5de0c8
 password-store_1.6.3.orig.tar.xz
diff -Nru password-store-1.6.3/debian/changelog password-store-1.6.3/debian/changelog
--- password-store-1.6.3/debian/changelog	2014-09-27 23:30:39.000000000 +0100
+++ password-store-1.6.3/debian/changelog	2015-01-14 11:06:18.000000000 +0000
@@ -1,3 +1,10 @@
+password-store (1.6.3-3) unstable; urgency=medium
+
+  * Cherry-pick from upstream:
+    - Fix pass zsh completion and autoloading (closes: #775268).
+
+ -- Colin Watson <cjwatson@debian.org>  Wed, 14 Jan 2015 11:06:17 +0000
+
 password-store (1.6.3-2) unstable; urgency=medium
 
   * Simplify debian/install now that all the importers are in their own
diff -Nru password-store-1.6.3/debian/patches/fix-zsh.patch password-store-1.6.3/debian/patches/fix-zsh.patch
--- password-store-1.6.3/debian/patches/fix-zsh.patch	1970-01-01 01:00:00.000000000 +0100
+++ password-store-1.6.3/debian/patches/fix-zsh.patch	2015-01-14 11:05:33.000000000 +0000
@@ -0,0 +1,76 @@
+From 072f0b597ed7d40d59749cd041f86f64f1c808bd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com>
+Date: Mon, 28 Jul 2014 08:04:49 +0200
+Subject: Fix pass zsh completion and autoloading
+
+When autocompleting from `pass <TAB>', sometimes the following errors
+appear:
+
+  _values:compvalues:10: not enough arguments
+  find: `/home/user/.password-store': No such file or directory
+  _values:compvalues:10: not enough arguments
+  find: `/home/user/.password-store': No such file or directory
+
+The `_values' error happens when there is no password-store folder *or*
+there are no passwords in pass; the `find' error only when there is no
+password-store folder.
+
+We can trace it back to line 108, which contains the only `_values'
+statement that is executed when we autocomplete from pass. We confirm
+this by following the trail of execution, which is
+
+  _pass -> _pass_cmd_show -> _pass_complete_entries ->
+        -> _pass_complete_entries_helper
+
+If we try running the command inside `$()' on line 104, we see that it
+returns nothing and the output is blank. This means that `_values' only
+receives 1 of its 2 mandatory parameters, therefore the above error is
+triggered (not enough arguments).
+
+That is unless we don't have a password-store folder, in which case the
+`find: [...] no such file or directory' error is *also* triggered.
+
+We solve the first error by supplying a default value of "" if the
+command outputs nothing, using the zsh construct ${var:-else}.
+
+We solve the second error by redirecting the find command's stderr output
+to /dev/null, so the error is effectively suppressed.
+
+* * * *
+
+This patch also fixes the first tab completion, which currently only
+loads the completion function definition.
+
+We do this by adding a `_pass' statement at the end of the file, which
+runs the `_pass' completion function after loading its definition.
+This is the standard way an autoloaded function works; for other examples
+look at zsh's official completion files.
+
+Origin: upstream, http://git.zx2c4.com/password-store/commit/?id=5a6df91e49376c701381b99d89d61af698c98463
+Bug-Debian: https://bugs.debian.org/775268
+Last-Update: 2015-01-14
+
+Patch-Name: fix-zsh.patch
+---
+ src/completion/pass.zsh-completion | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/completion/pass.zsh-completion b/src/completion/pass.zsh-completion
+index a31da77..1101d81 100644
+--- a/src/completion/pass.zsh-completion
++++ b/src/completion/pass.zsh-completion
+@@ -114,7 +114,7 @@ _pass_cmd_show () {
+ _pass_complete_entries_helper () {
+ 	local IFS=$'\n'
+ 	local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
+-	_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' | sort)
++	_values -C 'passwords' ${$(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' | sort):-""}
+ }
+ 
+ _pass_complete_entries_with_subdirs () {
+@@ -132,3 +132,5 @@ _pass_complete_keys () {
+ 	# Extract names and email addresses from gpg --list-keys
+ 	_values 'gpg keys' $($GPG --list-secret-keys --with-colons | cut -d : -f 10 | sort -u | sed '/^$/d')
+ }
++
++_pass
diff -Nru password-store-1.6.3/debian/patches/series password-store-1.6.3/debian/patches/series
--- password-store-1.6.3/debian/patches/series	2014-07-03 11:18:46.000000000 +0100
+++ password-store-1.6.3/debian/patches/series	2015-01-14 11:05:33.000000000 +0000
@@ -1,2 +1,3 @@
 editor.patch
 gnupg1-support.patch
+fix-zsh.patch

unblock password-store/1.6.3-3

Thanks,

-- 
Colin Watson                                       [cjwatson@debian.org]

--- End Message ---
--- Begin Message ---
Hi,

On Wed, Jan 14, 2015 at 11:16:11AM +0000, Colin Watson wrote:
> Please unblock password-store 1.6.3-3.  This just fixes some ugly errors
> in some cases from the zsh completion file.

Unblocked.

Cheers,

Ivo

--- End Message ---

Reply to: