New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building an omnibus package writes to the install destination #840
Comments
Omnibus defaults to using /var/cache/omnibus as the root directory, and expects read/write/execute privileges. If this doesn't work for your setup you can override (with varying levels of granularity) the build, cache, package, and other directories using the configuration options found here: https://www.rubydoc.info/github/chef/omnibus/Omnibus/Config |
The documentation of omnibus requiring write access to But now that I know this I've made the directory writable by my user and run again, this time with a generated project.
I expect this to not need root permissions and to not write to my existing application, but it does:
Similarly for chef-dk from above:
|
@scotthain should I create a new issue, or is the update in the above comment enough to re-open this one? |
Description
When I'm building the next version of an omnibus-packaged application omnibus obliterates the existing files I installed using a previous package. If the build fails I may have a corrupt or non-working application.
If I'm building for the first time omnibus expects to be able to write to the installed locations. If this directory is only root-writable the omnibus build will fail with
Errno::EACCESS
as it tries to delete the installed files.Additionally, a macOS .pkg requires root permissions to install the package, which omnibus should not need to build that package.
Instead omnibus should build the installer in a directory completely under its ownership.
Omnibus Version
5.6.12
Platform Version
macOS 10.13.4:
Darwin asx.local 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64
Ruby 2.5.0:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
Replication Case
git clone git@github.com:chef/chef-dk.git
cd chef-dk/omnibus
bundle install --binstubs
bundle exec omnibus build chefdk
It doesn't matter which omnibus application I'm trying to build, omnibus always tries to write to the install path.
Build Output
The text was updated successfully, but these errors were encountered: