Question: How to get my tool on Homebrew ?
1
gravatar for Elephantdumbo
16 days ago by
Elephantdumbo20 wrote:

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 havent 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 tool pipeline tools • 239 views
ADD COMMENTlink modified 16 days ago by Philipp Bayer6.3k • written 16 days ago by Elephantdumbo20

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 REPLYlink written 15 days ago by dariober10k

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 REPLYlink written 15 days ago by Elephantdumbo20
2
gravatar for Philipp Bayer
16 days ago by
Philipp Bayer6.3k
Australia/Perth/UWA
Philipp Bayer6.3k wrote:

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 COMMENTlink written 16 days ago by Philipp Bayer6.3k

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

ADD REPLYlink written 16 days ago by Elephantdumbo20
1

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 REPLYlink written 16 days ago by Philipp Bayer6.3k
1

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 REPLYlink written 16 days ago by Elephantdumbo20

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 REPLYlink modified 15 days ago • written 15 days ago by Elephantdumbo20

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 REPLYlink written 15 days ago by Philipp Bayer6.3k

Thank you so much.

ADD REPLYlink modified 15 days ago • written 15 days ago by Elephantdumbo20

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 REPLYlink modified 15 days ago • written 15 days ago by Elephantdumbo20

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

ADD REPLYlink written 15 days ago by Philipp Bayer6.3k

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

ADD REPLYlink written 15 days ago by Elephantdumbo20

how does the full 01.configure file look like?

ADD REPLYlink written 15 days ago by Philipp Bayer6.3k

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 REPLYlink modified 15 days ago • written 15 days ago by Elephantdumbo20

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 REPLYlink modified 15 days ago • written 15 days ago by Philipp Bayer6.3k

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

ADD REPLYlink modified 15 days ago • written 15 days ago by Elephantdumbo20

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 REPLYlink written 14 days ago by Philipp Bayer6.3k

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 REPLYlink written 14 days ago by Elephantdumbo20

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 REPLYlink modified 14 days ago • written 14 days ago by Elephantdumbo20

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 REPLYlink written 14 days ago by Philipp Bayer6.3k

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 REPLYlink modified 14 days ago • written 14 days ago by Elephantdumbo20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 964 users visited in the last hour