-
Notifications
You must be signed in to change notification settings - Fork 289
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
Implement usrmerge for binaries #40273
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
f6ac440
to
9666018
Compare
scriptlets: | ||
# Must work with busybox, coreutils, any $shell-binsh | ||
pre-upgrade: | | ||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When can we get rid of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in the shebang? one must specify it; or the whole thing?
Apk will attempt the upgrade regardless; replacing symlinks will fail; and one ends up in a system with broken shell most likely. If one ends up in such state without backup one will have to do all of the below steps regardless; thus may as well document / attempt them anyway. Depending on what users have places in those locations it can still fail, but at least we ensure they will still have a working shell and utilities that we provided for them to fix up the container further if they have such a need.
I am only doing this, because there is no other way to stop the install or upgrade; as apk continues with unpacking broken things regardless.
I guess I can or should specify conflicts maybe? But not sure what I can conflict on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added https://github.com/chainguard-dev/internal-dev/issues/8673 to track the post-migration code removal
pre-upgrade: | | ||
#!/bin/sh | ||
[ -h /bin ] && exit 0 | ||
echo Performing usr-merge... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we set -ex
this during the migration period to help with debugging?
This implements usrmerge for binaries. See: - https://github.com/orgs/wolfi-dev/discussions/40270
This implements usrmerge for binaries. See: