diff --git a/slices/liblzo2-2.yaml b/slices/liblzo2-2.yaml new file mode 100644 index 00000000..3c55b539 --- /dev/null +++ b/slices/liblzo2-2.yaml @@ -0,0 +1,15 @@ +package: liblzo2-2 + +essential: + - liblzo2-2_copyright + +slices: + libs: + essential: + - libc6_libs + contents: + /lib/*-linux-*/liblzo2.so.2*: + + copyright: + contents: + /usr/share/doc/liblzo2-2/copyright: diff --git a/slices/squashfs-tools.yaml b/slices/squashfs-tools.yaml new file mode 100644 index 00000000..8f2016c9 --- /dev/null +++ b/slices/squashfs-tools.yaml @@ -0,0 +1,30 @@ +package: squashfs-tools + +essential: + - squashfs-tools_copyright + +slices: + bins: + # adding libgcc-s1 as mksquashfs crashes without + # In practice, libc6 should bring it anyway, BUT, there is a circular + # dependency in the archives, where libc6 depends on libgcc-s1 and + # vice versa. We don't allow that circular dependency to exist in Chisel + # and libgcc-s1 already depends on libc6, so we'll have to include this + # line here, explicitly. + essential: + - libc6_libs + - libgcc-s1_libs + - liblz4-1_libs + - liblzma5_libs + - liblzo2-2_libs + - libzstd1_libs + - zlib1g_libs + contents: + /usr/bin/mksquashfs: + /usr/bin/sqfscat: + /usr/bin/sqfstar: + /usr/bin/unsquashfs: + + copyright: + contents: + /usr/share/doc/squashfs-tools/copyright: diff --git a/tests/spread/integration/squashfs-tools/task.yaml b/tests/spread/integration/squashfs-tools/task.yaml new file mode 100644 index 00000000..e6fe058b --- /dev/null +++ b/tests/spread/integration/squashfs-tools/task.yaml @@ -0,0 +1,28 @@ +summary: Integration tests for squashfs-tools + +execute: | + rootfs="$(install-slices squashfs-tools_bins)" + + # create a test folder to squash + mkdir -p "${rootfs}/test/dir1" + mkdir -p "${rootfs}/test/dir2" + + echo "test file with some content" > "${rootfs}/test/dir1/text" + echo "second test file with some content" > "${rootfs}/test/dir2/second" + + # squash it + chroot "${rootfs}" mksquashfs /test test.sq + + # test sqfscat + chroot "${rootfs}" sqfscat test.sq dir1/text | grep "test file" + + # unsquash it again + chroot "${rootfs}" unsquashfs test.sq + + # compare files inside + cmp "${rootfs}/test/dir1/text" "${rootfs}/squashfs-root/dir1/text" + cmp "${rootfs}/test/dir2/second" "${rootfs}/squashfs-root/dir2/second" + + # test sqfstar + tar -cvf test.tar "${rootfs}"/test + chroot "${rootfs}" sqfstar test2.squashfs < test.tar