aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/password-store/Makefile3
-rw-r--r--sysutils/password-store/distinfo4
-rw-r--r--sysutils/password-store/files/linuxism+git+xclip.patch78
-rw-r--r--sysutils/password-store/files/linuxism+git.patch51
-rw-r--r--sysutils/password-store/files/linuxism+xclip.patch64
-rw-r--r--sysutils/password-store/files/linuxism.patch13
6 files changed, 103 insertions, 110 deletions
diff --git a/sysutils/password-store/Makefile b/sysutils/password-store/Makefile
index 494d07c635d2..9a2d6df2a5cb 100644
--- a/sysutils/password-store/Makefile
+++ b/sysutils/password-store/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= password-store
-PORTVERSION= 1.4
-PORTREVISION= 2
+PORTVERSION= 1.4.2
CATEGORIES= sysutils
MASTER_SITES= http://git.zx2c4.com/password-store/snapshot/
diff --git a/sysutils/password-store/distinfo b/sysutils/password-store/distinfo
index 42d324dc35e5..9b80be5a37cf 100644
--- a/sysutils/password-store/distinfo
+++ b/sysutils/password-store/distinfo
@@ -1,2 +1,2 @@
-SHA256 (password-store-1.4.tar.gz) = abfff29d5bf767c5b7e4bd0e037fadf32078a0b4534deac86df2765e88791954
-SIZE (password-store-1.4.tar.gz) = 19632
+SHA256 (password-store-1.4.2.tar.gz) = 58f03d0d2e958daa2ea2f37b12a153b0bc16bede1447c0028592fa27477abc74
+SIZE (password-store-1.4.2.tar.gz) = 20978
diff --git a/sysutils/password-store/files/linuxism+git+xclip.patch b/sysutils/password-store/files/linuxism+git+xclip.patch
index 0ec9d82bd7b1..742d87251704 100644
--- a/sysutils/password-store/files/linuxism+git+xclip.patch
+++ b/sysutils/password-store/files/linuxism+git+xclip.patch
@@ -1,4 +1,4 @@
-diff --git a/README b/README
+diff --git README README
index 47ed64b..6ebfd68 100644
--- README
+++ README
@@ -13,8 +13,8 @@ index 47ed64b..6ebfd68 100644
- pwgen
http://sourceforge.net/projects/pwgen/
- tree
-diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion
-index ccffbfa..b9f86e4 100644
+diff --git contrib/pass.bash-completion contrib/pass.bash-completion
+index d0ef012..66e8866 100644
--- contrib/pass.bash-completion
+++ contrib/pass.bash-completion
@@ -48,7 +48,7 @@ _pass()
@@ -52,8 +52,8 @@ index ccffbfa..b9f86e4 100644
esac
else
COMPREPLY+=($(compgen -W "${commands}" -- ${cur}))
-diff --git a/contrib/pass.fish-completion b/contrib/pass.fish-completion
-index 7652d56..7d470b8 100644
+diff --git contrib/pass.fish-completion contrib/pass.fish-completion
+index 9130d1f..366ed5e 100644
--- contrib/pass.fish-completion
+++ contrib/pass.fish-completion
@@ -76,7 +76,6 @@ complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -a "(__fish_pass_pr
@@ -81,8 +81,8 @@ index 7652d56..7d470b8 100644
-complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'push' -d 'Push changes to remote repo'
-complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'pull' -d 'Pull changes from remote repo'
-complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'log' -d 'View changelog'
-diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
-index c6fe678..4783a60 100644
+diff --git contrib/pass.zsh-completion contrib/pass.zsh-completion
+index 848bc67..e8f0ebe 100644
--- contrib/pass.zsh-completion
+++ contrib/pass.zsh-completion
@@ -39,8 +39,6 @@ _pass () {
@@ -138,8 +138,8 @@ index c6fe678..4783a60 100644
}
_pass_complete_entries_with_subdirs () {
-diff --git a/man/pass.1 b/man/pass.1
-index 3ccfa67..2f16727 100644
+diff --git man/pass.1 man/pass.1
+index efb5d9b..1e273ea 100644
--- man/pass.1
+++ man/pass.1
@@ -33,13 +33,6 @@ or
@@ -169,7 +169,7 @@ index 3ccfa67..2f16727 100644
+\fBshow\fP \fIpass-name\fP
+Decrypt and print a password named \fIpass-name\fP.
.TP
- \fBinsert\fP [ \fI--no-echo\fP, \fI-n\fP | \fI--multiline\fP, \fI-m\fP ] [ \fI--force\fP, \fI-f\fP ] \fIpass-name\fP
+ \fBinsert\fP [ \fI--echo\fP, \fI-e\fP | \fI--multiline\fP, \fI-m\fP ] [ \fI--force\fP, \fI-f\fP ] \fIpass-name\fP
Insert a new password into the password store called \fIpass-name\fP. This will
@@ -92,15 +81,12 @@ ensure that temporary files are created in \fI/dev/shm\fP in order to avoid writ
difficult-to-erase disk sectors. If \fI/dev/shm\fP is not accessible, fallback to
@@ -341,15 +341,15 @@ index 3ccfa67..2f16727 100644
The location of the text editor used by \fBedit\fP.
.SH SEE ALSO
- .BR gpg (1),
+ .BR gpg2 (1),
.BR pwgen (1),
-.BR git (1),
-.BR xclip (1).
.SH AUTHOR
.B pass
-diff --git a/src/password-store.sh b/src/password-store.sh
-index 503bac4..ecc4665 100755
+diff --git src/password-store.sh src/password-store.sh
+index 26a4bd0..e669e08 100755
--- src/password-store.sh
+++ src/password-store.sh
@@ -1,4 +1,4 @@
@@ -371,7 +371,7 @@ index 503bac4..ecc4665 100755
version() {
cat <<_EOF
|-----------------------|
-@@ -35,24 +31,19 @@ Usage:
+@@ -35,24 +31,21 @@ Usage:
Optionally reencrypt existing passwords using new gpg-id.
$program [ls] [subfolder]
List passwords.
@@ -380,9 +380,11 @@ index 503bac4..ecc4665 100755
- If put on the clipboard, it will be cleared in 45 seconds.
+ $program [show] pass-name
+ Show existing password
- $program insert [--no-echo,-n | --multiline,-m] [--force,-f] pass-name
- Insert new password. Optionally, the console can be enabled to not
- echo the password back. Or, optionally, it may be multiline. Prompt
+ $program insert [--echo,-e | --multiline,-m] [--force,-f] pass-name
+ Insert new password. Optionally, the console can be enabled echo
+ the password back. Or, optionally, it may be multiline. Prompt
++ Insert new password. Optionally, the console can be enabled to not
++ echo the password back. Or, optionally, it may be multiline. Prompt
before overwriting existing password unless forced.
$program edit pass-name
Insert a new password or edit an existing password using ${EDITOR:-vi}.
@@ -399,7 +401,7 @@ index 503bac4..ecc4665 100755
$program help
Show this text.
$program version
-@@ -63,16 +54,10 @@ _EOF
+@@ -63,16 +56,10 @@ _EOF
}
is_command() {
case "$1" in
@@ -417,7 +419,7 @@ index 503bac4..ecc4665 100755
yesno() {
read -p "$1 [y/N] " response
[[ $response == "y" || $response == "Y" ]] || exit 1
-@@ -80,49 +65,24 @@ yesno() {
+@@ -80,48 +67,21 @@ yesno() {
#
# BEGIN Platform definable
#
@@ -434,7 +436,7 @@ index 503bac4..ecc4665 100755
- if [[ $now != $(echo -n "$1" | base64) ]]; then
- before="$now"
- fi
-
+-
- # It might be nice to programatically check to see if klipper exists,
- # as well as checking for other common clipboard managers. But for now,
- # this works fine -- if qdbus isn't there or if klipper isn't running,
@@ -452,7 +454,7 @@ index 503bac4..ecc4665 100755
- if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
- tmp_dir="$(TMPDIR=/dev/shm mktemp -t "$template" -d)"
+ ramdisk="/var/tmp/password-store.ramdisk"
-+ if [[ -d $ramdisk && -w $ramdisk && -x $ramdisk ]]; then
++ if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then
+ tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)"
else
- yesno "$(echo "Your system does not have /dev/shm, which means that it may"
@@ -468,17 +470,14 @@ index 503bac4..ecc4665 100755
fi
-
}
--GPG="gpg"
-GETOPT="getopt"
-# source /path/to/platform-defined-functions
-+GPG="gpg2"
+GETOPT="/usr/local/bin/getopt"
-+
#
# END Platform definable
#
-@@ -156,14 +116,12 @@ case "$command" in
+@@ -155,14 +115,12 @@ case "$command" in
mkdir -v -p "$PREFIX"
echo "$gpg_id" > "$ID"
echo "Password store initialized for $gpg_id."
@@ -486,14 +485,14 @@ index 503bac4..ecc4665 100755
if [[ $reencrypt -eq 1 ]]; then
find "$PREFIX" -iname '*.gpg' | while read passfile; do
- $GPG -d $GPG_OPTS "$passfile" | $GPG -e -r "$gpg_id" -o "$passfile.new" $GPG_OPTS &&
+ gpg2 -d $GPG_OPTS "$passfile" | gpg2 -e -r "$gpg_id" -o "$passfile.new" $GPG_OPTS &&
mv -v "$passfile.new" "$passfile"
done
- git_add_file "$PREFIX" "Reencrypted entire store using new GPG id $gpg_id."
fi
exit 0
;;
-@@ -192,18 +150,8 @@ fi
+@@ -191,18 +149,8 @@ fi
case "$command" in
show|ls|list)
@@ -513,28 +512,31 @@ index 503bac4..ecc4665 100755
exit 1
fi
-@@ -221,11 +169,7 @@ case "$command" in
+@@ -220,13 +168,8 @@ case "$command" in
echo "$path is not in the password store."
exit 1
fi
- if [[ $clip -eq 0 ]]; then
-- exec $GPG -d $GPG_OPTS "$passfile"
+- exec gpg2 -d $GPG_OPTS "$passfile"
- else
-- clip "$($GPG -d $GPG_OPTS "$passfile" | head -n 1)" "$path"
+- pass="$(gpg2 -d $GPG_OPTS "$passfile" | head -n 1)"
+- [[ -n $pass ]] || exit 1
+- clip "$pass" "$path"
- fi
-+ exec $GPG -d $GPG_OPTS "$passfile"
++
++ gpg2 -d $GPG_OPTS "$passfile"
fi
;;
insert)
-@@ -275,7 +219,6 @@ case "$command" in
- read -p "Enter password for $path: " -e password
- $GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$password"
+@@ -276,7 +219,6 @@ case "$command" in
+ read -r -p "Enter password for $path: " -e password
+ gpg2 -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$password"
fi
- git_add_file "$passfile" "Added given password for $path to store."
;;
edit)
if [[ $# -ne 1 ]]; then
-@@ -303,25 +246,22 @@ case "$command" in
+@@ -304,25 +246,22 @@ case "$command" in
echo "GPG encryption failed. Retrying."
sleep 1
done
@@ -562,10 +564,10 @@ index 503bac4..ecc4665 100755
exit 1
fi
path="$1"
-@@ -338,14 +278,9 @@ case "$command" in
+@@ -339,14 +278,9 @@ case "$command" in
pass="$(pwgen -s $symbols $length 1)"
[[ -n $pass ]] || exit 1
- $GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
+ gpg2 -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
- git_add_file "$passfile" "Added generated password for $path to store."
- if [[ $clip -eq 0 ]]; then
@@ -579,7 +581,7 @@ index 503bac4..ecc4665 100755
;;
delete|rm|remove)
recursive=""
-@@ -377,21 +312,6 @@ case "$command" in
+@@ -378,21 +312,6 @@ case "$command" in
[[ $force -eq 1 ]] || yesno "Are you sure you would like to delete $path?"
rm $recursive -f -v "$passfile"
diff --git a/sysutils/password-store/files/linuxism+git.patch b/sysutils/password-store/files/linuxism+git.patch
index 299829e6d613..2cd4f74c472d 100644
--- a/sysutils/password-store/files/linuxism+git.patch
+++ b/sysutils/password-store/files/linuxism+git.patch
@@ -1,4 +1,4 @@
-diff --git a/README b/README
+diff --git README README
index 47ed64b..65a041e 100644
--- README
+++ README
@@ -11,8 +11,8 @@ index 47ed64b..65a041e 100644
- xclip
http://sourceforge.net/projects/xclip/
- pwgen
-diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion
-index ccffbfa..aa7e7d8 100644
+diff --git contrib/pass.bash-completion contrib/pass.bash-completion
+index d0ef012..5cf6550 100644
--- contrib/pass.bash-completion
+++ contrib/pass.bash-completion
@@ -48,7 +48,7 @@ _pass()
@@ -34,8 +34,8 @@ index ccffbfa..aa7e7d8 100644
esac
else
COMPREPLY+=($(compgen -W "${commands}" -- ${cur}))
-diff --git a/contrib/pass.fish-completion b/contrib/pass.fish-completion
-index 7652d56..086e7ee 100644
+diff --git contrib/pass.fish-completion contrib/pass.fish-completion
+index 9130d1f..e692595 100644
--- contrib/pass.fish-completion
+++ contrib/pass.fish-completion
@@ -96,9 +96,3 @@ complete -c $PROG -f -A -n '__fish_pass_needs_command' -s c -l clip -d 'Put pass
@@ -48,8 +48,8 @@ index 7652d56..086e7ee 100644
-complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'push' -d 'Push changes to remote repo'
-complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'pull' -d 'Pull changes from remote repo'
-complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'log' -d 'View changelog'
-diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
-index c6fe678..9fe974d 100644
+diff --git contrib/pass.zsh-completion contrib/pass.zsh-completion
+index 848bc67..76124ae 100644
--- contrib/pass.zsh-completion
+++ contrib/pass.zsh-completion
@@ -51,18 +51,6 @@ _pass () {
@@ -88,8 +88,8 @@ index c6fe678..9fe974d 100644
}
_pass_complete_entries_with_subdirs () {
-diff --git a/man/pass.1 b/man/pass.1
-index 3ccfa67..2ea765b 100644
+diff --git man/pass.1 man/pass.1
+index efb5d9b..4ddc90d 100644
--- man/pass.1
+++ man/pass.1
@@ -33,13 +33,6 @@ or
@@ -233,14 +233,14 @@ index 3ccfa67..2ea765b 100644
The location of the text editor used by \fBedit\fP.
.SH SEE ALSO
- .BR gpg (1),
+ .BR gpg2 (1),
.BR pwgen (1),
-.BR git (1),
.BR xclip (1).
.SH AUTHOR
-diff --git a/src/password-store.sh b/src/password-store.sh
-index 503bac4..3c4ad4b 100755
+diff --git src/password-store.sh src/password-store.sh
+index 26a4bd0..cc9dd22 100755
--- src/password-store.sh
+++ src/password-store.sh
@@ -1,4 +1,4 @@
@@ -290,16 +290,14 @@ index 503bac4..3c4ad4b 100755
yesno() {
read -p "$1 [y/N] " response
[[ $response == "y" || $response == "Y" ]] || exit 1
-@@ -107,22 +94,24 @@ clip() {
- ) & disown
+@@ -108,20 +95,20 @@ clip() {
echo "Copied $2 to clipboard. Will clear in 45 seconds."
}
-+
tmpdir() {
- if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
- tmp_dir="$(TMPDIR=/dev/shm mktemp -t "$template" -d)"
+ ramdisk="/var/tmp/password-store.ramdisk"
-+ if [[ -d $ramdisk && -w $ramdisk && -x $ramdisk ]]; then
++ if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then
+ tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)"
else
- yesno "$(echo "Your system does not have /dev/shm, which means that it may"
@@ -315,17 +313,14 @@ index 503bac4..3c4ad4b 100755
fi
-
}
--GPG="gpg"
-GETOPT="getopt"
-# source /path/to/platform-defined-functions
-+GPG="gpg2"
+GETOPT="/usr/local/bin/getopt"
-+
#
# END Platform definable
#
-@@ -156,14 +145,12 @@ case "$command" in
+@@ -155,14 +142,12 @@ case "$command" in
mkdir -v -p "$PREFIX"
echo "$gpg_id" > "$ID"
echo "Password store initialized for $gpg_id."
@@ -333,22 +328,22 @@ index 503bac4..3c4ad4b 100755
if [[ $reencrypt -eq 1 ]]; then
find "$PREFIX" -iname '*.gpg' | while read passfile; do
- $GPG -d $GPG_OPTS "$passfile" | $GPG -e -r "$gpg_id" -o "$passfile.new" $GPG_OPTS &&
+ gpg2 -d $GPG_OPTS "$passfile" | gpg2 -e -r "$gpg_id" -o "$passfile.new" $GPG_OPTS &&
mv -v "$passfile.new" "$passfile"
done
- git_add_file "$PREFIX" "Reencrypted entire store using new GPG id $gpg_id."
fi
exit 0
;;
-@@ -275,7 +262,6 @@ case "$command" in
- read -p "Enter password for $path: " -e password
- $GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$password"
+@@ -276,7 +261,6 @@ case "$command" in
+ read -r -p "Enter password for $path: " -e password
+ gpg2 -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$password"
fi
- git_add_file "$passfile" "Added given password for $path to store."
;;
edit)
if [[ $# -ne 1 ]]; then
-@@ -303,7 +289,6 @@ case "$command" in
+@@ -304,7 +288,6 @@ case "$command" in
echo "GPG encryption failed. Retrying."
sleep 1
done
@@ -356,15 +351,15 @@ index 503bac4..3c4ad4b 100755
;;
generate)
clip=0
-@@ -338,7 +323,6 @@ case "$command" in
+@@ -339,7 +322,6 @@ case "$command" in
pass="$(pwgen -s $symbols $length 1)"
[[ -n $pass ]] || exit 1
- $GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
+ gpg2 -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
- git_add_file "$passfile" "Added generated password for $path to store."
if [[ $clip -eq 0 ]]; then
echo "The generated password to $path is:"
-@@ -377,21 +361,6 @@ case "$command" in
+@@ -378,21 +360,6 @@ case "$command" in
[[ $force -eq 1 ]] || yesno "Are you sure you would like to delete $path?"
rm $recursive -f -v "$passfile"
diff --git a/sysutils/password-store/files/linuxism+xclip.patch b/sysutils/password-store/files/linuxism+xclip.patch
index 426fc69bf7ca..cd7356ee9de9 100644
--- a/sysutils/password-store/files/linuxism+xclip.patch
+++ b/sysutils/password-store/files/linuxism+xclip.patch
@@ -1,4 +1,4 @@
-diff --git a/README b/README
+diff --git README README
index 47ed64b..496c37f 100644
--- README
+++ README
@@ -11,8 +11,8 @@ index 47ed64b..496c37f 100644
- pwgen
http://sourceforge.net/projects/pwgen/
- tree
-diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion
-index ccffbfa..2c2afc0 100644
+diff --git contrib/pass.bash-completion contrib/pass.bash-completion
+index d0ef012..7b3c149 100644
--- contrib/pass.bash-completion
+++ contrib/pass.bash-completion
@@ -59,7 +59,6 @@ _pass()
@@ -32,8 +32,8 @@ index ccffbfa..2c2afc0 100644
_pass_complete_entries
;;
rm|remove|delete)
-diff --git a/contrib/pass.fish-completion b/contrib/pass.fish-completion
-index 7652d56..5c180e2 100644
+diff --git contrib/pass.fish-completion contrib/pass.fish-completion
+index 9130d1f..8998d96 100644
--- contrib/pass.fish-completion
+++ contrib/pass.fish-completion
@@ -76,7 +76,6 @@ complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -a "(__fish_pass_pr
@@ -58,8 +58,8 @@ index 7652d56..5c180e2 100644
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a git -d 'Command: execute a git command'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'init' -d 'Initialize git repository'
-diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
-index c6fe678..a01bb2b 100644
+diff --git contrib/pass.zsh-completion contrib/pass.zsh-completion
+index 848bc67..9855ac0 100644
--- contrib/pass.zsh-completion
+++ contrib/pass.zsh-completion
@@ -39,8 +39,6 @@ _pass () {
@@ -81,8 +81,8 @@ index c6fe678..a01bb2b 100644
_pass_complete_entries
}
_pass_complete_entries_helper () {
-diff --git a/man/pass.1 b/man/pass.1
-index 3ccfa67..c0aa018 100644
+diff --git man/pass.1 man/pass.1
+index efb5d9b..bc65a54 100644
--- man/pass.1
+++ man/pass.1
@@ -68,12 +68,8 @@ by using the
@@ -98,7 +98,7 @@ index 3ccfa67..c0aa018 100644
+\fBshow\fP \fIpass-name\fP
+Decrypt and print a password named \fIpass-name\fP.
.TP
- \fBinsert\fP [ \fI--no-echo\fP, \fI-n\fP | \fI--multiline\fP, \fI-m\fP ] [ \fI--force\fP, \fI-f\fP ] \fIpass-name\fP
+ \fBinsert\fP [ \fI--echo\fP, \fI-e\fP | \fI--multiline\fP, \fI-m\fP ] [ \fI--force\fP, \fI-f\fP ] \fIpass-name\fP
Insert a new password into the password store called \fIpass-name\fP. This will
@@ -92,15 +88,12 @@ ensure that temporary files are created in \fI/dev/shm\fP in order to avoid writ
difficult-to-erase disk sectors. If \fI/dev/shm\fP is not accessible, fallback to
@@ -144,15 +144,15 @@ index 3ccfa67..c0aa018 100644
Remove password from store
.B zx2c4@laptop ~ $ pass remove Business/cheese-whiz-factory
@@ -345,7 +331,6 @@ The location of the text editor used by \fBedit\fP.
- .BR gpg (1),
+ .BR gpg2 (1),
.BR pwgen (1),
.BR git (1),
-.BR xclip (1).
.SH AUTHOR
.B pass
-diff --git a/src/password-store.sh b/src/password-store.sh
-index 503bac4..5264fb4 100755
+diff --git src/password-store.sh src/password-store.sh
+index 26a4bd0..fe79c82 100755
--- src/password-store.sh
+++ src/password-store.sh
@@ -1,4 +1,4 @@
@@ -161,7 +161,7 @@ index 503bac4..5264fb4 100755
# Copyright (C) 2012 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
-@@ -35,18 +35,16 @@ Usage:
+@@ -35,18 +35,18 @@ Usage:
Optionally reencrypt existing passwords using new gpg-id.
$program [ls] [subfolder]
List passwords.
@@ -170,9 +170,11 @@ index 503bac4..5264fb4 100755
- If put on the clipboard, it will be cleared in 45 seconds.
+ $program [show] pass-name
+ Show existing password
- $program insert [--no-echo,-n | --multiline,-m] [--force,-f] pass-name
- Insert new password. Optionally, the console can be enabled to not
- echo the password back. Or, optionally, it may be multiline. Prompt
+ $program insert [--echo,-e | --multiline,-m] [--force,-f] pass-name
+ Insert new password. Optionally, the console can be enabled echo
+ the password back. Or, optionally, it may be multiline. Prompt
++ Insert new password. Optionally, the console can be enabled to not
++ echo the password back. Or, optionally, it may be multiline. Prompt
before overwriting existing password unless forced.
$program edit pass-name
Insert a new password or edit an existing password using ${EDITOR:-vi}.
@@ -183,7 +185,7 @@ index 503bac4..5264fb4 100755
Prompt before overwriting existing password unless forced.
$program rm [--recursive,-r] [--force,-f] pass-name
Remove existing password or directory, optionally forcefully.
-@@ -80,49 +78,24 @@ yesno() {
+@@ -80,48 +80,21 @@ yesno() {
#
# BEGIN Platform definable
#
@@ -200,7 +202,7 @@ index 503bac4..5264fb4 100755
- if [[ $now != $(echo -n "$1" | base64) ]]; then
- before="$now"
- fi
-
+-
- # It might be nice to programatically check to see if klipper exists,
- # as well as checking for other common clipboard managers. But for now,
- # this works fine -- if qdbus isn't there or if klipper isn't running,
@@ -218,7 +220,7 @@ index 503bac4..5264fb4 100755
- if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
- tmp_dir="$(TMPDIR=/dev/shm mktemp -t "$template" -d)"
+ ramdisk="/var/tmp/password-store.ramdisk"
-+ if [[ -d $ramdisk && -w $ramdisk && -x $ramdisk ]]; then
++ if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then
+ tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)"
else
- yesno "$(echo "Your system does not have /dev/shm, which means that it may"
@@ -234,17 +236,14 @@ index 503bac4..5264fb4 100755
fi
-
}
--GPG="gpg"
-GETOPT="getopt"
-# source /path/to/platform-defined-functions
-+GPG="gpg2"
+GETOPT="/usr/local/bin/getopt"
-+
#
# END Platform definable
#
-@@ -192,18 +165,8 @@ fi
+@@ -191,18 +164,8 @@ fi
case "$command" in
show|ls|list)
@@ -264,20 +263,23 @@ index 503bac4..5264fb4 100755
exit 1
fi
-@@ -221,11 +184,7 @@ case "$command" in
+@@ -220,13 +183,8 @@ case "$command" in
echo "$path is not in the password store."
exit 1
fi
- if [[ $clip -eq 0 ]]; then
-- exec $GPG -d $GPG_OPTS "$passfile"
+- exec gpg2 -d $GPG_OPTS "$passfile"
- else
-- clip "$($GPG -d $GPG_OPTS "$passfile" | head -n 1)" "$path"
+- pass="$(gpg2 -d $GPG_OPTS "$passfile" | head -n 1)"
+- [[ -n $pass ]] || exit 1
+- clip "$pass" "$path"
- fi
-+ exec $GPG -d $GPG_OPTS "$passfile"
++
++ gpg2 -d $GPG_OPTS "$passfile"
fi
;;
insert)
-@@ -306,22 +265,20 @@ case "$command" in
+@@ -307,22 +265,20 @@ case "$command" in
git_add_file "$passfile" "$action password for $path using ${EDITOR:-vi}."
;;
generate)
@@ -302,8 +304,8 @@ index 503bac4..5264fb4 100755
exit 1
fi
path="$1"
-@@ -340,12 +297,8 @@ case "$command" in
- $GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
+@@ -341,12 +297,8 @@ case "$command" in
+ gpg2 -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
git_add_file "$passfile" "Added generated password for $path to store."
- if [[ $clip -eq 0 ]]; then
diff --git a/sysutils/password-store/files/linuxism.patch b/sysutils/password-store/files/linuxism.patch
index 80257f562679..24b69ba078d6 100644
--- a/sysutils/password-store/files/linuxism.patch
+++ b/sysutils/password-store/files/linuxism.patch
@@ -1,5 +1,5 @@
-diff --git a/src/password-store.sh b/src/password-store.sh
-index 503bac4..6fcf2cc 100755
+diff --git src/password-store.sh src/password-store.sh
+index 26a4bd0..4e0526d 100755
--- src/password-store.sh
+++ src/password-store.sh
@@ -1,4 +1,4 @@
@@ -8,16 +8,14 @@ index 503bac4..6fcf2cc 100755
# Copyright (C) 2012 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
-@@ -107,22 +107,24 @@ clip() {
- ) & disown
+@@ -108,20 +108,20 @@ clip() {
echo "Copied $2 to clipboard. Will clear in 45 seconds."
}
-+
tmpdir() {
- if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
- tmp_dir="$(TMPDIR=/dev/shm mktemp -t "$template" -d)"
+ ramdisk="/var/tmp/password-store.ramdisk"
-+ if [[ -d $ramdisk && -w $ramdisk && -x $ramdisk ]]; then
++ if [[ -d $ramdisk && -d $ramdisk && -d $ramdisk ]]; then
+ tmp_dir="$(TMPDIR=$ramdisk mktemp -t "$template" -d)"
else
- yesno "$(echo "Your system does not have /dev/shm, which means that it may"
@@ -33,13 +31,10 @@ index 503bac4..6fcf2cc 100755
fi
-
}
--GPG="gpg"
-GETOPT="getopt"
-# source /path/to/platform-defined-functions
-+GPG="gpg2"
+GETOPT="/usr/local/bin/getopt"
-+
#
# END Platform definable
#