diff --git a/slices/cracklib-runtime.yaml b/slices/cracklib-runtime.yaml new file mode 100644 index 000000000..bf2af8324 --- /dev/null +++ b/slices/cracklib-runtime.yaml @@ -0,0 +1,46 @@ +package: cracklib-runtime + +essential: + - cracklib-runtime_copyright + +# Cracklib runs /usr/sbin/update-cracklib on install, and this +# in turns generate the cracklib caches. This is mostly possible to do +# as a mutation script, and is provided here: +# https://paste.ubuntu.com/p/Jc5vvgk3tN/ +# however the files it writes are malformed as we cannot write raw bytes, +# but instead we write files as text which results in larger files than +# expected (i.e the generated cracklib_dict.hwm is 1618 bytes instead of 1024). +# If we could use the above mutation script, then the contents of the 'bins' +# slice would probably not be needed, together with most of the 'config' +# slice. +slices: + # the scripts use both 'file', 'find' and 'grep' + # so we ensure those dependencies are added. + # furthermore, libssl3t64 is required as well + bins: + essential: + - cracklib-runtime_config + - file_bins + - findutils_bins + - grep_bins + - libc6_libs + - libcrack2_libs + - libssl3t64_libs + contents: + /usr/sbin/cracklib-check: + /usr/sbin/cracklib-format: + /usr/sbin/cracklib-packer: + /usr/sbin/cracklib-unpacker: + /usr/sbin/create-cracklib-dict: + /usr/sbin/update-cracklib: + + config: + contents: + /etc/cracklib/cracklib.conf: + /etc/logcheck/ignore.d.paranoid/cracklib-runtime: + /usr/share/dict/cracklib-small: + /var/cache/cracklib/: { make: true, mode: 0755 } + + copyright: + contents: + /usr/share/doc/cracklib-runtime/copyright: diff --git a/slices/file.yaml b/slices/file.yaml new file mode 100644 index 000000000..a5c449281 --- /dev/null +++ b/slices/file.yaml @@ -0,0 +1,17 @@ +package: file + +essential: + - file_copyright + +slices: + bins: + essential: + - libc6_libs + - libmagic1t64_config + - libmagic1t64_libs + contents: + /usr/bin/file: + + copyright: + contents: + /usr/share/doc/file/copyright: diff --git a/slices/libcrack2.yaml b/slices/libcrack2.yaml new file mode 100644 index 000000000..e0e789ea7 --- /dev/null +++ b/slices/libcrack2.yaml @@ -0,0 +1,15 @@ +package: libcrack2 + +essential: + - libcrack2_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /usr/lib/*-linux-*/libcrack.so.2*: + + copyright: + contents: + /usr/share/doc/libcrack2/copyright: diff --git a/slices/libmagic-mgc.yaml b/slices/libmagic-mgc.yaml new file mode 100644 index 000000000..e6ccbd3f1 --- /dev/null +++ b/slices/libmagic-mgc.yaml @@ -0,0 +1,15 @@ +package: libmagic-mgc + +essential: + - libmagic-mgc_copyright + +slices: + config: + contents: + /usr/lib/file/magic.mgc: + /usr/share/file/magic.mgc: + /usr/share/misc/magic.mgc: + + copyright: + contents: + /usr/share/doc/libmagic-mgc/copyright: diff --git a/slices/libmagic1t64.yaml b/slices/libmagic1t64.yaml new file mode 100644 index 000000000..a4561117e --- /dev/null +++ b/slices/libmagic1t64.yaml @@ -0,0 +1,26 @@ +package: libmagic1t64 + +essential: + - libmagic1t64_copyright + +slices: + libs: + essential: + - libbz2-1.0_libs + - libc6_libs + - liblzma5_libs + - zlib1g_libs + contents: + /usr/lib/*-linux-*/libmagic.so.1*: + + config: + essential: + - libmagic-mgc_config + contents: + /etc/magic: + /etc/magic.mime: + /usr/share/misc/magic: + + copyright: + contents: + /usr/share/doc/libmagic1t64/copyright: diff --git a/tests/spread/integration/cracklib-runtime/task.yaml b/tests/spread/integration/cracklib-runtime/task.yaml new file mode 100644 index 000000000..10db25204 --- /dev/null +++ b/tests/spread/integration/cracklib-runtime/task.yaml @@ -0,0 +1,31 @@ +summary: Integration tests for cracklib-runtime + +systems: + - -ubuntu-24.04-ppc64le + - -ubuntu-24.04-s390x + +execute: | + rootfs="$(install-slices bash_bins base-files_base coreutils_bins cracklib-runtime_bins)" + + chroot "$rootfs" ln -s /usr/bin/bash /bin/sh + chroot "$rootfs" /usr/sbin/update-cracklib + + if ! [ -e "$rootfs"/var/cache/cracklib/cracklib_dict.hwm ]; then + echo "expected /var/cache/cracklib/cracklib_dict.hwm to exist" + exit -1 + fi + + if ! [ -e "$rootfs"/var/cache/cracklib/cracklib_dict.pwd ]; then + echo "expected /var/cache/cracklib/cracklib_dict.pwd to exist" + exit -1 + fi + + if ! [ -e "$rootfs"/var/cache/cracklib/cracklib_dict.pwi ]; then + echo "expected /var/cache/cracklib/cracklib_dict.pwi to exist" + exit -1 + fi + + if ! [ -e "$rootfs"/var/cache/cracklib/src-dicts ]; then + echo "expected /var/cache/cracklib/src-dicts to exist" + exit -1 + fi