Skip to contentSkip to conversation

pseudo: add patch with statvfs64 wrapper

PATCH New Matt Madison 1 participant 1 message Feb 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pseudo: add patch with statvfs64 wrapper

rpm 4.19 now builds with LFS64 support enabled by default, so it calls statvfs64() to get the space available on the filesystem it is installing packages into. This is not getting caught by pseudo, so rpm is checking the host's root filesystem, rather than the filesystem where the build is happening.

The patch here adds the missing wrapper, so pseudo performs the correct path remapping.

---
 ...orts-linux-add-wrapper-for-statvfs64.patch | 50 +++++++++++++++++++
 meta/recipes-devtools/pseudo/pseudo_git.bb    |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-devtools/pseudo/files/0001-ports-linux-add-wrapper-for-statvfs64.patch
meta/recipes-devtools/pseudo/files/0001-ports-linux-add-wrapper-for-statvfs64.patch new file +50 -0
new file mode 100644
index 0000000000..bf22cdeaf9
@@ -0,0 +1,50 @@
+From e3eca18e28859b6d8a1450eac22dbb314e8e6225 Mon Sep 17 00:00:00 2001
+From: Matt Madison <[email protected]>
+Date: Sun, 28 Jan 2024 09:49:55 -0800
+Subject: [PATCH][pseudo] ports/linux: add wrapper for statvfs64
+
+rpm 4.19 now builds with LFS64 support enabled by default,
+so it calls statvfs64() to get the space available on the
+filesystem it is installing packages into.  Add a wrapper
+for this call so the right filesystem is used.
+
+Upstream-Status: Submitted [https://lists.openembedded.org/g/openembedded-core/message/194464]
+
+Signed-off-by: Matt Madison <[email protected]>
+---
+ ports/linux/statvfs/guts/statvfs64.c | 15 +++++++++++++++
+ ports/linux/statvfs/wrapfuncs.in     |  1 +
+ 2 files changed, 16 insertions(+)
+ create mode 100644 ports/linux/statvfs/guts/statvfs64.c
+
+diff --git a/ports/linux/statvfs/guts/statvfs64.c b/ports/linux/statvfs/guts/statvfs64.c
+new file mode 100644
+index 0000000..856d3db
+--- /dev/null
++++ b/ports/linux/statvfs/guts/statvfs64.c
+@@ -0,0 +1,15 @@
++/*
++ * Copyright (c) 2018 Wind River Systems; see
++ * guts/COPYRIGHT for information.
++ *
++ * SPDX-License-Identifier: LGPL-2.1-only
++ *
++ * int statvfs64(const char *path, struct statvfs64 *buf)
++ *	int rc = -1;
++ */
++
++	rc = real_statvfs64(path, buf);
++
++/*	return rc;
++ * }
++ */
+diff --git a/ports/linux/statvfs/wrapfuncs.in b/ports/linux/statvfs/wrapfuncs.in
+index 1afb64d..6a59660 100644
+--- a/ports/linux/statvfs/wrapfuncs.in
++++ b/ports/linux/statvfs/wrapfuncs.in
+@@ -1 +1,2 @@
+ int statvfs(const char *path, struct statvfs *buf);
++int statvfs64(const char *path, struct statvfs64 *buf);
+-- 
+2.34.1
+
meta/recipes-devtools/pseudo/pseudo_git.bb +1 -0
index 699cab11c6..f15fb0aaee 100644
@@ -3,6 +3,7 @@ require pseudo.inc
 SRC_URI = "git://git.yoctoproject.org/pseudo;branch=master;protocol=https \
            file://0001-configure-Prune-PIE-flags.patch \
            file://glibc238.patch \
+           file://0001-ports-linux-add-wrapper-for-statvfs64.patch \
            file://fallback-passwd \
            file://fallback-group \
            "
Signature · 1 line
2.34.1