Skip to content

homebrew 🍺 tap serving off beat ales ↑ and lagers ↓

License

Notifications You must be signed in to change notification settings

ipatch/homebrew-us-05

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Contents πŸ“–

ipatch/homebrew-us-05

An off beat repo for storing custom ↑ ales and lagers ↓ to make your life a little b1t easier.

Installing a formula

To install formula from this repo

brew tap ipatch/homebrew-us-05
brew install ipatch/homebrew-us-05/[name-of-formula] [--with-options]

Example

brew install ipatch/us-05/openssh --verbose --build-from-source --with-ldns

To upgrade a formula that has been installed via this tap

brew reinstall ipatch/us-05/[name-of-formula] --verbose --build-from-source

Working with Neovim

When attempting to install neovim on a box where macports installation exists in /opt/local the neovim configure scripts will find the support files in the macports installation before the homebrew installation (that's a no no) and will lead to a failed installation. my quick hack rename /usr/local/ (macports installation path) to something else, ie.

mv /opt/local /opt/localllll

undo the name change after the homebrew installation of neovim completes. learn more

Working with OpenSSH from this repo

When installing OpenSSH from this repo LibreSSL install from tarball and not git source head

When upgrading or install OpenSSH from this repo, a few files will need to have their permissions changed.

cd /usr/local/etc/ssh
sudo chown root:wheel *_key
sudo chmod 600 *_key

TODOs / openssh

  • change permissions, owner, and group of above mentioned files when installing formula.

If LibreSSL has been updated from mainline Homebrew, ie. upgrading from v2.7.x to v2.8.x then this version of OpenSSH will need to be reinstalled from this tap.

Working with osxfuse

The last version of osxfuse to have a open source license without using a prebuild binary is version 3.8.3, per this github issue

I recently reinstalled osxfuse so i could have write support for NTFS filesystems without having to spin up a virtual machine for write purposes. I created a cask based formula file within this repo to store the last open source version of osxfuse as mentioned above.

For getting write support to NTFS file systems after installing ntfs-3g using brew, reference

sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.apl
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs

Working with fuse-ext2

  • fuse-ext2 is a program that allows working with ext-{2,3,4} file systems on macOS, and provides both read and write support.

To install fuse-ext2 from this repo using homebrew

brew tap ipatch/homebrew-us-05
brew install ipatch/homebrew-us-05/fuse-ext2 --verbose

As of September 17, 2018, e2fsprogs needs to be unlinked after installing fuse-ext2

To manually unlink e2fsprogs

brew unlink e2fsprogs

To manually link fuse-ext2

brew link fuse-ext2

Working with Qemu

To install Qemu from this homebrew 🍺 repo

brew install ipatch/homebrew-us-05/qemu \
--verbose \
--with-docs \
--with-libusb \
--with-hvf \
--with-hax \
--HEAD

Gotchas

If a formula is installed from this repo ie. qemu with options, passed to the install command, ie. --with-hax homebrew has issues running the reinstall command even with the --build-from-source flag. To work around this, run brew remove [name-of-formula] to uninstall the package, and then reinstall the package with the flags provided form the previous install. see my Q/A

Maintenance

To pull down updates from this tap from time to time or when an upstream change has been made

brew update

Miscellanous

Installing universal ctags requires its own work around, learn more

Development

When working with formula locally for debugging purposes specify a local filesystem path, make sure to add .rb

brew [re]install /path/to/some/local_formula.rb

πŸ’‘ set the following env var $HOMEBREW_NO_AUTO_UPDATE to 1 preventing mac homebrew from auto updating everytime a brew install cmd is run, thus greatly speeding up the process of local formula development.

❗️brew reinstall is problematic a majority of the time, so when experimenting with local formula when developing use brew install [/path/to/formula.rb]

🚨 recently i've had difficulty installing a formula that has a similar name with that of a formula from a installed tap, ie. installing freecad.rb locally was resulting in conflicts of sorts, so created a unique name, ie. freecad-dev.rb and am able to install & test formula file locally without doing the, git add, commit, push brew update, brew install routine. the above mentioned brew [re]install cmd is all that is required

🚨 if there are any sytnax errors within the formula file the brew cmd will fail with a shitty error message, ie. not letting the user (developer) know the formula file contains a error mesage (more than likely a syntax error) but rather complains it cannot find the specified formula.

Development / cask

  • development of cask(s) formula files will live within, /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask, path may vary depending upon how homebrew is installed and the current OS that homebrew is running on.
  • development of cask(s) formula files that represent app bundles that are considered development, beta, or unstable releases live within /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions

Before submitting a PR for a cask upstream run through the below check

brew cask audit --download {{cask_file}}
brew cask style --fix {{cask_file}}
brew cask (re)install {{cask_file}}
brew cask uninstall {{cask_file}}

Development / cask / naming example

  • renamed the freecad cask within this repo (homebrew tap) to not conflict with either the hombrew-cask-versions, freecad-pre, to have a cask specific to this tap, freecad-ipre, prepended an i to the cask name in reference to my github username.

  • github / @kapcake created a cask.formula for freecad pre release, but appears to not have been updated in ~ a year. learn more

freecad

i moved all freecad related notes within its own README

cmake related

to show a list of configuration settings

cd ./build; cmake -L ..

apparently explicitly setting CC and CXX env vars in .cmake files can lead to complications, the preferred way to set a specific CC & CXX compiler is to use env vars export CC=/path/to/c-compiler before running cd ./build; cmake ..

/ devolpment / homebrew / References


TODOs