Skip to content
This repository
Browse code

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
Jason A. Donenfeld authored September 07, 2012 mistydemeo committed September 07, 2012

Showing 1 changed file with 27 additions and 0 deletions. Show diff stats Hide diff stats

  1. 27  Library/Formula/pass.rb
27  Library/Formula/pass.rb
... ...
@@ -0,0 +1,27 @@
  1
+require 'formula'
  2
+
  3
+class Pass < Formula
  4
+  homepage 'http://zx2c4.com/projects/password-store'
  5
+  url 'http://git.zx2c4.com/password-store/snapshot/password-store-1.1.4.tar.xz'
  6
+  sha256 '4dd8d1b39b885ba4e902e50f36afb40b3087e682f9afb89d33d17fa931405929'
  7
+  head 'http://git.zx2c4.com/password-store', :using => :git
  8
+
  9
+  depends_on 'xz' => :build
  10
+  depends_on 'pwgen'
  11
+  depends_on 'tree'
  12
+  depends_on 'gnupg2'
  13
+
  14
+  def install
  15
+    inreplace "src/password-store.sh" do |s|
  16
+      s.gsub! "gpg ", "gpg2 "
  17
+      s.gsub! "xclip -o -selection clipboard", "pbpaste"
  18
+      s.gsub! "xclip -selection clipboard", "pbcopy"
  19
+      s.gsub! "qdbus", "#qdbus"
  20
+      s.gsub! "base64", "openssl base64"
  21
+    end
  22
+    inreplace "man/pass.1", "xclip", "pbcopy"
  23
+
  24
+    system "make DESTDIR=#{prefix} PREFIX=/ install"
  25
+  end
  26
+
  27
+end

0 notes on commit 66b45ae

Yulian Kuncheff

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.

Jason A. Donenfeld

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

Jack Nagel

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.

Jason A. Donenfeld

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?

Yulian Kuncheff

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

Jack Nagel

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.

Jason A. Donenfeld

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

Jack Nagel

Homebrew most certainly does abort if building a dependency fails.

Jason A. Donenfeld

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.

Jason A. Donenfeld

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.

Please sign in to comment.
Something went wrong with that request. Please try again.