summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy MacLeod <Randy.MacLeod@windriver.com>2025-03-27 16:49:29 -0400
committerKhem Raj <raj.khem@gmail.com>2025-03-27 17:16:16 -0700
commit5756aa17e8cefc1be95b8fc6a9b8527570d1d683 (patch)
treee89bf03e5e937c31c7665bc6f6c96210046ea605
parent3b448edbf32cb484c99a84f0fa7be1134d970734 (diff)
downloadmeta-openembedded-5756aa17e8cefc1be95b8fc6a9b8527570d1d683.tar.gz
pv: upgrade 1.6.20 -> 1.9.31
License changed to GPL-3.0-or-later in: ??? is this right??? e5cc71b Switched licensing to GPLv3+. and moved doc to docs directory in: 86feafb Rename "doc" directory to "docs" to match Debian standards. Change the tarball suffix since the project now only provides .gz files. Added 'inherit gettext' to fix: QA Issue: AM_GNU_GETTEXT used but no inherit gettext [configure-gettext] Drop: 0001-pv-display-handle-error-of-tcgetpgrp-in-pv_in_foregr.patch which is covered by: c5cd932 pv/display: handle error of tcgetpgrp() in pv_in_foreground() Re-write the run-ptest wrapper since upstream switched to using 'make check'. Skip some of the tests to get the recipe update merged. Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/pv/pv/0001-pv-display-handle-error-of-tcgetpgrp-in-pv_in_foregr.patch40
-rw-r--r--meta-oe/recipes-support/pv/pv/pv-test-system-version.patch18
-rw-r--r--meta-oe/recipes-support/pv/pv/run-ptest25
-rw-r--r--meta-oe/recipes-support/pv/pv_1.6.20.bb28
-rw-r--r--meta-oe/recipes-support/pv/pv_1.9.31.bb41
5 files changed, 79 insertions, 73 deletions
diff --git a/meta-oe/recipes-support/pv/pv/0001-pv-display-handle-error-of-tcgetpgrp-in-pv_in_foregr.patch b/meta-oe/recipes-support/pv/pv/0001-pv-display-handle-error-of-tcgetpgrp-in-pv_in_foregr.patch
deleted file mode 100644
index c51fb1cfdb..0000000000
--- a/meta-oe/recipes-support/pv/pv/0001-pv-display-handle-error-of-tcgetpgrp-in-pv_in_foregr.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From c5cd932fb08e7ce90cdbf9ae6c5cc7e65ac0738e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Michael=20Wei=C3=9F?= <michael.weiss@aisec.fraunhofer.de>
3Date: Tue, 9 May 2023 20:00:26 +0200
4Subject: [PATCH] pv/display: handle error of tcgetpgrp() in pv_in_foreground()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Show pv progress bar even if no terminal is set, e.g., in a busybox
10init script. The description of pv_in_forground() states it will
11return true "if we aren't outputting to a terminal". However, this
12is not the case since tcgetpgrg() will return an error and set ERRNO
13to ENOTTY if the output fd is not an tty. We now handle this error
14correctly and pv_in_foreground() returns also true in that case.
15
16Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
17---
18Upstream-Status: Pending
19
20 src/pv/display.c | 4 ++++
21 1 file changed, 4 insertions(+)
22
23diff --git a/src/pv/display.c b/src/pv/display.c
24index aff643b..8d1f4c9 100644
25--- a/src/pv/display.c
26+++ b/src/pv/display.c
27@@ -48,6 +48,10 @@ bool pv_in_foreground(void)
28
29 our_process_group = getpgrp();
30 tty_process_group = tcgetpgrp(STDERR_FILENO);
31+
32+ if (tty_process_group == -1 && errno == ENOTTY)
33+ return true;
34+
35 if (our_process_group == tty_process_group)
36 return true;
37
38--
392.30.2
40
diff --git a/meta-oe/recipes-support/pv/pv/pv-test-system-version.patch b/meta-oe/recipes-support/pv/pv/pv-test-system-version.patch
new file mode 100644
index 0000000000..f5e2b05768
--- /dev/null
+++ b/meta-oe/recipes-support/pv/pv/pv-test-system-version.patch
@@ -0,0 +1,18 @@
1Use the version of pv installed on the system rather than the ./pv from
2the development tree as is done when running 'make check'.
3
4Upstream-Status: Inappropriate [x-compile specific]
5
6---
7diff -Naur pv-1.9.31.orig/tests/test-env.sh pv-1.9.31/tests/test-env.sh
8--- pv-1.9.31.orig/tests/test-env.sh 2024-12-07 08:59:43.000000000 -0500
9+++ pv-1.9.31/tests/test-env.sh 2025-03-26 14:11:30.987123378 -0400
10@@ -9,7 +9,7 @@
11 true "${srcdir:?not set - call this from 'make check'}"
12
13 # Parameters.
14-testSubject="./pv"
15+testSubject="pv"
16 sourcePath="${srcdir}"
17
18 # Set everything to the "C" locale.
diff --git a/meta-oe/recipes-support/pv/pv/run-ptest b/meta-oe/recipes-support/pv/pv/run-ptest
index 3f5956f4c0..b0370e0a99 100644
--- a/meta-oe/recipes-support/pv/pv/run-ptest
+++ b/meta-oe/recipes-support/pv/pv/run-ptest
@@ -1,7 +1,22 @@
1#!/bin/sh 1#!/bin/sh
2 2
3rm -rf tests.log 3srcdir=/usr/lib/pv/ptest
4sh -e run-test.sh pv . > tests.log 2>&1 4export srcdir
5sed -e 's|\(.*\):.*OK|PASS: \1|' \ 5
6 -e 's|\(.*\):.*FAILED|FAIL: \1|' \ 6source tests/test-env.sh
7 tests.log 7
8num_fail=0
9
10# all pv tests are capitalized
11for test in tests/[A-Z]*
12do
13 ./"$test" \
14 && echo "PASS: $test" \
15 || {
16 echo "FAIL: $test"
17 num_fail=$(( ${num_fail} + 1))
18 }
19
20done
21
22exit $num_fail
diff --git a/meta-oe/recipes-support/pv/pv_1.6.20.bb b/meta-oe/recipes-support/pv/pv_1.6.20.bb
deleted file mode 100644
index ac26ef9365..0000000000
--- a/meta-oe/recipes-support/pv/pv_1.6.20.bb
+++ /dev/null
@@ -1,28 +0,0 @@
1SUMMARY = "Terminal-based tool for monitoring the progress of data through a pipeline"
2HOMEPAGE = "http://www.ivarch.com/programs/pv.shtml"
3
4LICENSE = "Artistic-2.0"
5LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
6
7SRC_URI = "https://www.ivarch.com/programs/sources/${BP}.tar.bz2 \
8 file://0001-pv-display-handle-error-of-tcgetpgrp-in-pv_in_foregr.patch \
9 file://run-ptest \
10"
11SRC_URI[sha256sum] = "e831951eff0718fba9b1ef286128773b9d0e723e1fbfae88d5a3188814fdc603"
12
13UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
14UPSTREAM_CHECK_REGEX = "pv-(?P<pver>\d+(\.\d+)+).tar"
15
16inherit autotools ptest
17
18LDEMULATION:mipsarchn32 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'elf32btsmipn32', 'elf32ltsmipn32', d)}"
19export LDEMULATION
20
21RDEPENDS:${PN}-ptest += "coreutils ${PN}"
22
23do_install_ptest() {
24 install -d ${D}${PTEST_PATH}/tests
25 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests
26 cp -r ${S}/autoconf/scripts/run-test.sh ${D}${PTEST_PATH}
27 # sed -i -e 's@\$SRCDIR/@./@g' ${D}${PTEST_PATH}/run-ptest
28}
diff --git a/meta-oe/recipes-support/pv/pv_1.9.31.bb b/meta-oe/recipes-support/pv/pv_1.9.31.bb
new file mode 100644
index 0000000000..2f1d38337f
--- /dev/null
+++ b/meta-oe/recipes-support/pv/pv_1.9.31.bb
@@ -0,0 +1,41 @@
1SUMMARY = "Terminal-based tool for monitoring the progress of data through a pipeline"
2HOMEPAGE = "http://www.ivarch.com/programs/pv.shtml"
3
4LICENSE = "GPL-3.0-or-later"
5LIC_FILES_CHKSUM = "file://docs/COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
6
7SRC_URI = "https://www.ivarch.com/programs/sources/${BP}.tar.gz \
8 file://pv-test-system-version.patch \
9 file://run-ptest \
10"
11SRC_URI[sha256sum] = "a35e92ec4ac0e8f380e8e840088167ae01014bfa008a3a9d6506b848079daedf"
12
13UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml"
14UPSTREAM_CHECK_REGEX = "pv-(?P<pver>\d+(\.\d+)+).tar"
15
16inherit autotools gettext ptest
17
18LDEMULATION:mipsarchn32 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'elf32btsmipn32', 'elf32ltsmipn32', d)}"
19export LDEMULATION
20
21RDEPENDS:${PN}-ptest += "bash coreutils tmux valgrind"
22RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales"
23RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-binary-localedata-c"
24
25do_install_ptest() {
26 testsdir=${D}${PTEST_PATH}/tests
27 install -d ${testsdir}
28 cp -r ${S}/tests/* ${testsdir}
29 #
30 # remove self-hosted install test
31 rm -f ${testsdir}/Bug_-_Install_all_files.test
32 # skip the failing valgrind tests for now (March 2025).
33 # See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15817
34 rm -f ${testsdir}/Memory*
35 # test requires at least 3GB free on /tmp
36 rm -f ${testsdir}/Integrity_-_Large_file_support.test
37 # fails due to our prompt:
38 rm -f ${testsdir}/Terminal_-_Detect_width.test
39 #
40 # sed -i -e 's@\$SRCDIR/@./@g' ${D}${PTEST_PATH}/run-ptest
41}