-
Notifications
You must be signed in to change notification settings - Fork 35
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
tar needs a wrapper to add --no-same-owner when executing in an airlock context #365
Comments
Add this one to the list with the exact same problem: https://bldr.habitat.sh/#/pkgs/chef-server/oc_id/builds/959414338453241856 |
From @irvingpop: On Builder, Plans that use |
I'm taking a look at this, will have more updates tomorrow |
awesome @baumanj ! I invited you to the |
We've got |
That's very strange, but useful know, @rsertelon. Thanks for pointing it out! |
The short version is that The reason
Instead, the fix is adding:
So, the command
Should do the trick. More details at habitat-sh/habitat#3972 and habitat-sh/core-plans#913. Fixing Let me know if this fix doesn't resolve things for you, @irvingpop. |
@baumanj thanks! Although, for opam, don't worry, there's an issue for that in core-plans. I'll take care of it at some point. still hesitating between patching the tar commands or building hab packages for the deps that are being downloaded by the build :) |
Thanks, @rsertelon! I commented on habitat-sh/core-plans#1294, but I want to keep this one open while we discuss if we want to try something to fix this in the general case. This seems the right place as opposed to |
The general problem is that when However, there may be other uses of While correcting individual plans in the It seems like to reliably avoid this error, we need to find a way to prevent What do you think, @fnichol ? |
@baumanj I'll try
|
I think this would work if we created a #!/bin/bash
add_no_same_owner=true
for arg; do
if [ "$arg" == "--no-same-owner" ]; then
add_no_same_owner=false
break
fi
done
if $add_no_same_owner; then
set -- --no-same-owner "$@"
fi
echo exec hab pkg exec core/tar "$@" |
@jeremymv2: I agree that we should address the As for doing builder builds on non-master branches, I'll let that discussion play out in the filed issue, but I think there are a couple things you could do in the meantime that may reduce your pain:
|
…s like builder Attempts to fix Builder builds currently failing because they occur in a privilege restricted environment and cannot change owner or group based on the archive metadata during a tar extract. This should introduce a new behavior to the tar command where owner/group archive metadata is ignored. Additionally, it adds `core/libxml2` and `core/libxslt` to the build deps of `oc_id` so that we can then pass custom paths during the `nokogiri` gem build. Otherwise, when we bundle install, `nokogiri` fails to build because of a `tar` extraction failure of libxml like [this](https://bldr.habitat.sh/#/pkgs/chef-server/oc_id/builds/959414338453241856) Further Discussion on the `tar` extraction issue: habitat-sh/builder#365 Signed-off-by: Jeremy J. Miller <jm@chef.io>
|
@jeremymv2: did this resolve your issue? I want to repurpose this issue to the more general underlying cause, but before I do I want to ensure you're unblocked. |
@baumanj Where I had declared a However, I have another pkg build failing because there is a I'm not currently blocked by this though since I've migrated the pkg builds to expeditor until this gets sorted out. |
The |
@baumanj is there any simple way for me to provide a PR with the script you wrote above? :) I think it would be really cool to finally fix this ^^ |
I would really like to get @fnichol's input on the approach since airlock and the guts of the studio are his magical realm. I'll remind him to in the next day or two if he misses this comment. Is there anything new where this is tripping you up that makes a good case for fixing this now? |
Still the same blocked things in core plans actually. They've been there for a while now. |
We currently run all
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
this issue is not resolved for me tar: --no-same-owner: Cannot open: No such file or directory code change was |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details. |
A simple tar extraction during pkg build fails on Builder and works locally.
Originally we had this:
tar -xzf lpeg-${lpeg_version}.tar.gz
Then we changed to this
tar -xzf lpeg-${lpeg_version}.tar.gz --owner=$(id -u) --group=$(id -g)
Regardless, the above two commands result in this error only on Builder:
Aha! Link: https://chef.aha.io/features/APPDL-124
The text was updated successfully, but these errors were encountered: