From fc921fc0b2fcac912890330f02bf4d3376d0ac0a Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Tue, 28 Jul 2026 15:33:03 +0300 Subject: [PATCH] less: update to 704 Update to the latest upstream stable release. Signed-off-by: Alexandru Ardelean --- utils/less/Makefile | 4 ++-- utils/less/test.sh | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/utils/less/Makefile b/utils/less/Makefile index 8c342294e9..b22dd156f2 100644 --- a/utils/less/Makefile +++ b/utils/less/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=less -PKG_VERSION:=692 +PKG_VERSION:=704 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= @GNU/less \ https://www.greenwoodsoftware.com/less -PKG_HASH:=61300f603798ecf1d7786570789f0ff3f5a1acf075a6fb9f756837d166e37d14 +PKG_HASH:=20a0b0a2bb2525fa53c7eee9beb854b4c9cf172eabb209af7020743547bfe9fb PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING diff --git a/utils/less/test.sh b/utils/less/test.sh index cb6d61cae0..7a09a88e66 100644 --- a/utils/less/test.sh +++ b/utils/less/test.sh @@ -1,3 +1,20 @@ #!/bin/sh +# less is a pager; with a non-tty output and one-screen content (-F quits +# at once) it dumps the input verbatim, which we can check without a +# terminal. Payloads stay small so less never blocks waiting to page. -[ -x /usr/libexec/less-gnu ] || { echo "FAIL: /usr/libexec/less-gnu not installed"; exit 1; } +LESS_BIN=/usr/libexec/less-gnu +[ -x "$LESS_BIN" ] || { echo "FAIL: $LESS_BIN not installed"; exit 1; } + +payload="$(printf 'alpha\nbeta\ngamma\ndelta')" + +# from stdin +out="$(printf '%s\n' "$payload" | "$LESS_BIN" -F)" +[ "$out" = "$payload" ] || { echo "FAIL: less mangled stdin"; exit 1; } + +# from a file argument +tmp="$(mktemp)"; printf '%s\n' "$payload" > "$tmp" +out="$("$LESS_BIN" -F "$tmp")"; rm -f "$tmp" +[ "$out" = "$payload" ] || { echo "FAIL: less mangled a file argument"; exit 1; } + +echo "less: pass-through OK"