This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add pass: the standard unix password manager.

Closes #14779.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
  • Loading branch information...
zx2c4 authored and mistydemeo committed Sep 6, 2012
1 parent b6967f7 commit 66b45aed5140781f6c6338492fe47eb77e6025ec
Showing with 27 additions and 0 deletions.
  1. +27 −0 Library/Formula/pass.rb
View
@@ -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 "

This comment has been minimized.

Show comment
Hide comment
@Daegalus

Daegalus Sep 11, 2012

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.

@Daegalus

Daegalus Sep 11, 2012

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.

This comment has been minimized.

Show comment
Hide comment
@mistydemeo

mistydemeo Sep 11, 2012

Contributor

Ping @zx2c4

This comment has been minimized.

Show comment
Hide comment
@zx2c4

zx2c4 Sep 11, 2012

Contributor

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

@zx2c4

zx2c4 Sep 11, 2012

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Sep 11, 2012

Contributor

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.

@jacknagel

jacknagel Sep 11, 2012

Contributor

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.

This comment has been minimized.

Show comment
Hide comment
@zx2c4

zx2c4 Sep 11, 2012

Contributor

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

zx2c4 Sep 11, 2012

Contributor

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?

This comment has been minimized.

Show comment
Hide comment
@Daegalus

Daegalus Sep 11, 2012

@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.

@Daegalus

Daegalus Sep 11, 2012

@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.

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Sep 11, 2012

Contributor

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.

@jacknagel

jacknagel Sep 11, 2012

Contributor

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.

This comment has been minimized.

Show comment
Hide comment
@zx2c4

zx2c4 Sep 11, 2012

Contributor

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

@zx2c4

zx2c4 Sep 11, 2012

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Sep 11, 2012

Contributor

?

This comment has been minimized.

Show comment
Hide comment
@jacknagel

jacknagel Sep 11, 2012

Contributor

Homebrew most certainly does abort if building a dependency fails.

@jacknagel

jacknagel Sep 11, 2012

Contributor

Homebrew most certainly does abort if building a dependency fails.

This comment has been minimized.

Show comment
Hide comment
@zx2c4

zx2c4 Sep 11, 2012

Contributor

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 Sep 11, 2012

Contributor

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.

This comment has been minimized.

Show comment
Hide comment
@zx2c4

zx2c4 Sep 11, 2012

Contributor

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.

@zx2c4

zx2c4 Sep 11, 2012

Contributor

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.

+ 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

0 comments on commit 66b45ae

Please sign in to comment.