-
Notifications
You must be signed in to change notification settings - Fork 298
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 requires write access to the install destination #841
Comments
Apologies this sat for so long without a response. You've reported a number of issues here. I've tried to list them all below:
1 and 4 should probably be fixed with a combination of better docs and better error messages. We could potentially default the omnibus cache dir to another location if not running as root. 2 and 3 should just be fixed. It isn't clear to me we need the version_manifest software anymore since omnibus can do that directly. I think this was broken here: 2d1d714 since these definitions are included in omnibus-software which was included in the bundle. Unfortunately, issue 5 is much trickier. The issue is that building the software in any directory other than |
Omnibus was previously generating an invalid project by default because it: - Didn't include a version-manifest software definition - Didn't include the "preparation" software definition - Had an invalid Gemfile This fixes those issues, getting us a bit closer to the Getting Starting directions working out of the box for people. Fixes #887 Partially addresses #841 Signed-off-by: Steven Danna <[email protected]>
Would you like me to open separate issues for the multiple issues you've identified as combined into this one? 5 is disappointing, I've worked on other software packagers (RubyGems, ruby-packer) and have managed to make use of |
I thinks this is OK. I've fixed 2 of the issues, and another 2 are directly related to the title of the ticket so this ticket is fine to track them.
I agree. It isn't impossible to do, but it would require many people to update their software definitions potentially. Perhaps a separate ticket for this could be opened and we could consider it if we ever decide to do another major version of omnibus. Or if someone thinks of a way to do it without breaking compatibility. |
I'd hate to leave an issue around to decay in the history and not be noticed if you do get around to a major version bump |
Omnibus was previously generating an invalid project by default because it: - Didn't include a version-manifest software definition - Didn't include the "preparation" software definition - Had an invalid Gemfile This fixes those issues, getting us a bit closer to the Getting Starting directions working out of the box for people. Fixes #887 Partially addresses #841 Signed-off-by: Steven Danna <[email protected]>
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 or overwrite 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
v5.6.8
Platform Version
macOS 10.13.5:
Darwin asx.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
ruby 2.5.0:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
Replication Case
This starts by following the Get Sarted steps in the omnibus README, then extends that to a scenario where you've installed your software and want to package when you have a previous package installed.
omnibus new MY_PROJECT_NAME
bundle install --binstubs
bin/omnibus build MY_PROJECT_NAME
/var/cache/omnibus
is not writable/var/cache/omnibus
and make it writablesudo mkdir /var/cache/omnibus
sudo chown $USER /var/cache/omnibus
bin/omnibus build MY_PROJECT_NAME
bin/omnibus build MY_PROJECT_NAME
bin/omnibus build MY_PROJECT_NAME
sudo mkdir /opt/MY_PROJECT_NAME
sudo chown $USER /opt/MY_PROJECT_NAME/
bin/omnibus build MY_PROJECT_NAME
pkg/myprojectname-0.0.0+20180612202154-1.pkg
being createdsudo rm -r /opt/MY_PROJECT_NAME/
open pkg/myprojectname-0.0.0+20180612202154-1.pkg
bin/omnibus build MY_PROJECT_NAME
Permission denied @ apply2files - /opt/MY_PROJECT_NAME/LICENSES/.gitkeep (Errno::EACCES)
Expected results
I want to be able to build a package without corrupting and replacing my currently installed project. If there is some issue with the package it may not complete replace my currently installed and working version.
I should not require write access by default to the package installation destination. Since the installer requires my password to install, and they're installed such that I can't mess them up by accident, then building the software should not touch that same location.
Step 6 must not require 6.ⅱ or 6.ⅲ and step 11 must work without changing the permissions of
/opt/MY_PROJECT_NAME
Additionally, the Get Started steps are incomplete and the README generated in the omnibus-MY_PROJECT_NAME directory does not include any of the extra steps I had to perform to reproduce the bug I care about.
Actual results
The install location must be writable in order to build an omnibus package
Additionally, if you file a bug about how the Get Started steps are missing steps (#840) it gets closed and the steps are not updated for correctness.
Build Output
Step 6:
Step 11:
The text was updated successfully, but these errors were encountered: