-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat(24.04): add bzip2 slice #337
base: ubuntu-24.04
Are you sure you want to change the base?
Conversation
Diff of dependencies: |
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.
Thanks this is a good package to add, although I think the bins slice needs to be split.
essential: | ||
- libbz2-1.0_libs | ||
- libc6_libs | ||
contents: |
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.
Some of these bins are actually scripts and probably need dash_bins and one or more base-files slices. Could we separate the executables like this xz-utils PR? https://github.com/canonical/chisel-releases/pull/338/files
/usr/bin/bzdiff: POSIX shell script, ASCII text executable
/usr/bin/bzexe: POSIX shell script, ASCII text executable
/usr/bin/bzgrep: POSIX shell script, ASCII text executable
/usr/bin/bzmore: POSIX shell script, ASCII text executable
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.
Why do we want to introduce dash as a dependency? What if people want to use bash?
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.
I asked questions in your PR so we can clarify this - I'm not sure I completely agree with 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.
No problem. btw that draft PR just contains some examples for another PR I was assisting, it probably wont get merged. Most of the work belongs to endersonmaia, Maybe you want to move some of the comments to -> #338
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.
dash is the default system shell on debian based systems. It is normally linked to /bin/sh. As far as I know, users can still install and execute bash form bash_bins
Here is an example from a relatively fresh multipass instance
ubuntu@noble:~$ head -n 10 /usr/bin/bzmore
#!/bin/sh
# Bzmore wrapped for bzip2,
# adapted from zmore by Philippe Troin <[email protected]> for Debian GNU/Linux.
PATH="/usr/bin:$PATH"; export PATH
prog=`echo $0 | sed 's|.*/||'`
case "$prog" in
*less) more=less ;;
ubuntu@noble:~$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Mar 31 10:47 /bin/sh -> dash*
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.
I know it's the default shell in ubuntu, but I question whether or not it should be a forced dependency when alternatives exist and it's not a dependency for the official package. Some dependencies make sense to introduce as they are actually required to run and it's pretty binary (i.e coreutils vs not coreutils), but the choice of shell interpreter, dash
is not actually a required choice.
I'm not saying I'm right here, but I just want to explain my opinion about why I think it's shouldn't be, if you and your team feel strongly otherwise I'll let it be
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.
I question whether or not it should be a forced dependency when alternatives exist
I agree, and that is a good point. Our team had a short discussion about this recently. What if someone wanted a busybox based image? I think we need a larger discussion on this, but its probably outside the scope of this PR. Especially since some other slices use dash for the same reason.
Not to argue against my first point, but for the time being I think we should be consistent with expectations of a Ubuntu 24.04 distribution. This more reliable since it is widely used as a default shell, and it is what an end user probably expects to be there.
I'd like to hear more voices on this, I've only been on the project for a few months. :)
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.
@rebornplusplus @cjdcordeiro I belive we need some more input here
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.
I had a discussion with @cjdcordeiro yesterday on this. We'll get the user to link in the shell after chiseling. The current PR should be fine then. Apologies for the confusion.
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.
Y I think this is something that may get some peace of mind once we can also handle conflicts. But for now, I can actually suggest one thing, if needed (I won't stop the PR because of this): you can create shell-specific slices. If really needed, one can have bins-dash
, etc. to create options.
I'm not sure this is the ideal UX, but it surely is possible and avoids any post-inst hooks.
essential: | ||
- libbz2-1.0_libs | ||
- libc6_libs | ||
contents: |
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.
I had a discussion with @cjdcordeiro yesterday on this. We'll get the user to link in the shell after chiseling. The current PR should be fine then. Apologies for the confusion.
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.
lgtm but we need to test all binaries and scripts, just to make sure they're properly loaded.
And as alluded by the above discussion, if there are scripts that assume a post-inst operation, then at least leave a comment in the YAML
Hey @Meulengracht |
Proposed changes
Add the bzip2 package
Related issues/PRs
Forward porting
Can be proposed for 24.10 if approved
Checklist