-
Notifications
You must be signed in to change notification settings - Fork 50
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 xz-utils slice #322
base: ubuntu-24.04
Are you sure you want to change the base?
Conversation
Diff of dependencies: slices/xz-utils.yaml@@ -1,2 +1,5 @@
+dash
+diffutils
+grep
libc6
liblzma5 |
@@ -0,0 +1,26 @@ | |||
package: xz-utils |
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 for the contribution! The slice itself looks good to me. However could you add some spread tests to help us verify everything works as expected? https://github.com/canonical/chisel-releases/blob/main/CONTRIBUTING.md#7-test-your-slices-before-opening-a-pr
Here is an example PR with tests:
https://github.com/canonical/chisel-releases/pull/320/files#diff-40e68e9abb4e657ef292dcfd6fa750ddffea20daec62f7ceb9acc7605beb17e3
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 suppose I don't need to add a test for every binary provided.
But when testing xz
I thought I could test with xz --version
, xz -z
(compress) and a little xzgrep
just for "completeness" of the test. But this failed and I can't understand why.
I'll send a fixup without the xzgrep
that may pass, but I am not satisfied.
essential: | ||
- xz-utils_copyright | ||
|
||
slices: |
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.
It looks like xzgrep and a few of the other utils in /usr/bin/
maybe shell scripts. Could we move the scripts to a util folder slice and add the dependencies there?
slices:
bins:
essential:
- libc6_libs
- liblzma5_libs
contents:
/usr/bin/lzmainfo:
/usr/bin/unxz:
/usr/bin/xz:
slices:
utils:
essential:
- xz-utils_bins
- dash_bins
- grep_bins
... possibly more dependencies
contents:
/usr/bin/xzcat:
/usr/bin/xzcmp:
/usr/bin/xzdiff:
/usr/bin/xzegrep:
/usr/bin/xzfgrep:
/usr/bin/xzgrep:
/usr/bin/xzless:
/usr/bin/xzmore:
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.
You mean create a new slice called utils?
slices:
...
utils:
essential:
- xz-utils_bins
- dash_bins
- grep_bins
I just think it's gonna be ugly to call xz-utils_utils
.
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 couldn't make it pass the test I've made, but sent the commit anyway so you can help me track what's missing.
I still get this error:
chroot: failed to run command ‘xzgrep’: No such file or directory
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 made a rootfs with your slices and busybox so I can take a closer look at the environment, and was able to recreate your error. It looks like xzgrep is expecting /bin/sh to exist. I symlinked /bin to /usr/bin and /usr/bin/sh to /usr/bin/busybox and xzgrep seems to execute now.
I think I saw another slice with a similar hurdle, let me see what the convention is for fixing 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.
Sorry for the delay. The team mentioned we need to add base-files_bin (or base-files_base) to link /bin to /usr/bin. I gave it a shot and there were still a few broken lines in the test task. I think some of the process substitution might be breaking under chroot. Tomorrow I'll see if I can come up with an alternate test.
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.
Here is a draft PR with some changes I made to get it to run locally. Lets see if it passes spread tests. Feel free to cherry-pick the changes if you like them.
Hi @endersonmaia, I added some final changes with the team in #338. Feel free to add some comments there, otherwise I will merge it soon, and close this PR. Thanks again for the contribution! |
Proposed changes
Add xz-utils slice.
Checklist