summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo
Commit message (Collapse)AuthorAgeFilesLines
* pseudo: Fix handling of absolute linksAlexandre Belloni2022-04-211-1/+1
| | | | | | | | | | | | | Update to a version of pseudo which has a fix for absolute links, evaluating them from the chroot path. (From OE-Core rev: 4e79b3fa07d6b8d044f2fb21e691ff3683aee1ea) Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 33147b89bc3c9e9bdd53a942a5551d8a1d06130c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add patch to workaround paths with crazy lengthsRichard Purdie2022-04-211-1/+1
| | | | | | | | | | | | Update to a version of pseudo which includes a workaround for crazy long paths, as shown by the libfm failures from the libtool upgrade. (From OE-Core rev: 5cac1e855e397b58c3c2b251a9794f3d480c8ad6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 67dfa32d82b8862e6e543c37315f211aba3ec28b) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add fcntl64 wrapperRichard Purdie2021-11-151-1/+1
| | | | | | | | | | | | Add fcntl64 wrapper which hopefully fixes issues seen in findutils and the find command in the libtool removal code when built with LFS compile flags on Gentoo. (From OE-Core rev: c87d2dd8ec10d8164b0bff4307ea66f41b3360d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f26867fe4daec7299f59a82ae4a0d70cceb3e082) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add in ability to flush database with shutdown requestRichard Purdie2021-11-151-1/+1
| | | | | | | | | | | | | Pulls in: pseudo_db: Flush DB if there is a shutdown request fcntl: Add support for fcntl F_GETPIPE_SZ and F_SETPIPE_SZ (test fix) (From OE-Core rev: 649333a0d1bd5be4d5fb8a494e06686e08d291be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0882095d608ce3abbcc9814517434c21ea549063) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk-pseudo: Fix to work with glibc 2.34 systemsHongxu Jia2021-10-232-15/+26
| | | | | | | | | | | | | | | | | | | | | | | Since commit [df313aa810 pseudo: Fix to work with glibc 2.34 systems] applied, it fixed native only. And nativesdk has the similar issue Tweak library search order, make prebuilt lib ahead of recipe lib, after apply the fix: ... $ readelf -a lib/pseudo/lib64/libpseudo.so | grep 'Shared library' 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library:[libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] ... (From OE-Core rev: b7d269c84838f646b2915e7ff66d81db0bc16b9e) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d6d116b5db78645958ea30be3d0572e0f6d7bd92) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update with fcntl and glibc 2.34 fixesRichard Purdie2021-10-231-1/+1
| | | | | | | | | | | | | | | | | | | Pull in the following changes: * ports/linux/guts: Add closefrom support for glibc 2.34 * pseudo_client: Make msg static in pseudo_op_client * ports/linux/guts: Add close_range wrapper for glibc 2.34 * pseudo_client: Do not pass null argument to pseudo_diag() * test-openat: Consider device as well as inode number * test: Add missing test-statx test case * fcntl: Add support for fcntl F_GETPIPE_SZ and F_SETPIPE_SZ (From OE-Core rev: 63afcafef78f3d3b95c0d0c9746f9d627b6291c3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 71b549924a7fa7973a8e03e11f3db45fdc29889d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Fix to work with glibc 2.34 systemsRichard Purdie2021-10-233-0/+73
| | | | | | | | | | | | The merge of libdl into libc in glibc 2.34 causes problems for pseudo. Add a fix that works around this issue. (From OE-Core rev: 449bb53b3ebfc838ba674c1c3a39407620103c8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dd3e46a043c81cd4d81731a0f691868d3c059742) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to latest version including statx fixRichard Purdie2021-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | This updates to the latest pseudo version which includes: Revert "client: Fix some compiler warnings" ports/linux: Always build statx support makewrappers: Handle parameters marked as nonnull client: Fix some compiler warnings wrappers: Avoid -Wcast-function-type warning In particular, this pseudo version always has statx enabled which means we can then remove the need to make pseudo-native host distro specific which fixes an eSDK issue. (From OE-Core rev: c78d82c60acd8cf1eabc728d614bf4631a96c2ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 58cc70940ff998be49a9b89e1ad0538242cb7998) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add uninative configuration sanity checkRichard Purdie2021-07-201-0/+13
| | | | | | | | | | | | | | | When building pseudo-native to work with uninative, we need to ensure the configuration will work on all supported target systems. This means "new clone" semantics, xattr and statvfs support in particular. It is extremely unlikely we'd run on a system without any of these but add a check just to be sure when uninative is enabled. (From OE-Core rev: 262b70f94c34762f5879f637dc918e2d5928f2d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ea5b208ee25752bea6037cd0f3b28da7d2c9905e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Upgrade to add trailing slashes ignore path fixRichard Purdie2021-04-301-1/+1
| | | | | | | | | | | | Pull in: client: strip trailing slashes when opening an ignored path (From OE-Core rev: fda1bc10604c41904df6b859105cab68dc70b556) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9fb92bc13b8a78ef98798f14e728058feb180ba6) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/recipes-devtools: Add HOMEPAGE / DESCRIPTIONDorinda2021-03-101-0/+1
| | | | | | | | | | | | | | Added HOMEPAGE and DESCRIPTION for recipes with missing decriptions or homepage [YOCTO #13471] (From OE-Core rev: bd3352880322598b0ba6dc439ff08c2e4c592e36) Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bb05814335e7101bfd8df0a11dc18a044e867bed) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to include fixes for glibc 2.33Richard Purdie2021-03-041-1/+1
| | | | | | | | | | | | | Pull in the changes: makewrappers: Fix glibc 2.33 fstatat usage issues ports/linux: Add wrapper for fstatat/fstatat64 in glibc 2.33 (From OE-Core rev: b09b9a28f8ab26b5ce5a21e1f3f1d05eb3540d61) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dfcb1c5eb2690046f96c2bb6724e091028ddc3ec) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update for rename and faccessat fixesRichard Purdie2021-03-041-1/+1
| | | | | | | | | | | | | | | | | Pull in: ports/rename/renameat: Avoid race when renaming files ports/unix: Add faccessat and faccessat2 ports/access.c: Use EACCES, not EPERM which includes a fix for rename race issues causing pseudo aborts. (From OE-Core rev: 8a21081add7b2a2698f8eafcc9df472188e9a9c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 330c232e4f756296331f9026e91ac26fd45f0315) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to work with glibc 2.33Richard Purdie2021-03-041-1/+1
| | | | | | | | | | | | Update to a pseudo version which contains some heqader fixes for glibc 2.33. (From OE-Core rev: 3bf3de8159c44c47a39104fdda5d63aab549269d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c897ac317926b132547578b1f6bd347fe5677dfc) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to include passwd and file renaming fixesRichard Purdie2021-02-101-1/+1
| | | | | | | | | | | | | | | | | Pulls in: pseudo_client: Ensure renames update open fd file paths pseudo_client.c: Rebuild passwd paths after chroot which should fix issues seen in apt package index creation, new binutils and other autobuilder race issues in pseudo amongst other issues. (From OE-Core rev: a92c60dddc65f316eca5ae8434e2815fefc025af) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 44d11b56001f40622c055069b0901cc4ae15c76c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update for arm host and memleak fixes/cleanupRichard Purdie2021-02-031-1/+1
| | | | | | | | | | | | | | | | | | Pulls in: makewrappers: support architecture-overrides in wrapper modifiers makewrappers: fix Python 2 hangover Fix some memory leaks Disable deprecated function warnings Silence switch block warnings pseudo_util: don't overrun strings when looking for keys (From OE-Core rev: bd176984ac66a2f47e06394f54df26a3322668b1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 11a3a9203ad595e7fa92acf442a7f3216d6e3830) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add lchmod wrapperRichard Purdie2021-02-031-1/+1
| | | | | | | | | | | | | | | | | | New versions of glibc have an lchmod function so we need to wrap it. Identified through a reproducibility issue in initramfs-base where /dev/console created by mknod from coreutils changed permissions depending on the host distro (mknod used the gnulib wrapper on most hosts but newer ones used the libc call). [YOCTO #14162] (From OE-Core rev: 38f0f8cb915a4220a04b73dc3de29749337062d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 20a645664977530e602e1ac97e8dc0962e730e6c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Drop patches merged into upstream branchRichard Purdie2021-02-033-122/+1
| | | | | | | | | (From OE-Core rev: 36ca6bfad00ef26a16230141a2374de4a8c7aca7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7386a116222979e6de60c39d2c094d5f216fb101) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to print PSEUDO_LOGFILE in abort message on path mismatchesTomasz Dziendzielski2021-02-031-1/+1
| | | | | | | | | | (From OE-Core rev: 500a7236702023920836d0ca5e93db395d9a2890) Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9259d684415e3e7923de74359a4ed3487e0e9da7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Simplify pseudo_client_ignore_path_chroot()Peter Kjellerstedt2021-02-033-0/+121
| | | | | | | | | | | | This also plugs a memory leak in pseudo_client_ignore_path_chroot(). (From OE-Core rev: 8308919189e6f8ae68e19e0d3578de514635427b) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d8dddd5054a1c4e20a3e32fa9ab31f5859d6fbb6) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Upgrade to include mkostemp64 wrapperRichard Purdie2021-02-031-1/+1
| | | | | | | | | | | | | | Newer systems are using this currently unwrapped glibc function, add it. [YOCTO #14080] (From OE-Core rev: 893f6700b21cdd86c05a1eb04f2c4849aca0b6f0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cba4f51f0166e2c20e854ee0344be0c58769eaca) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to account for patches merged on branchRichard Purdie2021-02-039-735/+1
| | | | | | | | | (From OE-Core rev: 9002c81b8996bfbdf3fa1b8b15a198408b749d1d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ea22fb3aa1c5dd3edcd1d8b415a0843a9ee4677c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Fix statx function usageRichard Purdie2021-02-032-0/+57
| | | | | | | | | | | | | | 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: 48f464f84e90354aa57ba4b9f10e01d3bd39403e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f9ae80aee98a7bb59c83ac9ebf9d317302507cec) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add pathfix patchRichard Purdie2021-02-032-0/+26
| | | | | | | | | | | | Add a path to fix up handling of dirfd being passed as a full file and with path="". (From OE-Core rev: 07ca0b87e0fa3f783ecce7f09f8800b1a6eb668e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3006bbe7768e4efe33d3d2d3f5786a561ecbe96f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add may unlink patchRichard Purdie2021-02-032-0/+38
| | | | | | | | | | | | Mark files which are unlinked (nlink == 0) but open with fd's as "may-unlink" to avoid problematic database entries. (From OE-Core rev: 2856c4f514ddf1c28eb6e59e0ab4f11621fb5856) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e1e481f3608c05ab14c61bf45cd0837d7287b6a5) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Fix xattr segfaultRichard Purdie2021-02-032-0/+41
| | | | | | | | | | | | Fix a NULL pointer dereference exposed by the path ignore code in xattr handling. (From OE-Core rev: 4e698300a602b484bd70e76dfc66fb2e420f7fe4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 929a27bf6cbca94d1141d2094ae0c915d93bd3f4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* psuedo: Add tracking of linked files for fdsRichard Purdie2021-02-032-0/+156
| | | | | | | | | | | | | Where files are link()'d and one is unlink()'d, pseudo's fd mappings can become confused. Add a patch to try and improve this for the common usecases we see. (From OE-Core rev: 09da51d69e1ead6dc7b41034f1dee05e1c98078b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9ce621fa2099608ca0ccbb8420b31d71cdd7b00e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Abort on mismatch patchRichard Purdie2021-02-032-0/+65
| | | | | | | | | | | | | | Rather than doing what turns out to be a rather dangerous "fixup" if we see a file with a different path but the same inode as another file we've previously seen, throw and abort. Direct the user to a wiki page where we can maintain information about what this error means. (From OE-Core rev: 3e822ccf93746931a49e0bf3671982e0dff910ea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2db491d97da08d44ebd257f98489550a82a7935c) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add support for ignoring paths from the pseudo DBRichard Purdie2021-02-032-0/+299
| | | | | | | | | | | | | | | Add PSEUDO_IGNORE_PATHS, a comma separated list of path prefixes, where any files underneath are not handled by pseudo. This allows files to be left out of the pseudo datanase where we know we don't need the fake root emulation. This is particularly useful if we know these files can be deleted outside of pseudo context. (From OE-Core rev: 6166ea35d44accbf39ac67878acbe6447272d227) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8defb687a2c0ffac232c4d0d63a590871c453a2e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Ignore mismatched inodes from the dbRichard Purdie2021-02-032-0/+52
| | | | | | | | | | | | | | | | | | | | | | | Currently, where pseudo finds a database entry for an inode but the path doesn't match, it reuses that database entry metadata. This is causing real world "corruption" of file attributes. See [YOCTO #14057] for an example of this. This can happen when files are deleted outside of pseudo context and the inode is reused by a new file which pseduo then "sees". Its possible the opposite could happen, it needs to reuse attributes but this change would prevent it. As far as I can tell, we don't want pseuo to reuse these attributes though so this code should be safer and avoid bugs like the above. (From OE-Core rev: 064eb959c38ae10dcb99b750c6bf6112de6c29d5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1c13149b81e03a1ac48b27a208a139d5493c3ce7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: fix renaming to selfJoe Slater2021-02-031-1/+1
| | | | | | | | | | | | | | | | | Pseudo tests for an item being renamed to itself only after information about it has been deleted. Move the test to before we change the database. Note that pseudo does not support renameat2(), but neither does glibc. (From OE-Core rev: 771f8755db3a612c2c438367e8a49f190d4b9d8e) Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6b3d109f42385ad1cf1f297a6c06ea7eb6509f26) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to add OFC fcntl lock updatesRichard Purdie2021-02-031-1/+1
| | | | | | | | | | | | This adds in support for the OFC fcntl ioctl lock flags, removing warnings on some more recent linux kernels. (From OE-Core rev: 7d35b29add0d0baf786c3f2382492b44f16b4dba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 234168f803bee2e5b0955aabaddb1d967349fb82) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: merge in fixes for setfacl issueRichard Purdie2021-02-031-1/+1
| | | | | | | | | | | [YOCTO #13959] (From OE-Core rev: 4303a9ba51b15d4f00988a08a1d1f80da51f6d54) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 18fbd28c9aa0276d110839c4282a9ab75fc9f28e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Switch to oe-core branch in git repoRichard Purdie2021-02-0311-618/+2
| | | | | | | | | | | | | | We have a significant number of outstanding patches to pseudo. Rather than queue these up as patches, create a branch in the upstream repo and use that until such times as we have someone with the time/skills to properly review these for master in the pseudo repo. (From OE-Core rev: 1f26db1ffd0ce080d432434137482a71b401f77a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f09088eaa803ce396726368626a35dee70168d91) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Fix attr errors due to incorrect library resolution issuesRichard Purdie2020-07-022-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | 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: 60ae9e6d31dcfc06961fedf7622a204162d3f464) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 82655cb26ad01de9587ef41eaef155c61c361f67) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Fix enum typedefJacob Kroon2020-05-222-0/+32
| | | | | | | | | | | | | 'pseudo_access_t' is a type, so use typedef. Fixes building pseudo with gcc 10 where -fno-common is the default. (From OE-Core rev: 2093769199ecc3d1e474bea5ec6e8b193f6f8ea3) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: add macro guard for seccompKai Kang2020-05-071-1/+14
| | | | | | | | | | | | | | | | | | It fails to compile pseudo-native on centos 7: | ports/linux/pseudo_wrappers.c: In function ‘prctl’: | ports/linux/pseudo_wrappers.c:129:14: error: ‘SECCOMP_SET_MODE_FILTER’ undeclared (first use in this function) | if (cmd == SECCOMP_SET_MODE_FILTER) { | ^ Add macro guard for the definition to avoid the failure. (From OE-Core rev: 9fff03afb8e67b360042e80fda8213a67472b9ec) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: During DB fix, remove files that do not existRicardo Ribalda Delgado2020-04-062-0/+50
| | | | | | | | | | | | If a file does not exist, either because it has been removed outside bitbake, or because only some of the files have been moved to a different location, delete it from the pseudo-db is the user decides to fix the database. (From OE-Core rev: 79f7212ae71a4eb9e7abfe2c333b035ccc10e5c5) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Force seccomp to return success when in fact doing nothingRichard Purdie2020-04-062-0/+125
| | | | | | | | | | | | | | Pseudo changes the syscall access patterns which makes it incompatible with seccomp. Therefore intercept the seccomp syscall and alter it, pretending that seccomp was setup when in fact we do nothing. If we error as unsupported, utilities like file will exit with errors so we can't just disable it. This works around issues on platforms where seccomp is enabled in file (e.g. archlinux). (From OE-Core rev: bc895522eb940539a0e3cb6192c4a64f13ca8d6a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Ensure we use our own libsqliteRichard Purdie2020-03-311-0/+2
| | | | | | | | | | | | | | | | | | | pseudo-native is special in that bitbake ends up executing it from the sysroot-components directory before we have any workdirs for the bitbake fakeroot worker. Since we switched to dynamically linking sqlite, it means sqlite from the host system may be found, we really want the version in sysroot-components. Trying to run tasks to create some special environment for pseudo is hard and error prone. The simplest fix is to add an RPATH to the binary so that it can correctly find the sqlite we want. Unfortunately passing $ORIGIN into make doesn't work so well with shell quoting so we have to fix that during do_install. [YOCTO #13814] (From OE-Core rev: 3937ca9e2dfabb1ce9bce1d536b60b1e2a43739b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: adjust for attr 2.4.48Alexander Kanavin2020-01-162-0/+49
| | | | | | | (From OE-Core rev: 5273df4e142b230636f1b90d0e48986c178472d6) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Make realpath() remove trailing slashesRobert Yang2019-12-302-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux system's realpath() remove trailing slashes, but pseudo's doesn't, need make them identical. E.g., the following code (rel.c) prints '/tmp' with system's realpath, but pseudo's realpath prints '/tmp/': #include <stdio.h> #include <limits.h> #include <stdlib.h> int main() { char out[PATH_MAX]; printf("%s\n", realpath("/tmp/", out)); return 0; } $ bitbake base-passwd -cdevshell # For pseudo env $ gcc rel.c $ ./a.out /tmp/ (but should be /tmp) This patch fixes the problem. (From OE-Core rev: 319bbf66e03377adf2db7efa93ef578e3460eb38) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Drop static linking to sqlite3Richard Purdie2019-11-101-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2010[1] we made pseudo statically link against sqlite3. Since then the world has changed, pseudo now has separate processes for the database in the server and the client and they have separate linking commands. Also, whilst there were concerns about needing specific versions of sqlite3, in the OE environment, this is always the case. [1] http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ad0ac0ecd38fc77daf42485489fccc10a5e1e3e7 The static sqlite3-native is causing us problems, in particular: tmp/work/x86_64-linux/pseudo-native/1.9.0+gitAUTOINC+060058bb29-r0/recipe-sysroot-native/usr/lib/libsqlite3.a(sqlite3.o):(.data.rel+0xb0): undefined reference to `fcntl64' which occurs if sqlite3-native was built on a machine with glibc 2.28 or later and pseudo-native is being built on glibc before that. With dyanmical linking, libc is backwards compatible and works but with static linking it does not. There appears to be no easy way to avoid this other than adding a copy of sqlite3 into the pseudo recipe. Given the static linking doesn't seem to be required any longer due to the separate processes, drop that to fix those issues. (From OE-Core rev: a0c238d40a9cc1f87da0607fddaaef0c31d93720) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Add statx support to fix fedora30 issuesRichard Purdie2019-11-072-0/+107
| | | | | | | | | | Modern distros (e.g. fedora30) are starting to use the new statx() syscall through the newly exposed glibc wrapper function in software like coreutils (e.g. the ls command). Add support to intercept this to pseudo. (From OE-Core rev: 11694eb59bea347085d6e389df0b46826219c0d3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: use python 3 during buildsAlexander Kanavin2019-09-012-0/+35
| | | | | | | (From OE-Core rev: 7c2acbd4dff976e8def1e16c6631f9ab74503cae) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* world-broken.inc: RemoveAdrian Bunk2019-08-281-0/+2
| | | | | | | | | | | | | Move still required entries as COMPATIBLE_HOST_libc-musl = 'null' to individual recipes. This also gives users a proper error message when trying to build a known non-building package. (From OE-Core rev: 8bbb17d2dcafa9b4e26941a55932f4be2782e1d1) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Fix openat() with a symlink pointing to a directoryJason Wessel2019-08-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working with ostree disk generation in conjunction with wic, I found a problem with pseudo where it tried to resolve a symlink when it shouldn't, based on openat() flags. A C program has been constructed to test pseudo to show that it is working properly with the correct behavior around openat(). #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> #include <unistd.h> #include <fcntl.h> int main() { /* * Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ; * ./app ; echo "pseudo"; pseudo ./app */ system("rm -rf tdir tlink"); system("mkdir tdir"); system("ln -s tdir tlink"); DIR *dir = opendir("."); int dfd = dirfd(dir); int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW); if (target_dfd == -1) { printf("Test 1 good\n"); } else { printf("Test 1 failed\n"); close(target_dfd); } target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC); if (target_dfd == -1) { printf("Test 2 failed\n"); } else { printf("Test 2 good\n"); close(target_dfd); } /* Test 3 make sure the owner of the link is root */ struct stat sbuf; if (!lstat("tlink", &sbuf) && sbuf.st_uid == 0) { printf("Test 3 good\n"); } else { printf("Test 3 failed\n"); } /* Test 4 tests open with the "rb" flag, owner should not change */ int ofd = openat(dfd,"./tlink", O_RDONLY|O_CLOEXEC); if (ofd >= 0) { if (fstat(ofd, &sbuf) != 0) printf("ERROR in fstat test 4\n"); else if (sbuf.st_uid == 0) printf("Test 4 good\n"); close(ofd); } else { printf("Test 4 failed with openat()\n"); } /* Test pseudo db to see the fstat() above did not delete the DB entry */ if (!lstat("tlink", &sbuf) && sbuf.st_uid == 0) printf("Test 5 good\n"); else printf("Test 5 failed... tlink is owned by %i and not 0\n", sbuf.st_uid); return 0; } int main() { /* Tested with: gcc -Wall -o app app.c ; echo "no pseudo" ; ./app ; echo "pseudo"; pseudo ./app */ system("rm -rf tdir tlink"); system("mkdir tdir"); system("ln -s tdir tlink"); DIR *dir = opendir("."); int dfd = dirfd(dir); int target_dfd = openat (dfd, "tlink", O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW); if (target_dfd == -1) { printf("This is right\n"); } else { printf("This is broken\n"); } return 0; } Many thanks to Peter Seebach for fixing the problem in the pseudo code to use the same logic which was already there for the AT_SYMLINK_NOFOLLOW. Also updated is the license MD5 checksum since the master branch of pseudo has had the SPDX data updated. (From OE-Core rev: a98ea4be5ce19ff380ca500ba1ef3da490ec4556) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: Update to gain key bugfixesRichard Purdie2019-04-111-1/+1
| | | | | | | | | | | | | | | | Newer distros are using new versions of glibc and coreutils which use the new glibc renameat2 function. We need to intercept this for correct functioning of pseudo. This is essential to ensure new distros continue to work with the project. Also, this version has a fix for path/inode cross corruption problems which may explain our mysterious locale permissions issues. Many thanks to Otavio and Peter Seebach for the help in figuring this out and fixing it. (From OE-Core rev: 0fb257121b68f38b40c078150db8f7d0979b7ea5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: fix link of sqlite3 using pkg-configJens Rehsack2018-11-203-37/+16
| | | | | | | | | | | | | | | | If sqlite3 is built with FTS5 it uses log() from libm, it sqlite3 is built with READLINE it uses tgetent from a curses lib and readline from libreadline, if it is built using deflate from libz ... , but all that linkage is lost if we manually statically link so explicitely extract extra static linking options from pkg-config and force them into pseudo as well. This commit obsoletes (so include the implicit revert) e39fec613d pseudo: fix link with new sqlite3 (From OE-Core rev: 042af406583acc091ef82c3d1dcedd41315046de) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pseudo: fix link with new sqlite3Ross Burton2018-11-142-0/+34
| | | | | | | | | | If sqlite3 is built with FTS5 it uses log() from libm, but that linkage is lost if we manually statically link so explicitly link to libm. (From OE-Core rev: b24a67217d82f225e76fbc2dfb70dd8e1a6ea215) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>