pv: update to 1.11.0

Update to the latest upstream stable release and add a functional
test.sh that pipes a small text stream and a 256 KiB binary stream
through pv, checking both arrive unchanged.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean authored and Alexandru Ardelean committed 2026-07-30 14:21:19 +03:00
1 parent ee996e4c93
commit 833d665fe3
2 files changed
+22 -3

No files matched your search

+3 -3
View File
@@ -9,12 +9,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=pv
PKG_VERSION:=1.9.31
PKG_RELEASE:=2
PKG_VERSION:=1.11.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.ivarch.com/programs/sources
PKG_HASH:=a35e92ec4ac0e8f380e8e840088167ae01014bfa008a3a9d6506b848079daedf
PKG_HASH:=fc02c9fc2b82b20a92cc8d98f844be63f22abd98751a8e4abc875e1d803662eb
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=docs/COPYING
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# pv must copy a stream through the pipe unchanged.
[ -x /usr/bin/pv ] || { echo "FAIL: /usr/bin/pv not installed"; exit 1; }
# text stream
payload="pv basic functionality test 0123456789"
out="$(printf '%s' "$payload" | pv -q)"
[ "$out" = "$payload" ] || { echo "FAIL: pv altered a text stream"; exit 1; }
# 256 KiB binary stream: checksum must survive the pipe
tmp="$(mktemp)"
head -c 262144 /dev/urandom > "$tmp"
in_sum="$(md5sum < "$tmp" | cut -d' ' -f1)"
out_sum="$(pv -q < "$tmp" | md5sum | cut -d' ' -f1)"
rm -f "$tmp"
[ "$in_sum" = "$out_sum" ] || { echo "FAIL: pv corrupted a 256 KiB stream"; exit 1; }
echo "pv: stream pass-through OK"