diff --git a/slices/ncurses-base.yaml b/slices/ncurses-base.yaml new file mode 100644 index 00000000..3bbbf495 --- /dev/null +++ b/slices/ncurses-base.yaml @@ -0,0 +1,19 @@ +package: ncurses-base + +essential: + - ncurses-base_copyright + +slices: + tabset: + contents: + /usr/share/tabset/**: + + terminfo: + essential: + - ncurses-base_tabset + contents: + /usr/share/terminfo/**: + + copyright: + contents: + /usr/share/doc/ncurses-base/copyright: diff --git a/slices/zstd.yaml b/slices/zstd.yaml new file mode 100644 index 00000000..7172fadf --- /dev/null +++ b/slices/zstd.yaml @@ -0,0 +1,36 @@ +package: zstd + +essential: + - zstd_copyright + +slices: + bins: + essential: + - libc6_libs + - libgcc-s1_libs + - liblz4-1_libs + - liblzma5_libs + - libstdc++6_libs + - zlib1g_libs + contents: + /usr/bin/pzstd: + /usr/bin/unzstd: + /usr/bin/zstd: + /usr/bin/zstdcat: + /usr/bin/zstdmt: + + scripts: + essential: + # shebang in scripts reference interpreter in /bin not /usr/bin + - base-files_bin + - bash_bins # needed for zstdless + - grep_bins # needed for zstdgrep + - less_bins # needed for zstdless + - zstd_bins + contents: + /usr/bin/zstdgrep: + /usr/bin/zstdless: + + copyright: + contents: + /usr/share/doc/zstd/copyright: diff --git a/tests/spread/integration/zstd/task.yaml b/tests/spread/integration/zstd/task.yaml new file mode 100644 index 00000000..c2f67b5d --- /dev/null +++ b/tests/spread/integration/zstd/task.yaml @@ -0,0 +1,29 @@ +summary: Integration tests for zstd + +execute: | + rootfs="$(install-slices base-files_bin bash_bins dash_bins grep_bins ncurses-base_terminfo \ + zstd_bins less_bins zstd_scripts)" + + chroot "${rootfs}/" pzstd -h + chroot "${rootfs}/" unzstd -H + chroot "${rootfs}/" zstd -H + chroot "${rootfs}/" zstdcat -H + chroot "${rootfs}/" zstdless --version + chroot "${rootfs}/" zstdmt -H + chroot "${rootfs}/" zstd + echo "Hello, World" > "${rootfs}/testfile_orig.txt" + chroot "${rootfs}/" zstd testfile_orig.txt -o testfile.zst + chroot "${rootfs}/" zstdmt testfile_orig.txt -o testfile_mt.zst + chroot "${rootfs}/" unzstd testfile.zst -o testfile_new.txt + chroot "${rootfs}/" unzstd testfile_mt.zst -o testfile_mt.txt + test "$(cat "${rootfs}/testfile_new.txt")" = "$(cat "${rootfs}/testfile_orig.txt")" + test "$(cat "${rootfs}/testfile_mt.txt")" = "$(cat "${rootfs}/testfile_orig.txt")" + chroot "${rootfs}/" pzstd -p 4 testfile_orig.txt + chroot "${rootfs}/" unzstd testfile_orig.txt.zst -o testfile_pzstd.txt + test "$(cat "${rootfs}/testfile_pzstd.txt")" = "$(cat "${rootfs}/testfile_orig.txt")" + echo "It's Linux" > "${rootfs}/testfile_new.txt" + chroot "${rootfs}/" zstd testfile_orig.txt -o testfile_orig.zst + chroot "${rootfs}/" zstd testfile_new.txt -o testfile_new.zst + chroot "${rootfs}/" zstdcat testfile_orig.zst testfile_new.zst > "${rootfs}/testfile_cat.txt" + test "$(chroot "${rootfs}/" zstdgrep "Hello, World" testfile_cat.txt)" = "Hello, World" + test "$(chroot "${rootfs}/" zstdless -F -X -R testfile_orig.zst)" = "Hello, World"