New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browserpass 2.0.8 (new formula) #21039
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
class Browserpass < Formula | ||
desc "Native component for Chrome & Firefox password management add-on" | ||
homepage "https://github.com/dannyvankooten/browserpass" | ||
url "https://github.com/dannyvankooten/browserpass/archive/2.0.8.tar.gz" | ||
sha256 "1747fc24e51128811eb679b43ab23a8cce6ac566620112f0ca9fa129ace4a928" | ||
|
||
depends_on "dep" => :build | ||
depends_on "go" => :build | ||
depends_on "node" => :build | ||
depends_on "yarn" => :build | ||
|
||
def install | ||
ENV["GOPATH"] = buildpath | ||
(buildpath/"src/github.com/dannyvankooten/browserpass").install buildpath.children | ||
cd "src/github.com/dannyvankooten/browserpass" do | ||
system "make", "deps" | ||
system "make", "js" | ||
system "make", "browserpass-darwinx64" | ||
mkdir "out" | ||
mkdir "out/bin" | ||
mkdir "out/share" | ||
cp "browserpass-darwinx64", "out/bin/browserpass" | ||
cp "install.sh", "out/bin/browserpass-setup" | ||
cp "firefox/host.json", "out/share/firefox-host.json" | ||
cp "chrome/host.json", "out/share/chrome-host.json" | ||
cp "chrome/policy.json", "out/share/chrome-policy.json" | ||
dir = csh_quote(HOMEBREW_PREFIX) | ||
inreplace "out/bin/browserpass-setup", /^(BIN_DIR=).*$/, "\\1\"#{dir}/bin\"" | ||
inreplace "out/bin/browserpass-setup", /^(JSON_DIR=).*$/, "\\1\"#{dir}/share/browserpass\"" | ||
bin.install Dir["out/bin/*"] | ||
pkgshare.install Dir["out/share/*"] | ||
ohai "#{Tty.magenta}** To complete installation of browserpass, do the following:#{Tty.reset}" | ||
puts "(1) Install the browserpass-ce add-on in your browser." | ||
puts " - Chrome: https://chrome.google.com/webstore/detail/browserpass-ce/naepdomgkenhinolocfifgehidddafch" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No action needed, just wanted to let you know this, maybe check how There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't seem to happen in Chrome. Are there any docs about this behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The feature is called ExtensionInstallForcelist, I think it is usually used by companies to enforce installation of a certain extension. When I have the
|
||
puts " - Firefox: https://addons.mozilla.org/en-US/firefox/addon/browserpass-ce/" | ||
puts "(2) Run `browserpass-setup` to install browser-specific manifest files." | ||
ohai "#{Tty.magenta}** The add-on will not work otherwise!#{Tty.reset}" | ||
end | ||
end | ||
|
||
test do | ||
mkdir "#{ENV["HOME"]}/.password-store" | ||
json = { :action => "search", :domain => "test" } | ||
msg = JSON.generate(json) | ||
Open3.popen3("#{bin}/browserpass") do |stdin, stdout, _| | ||
stdin.write([msg.bytesize].pack("L")) | ||
stdin.write(msg) | ||
stdin.close | ||
len = stdout.read(4).unpack("L")[0] | ||
result = JSON.parse(stdout.read(len)) | ||
assert_equal(result, []) | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can combine all 3 goals in one system call, "make deps js browserpass-darwinx64"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't compile when I combine them. Go complains about not being able to find some packages (
twofactor
andgo-zglob
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, actually I forgot to tell you, you should download archive from a different link (click), that one already contains all the dependencies so that you don't need to do
make deps
andmake js
at all. Then you only need to domake browserpass-darwinx64
. That will also allow you to remove dependencies on "dep", "yarn" and "node".I made this custom tarball specifically for other package managers, to reduce dependencies and to simplify build instructions.