Skip to content

Commit

Permalink
slices: add util-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht committed Sep 3, 2024
1 parent d919a1b commit a8dd1b3
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 0 deletions.
130 changes: 130 additions & 0 deletions slices/util-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
package: util-linux

essential:
- util-linux_copyright

slices:
bins:
essential:
- libblkid1_libs
- libc6_libs
- libcap-ng0_libs
- libcrypt1_libs
- libmount1_libs
- libpam0g_libs
- libselinux1_libs
- libsmartcols1_libs
- libsystemd0_libs
- libtinfo6_libs
- libudev1_libs
- libuuid1_libs
- util-linux_generated
- zlib1g_libs
contents:
/usr/bin/addpart:
/usr/bin/choom:
/usr/bin/chrt:
/usr/bin/delpart:
/usr/bin/dmesg:
/usr/bin/fallocate:
/usr/bin/findmnt:
/usr/bin/flock:
/usr/bin/getopt:
/usr/bin/hardlink:
/usr/bin/i386:
/usr/bin/ionice:
/usr/bin/ipcmk:
/usr/bin/ipcrm:
/usr/bin/ipcs:
/usr/bin/last:
/usr/bin/lastb:
/usr/bin/linux32:
/usr/bin/linux64:
/usr/bin/lsblk:
/usr/bin/lscpu:
/usr/bin/lsipc:
/usr/bin/lslocks:
/usr/bin/lslogins:
/usr/bin/lsmem:
/usr/bin/lsns:
/usr/bin/mcookie:
/usr/bin/mesg:
/usr/bin/more:
/usr/bin/mountpoint:
/usr/bin/namei:
/usr/bin/nsenter:
/usr/bin/partx:
/usr/bin/prlimit:
/usr/bin/rename.ul:
/usr/bin/resizepart:
/usr/bin/rev:
/usr/bin/setarch:
/usr/bin/setpriv:
/usr/bin/setsid:
/usr/bin/setterm:
/usr/bin/su:
/usr/bin/taskset:
/usr/bin/uclampset:
/usr/bin/unshare:
/usr/bin/utmpdump:
/usr/bin/wdctl:
/usr/bin/whereis:
/usr/bin/x86_64:
/usr/sbin/agetty:
/usr/sbin/blkdiscard:
/usr/sbin/blkid:
/usr/sbin/blkzone:
/usr/sbin/blockdev:
/usr/sbin/chcpu:
/usr/sbin/chmem:
/usr/sbin/ctrlaltdel:
/usr/sbin/findfs:
/usr/sbin/fsck:
/usr/sbin/fsck.cramfs:
/usr/sbin/fsck.minix:
/usr/sbin/fsfreeze:
/usr/sbin/fstrim:
/usr/sbin/getty:
/usr/sbin/isosize:
/usr/sbin/ldattach:
/usr/sbin/mkfs:
/usr/sbin/mkfs.bfs:
/usr/sbin/mkfs.cramfs:
/usr/sbin/mkfs.minix:
/usr/sbin/mkswap:
/usr/sbin/pivot_root:
/usr/sbin/readprofile:
/usr/sbin/rtcwake:
/usr/sbin/runuser:
/usr/sbin/sulogin:
/usr/sbin/swaplabel:
/usr/sbin/switch_root:
/usr/sbin/wipefs:
/usr/sbin/zramctl:

# the following emulates the post-install script
generated:
contents:
/usr/bin/pager: {symlink: /usr/bin/more}

mime:
contents:
/usr/lib/mime/packages/util-linux:

pam-profile:
contents:
/etc/pam.d/runuser:
/etc/pam.d/runuser-l:
/etc/pam.d/su:
/etc/pam.d/su-l:

services:
essential:
- util-linux_bins
contents:
/usr/lib/systemd/system/fstrim.service:
/usr/lib/systemd/system/fstrim.timer:

copyright:
contents:
/usr/share/doc/util-linux/copyright:
31 changes: 31 additions & 0 deletions tests/spread/integration/util-linux/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
summary: Integration tests for util-linux

systems:
- -ubuntu-24.04-ppc64le
- -ubuntu-24.04-s390x

execute: |
rootfs="$(install-slices util-linux_bins)"
# we need dev/sys mounted for some of them
mkdir "${rootfs}"/dev
mkdir "${rootfs}"/sys
mount --rbind /dev "${rootfs}"/dev
mount --rbind /sys "${rootfs}"/sys
# smoke test a couple of the bundled applications
chroot "${rootfs}" lsblk | grep "loop0"
chroot "${rootfs}" lsipc | grep "MSGMNI"
chroot "${rootfs}" lsmem | grep "Total online memory"
chroot "${rootfs}" whereis lsblk | grep "/usr/bin/lsblk"
# cleanup
umount -l "${rootfs}"/dev
umount -l "${rootfs}"/sys
# ensure expected links are generated
if ! [ -e "${rootfs}"/usr/bin/pager ]; then
echo "expected /usr/bin/pager to be generated"
exit 1
fi

0 comments on commit a8dd1b3

Please sign in to comment.