diff mbox series

pseudo: add patch with statvfs64 wrapper

Message ID 20240202144042.675454-1-matt@madison.systems
State New
Headers show
Series pseudo: add patch with statvfs64 wrapper | expand

Commit Message

Matt Madison Feb. 2, 2024, 2:40 p.m. UTC
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.

Signed-off-by: Matt Madison <matt@madison.systems>
---
 ...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
diff mbox series

Patch

diff --git a/meta/recipes-devtools/pseudo/files/0001-ports-linux-add-wrapper-for-statvfs64.patch b/meta/recipes-devtools/pseudo/files/0001-ports-linux-add-wrapper-for-statvfs64.patch
new file mode 100644
index 0000000000..bf22cdeaf9
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/0001-ports-linux-add-wrapper-for-statvfs64.patch
@@ -0,0 +1,50 @@ 
+From e3eca18e28859b6d8a1450eac22dbb314e8e6225 Mon Sep 17 00:00:00 2001
+From: Matt Madison <matt@madison.systems>
+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 <matt@madison.systems>
+---
+ 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
+
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 699cab11c6..f15fb0aaee 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -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 \
            "