diff options
author | Morgenstern | 2020-05-07 10:35:34 +1200 |
---|---|---|
committer | Morgenstern | 2020-05-07 10:45:45 +1200 |
commit | bf2ad32447b06ddf306e72b939d871f1e726badf (patch) | |
tree | 47e4bd6468aec6e6e13b6463b666ba2200d07c94 | |
parent | 9820a01980168167f0d4281a868d6535516b6d3d (diff) | |
download | aur-bf2ad32447b06ddf306e72b939d871f1e726badf.tar.gz |
Added OTP support to passmenu
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | passmenu-extended.patch (renamed from passmenu-extended-typing.patch) | 53 |
3 files changed, 60 insertions, 25 deletions
@@ -1,7 +1,7 @@ pkgbase = pass-parcellite - pkgdesc = Stores, retrieves, generates, and synchronizes passwords securely (Parcellite and extended typing support) + pkgdesc = Stores, retrieves, generates, and synchronizes passwords securely (Parcellite and extended passmenu support) pkgver = 1.7.3 - pkgrel = 3 + pkgrel = 4 url = https://www.passwordstore.org/ arch = any license = GPL2 @@ -10,11 +10,12 @@ pkgbase = pass-parcellite depends = bash depends = gnupg depends = tree - depends = parcellite-git + optdepends = parcellite-git: for Parcellite support optdepends = git: for Git support optdepends = dmenu: for passmenu optdepends = qrencode: for QR code support optdepends = xdotool: for typing support + optdepends = pass-otp: for OTP support provides = passmenu provides = pass conflicts = passmenu @@ -22,10 +23,10 @@ pkgbase = pass-parcellite replaces = passmenu source = https://git.zx2c4.com/password-store/snapshot/password-store-1.7.3.tar.xz source = pass-parcellite.patch - source = passmenu-extended-typing.patch + source = passmenu-extended.patch sha256sums = 2b6c65846ebace9a15a118503dcd31b6440949a30d3b5291dfb5b1615b99a3f4 sha256sums = 451a0e4b09cb56fa57382a6ee30f646fe7734658c709dbe6e2411cafe75af155 - sha256sums = b65c1f501096b7df74a69d67d7fc5460b53d34bf0bb89c8504b92ac92f5ec2d6 + sha256sums = f714cf5edebc5971eaa8d81111d5ebf20e738af18e7a9047434c1290ed548114 pkgname = pass-parcellite @@ -4,35 +4,38 @@ pkgname='pass-parcellite' pkgver=1.7.3 -pkgrel=3 -pkgdesc='Stores, retrieves, generates, and synchronizes passwords securely (Parcellite and extended typing support)' +pkgrel=4 +pkgdesc='Stores, retrieves, generates, and synchronizes passwords securely (Parcellite and extended passmenu support)' arch=('any') url='https://www.passwordstore.org/' license=('GPL2') -depends=('xclip' 'bash' 'gnupg' 'tree' 'parcellite-git') +depends=('xclip' 'bash' 'gnupg' 'tree') checkdepends=('git') -optdepends=('git: for Git support' +optdepends=('parcellite-git: for Parcellite support' + 'git: for Git support' 'dmenu: for passmenu' 'qrencode: for QR code support' - 'xdotool: for typing support') + 'xdotool: for typing support' + 'pass-otp: for OTP support') replaces=('passmenu') provides=('passmenu' 'pass') conflicts=('passmenu' 'pass') source=("https://git.zx2c4.com/password-store/snapshot/password-store-${pkgver}.tar.xz" "pass-parcellite.patch" - "passmenu-extended-typing.patch") + "passmenu-extended.patch") sha256sums=('2b6c65846ebace9a15a118503dcd31b6440949a30d3b5291dfb5b1615b99a3f4' '451a0e4b09cb56fa57382a6ee30f646fe7734658c709dbe6e2411cafe75af155' - 'b65c1f501096b7df74a69d67d7fc5460b53d34bf0bb89c8504b92ac92f5ec2d6') + 'f714cf5edebc5971eaa8d81111d5ebf20e738af18e7a9047434c1290ed548114') prepare() { cd "${srcdir}/password-store-$pkgver/" # Parcellite history removal support # https://github.com/rickyrockrat/parcellite/commit/fa54161d0ea83357d817d3d16b6ef3f503bafc09 patch --forward --strip=1 --input="${srcdir}/pass-parcellite.patch" - # Extend "passmenu" to allow username and password typing + # Extend "passmenu" (typing and OTP) # https://lists.zx2c4.com/pipermail/password-store/2015-December/001834.html - patch --forward --strip=1 --input="${srcdir}/passmenu-extended-typing.patch" + # https://github.com/tadfisher/pass-otp + patch --forward --strip=1 --input="${srcdir}/passmenu-extended.patch" } check() { diff --git a/passmenu-extended-typing.patch b/passmenu-extended.patch index 4d667aa4e405..6aaddf930e01 100644 --- a/passmenu-extended-typing.patch +++ b/passmenu-extended.patch @@ -1,7 +1,7 @@ diff --unified --recursive --text password-store-1.7.3/contrib/dmenu/passmenu password-store-1.7.3.new/contrib/dmenu/passmenu ---- password-store-1.7.3/contrib/dmenu/passmenu 2018-08-03 15:32:48.000000000 +1200 -+++ password-store-1.7.3.new/contrib/dmenu/passmenu 2020-05-06 13:00:50.156634320 +1200 -@@ -8,6 +8,18 @@ +--- password-store-1.7.3/contrib/dmenu/passmenu 2020-05-07 10:15:53.692356060 +1200 ++++ password-store-1.7.3.new/contrib/dmenu/passmenu 2020-05-07 10:11:21.246208556 +1200 +@@ -8,6 +8,30 @@ shift fi @@ -17,10 +17,22 @@ diff --unified --recursive --text password-store-1.7.3/contrib/dmenu/passmenu pa + shift +fi + ++otp=0 ++if [[ $1 == "--otp" ]]; then ++ otp=1 ++ shift ++fi ++ ++typeotp=0 ++if [[ $1 == "--typeotp" ]]; then ++ typeotp=1 ++ shift ++fi ++ prefix=${PASSWORD_STORE_DIR-~/.password-store} password_files=( "$prefix"/**/*.gpg ) password_files=( "${password_files[@]#"$prefix"/}" ) -@@ -17,9 +29,19 @@ +@@ -17,9 +41,24 @@ [[ -n $password ]] || exit @@ -40,26 +52,45 @@ diff --unified --recursive --text password-store-1.7.3/contrib/dmenu/passmenu pa + xdotool type --clearmodifiers --file - pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --file - ++elif [[ $otp -eq 1 ]]; then ++ pass otp -c "$password" 2>/dev/null ++elif [[ $typeotp -eq 1 ]]; then ++ pass otp "$password" | { IFS= read -r pass; printf %s "$pass"; } | ++ xdotool type --clearmodifiers --file - +else + pass show -c "$password" 2>/dev/null fi diff --unified --recursive --text password-store-1.7.3/contrib/dmenu/README.md password-store-1.7.3.new/contrib/dmenu/README.md ---- password-store-1.7.3/contrib/dmenu/README.md 2018-08-03 15:32:48.000000000 +1200 -+++ password-store-1.7.3.new/contrib/dmenu/README.md 2020-05-06 12:57:27.023879229 +1200 -@@ -2,11 +2,14 @@ +--- password-store-1.7.3/contrib/dmenu/README.md 2020-05-07 10:15:27.296221593 +1200 ++++ password-store-1.7.3.new/contrib/dmenu/README.md 2020-05-07 10:09:48.133462161 +1200 +@@ -1,13 +1,24 @@ + `passmenu` is a [dmenu][]-based interface to [pass][], the standard Unix password manager. This design allows you to quickly copy a password to the clipboard without having to open up a terminal window if you don't already have - one open. If `--type` is specified, the password is typed using [xdotool][] +-one open. If `--type` is specified, the password is typed using [xdotool][] -instead of copied to the clipboard. ++one open. ++ ++If `--type` is specified, the password is typed using [xdotool][] +instead of copied to the clipboard. If `--typeuser` is specified, the +second line is typed using [xdotool][] (ideally the username). If `--typeboth` +is specified, the second line is typed using [xdotool][] first (ideally the +username), then tab, then the first line. ++ ++If [pass-otp][] is installed and `--typeotp` is specified, the otpauth URI ++is used to generate a token that is typed using [xdotool][]. If `--otp` is ++specified, the otpauth URI is used to generate a token that is copied to ++the clipboard. # Usage - passmenu [--type] [dmenu arguments...] -+ passmenu [--type | --typeuser | --typeboth] [dmenu arguments...] ++ passmenu [--type | --typeuser | --typeboth | --typeotp | --otp] [dmenu arguments...] - [dmenu]: http://tools.suckless.org/dmenu/ - [xdotool]: http://www.semicomplete.com/projects/xdotool/ +-[dmenu]: http://tools.suckless.org/dmenu/ +-[xdotool]: http://www.semicomplete.com/projects/xdotool/ +-[pass]: http://www.zx2c4.com/projects/password-store/ ++[dmenu]: https://tools.suckless.org/dmenu/ ++[xdotool]: https://www.semicomplete.com/projects/xdotool/ ++[pass]: https://www.zx2c4.com/projects/password-store/ ++[pass-otp]: https://github.com/tadfisher/pass-otp |