From 18f2c01f256e775e14fc1d09e95b422e800f64db Mon Sep 17 00:00:00 2001 From: Zhijie Yang Date: Wed, 5 Feb 2025 14:04:54 +0100 Subject: [PATCH] feat(24.04): add less --- slices/less.yaml | 32 +++++++++++++++++++++++++ tests/spread/integration/less/task.yaml | 11 +++++++++ 2 files changed, 43 insertions(+) create mode 100644 slices/less.yaml create mode 100644 tests/spread/integration/less/task.yaml diff --git a/slices/less.yaml b/slices/less.yaml new file mode 100644 index 000000000..e44abb6f8 --- /dev/null +++ b/slices/less.yaml @@ -0,0 +1,32 @@ +package: less + +essential: + - less_copyright + +slices: + bins: + essential: + - libc6_libs + - libtinfo6_libs + contents: + /usr/bin/less: + /usr/bin/lessecho: + # lesskey is deprecated since version 582. + + scripts: + essential: + - less_bins + contents: + /usr/bin/lesspipe: + + pager: + essential: + - less_bins + # pager conflicts with the one generated in util-linux_generated. + # Manually link pager to less if required. + contents: + # /usr/bin/pager: {symlink: /usr/bin/less} + + copyright: + contents: + /usr/share/doc/less/copyright: diff --git a/tests/spread/integration/less/task.yaml b/tests/spread/integration/less/task.yaml new file mode 100644 index 000000000..188f49cec --- /dev/null +++ b/tests/spread/integration/less/task.yaml @@ -0,0 +1,11 @@ +summary: Integration tests for less + +execute: | + rootfs="$(install-slices less_bins)" + + chroot "${rootfs}" less /usr/share/doc/less/copyright > copyright.txt + + cmp copyright.txt "${rootfs}"/usr/share/doc/less/copyright + + test "$(chroot ${rootfs} lessecho -a hello world)" = '"hello" "world"' +