{"id":19639041,"url":"https://github.com/timsutton/brewbus","last_synced_at":"2025-07-19T05:06:20.435Z","repository":{"id":145808480,"uuid":"42778234","full_name":"timsutton/brewbus","owner":"timsutton","description":"Very simple Omnibus-style OS X installer packages from Homebrew.","archived":false,"fork":false,"pushed_at":"2018-06-03T12:06:04.000Z","size":11,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T01:34:17.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timsutton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-19T15:29:53.000Z","updated_at":"2023-08-23T05:52:32.000Z","dependencies_parsed_at":"2023-06-11T05:45:15.934Z","dependency_job_id":null,"html_url":"https://github.com/timsutton/brewbus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timsutton/brewbus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timsutton%2Fbrewbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timsutton%2Fbrewbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timsutton%2Fbrewbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timsutton%2Fbrewbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timsutton","download_url":"https://codeload.github.com/timsutton/brewbus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timsutton%2Fbrewbus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265891979,"owners_count":23844943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T12:43:53.990Z","updated_at":"2025-07-19T05:06:20.414Z","avatar_url":"https://github.com/timsutton.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brewbus\n\nThis is a very simple shell script that outputs Omnibus-style OS X installer packages from Homebrew.\n\nThe use case is for outputting Installer packages for a given Homebrew formula, including all its dependencies,\nin such a way that the binary and dependencies can't collide with those of other components (other formulae,\nother things installed in `/usr/local`, etc.)\n\nIf the formula and its dependencies are all versioned, it should be possible to make reproducible\nbuilds of older versions by passing in the commit revision, which will build from the revision\nwithin the Homebrew repo.\n\nMore on the general idea of Omnibus packaging here:\n\n  * https://github.com/chef/omnibus\n  * http://blog.scoutapp.com/articles/2013/06/21/omnibus-tutorial-package-a-standalone-ruby-gem\n\n## How it works\n\nSets up an \"isolated\" Homebrew installation at a prefix you specify (e.g. `/myorg`), with the entire\nformula installation located within the formula name (e.g. `/myorg/ffmpeg`). All the formula's\ndependencies should be properly installed using `/myorg/ffmpeg` as the prefix, and an installer\npackage will be built using the prefix as the `install-location`. The payload is the entire contents of the Homebrew installation, minus a set of Homebrew-specific paths which are excluded from the built package (such as the actual repo in `.git`).\n\n```\nFORMULA=nyancat ./brewbus.sh\n```\n\nTo create the initial prefix/formula path, this script uses `sudo` so that your regular (or admin) user can create the necessarily target directories, but the actual brew installation and package creation is done as a regular user. Homebrew also, rightfully, doesn't allow being run as root.\n\n## Command-line options\n\nThere are none - all configuration is done via environment variables. This was done simply so that I could run the script standalone in a \"cleanroom\" VM as a Jenkins parameterized build (where the parameters ultimately set environment variables).\n\nThe supported environment variables for configuration:\n\n#### FORMULA\n\n(required): name of Homebrew formula\n\n#### PREFIX\n\nPrefix to use in conjunction with FORMULA, to use as a root for the package. For example, a `PREFIX` of `/opt` and a `FORMULA` of `tree` will make a root of `/opt/tree`, meaning the final binaries will be in `/opt/tree/bin/` (or `sbin`, etc.). **Default:** /brewbus\n\n#### REVERSE_DOMAIN\n\nReverse-domain-style prefix for the installer package identifier. **Default:** ca.macops.brewbus\n\n#### BREW_GIT_SHA\n\nOptional Git SHA-1 hash to which the tap of the homebrew-core repo will be checked out. Useful if you want to 'pin' to a specific known state for the Formula. **Default:** (none, and use the tip of master branch)\n\n#### OUTPUT_DIR\n\nOptional output directory for the built package. **Default:** Current working directory\n\n\n## Paths\n\nOf course, binaries that are installed to `/myprefix/formula/{bin,sbin}` will not be in a user's default `PATH`. This tool wasn't specifically intended for distributing tools for general use but rather infrastructure- or build-related tools. However, one can always add additional paths to files in `/etc/paths.d`, which shells on OS X should be sourcing to add to the end of a user's `PATH` at login. If anyone would like to submit an option to add something like this automatically, it would be welcome.\n\n## Formulae linking to /usr/local/opt\n\nSome formulae link to shared libraries installed to /usr/local/opt (for example, formulae depending on `openssl`), and those will not work with this project as-is. The workaround for these cases would be to manage installations of these dependencies to /usr/local/opt independently. Not yet sure if there is a way to also support installing these dependencies within the same PREFIX as we install the rest of the formula dependencies.\n\n## A note on sudo and permissions\n\nAssuming one is using prefixes like `/myorg/formula`, this script will require `sudo` in order for the script to have permission to write to the root volume to create the prefix, unless the prefix exists already and is writeable by the current user.\n\nRunning this script using `sudo` if there already exists a Homebrew installation for the regular user of the machine may result in some cache files created as root, causing issues with future usage of `brew` as the regular user.\n\nI don't advise running this in such a situation, but instead recommend it be done in a \"clean\" environment with no pre-existing Homebrew installation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimsutton%2Fbrewbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimsutton%2Fbrewbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimsutton%2Fbrewbus/lists"}