diff mbox series

[meta-oe,4/4] ostree: Handle musl's ERANGE mapping

Message ID 20230102224234.287772-4-alex.kiernan@gmail.com
State Under Review
Headers show
Series [meta-oe,1/4] ostree: Use systemd_system_unitdir for systemd units | expand

Commit Message

Alex Kiernan Jan. 2, 2023, 10:42 p.m. UTC
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

 ...1-tests-Handle-musl-s-ERANGE-mapping.patch | 29 +++++++++++++++++++
 .../recipes-extended/ostree/ostree_2022.7.bb  |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-tests-Handle-musl-s-ERANGE-mapping.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/ostree/ostree/0001-tests-Handle-musl-s-ERANGE-mapping.patch b/meta-oe/recipes-extended/ostree/ostree/0001-tests-Handle-musl-s-ERANGE-mapping.patch
new file mode 100644
index 000000000000..d0a8447e3da4
--- /dev/null
+++ b/meta-oe/recipes-extended/ostree/ostree/0001-tests-Handle-musl-s-ERANGE-mapping.patch
@@ -0,0 +1,29 @@ 
+From bd182584a1e2f820493d9db689598a20c5700ba5 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan <alex.kiernan@gmail.com>
+Date: Mon, 2 Jan 2023 10:37:49 +0000
+Subject: [PATCH] tests: Handle musl's ERANGE mapping
+
+musl uses "Result not representable" for ERANGE, support this in
+addition to glibc's "Numerical result out of range".
+
+Upstream-Status: Backport [https://github.com/ostreedev/ostree/commit/2d4ee168d7eae0afcce356a3f8135294e6d7fe6f]
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+---
+ tests/test-commit-timestamp.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test-commit-timestamp.sh b/tests/test-commit-timestamp.sh
+index 0688c63a4bdb..de105b768a9c 100755
+--- a/tests/test-commit-timestamp.sh
++++ b/tests/test-commit-timestamp.sh
+@@ -40,6 +40,6 @@ fi
+ ${CMD_PREFIX} ostree --repo=./testrepo show env > show-env.txt
+ rm -rf testrepo testrepo-files
+ assert_file_has_content_literal commit-invalid.txt 'Failed to convert SOURCE_DATE_EPOCH'
+-assert_file_has_content_literal commit-overflowing.txt 'Parsing SOURCE_DATE_EPOCH: Numerical result out of range'
++assert_file_has_content commit-overflowing.txt 'Parsing SOURCE_DATE_EPOCH: \(Numerical result out of range\|Result not representable\)'
+ assert_file_has_content_literal show-env.txt 'Date:  2009-02-13 23:31:30 +0000'
+ echo "ok commit with env timestamp"
+-- 
+2.39.0
+
diff --git a/meta-oe/recipes-extended/ostree/ostree_2022.7.bb b/meta-oe/recipes-extended/ostree/ostree_2022.7.bb
index 2683c4f24558..61e208b3b718 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2022.7.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2022.7.bb
@@ -20,6 +20,7 @@  DEPENDS = " \
 SRC_URI = " \
     https://github.com/ostreedev/ostree/releases/download/v${PV}/libostree-${PV}.tar.xz \
     file://0001-lib-repo-checkout-Add-ALLPERMS-for-musl.patch \
+    file://0001-tests-Handle-musl-s-ERANGE-mapping.patch \
     file://run-ptest \
 "
 SRC_URI[sha256sum] = "8be2a9261c94e8b9ec4113380ffc480f8598245fb321a009bad4fae4b822411f"