Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add pass: the standard unix password manager.

Closes #14779.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
  • Loading branch information...
commit 66b45aed5140781f6c6338492fe47eb77e6025ec 1 parent b6967f7
@zx2c4 zx2c4 authored mistydemeo committed
Showing with 27 additions and 0 deletions.
  1. +27 −0 Library/Formula/pass.rb
View
27 Library/Formula/pass.rb
@@ -0,0 +1,27 @@
+require 'formula'
+
+class Pass < Formula
+ homepage 'http://zx2c4.com/projects/password-store'
+ url 'http://git.zx2c4.com/password-store/snapshot/password-store-1.1.4.tar.xz'
+ sha256 '4dd8d1b39b885ba4e902e50f36afb40b3087e682f9afb89d33d17fa931405929'
+ head 'http://git.zx2c4.com/password-store', :using => :git
+
+ depends_on 'xz' => :build
+ depends_on 'pwgen'
+ depends_on 'tree'
+ depends_on 'gnupg2'
+
+ def install
+ inreplace "src/password-store.sh" do |s|
+ s.gsub! "gpg ", "gpg2 "

Why is this gsub swithcing from gpg -> gpg2? the installed gpg from brew installs as gpg not gpg2. Had to go in and switch everything back in order for this to work.

@mistydemeo Owner

Ping @zx2c4

@zx2c4
zx2c4 added a note

On my mac, gnupg2 installs as gpg2, not gpg. Can we get a third opinion?

@jacknagel Owner

gnupg2 installs as gpg2, yes.

However, in other formulae we have avoided a hard dependency in favor of allowing the user to pick gnupg 1.x or 2.x (we package both, as they are different software that can be installed alongside each other) using a Requirement.

Of course this depends on the actual requirements of the dependent software.

@zx2c4
zx2c4 added a note

I believe pass works much better with gpg2, because of the advantages of gpg-agent, though I could be mistaken.

In anycase, how could it come about that @Daegalus wound up with pass installed and gnupg1, not gnupg2, when gnupg2 is listed as a dependency?

@zx2c4 I think i found the problem. I already had gnupg installed before installing pass (without gpg2 installed). When I installed pass, there were 0 errors, but apparently brew link libgnupg2 failed, and it never linked gpg2 for me. Hence why i thought it was broken with me falsely thinking that it was the formula.

I guess I apologize for jumping the gun and not realizing that it was a mistake with mine. But Brew never told me that gnupg2 failed to link while installing pass, it all went through just fine. Only manually uninstalling and reinstalling gnupg2 showed me the error.

@jacknagel Owner

We provide gpg-agent as a separate package, as both 1.x and 2.x have the capability to use it.

how could it come about that @Daegalus wound up with pass installed and gnupg1, not gnupg2, when gnupg2 is listed as a dependency?

Only by manual user intervention.

@zx2c4
zx2c4 added a note

Coming from a Gentoo background, that seems pretty crazy that homebrew won't abort when a dep fails...

@jacknagel Owner

?

@jacknagel Owner

Homebrew most certainly does abort if building a dependency fails.

@zx2c4
zx2c4 added a note

That was in response to

When I installed pass, there were 0 errors, but apparently brew link libgnupg2 failed, and it never linked gpg2 for me.

@zx2c4
zx2c4 added a note

Anyway, if you'd like to determine someway to depend on either gnupg or gnupg2 (via Requires, or whatever other mechanism), and then come up with an intelligent way of patching the source to be gpg or gpg2, depending on what's installed, go for it.

For the record, though, upstream prefers gnupg2, and as such gnupg2 ought to be the default if the user does not decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ s.gsub! "xclip -o -selection clipboard", "pbpaste"
+ s.gsub! "xclip -selection clipboard", "pbcopy"
+ s.gsub! "qdbus", "#qdbus"
+ s.gsub! "base64", "openssl base64"
+ end
+ inreplace "man/pass.1", "xclip", "pbcopy"
+
+ system "make DESTDIR=#{prefix} PREFIX=/ install"
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.