236.5. pass-1.7.4
The git-versioned, gpg-encrypted password store
| Version | 1.7.4, release 2 |
| Shelf | security — Security applications: GnuPG and front-ends, password and secret managers, certificates, scanners, forensics and audit |
| Phase | 43_toolkits (Toolkits), 317 of 344 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://www.passwordstore.org/ |
| Build time | 0.1 SBU |
| Installed size | 74.6 KiB in 6 files |
| Recipe | ports/core/security/pass/kpkgbuild |
About
pass is the standard Unix password manager: a shell script that keeps each password in a file encrypted with gnupg, in a directory that can be a git repository. pass -c copies a password to the clipboard through wl-clipboard and puts the previous clipboard back after 45 seconds; pass otp and the QR-code output use qrencode.
Why it is in KDOS
The comment above it in script/phases/43_toolkits/packages.d/security.txt:
900 lines of bash frozen since 2021: a file per entry in a git repo with gpg over each, readable with
gpg -dif pass itself vanished.treeis a hard dependency:passwith no argument lists the store by running it.
Sources
pass-1.7.4.tar.xz(63.8 KiB)
sha2564c2d0a8b99df8915a87099607a8d912fd05d30651b6f014745c14e4ca8dbbfb7
upstream: https://git.zx2c4.com/password-store/snapshot/password-store-1.7.4.tar.xz
archive copy: sources-4/security--pass-1.7.4.tar.xz
Dependencies
Depends on: bash, gnupg, git, tree, wl-clipboard, qrencode.
Required by (1): pass-otp.
Patches
build.sh applies these; kpkg applies nothing by itself.
klipper-sensitive.patch— Mark a Wayland clipboard copy as a secret and clear Klipper through qdbus6On Wayland the password is copied with wl-copy --sensitive, which offers x-kde-passwordManagerHint=secret so Klipper and other clipboard managers do not record it. The timed history wipe calls qdbus6, the Qt 6 name of the D-Bus tool; the restored previous content is copied without the hint.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install pass'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/security/pass.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/security/pass
echo '4c2d0a8b99df8915a87099607a8d912fd05d30651b6f014745c14e4ca8dbbfb7 pass-1.7.4.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/pass
SRC=$SRC_ROOT/pass-1.7.4
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf pass-1.7.4.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/klipper-sensitive.patch"
make PREFIX=/usr WITH_ALLCOMP=yes DESTDIR=$PKG install
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/pass, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf pass-1.7.4-2.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/pass, and runs the triggers its paths call for.
Contents
Installed programs: pass.
Installed directories: /usr/share/licenses/pass.
Short descriptions
pass |
stores, retrieves, generates, and synchronizes passwords securely |
Notes
klipper-sensitive.patch changes the clipboard copy in src/password-store.sh. On Wayland the password is copied with wl-copy --sensitive, which offers the x-kde-passwordManagerHint=secret type beside the text; Plasma’s Klipper honours it and keeps the copy out of its history and out of ~/.local/share/klipper. The timed wipe of Klipper’s history calls qdbus6, the Qt 6 name of the D-Bus tool: the tree installs no unsuffixed qdbus, and the script discards the call’s errors, so with the upstream name the wipe never runs and nothing says so. The previous clipboard content is put back without the hint. The patch is to be offered to password-store upstream (the password-store mailing list, which takes patches in place of merge requests).