[PATCH] to fix non-root install issue

Matt Taylor matt at matthewjosephtaylor.com
Sun Aug 1 23:54:13 UTC 2021

New user, just getting setup and discovered this issue while
attempting to install via the latest master to a non-root directory.

Don't think it matters but FYI I'm on a Mac.

I ran:

$ DESTDIR=~/local make install

which lead to a an error:

$ pass init
/Users/user-name/local/usr/bin/pass: line 249:
/usr/lib/password-store/platform.sh: No such file or directory
Password store initialized for p:, -l, path:, -n, pass, --


Because line 249 contained:

source "/usr/lib/password-store/platform.sh"


I patched the file as so:
diff --git a/Makefile b/Makefile
index eac2291..51602c0 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ install: install-common
        @install -v -d "$(DESTDIR)$(LIBDIR)/password-store" && install
-m 0644 -v "$(PLATFORMFILE)"
        @install -v -d "$(DESTDIR)$(LIBDIR)/password-store/extensions"
        @install -v -d "$(DESTDIR)$(BINDIR)/"
-       @trap 'rm -f src/.pass' EXIT; sed
src/password-store.sh > src/.pass && \
+       @trap 'rm -f src/.pass' EXIT; sed
src/password-store.sh > src/.pass && \
        install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v
src/.pass "$(DESTDIR)$(BINDIR)/pass"
 install: install-common

A simple miss of prefixing `$(DESTDIR)` before `$(LIBDIR)`

Re-ran the `make install` which fixed the sourcing from the wrong lib
directory issue.

I'm quite surprised that this wasn't found earlier, I guess most
people install from packages?

Thanks for creating such an awesome tool. :)


More information about the Password-Store mailing list