diff --git a/slices/libarchive-tools.yaml b/slices/libarchive-tools.yaml new file mode 100644 index 00000000..f2681e8b --- /dev/null +++ b/slices/libarchive-tools.yaml @@ -0,0 +1,19 @@ +package: libarchive-tools + +essential: + - libarchive-tools_copyright + +slices: + bins: + essential: + - libarchive13t64_libs + - libc6_libs + contents: + /usr/bin/bsdcat: + /usr/bin/bsdcpio: + /usr/bin/bsdtar: + /usr/bin/bsdunzip: + + copyright: + contents: + /usr/share/doc/libarchive-tools/copyright: diff --git a/slices/libarchive13t64.yaml b/slices/libarchive13t64.yaml new file mode 100644 index 00000000..b80cd5d2 --- /dev/null +++ b/slices/libarchive13t64.yaml @@ -0,0 +1,23 @@ +package: libarchive13t64 + +essential: + - libarchive13t64_copyright + +slices: + libs: + essential: + - libacl1_libs + - libbz2-1.0_libs + - libc6_libs + - liblz4-1_libs + - liblzma5_libs + - libnettle8t64_libs + - libxml2_libs + - libzstd1_libs + - zlib1g_libs + contents: + /usr/lib/*-linux-*/libarchive.so.13*: + + copyright: + contents: + /usr/share/doc/libarchive13t64/copyright: diff --git a/tests/spread/integration/libarchive-tools/task.yaml b/tests/spread/integration/libarchive-tools/task.yaml new file mode 100644 index 00000000..01560d76 --- /dev/null +++ b/tests/spread/integration/libarchive-tools/task.yaml @@ -0,0 +1,26 @@ +summary: Integration tests for libarchive-tools + +execute: | + rootfs="$(install-slices libarchive-tools_bins)" + chroot "${rootfs}/" bsdcat --version + chroot "${rootfs}/" bsdcpio --version + chroot "${rootfs}/" bsdtar --version + chroot "${rootfs}/" bsdunzip --version + echo "Hello, World" > "${rootfs}/testfile.txt" + test "$(chroot "${rootfs}/" bsdcat testfile.txt)" = "Hello, World" + chroot "${rootfs}/" bsdtar -cf /testfile.tar /testfile.txt + if [ ! -f "${rootfs}/testfile.tar" ]; then + echo "bsdtar failed to create archive: testfile.tar" + exit 1 + fi + cp "${rootfs}/testfile.txt" "${rootfs}/testfile_orig.txt" + chroot "${rootfs}/" bsdtar -xf testfile.tar + test "$(cat ${rootfs}/testfile.txt)" = "$( cat ${rootfs}/testfile_orig.txt)" + echo "testfile.txt" | chroot "${rootfs}/" bsdcpio -o -c \ + > "${rootfs}/testfile.cpio" + if [ ! -e "${rootfs}/testfile.cpio" ]; then + echo "bsdcpio failed" + exit 1 + fi + chroot "${rootfs}/" bsdcpio -i < "${rootfs}/testfile.cpio" + test "$(cat ${rootfs}/testfile.txt)" = "$(cat ${rootfs}/testfile_orig.txt)"