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 less #484

Merged
merged 8 commits into from
Feb 13, 2025
Merged
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
29 changes: 29 additions & 0 deletions slices/less.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package: less

essential:
- less_copyright

slices:
bins:
essential:
- libc6_libs
- libtinfo6_libs
contents:
/usr/bin/less:
/usr/bin/lessecho:
# Note that lesskey is deprecated since less version 582.
/usr/bin/lesskey:

# pager conflicts with the one generated in util-linux_generated slice.
# Manually link pager to less if required.
# TODO: Add `prefer` to /usr/bin/pager when conflict resolution
# is merged for chisel.
# pager:
# essential:
# - less_bins
# contents:
# /usr/bin/pager: {symlink: /usr/bin/less}

copyright:
contents:
/usr/share/doc/less/copyright:
10 changes: 10 additions & 0 deletions tests/spread/integration/less/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
summary: Integration tests for less

execute: |
rootfs="$(install-slices less_bins)"

chroot "${rootfs}/" less --version
chroot "${rootfs}/" lesskey --version
echo "Hello, World" > "${rootfs}/testfile.txt"
test "$(chroot "${rootfs}/" less -F -X -R testfile.txt)" = "Hello, World"
test "$(chroot "${rootfs}/" lessecho -m: a:b )" = "a\:b"
Loading