-
Notifications
You must be signed in to change notification settings - Fork 80
Homebrew formula for native binary #173
Comments
Please also consider supporting macports https://www.macports.org |
Would anyone want to volunteer helping with any of these suggestions? :) I will be happy to advise on any questions, but since I don't have a Mac and since it is a community project, if any of these ideas ever get implemented, the implementation will come from the community. I'll keep this ticket open for a while, hoping that it will draw attention of other Mac users, but if nobody wants to help I'll have to close it. |
I will have a look if I can write a port file for macports. I have done this in the past so that shouldn't be the problem. I am not so sure about the installation process. The binary has to be copied for every supported browser in a specific directory. I think I'd rather install the binary to the default system location (/opt/local/bin) and create symlinks. I'll give it a try next weekend... |
That would be awesome! It isn't normally needed to copy the binary, we usually put one binary in one place (like in I recommend checking out installation instructions in AUR package, the Another source of truth would of course be our own install.sh that we ship together with the release. |
I'm working on a brew formula, but Homebrew doesn't allow installing files outside the package sandbox. So my plan is to install both the native binary and the For that to work, I'll need the brew formula to do a search-and-replace on |
I recommend not using install.sh for this, the script is really only for manual installations. Have a look at AUR package that I mentioned above, specifically |
Or "package sandbox" means only the folder with the binary? In which case, yeah I see what you mean... Sounds sensible, but let me also think about it and I'll get back to you. There are simply a few other requests for install.sh, I want to make sure they will not break what you are doing here in future. |
@zsau I wouldn't like automated packages to depend on I'm not familiar much with brew, but in this example I see some I imagine the brew install the following files:
and then you can do the following:
That's essentially what aur package is doing, except that it keeps track of these files and automatically removes them upon uninstallation of browserpass. If there is a way to define commands to run on removal, you can also cleanup these files. |
I'd prefer that too, but apparently it's not possible: https://discourse.brew.sh/t/installing-files-to-library/1284. |
I'm curious how it will know what If this is indeed impossible, yes please go ahead and extend the |
Any attempt to write to paths outside the sandbox results in a permission error. |
About install.sh, would you accept a change that makes it do something similar to the AUR package, installing the actual JSON files to someplace like |
I'm not sure about symlinking, because I'm not sure how people use the script, i.e. if it is possible that someone will start having broken symlinks because they delete their "installation dir" after they install the app... Let's keep copying the files, but do your change to separate binary dir and manifests dir. |
The manifest already acts like a symlink, in that the JSON file references a binary at a specific path (which must exist for the plugin to work). Also I doubt many people blindly delete dirs in But it's not a big deal either way. If you still don't like the idea, I'll keep copying the JSON files and just add the binary/manifest dir distinction as discussed. |
I was more thinking like people might download release archive, unarchive the files, copy the binary to /usr/bin/browserpass, run |
The symlinks wouldn't be affected by doing that. I'm suggesting that |
On second thought, I'm not sure what I was thinking since the homebrew formula would need to copy the JSON files to the shared directory, so that part can't be done by |
How about just printing commands for user to execute after installation is done? So you install binary and all json files to somewhere, rename what is possible to rename, and then print messages "now please copy-paste and run these commands". I did something like this in a different aur package, just a bunch of prints after installation. |
I considered doing that, but the script seems a little more user-friendly and less error-prone. The Homebrew formula's pretty much ready, as soon as #190 makes it into a release. |
No problem! |
@zsau 2.0.8 was just released, please test your formula and close this issue if everything is working fine 😉 |
Thanks for the help! |
@zsau could you ping me when you manage to get the formula merged, in one place or another? I'd like to rewrite the installation section of the README and mention all available packages as a preferred way of installation (so far I'm only aware of existing packages for ArchLinux and NixOS). |
Looks like it's not going to be accepted by Homebrew, and frankly I have no will to mess with a cask after wasting a bunch of time on the HB formula. I also just found out that |
It's a shame that homebrew aren't willing to accept this. Thanks for trying anyway 👍 Wow, good finding about built-in native messaging support in gopass, I'm very curious about it now 🙂 |
It would be nice to be able to install the native binary via Homebrew, for easy updating.
The text was updated successfully, but these errors were encountered: