summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-07 17:16:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-08 08:08:32 +0100
commita5d7936202caf74d6b54cc3143f24b982201af9a (patch)
tree7ff2b31fa89a1e6cabfb72a4603017ed100d176a /meta/recipes-devtools
parentc194e5fac6f780bf792d7d560cb0c69f4180752f (diff)
downloadpoky-a5d7936202caf74d6b54cc3143f24b982201af9a.tar.gz
pseudo: Fix statx function usage
There is magic in the posts where specific variable names have specific magic. For that magic to work, "path" needs to be used not "pathname" as is currently there. Fix this, which fixes path issues on systems using statx (Ubuntu 20.04 in particular). (From OE-Core rev: f9ae80aee98a7bb59c83ac9ebf9d317302507cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/pseudo/files/statxfix.patch56
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb1
2 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/statxfix.patch b/meta/recipes-devtools/pseudo/files/statxfix.patch
new file mode 100644
index 0000000000..c47ff27f9f
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/statxfix.patch
@@ -0,0 +1,56 @@
1There is magic in the posts where specific variable names have specific
2magic. For that magic to work, "path" needs to be used not "pathname" as
3is currently there. Fix this, which fixes path issues on systems using
4statx (Ubuntu 20.04 in particular).
5
6Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7Upstream-Status: Pending
8
9Index: git/ports/linux/statx/guts/statx.c
10===================================================================
11--- git.orig/ports/linux/statx/guts/statx.c
12+++ git/ports/linux/statx/guts/statx.c
13@@ -5,14 +5,14 @@
14 * SPDX-License-Identifier: LGPL-2.1-only
15 *
16 * int
17- * statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) {
18+ * statx(int dirfd, const char *path, int flags, unsigned int mask, struct statx *statxbuf) {
19 * int rc = -1;
20 */
21 pseudo_msg_t *msg;
22 PSEUDO_STATBUF buf;
23 int save_errno;
24
25- rc = real_statx(dirfd, pathname, flags, mask, statxbuf);
26+ rc = real_statx(dirfd, path, flags, mask, statxbuf);
27 save_errno = errno;
28 if (rc == -1) {
29 return rc;
30@@ -25,16 +25,16 @@
31 buf.st_mode = statxbuf->stx_mode;
32 buf.st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor);
33 buf.st_nlink = statxbuf->stx_nlink;
34- msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, pathname, &buf);
35+ msg = pseudo_client_op(OP_STAT, 0, -1, dirfd, path, &buf);
36 if (msg && msg->result == RESULT_SUCCEED) {
37- pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
38+ pseudo_debug(PDBGF_FILE, "statx(path %s), flags %o, stat rc %d, stat uid %o\n", path, flags, rc, statxbuf->stx_uid);
39 statxbuf->stx_uid = msg->uid;
40 statxbuf->stx_gid = msg->gid;
41 statxbuf->stx_mode = msg->mode;
42 statxbuf->stx_rdev_major = major(msg->rdev);
43 statxbuf->stx_rdev_minor = minor(msg->rdev);
44 } else {
45- pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", pathname, flags, rc, statxbuf->stx_uid);
46+ pseudo_debug(PDBGF_FILE, "statx(path %s) failed, flags %o, stat rc %d, stat uid %o\n", path, flags, rc, statxbuf->stx_uid);
47 }
48 errno = save_errno;
49 /* return rc;
50Index: git/ports/linux/statx/wrapfuncs.in
51===================================================================
52--- git.orig/ports/linux/statx/wrapfuncs.in
53+++ git/ports/linux/statx/wrapfuncs.in
54@@ -1 +1 @@
55-int statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf);
56+int statx(int dirfd, const char *path, int flags, unsigned int mask, struct statx *statxbuf);
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index bc20a2f134..c79fe92bc3 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -9,6 +9,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=oe-core \
9 file://xattr_fix.patch \ 9 file://xattr_fix.patch \
10 file://mayunlink.patch \ 10 file://mayunlink.patch \
11 file://pathfix.patch \ 11 file://pathfix.patch \
12 file://statxfix.patch \
12 file://fallback-passwd \ 13 file://fallback-passwd \
13 file://fallback-group \ 14 file://fallback-group \
14 " 15 "