From b98d1f7857303c4fc11853eee4bd19b2038a993c Mon Sep 17 00:00:00 2001 From: "Manuel Amador (Rudd-O)" Date: Wed, 10 Jul 2019 00:46:31 +0000 Subject: [PATCH] Support a location where `qvm-pass` will emulate `pass`. --- Makefile | 5 +++++ README.md | 5 +++++ qubes-pass.spec | 5 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 635189f..37c0f2f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ BINDIR=/usr/bin +LIBEXECDIR=/usr/libexec SYSCONFDIR=/etc DESTDIR= PROGNAME=qubes-pass @@ -19,6 +20,10 @@ srpm: dist install-client: install -Dm 755 bin/qvm-pass -t $(DESTDIR)/$(BINDIR)/ install -Dm 755 bin/qubes-pass-client -t $(DESTDIR)/$(BINDIR)/ + mkdir -p $(DESTDIR)/$(LIBEXECDIR)/qubes-pass/ + # Support the trick of using PATH=/usr/libexec/qubes-pass:$PATH to fool + # programs which invoke the pass store command line program. + ln -sf $(BINDIR)/qvm-pass $(DESTDIR)/$(LIBEXECDIR)/qubes-pass/pass install-service: install -Dm 644 etc/qubes-rpc/ruddo.PassRead -t $(DESTDIR)/$(SYSCONFDIR)/qubes-rpc/ diff --git a/README.md b/README.md index 82f3a18..994404c 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,11 @@ the password store VM. Run `qvm-pass -?` on a terminal to get usage information. +*Tip:* fool programs that use `pass` into using `qvm-pass` instead. +After installation, you can `export PATH=/usr/libexec/qubes-pass:$PATH` +prior to invoking said programs, to indoce programs (which invoke the +pass store command line program) to invoke `qvm-pass` instead. + ## Installing the software There are three components for this software: diff --git a/qubes-pass.spec b/qubes-pass.spec index 1b80a0b..299c5a7 100644 --- a/qubes-pass.spec +++ b/qubes-pass.spec @@ -45,13 +45,13 @@ have VMs that have the %{name} package installed. %build # variables must be kept in sync with install -make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} SYSCONFDIR=%{_sysconfdir} +make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} SYSCONFDIR=%{_sysconfdir} LIBEXECDIR=%{_libexecdir} %install rm -rf $RPM_BUILD_ROOT # variables must be kept in sync with build for target in install-client install-service install-dom0; do - make $target DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} SYSCONFDIR=%{_sysconfdir} + make $target DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} SYSCONFDIR=%{_sysconfdir} LIBEXECDIR=%{_libexecdir} done %check @@ -62,6 +62,7 @@ fi %files %attr(0755, root, root) %{_bindir}/qvm-pass +%attr(-, -, -) %{_libexecdir}/%{name}/pass %attr(0755, root, root) %{_bindir}/qubes-pass-client %doc README.md