python3-numpy: Use Large File Support version of fallocate
PATCH 1/1 python3-numpy: Use Large File Support version of fallocate
This was supposed to always be the case from upstream but was exposed by the 64-bit-time QA checker when file function scanning was enabled.
--- ...le-fallocate-on-32-bit-linux-platfor.patch | 49 +++++++++++++++++++ .../python/python3-numpy_1.26.2.bb | 1 + 2 files changed, 50 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-numpy/0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch
meta/recipes-devtools/python/python3-numpy/0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch new file +49 -0
@@ -0,0 +1,49 @@ +From a67561c3c015589e26d156f82de8624533e3e6d7 Mon Sep 17 00:00:00 2001 +From: Ola x Nilsson <[email protected]> +Date: Fri, 19 Jan 2024 10:26:41 +0100 +Subject: [PATCH] BUG: Use large file fallocate on 32 bit linux platforms + +Using a local prototype for fallocate instead of the fcntl.h header +meant that the redirect triggered by -D_FILE_OFFSET_BITS=64 was not +triggered. + +The prototypes in feature_detection_stdio.h should only be used by +functions in setup_common.py. If they are used by the feature +discovery code they might trigger false positives. + +Upstream-Status: Backport [https://github.com/numpy/numpy/commit/f49c6f9ea735cd7f718e74f8d637ffbbd3a7a03b] +--- + numpy/core/feature_detection_stdio.h | 3 +++ + numpy/core/src/multiarray/convert.c | 5 +++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/numpy/core/feature_detection_stdio.h b/numpy/core/feature_detection_stdio.h +index bc14d16..d8bbfbd 100644 +--- a/numpy/core/feature_detection_stdio.h ++++ b/numpy/core/feature_detection_stdio.h +@@ -1,6 +1,9 @@ ++#define _GNU_SOURCE + #include <stdio.h> + #include <fcntl.h> + ++#if 0 /* Only for setup_common.py, not the C compiler */ + off_t ftello(FILE *stream); + int fseeko(FILE *stream, off_t offset, int whence); + int fallocate(int, int, off_t, off_t); ++#endif +diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c +index 60c1a1b..8ec0aee 100644 +--- a/numpy/core/src/multiarray/convert.c ++++ b/numpy/core/src/multiarray/convert.c +@@ -23,8 +23,9 @@ + #include "array_coercion.h" + #include "refcount.h" + +-int +-fallocate(int fd, int mode, off_t offset, off_t len); ++#if defined(HAVE_FALLOCATE) && defined(__linux__) ++#include <fcntl.h> ++#endif + + /* + * allocate nbytes of diskspace for file fp
meta/recipes-devtools/python/python3-numpy_1.26.2.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ file://0001-numpy-core-Define-RISCV-32-support.patch \ file://fix_reproducibility.patch \ file://run-ptest \ + file://0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch \ " SRC_URI[sha256sum] = "f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea"
Signature · 1 line
2.39.2
Patchtest results for [PATCH] python3-numpy: Use Large File Support version of fallocate
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/python3-numpy-Use-Large-File-Support-version-of-fallocate.patch
FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: '0001-BUG-Use-large-file-fallocate-on-32-bit-linux-platfor.patch' (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: Patch cannot be merged (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: Patch cannot be merged (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!