summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-22 17:56:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-23 12:31:03 +0100
commit4be590b19df840a60a651691de7c383b51bed0ac (patch)
tree05ba03a3f4f7ffd6d89bd4ba0dd87704d89acdbf /meta/recipes-devtools/pseudo
parent441a899ac99d354def8b89230be683c372f52aea (diff)
downloadpoky-4be590b19df840a60a651691de7c383b51bed0ac.tar.gz
pseudo: Fix attr errors due to incorrect library resolution issues
On a tumbleweed system, "install X Y" was showing the error: pseudo: ENOSYS for 'fsetxattr'. which was being caused by dlsym() for that function returning NULL. This appears to be due to it finding an unresolved symbol in libacl for this symbol in libattr. It hasn't been resolved so its NULL. dlerror() returns nothing since this is a valid symbol entry, its just not the one we want. We can add the glibc version string for the symbol we actually want so we get that version rather than the libattr/libacl one. The calls in libattr are just wrappers around the libc version so our attaching to the libc versions should intercept any accesses via these too. [YOCTO #13952] (From OE-Core rev: 82655cb26ad01de9587ef41eaef155c61c361f67) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pseudo')
-rw-r--r--meta/recipes-devtools/pseudo/files/xattr_version.patch54
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb1
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/xattr_version.patch b/meta/recipes-devtools/pseudo/files/xattr_version.patch
new file mode 100644
index 0000000000..a8b14bdd69
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/xattr_version.patch
@@ -0,0 +1,54 @@
1On a tumbleweed system, "install X Y" was showing the error:
2
3pseudo: ENOSYS for 'fsetxattr'.
4
5which was being caused by dlsym() for that function returning NULL. This
6appears to be due to it finding an unresolved symbol in libacl for this
7symbol in libattr. It hasn't been resolved so its NULL. dlerror() returns
8nothing since this is a valid symbol entry, its just not the one we want.
9
10We can add the glibc version string for the symbol we actually want so we get
11that version rather than the libattr/libacl one.
12
13To quote libattr:
14"""
15 These dumb wrappers are for backwards compatibility only.
16 Actual syscall wrappers are long gone to libc.
17"""
18and they are simply wrappers around the libc version so our attaching
19to the libc versions should intercept any accesses via these too.
20
21RP 2020/06/22
22Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
23Upstream-Status: Pending [discussed with seebs on irc and appears the correct fix]
24
25
26Index: git/ports/linux/xattr/wrapfuncs.in
27===================================================================
28--- git.orig/ports/linux/xattr/wrapfuncs.in
29+++ git/ports/linux/xattr/wrapfuncs.in
30@@ -1,12 +1,12 @@
31-ssize_t getxattr(const char *path, const char *name, void *value, size_t size); /* flags=0 */
32-ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); /* flags=AT_SYMLINK_NOFOLLOW */
33-ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size);
34-int setxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=0 */
35-int lsetxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=AT_SYMLINK_NOFOLLOW */
36-int fsetxattr(int filedes, const char *name, const void *value, size_t size, int xflags);
37-ssize_t listxattr(const char *path, char *list, size_t size); /* flags=0 */
38-ssize_t llistxattr(const char *path, char *list, size_t size); /* flags=AT_SYMLINK_NOFOLLOW */
39-ssize_t flistxattr(int filedes, char *list, size_t size);
40-int removexattr(const char *path, const char *name); /* flags=0 */
41-int lremovexattr(const char *path, const char *name); /* flags=AT_SYMLINK_NOFOLLOW */
42-int fremovexattr(int filedes, const char *name);
43+ssize_t getxattr(const char *path, const char *name, void *value, size_t size); /* flags=0, version="GLIBC_2.3" */
44+ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3" */
45+ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size); /* version="GLIBC_2.3" */
46+int setxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=0, version="GLIBC_2.3" */
47+int lsetxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3" */
48+int fsetxattr(int filedes, const char *name, const void *value, size_t size, int xflags); /* version="GLIBC_2.3" */
49+ssize_t listxattr(const char *path, char *list, size_t size); /* flags=0, version="GLIBC_2.3" */
50+ssize_t llistxattr(const char *path, char *list, size_t size); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3" */
51+ssize_t flistxattr(int filedes, char *list, size_t size); /* version="GLIBC_2.3" */
52+int removexattr(const char *path, const char *name); /* flags=0, version="GLIBC_2.3" */
53+int lremovexattr(const char *path, const char *name); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3" */
54+int fremovexattr(int filedes, const char *name); /* version="GLIBC_2.3" */
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index 324ae9071f..419bac19fe 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo \
13 file://seccomp.patch \ 13 file://seccomp.patch \
14 file://0001-pseudo-On-a-DB-fixup-remove-files-that-do-not-exist-.patch \ 14 file://0001-pseudo-On-a-DB-fixup-remove-files-that-do-not-exist-.patch \
15 file://0001-pseudo_ipc.h-Fix-enum-typedef.patch \ 15 file://0001-pseudo_ipc.h-Fix-enum-typedef.patch \
16 file://xattr_version.patch \
16 " 17 "
17 18
18SRCREV = "060058bb29f70b244e685b3c704eb0641b736f73" 19SRCREV = "060058bb29f70b244e685b3c704eb0641b736f73"