From babd8390e12b3959692f8de39d8e811898c3aa4e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 12 Nov 2026 03:01:25 -0800 Subject: [PATCH] libplist: upgrade 2.7.0 -> 2.8.1 Drop 0001-test-fix-operator-error.patch and 0001-ostep-invalid-types.test-Fix-ostep-invalid-types-tes.patch, the tests were fixed upstream. Install the new date_val_test, xml_behavior_test and bplist_behavior_test programs for the ptests, and use rm -f in run-ptest so the script does not exit non-zero when the last test leaves no data behind. ptests pass on qemux86-64. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...pes.test-Fix-ostep-invalid-types-tes.patch | 49 ------------- .../0001-test-fix-operator-error.patch | 68 ------------------- .../libimobiledevice/libplist/run-ptest | 2 +- .../{libplist_2.7.0.bb => libplist_2.8.1.bb} | 8 +-- 4 files changed, 5 insertions(+), 122 deletions(-) delete mode 100644 meta-oe/recipes-extended/libimobiledevice/libplist/0001-ostep-invalid-types.test-Fix-ostep-invalid-types-tes.patch delete mode 100644 meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch rename meta-oe/recipes-extended/libimobiledevice/{libplist_2.7.0.bb => libplist_2.8.1.bb} (90%) diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-ostep-invalid-types.test-Fix-ostep-invalid-types-tes.patch b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-ostep-invalid-types.test-Fix-ostep-invalid-types-tes.patch deleted file mode 100644 index 798ed47487..0000000000 --- a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-ostep-invalid-types.test-Fix-ostep-invalid-types-tes.patch +++ /dev/null @@ -1,49 +0,0 @@ -From d87f49535f5e815e91e309472c47da2375cbb5f4 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 26 Nov 2025 18:18:04 -0800 -Subject: [PATCH] ostep-invalid-types.test: Fix ostep-invalid-types test to - accept both success and error codes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The ostep-invalid-types.test expects plistutil to return exit code 2 -when converting binary plist data containing NSData objects to OpenStep -format, since OpenStep format doesn't natively support binary data types. - -However, plistutil's current behavior is to succeed (exit 0) and output -the binary data as hex-encoded strings in OpenStep format, which is a -valid fallback representation. - -This patch updates the test to accept both behaviors: -- Exit code 0: Success with hex-encoded binary data (current behavior) -- Exit code 2: Explicit rejection of unsupported type (expected behavior) - -Both outcomes are acceptable - either the tool can gracefully handle the -conversion by encoding binary data as strings, or it can reject formats -that don't support all input types. The test should not fail in either case. - -Upstream never noticed because they wrote -neq instead of -ne, so the -first check is effectively broken and doesn’t enforce the exit code. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - test/ostep-invalid-types.test | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/test/ostep-invalid-types.test b/test/ostep-invalid-types.test -index 240505c..ebfc6b0 100755 ---- a/test/ostep-invalid-types.test -+++ b/test/ostep-invalid-types.test -@@ -14,7 +14,8 @@ export PLIST_OSTEP_DEBUG=1 - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE0 -o /dev/null --if [ $? -ne 2 ]; then -+rc=$? -+if [ $rc -ne 0 ] && [ $rc -ne 2 ]; then - exit 1 - fi - diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch b/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch deleted file mode 100644 index 0866851537..0000000000 --- a/meta-oe/recipes-extended/libimobiledevice/libplist/0001-test-fix-operator-error.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 18e5b22a71f85091127cc063db79c8df687c582c Mon Sep 17 00:00:00 2001 -From: Ankur Tyagi -Date: Thu, 20 Nov 2025 16:01:58 +1300 -Subject: [PATCH] test: fix operator error - -Otherwise test fail with error [: -neq: binary operator expected - -Upstream-Status: Submitted [https://github.com/libimobiledevice/libplist/pull/284] -Signed-off-by: Ankur Tyagi ---- - test/json-invalid-types.test | 6 +++--- - test/ostep-invalid-types.test | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/test/json-invalid-types.test b/test/json-invalid-types.test -index c532316..a21fcd9 100755 ---- a/test/json-invalid-types.test -+++ b/test/json-invalid-types.test -@@ -14,19 +14,19 @@ export PLIST_JSON_DEBUG=1 - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null --if [ $? -neq 2 ]; then -+if [ $? -ne 2 ]; then - exit 1 - fi - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null --if [ $? -neq 2 ]; then -+if [ $? -ne 2 ]; then - exit 2 - fi - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null --if [ $? -neq 2 ]; then -+if [ $? -ne 2 ]; then - exit 3 - fi - -diff --git a/test/ostep-invalid-types.test b/test/ostep-invalid-types.test -index 9222394..240505c 100755 ---- a/test/ostep-invalid-types.test -+++ b/test/ostep-invalid-types.test -@@ -14,19 +14,19 @@ export PLIST_OSTEP_DEBUG=1 - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE0 -o /dev/null --if [ $? -neq 2 ]; then -+if [ $? -ne 2 ]; then - exit 1 - fi - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f openstepn -i $DATASRC/$TESTFILE1 -o /dev/null --if [ $? -neq 2 ]; then -+if [ $? -ne 2 ]; then - exit 2 - fi - - echo "Converting (failure expected)" - $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE2 -o /dev/null --if [ $? -neq 2 ]; then -+if [ $? -ne 2 ]; then - exit 3 - fi - diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest index ed940af5f6..0d1683e729 100644 --- a/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest +++ b/meta-oe/recipes-extended/libimobiledevice/libplist/run-ptest @@ -2,5 +2,5 @@ for t in `ls test/*.test`; do top_srcdir=$(pwd)/input top_builddir=$(pwd)/test ./$t && echo PASS: $t || echo FAIL: $t - rm $(pwd)/test/test/data/* 2>/dev/null + rm -f $(pwd)/test/test/data/* done diff --git a/meta-oe/recipes-extended/libimobiledevice/libplist_2.7.0.bb b/meta-oe/recipes-extended/libimobiledevice/libplist_2.8.1.bb similarity index 90% rename from meta-oe/recipes-extended/libimobiledevice/libplist_2.7.0.bb rename to meta-oe/recipes-extended/libimobiledevice/libplist_2.8.1.bb index f0dc784e73..e541683f5e 100644 --- a/meta-oe/recipes-extended/libimobiledevice/libplist_2.7.0.bb +++ b/meta-oe/recipes-extended/libimobiledevice/libplist_2.8.1.bb @@ -8,11 +8,9 @@ DEPENDS = "libxml2 glib-2.0 swig python3" inherit autotools pkgconfig python3native python3targetconfig ptest -SRCREV = "cf5897a71ea412ea2aeb1e2f6b5ea74d4fabfd8c" +SRCREV = "678b1a34693b86ae1787fa470dcb7203ffd0ef3f" SRC_URI = "git://github.com/libimobiledevice/libplist;protocol=https;branch=master;tag=${PV} \ file://run-ptest \ - file://0001-test-fix-operator-error.patch \ - file://0001-ostep-invalid-types.test-Fix-ostep-invalid-types-tes.patch \ " CVE_STATUS_GROUPS += "CVE_STATUS_LIBLIST" @@ -44,7 +42,9 @@ do_install_ptest(){ install ${S}/test/data/* ${D}${PTEST_PATH}/input/test/data/ install ${S}/test/*.test ${D}${PTEST_PATH}/test/ install -m 0755 ${B}/test/.libs/plist* ${D}${PTEST_PATH}/test/test/.libs/ - install -m 0755 ${B}/test/.libs/integer_set_test ${D}${PTEST_PATH}/test/test/ + for t in integer_set_test date_val_test xml_behavior_test bplist_behavior_test; do + install -m 0755 ${B}/test/.libs/$t ${D}${PTEST_PATH}/test/test/ + done for t in $(find ${B}/test -type f -name 'plist*' \! -name '*.o'); do install -m 0755 $t ${D}${PTEST_PATH}/test/test/ done