Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(24.04): add SDF for ncurses-base and zstd #486

Open
wants to merge 14 commits into
base: ubuntu-24.04
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions slices/ncurses-base.yaml
Original file line number Diff line number Diff line change
@@ -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:
36 changes: 36 additions & 0 deletions slices/zstd.yaml
Original file line number Diff line number Diff line change
@@ -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:
29 changes: 29 additions & 0 deletions tests/spread/integration/zstd/task.yaml
Original file line number Diff line number Diff line change
@@ -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"
Loading