-
Notifications
You must be signed in to change notification settings - Fork 53
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 debianutils #335
base: ubuntu-24.04
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package: debianutils | ||
|
||
essential: | ||
- debianutils_copyright | ||
|
||
slices: | ||
bins: | ||
essential: | ||
- debianutils_config | ||
- libc6_libs | ||
contents: | ||
/usr/bin/ischroot: | ||
/usr/bin/run-parts: | ||
/usr/bin/savelog: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A few of these executables are scripts. We need to figure out how we are going to link /bin/sh in #337 first |
||
/usr/bin/tempfile: | ||
/usr/bin/which.debianutils: | ||
/usr/sbin/add-shell: | ||
/usr/sbin/installkernel: | ||
/usr/sbin/remove-shell: | ||
/usr/sbin/update-shells: | ||
|
||
# the following emulates the post-install script | ||
which: | ||
essential: | ||
- debianutils_bins | ||
contents: | ||
/usr/bin/which: {symlink: /usr/bin/which.debianutils} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
config: | ||
contents: | ||
/usr/share/debianutils/shells: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file isn't necessary as a slice. However, this file is copied in the maintainer scripts to |
||
|
||
copyright: | ||
contents: | ||
/usr/share/doc/debianutils/copyright: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
summary: Integration tests for debianutils | ||
|
||
execute: | | ||
rootfs="$(install-slices bash_bins base-files_base coreutils_bins debianutils_bins debianutils_which)" | ||
|
||
# ischroot needs proc mounted | ||
mkdir -p "${rootfs}"/proc | ||
mount --bind /proc "${rootfs}"/proc | ||
|
||
# some executables are scripts that need /bin/sh | ||
chroot "$rootfs" ln -s /usr/bin/bash /bin/sh | ||
|
||
# smoke test some of the binaries | ||
chroot "${rootfs}" /usr/bin/ischroot | ||
chroot "${rootfs}" /usr/bin/which savelog | grep "/usr/bin/savelog" | ||
chroot "${rootfs}" /usr/bin/run-parts --list --regex 'shell$' /usr/sbin | tr '\n' ' ' | grep "/usr/sbin/add-shell /usr/sbin/remove-shell" | ||
|
||
# run the update-shells to generate the shells file, this | ||
# will output an error due to missing dpkg-realpath | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it's this case, the package |
||
chroot "${rootfs}" /usr/sbin/update-shells || true | ||
|
||
# still expect the file to be generated | ||
if ! [ -e "${rootfs}/etc/shells" ]; then | ||
echo "expected shells file to be generated" | ||
exit 1 | ||
fi | ||
|
||
# cleanup | ||
umount "${rootfs}"/proc |
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_bins
can be added as a dependency here for the executables that are actually shell scripts.