Thanks for your response. I am bit confused what is foo formula exactly ?
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
1 answer
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
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
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!
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 ?
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
Thank you so much.
Hmmm looking at the entire log, not just the last 15 lines may be more useful
does my gzip need to have something special ? I just have my subscripts and the bash file that runs the pipeline ?
how does the full 01.configure file look like?
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
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
so now I am confused. Is the problem in my formula or the command i run with ?
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?
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
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 ?
_______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
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
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 ?
Log in to answer this question.
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.
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