How to get my tool on Homebrew ?
1
1
Entering edit mode
5.4 years ago

Hello guys,

I have been working on a tool for months now, and we are currently preparing a paper to release it officially, so I need help to figure out how to make the tool available on homebrew for easy installation for users. I haven't done this before, so I am bit confused. Instructions on homebrew manual isn't so clear. Did anyone here did this before? I would really appreciate a some tips to get me started.

Thank you so much

homebrew pipeline • 3.4k views
ADD COMMENT
0
Entering edit mode

Maybe too late, maybe irrelevant... But have you considered submitting your program to bioconda instead? I think (bio)conda is more popular than homebrew in bioinformatics and the users of your program get the benefits of the conda ecosystem like separate environments and tons of packages already available.

ADD REPLY
0
Entering edit mode

I only used biconda once. It also seems like a really good idea to have it there. Thank you. I will consider it after homebrew

ADD REPLY
2
Entering edit mode
5.4 years ago

You will have to create a pull-request at the homebrew-bio repository with a new formula which details how your software is installed. You can read the guide here: https://github.com/brewsci/homebrew-bio/blob/master/CONTRIBUTING.md which links to this cookbook: https://docs.brew.sh/Formula-Cookbook.html

ADD COMMENT
0
Entering edit mode

Thanks for your response. I am bit confused what is foo formula exactly ?

ADD REPLY
1
Entering edit mode

foo is a placeholder for the software name, so if you wanted to create a new package called 'readAligner' you'd run

brew create https://whatever_your_host_is/readAligner-v1.0.0.tar.gz
# this will create something like /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/readAligner.rb
# edit that file, changing the name on the top to what it should be (let's say readAligner)
brew install --build-from-source readAligner
# this is the hardest part, does the installation work? If not, see whether you should add any dependencies to readAligner.rb as detailed in the cookbook
brew audit --new-formula foo

Then make a new commit with the format as required like `readAligner 1.0.0 (new formula)' , then open a PR, and see whether the automated tests fail

ADD REPLY
1
Entering edit mode

Thank you so much for your help . I will be working on that during the weekend. I will reply to this if i am stuck on something. Thank you!

ADD REPLY
0
Entering edit mode

so I have a question now. My pipeline uses some packages from r. How can i install it using the formula code ? can brew install these r packages as a dependency ?

ADD REPLY
0
Entering edit mode

Have a look at some other formulas - https://github.com/brewsci/homebrew-bio/blob/ea1b171f78eca1a8e2579d385ec6c80db9c09e2b/Formula/das_tool.rb

has a few lines where it installs the ggplot2, doMC and data.table R-packages

ADD REPLY
0
Entering edit mode

Thank you so much.

ADD REPLY
0
Entering edit mode

so i am getting this message. I dont really understand. What does that mean ? I also cant find a README as the cookbook suggests. Also why didnt it add the tool to my $PATH

ADD REPLY
0
Entering edit mode

Hmmm looking at the entire log, not just the last 15 lines may be more useful

ADD REPLY
0
Entering edit mode

does my gzip need to have something special ? I just have my subscripts and the bash file that runs the pipeline ?

ADD REPLY
0
Entering edit mode

how does the full 01.configure file look like?

ADD REPLY
0
Entering edit mode

oh. this is the file. it only produce it when i use brew install without interactive mode

2019-07-07 01:38:38 -0400

./configure --disable-debug --disable-dependency-tracking --disable-silent-rules --prefix=/home/linuxbrew/.linuxbrew/Cellar/repeat-test/1.1

HOMEBREW_VERSION: 2.1.6-44-g895467a ORIGIN: https://github.com/Homebrew/brew HEAD: 895467ad9f57a9245c36def26abca729f2559fbb Last commit: 4 days ago Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core Core tap HEAD: 8fc90f9949f42879aed819b772e737ec50d59e9c Core tap last commit: 29 hours ago HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew HOMEBREW_CACHE: /home/sherif/.cache/Homebrew HOMEBREW_LOGS: /home/sherif/.cache/Homebrew/Logs CPU: dodeca-core 64-bit skylake Homebrew Ruby: 2.5.1 => /usr/bin/ruby2.5 Clang: N/A Git: 2.17.1 => /usr/bin/git Curl: 7.58.0 => /usr/bin/curl Kernel: Linux 4.4.0-18932-Microsoft x86_64 GNU/Linux OS: Ubuntu 18.04.2 LTS (bionic) Host glibc: 2.27 /usr/bin/gcc: 7.4.0 glibc: N/A gcc: 5.5.0_4 xorg: 20170115_1

HOMEBREW_CC: gcc-5 HOMEBREW_CXX: g++-5 MAKEFLAGS: -j12 CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew HOMEBREW_GIT: git ACLOCAL_PATH: /home/linuxbrew/.linuxbrew/share/aclocal

PATH:/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super:/usr/bin:/bin:/usr/sbin:/sbin:/home/linuxbrew/.linuxbrew/opt/gcc/bin

ADD REPLY
0
Entering edit mode

What happens if you run

./configure --disable-debug --disable-dependency-tracking --disable-silent-rules --prefix=/home/linuxbrew/.linuxbrew/Cellar/repeat-test/1.1

in the --interactive mode?

The --interactive mode itself doesn't do much, if you look at the cookbook it says that this mode is there for you to manually run through the installation steps to see what breaks

ADD REPLY
0
Entering edit mode

so now I am confused. Is the problem in my formula or the command i run with ?

ADD REPLY
0
Entering edit mode

Maybe both?

You can try running

brew install --verbose --debug repeat-test

which will run through the whole installation without your manual input.

brew  install --interactive repeat-test

won't install the package, but will put you into a sandbox where all of your specified prerequisites are downloaded, so you can walk through the installation manually, step by step. What happens if you run the ./configure step in the interactive mode?

ADD REPLY
0
Entering edit mode

so i was able to deal with the errors i guess and it now installs and work correctly, but i have a question. When i release new updates to my tool in the future how will i update the formula on hombrew itself do i have to do a pull request every time ? I am confused about this process

ADD REPLY
0
Entering edit mode

I was able to install the formula with no error but when i audit i get this 1 error. why cant i put .R in the bin ? I modified my main bash script to look for them there and it works. . How can i get the path of the rest of the files then ? I cant seem to find a good idea to link the main bash scripts with the subscripts ?

https://ibb.co/PCWnRwH

_______update:

I was able to find a way but now i am wondering what if i want to release update 1.1 do i just point the main bash script to 1.1 instead of 1.0 folder ? I think this is a way to do it but is it "professional and clean " ?

I would really appreciate your insight

ADD REPLY
0
Entering edit mode

You make a formula for 1.0 and submit that, later you can submit a pull request for 1.1 with a new version of the same formula

ADD REPLY
0
Entering edit mode

oh Thanks. I ran the brew audit --strict --online and i got no errors and when i ran your brew audit --new-formula i got the github not notable error, but people on brew github said to ignore it, and the installed formula work as intended. I am set like this right ? However sometimes i get this error https://ibb.co/TW2sTpD ,but i fix it by running the suggested command. It is not a problem in the formula itself, right ?

ADD REPLY

Login before adding your answer.

Traffic: 1318 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6