Commit Graph

107 Commits

Author SHA1 Message Date
Richard Purdie
42eb45b3a0 pseudo: Update to pull in memleak fix
(From OE-Core rev: d789b03d33d9a0fce335080f667c29ed45515726)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 42137b6f97da0672af365cd841678f39ce5907d2)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-01-26 09:49:25 +00:00
Robert Yang
3a3b526edb pseudo: 1.9.0 -> 1.9.2
(From OE-Core rev: 2093a9c80e391795abbac8766569583a3547e43b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 48a42747fd280ce68283e1491971d22273e3bdf2)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-01-26 09:49:25 +00:00
Richard Purdie
8a6b3d82f6 pseudo: Upgrade to version 1.9.1
This brings in:
 * nftw, nftw64: add wrapper
 * ftw, nftw, ftw64, nftw64: add tests
 * Move ftw and ftw64 to calling ntfw and nftw64
 * makewrappers: Introduce 'array' support
 * pseudo_util.c: Avoid warning when we intentionally discard const
 * pseudo_client.c: Fix warning
 * yocto-older-glibc-symbols.path: Add as a reference patch
 * pseudo/pseudo_client: Add wrapper functions to operate correctly with glibc 2.38 onwards
 * configure: Prune PIE flags
 * test/test-parallel-rename.sh: Add parallel rename test
 * test/test-parallel-symlinks.sh: Add parallel symlink test
 * ports/linux/guts: Add .gitignore to ignore generated files

(From OE-Core rev: b3140c624504b19a2b2faec8df89f57a99cefce1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 994e508b2a0ede8b5cc4fe39444cf25dc9a53faf)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-01-26 09:49:25 +00:00
Richard Purdie
7090df8cc3 pseudo: Fix envp bug and add posix_spawn wrapper
Fix pseudo with python 3.13 by adding a wrapper for posix_spawn and
fixing a NULL pointer dereference in envp handling it uncovered. This
fixes issues on Fedora 41.

(From OE-Core rev: 89b64526ac2bf0609a18c4d44b4835028f686978)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
0781183d75 pseudo: Update to include open symlink handling bugfix
Update to a new revision which includes "Bugfix for Linux open(O_CREAT|O_EXCL)"

(From OE-Core rev: cc87b332c5d09d4d7aaa2569fa046a16012597d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
bb34759979 pseudo: Update to pull in python 3.12+ fix
Pull in a fix which avoids syntax warnings with python 3.12.

(From OE-Core rev: 82526703823e252070dbf689e6f82a12ceb3b035)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
67f0d86422 pseudo: Update to pull in fchmodat fix
This is needed to work with coreutils 9.5.

Also contains some README tweaks.

(From OE-Core rev: c2549844031c30d2c1a6965ee66f163878d46fab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
044c07e9fb pseudo: Update to pull in gcc14 fix and missing statvfs64 intercept
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.

Merge in that fix and a gcc14 fix.

(From OE-Core rev: 1b181d1fcef45f969ef9147912995d80dbe87d87)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
707e3073b4 pseudo: Update to pull in syncfs probe fix
Pulls in the changes:

Eilís 'pidge' Ní Fhlannagáin (1):
      subports: Add _GNU_SOURCE for syncfs probe

Richard Purdie (1):
      SECURITY.md: Add file

Wu Zhenyu (1):
      pseudo.1: Fix a typo

(From OE-Core rev: 40a013f7134aec1d0e953ad4906944072cfb2ca1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Alexandre Belloni
fb7c005c8d pseudo: Update to pull in fd leak fix
Pull in:
    pseudo_util.c: Open file with O_CLOEXEC to avoid fd leak

    Use close-on-exec (O_CLOEXEC) flag when open log file to
    make sure its file descriptor is not leaked to parent
    process on fork/exec.

    Fixes [YOCTO #13311]

(From OE-Core rev: b8445072f4009b3e912792931bd71a4201d541e9)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
676ce4044d pseudo: Update to include logic fix
The logic in the previous commit was reversed, update to fix it.

(From OE-Core rev: 9b06d2741191333c7b11c66e9ab5848f95cb4e42)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
a507374b08 pseudo: Switch back to the master branch
OE is the main user of pseudo and we've had the changes in the oe-core branch
around long enough that we're going to run with them. Swicth back to directly
using the master branch.

(From OE-Core rev: 198ff9141f94c551d2a29f3a036c209e3e554a37)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[Luca: re-add 'branch' parameter to fix "does not set any branch parameter" warning]
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Khem Raj
6dd57602e1 pseudo: Disable LFS on 32bit arches
pseudo overrides certain libc functions which are aliases when LFS64 is
enabled. In anycase pseudo may not be of much use on 32bit systems

(From OE-Core rev: 215367b62ac1f48ba224e56e7b8862c0a7bdbcd0)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
2f7e023180 pseudo: Update to pull in linux-libc-headers race fix
Update to pull in:

    pseudo.c: Avoid patch mismatch errors for NAMELESS file entries

    In rare cases we see failures, often in linux-libc-headers for things like:

    |   INSTALL /XXX/linux-libc-headers/6.1-r0/image/usr/include
    | abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.

    Pseudo log:
    path mismatch [2 links]: ino 46662476 db 'NAMELESS FILE' req '/XXX/linux-libc-headers/6.1-r0/image/usr'.
    Setup complete, sending SIGUSR1 to pid 3630890.

    Whilst this doesn't easily reproduce, the issue is that multiple different processes are
    likely working on the directory and the creation in pseudo might not match accesses
    made by other processes.

    Ultimately, the "NAMELESS FILE" is harmless and pseudo will reconcile things
    so rather than error out, we should ignore this case.

(From OE-Core rev: 77d018ce3b3a9390a5cc020bce9f9ea9017820dd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4f30a1a74828e105cbe69677b3fbe5623f371543)
Signed-off-by: Fabio Berton <fabio.berton@criticaltechworks.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-11-15 06:05:32 -08:00
Richard Purdie
4682ae38f2 pseudo: Fix to work with glibc 2.38
This adds a horrible hack to get pseudo working with glibc 2.38. We can't
drop _GNU_SOURCE to something like _DEFAULT_SOURCE since we need the defines
the gnu options bring in. That leaves using internal glibc defines to disable
the c23 versions of strtol/fscanf and friends. Which would break pseudo
build with 2.38 from running on hosts with older glibc.

We'll probably need to come up with something better but this gets glibc 2.38
and working and avoids autobuilder failures.

(From OE-Core rev: 909fd25c2ebd25f5d3bc560e26f9df6862e033d0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 596fb699d470d7779bfa694e04908929ffeabcf7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-23 05:26:15 -10:00
Richard Purdie
5cc976671b pseudo: Update to include recent upstream minor fixes
Pull in some minor fixes:

 pseudo_util: Silence symlink errors and fix resolution bug
 ports/linux: Remove build dependency on libattr
 Minor build fixes
 pseudo_util: Fix resolving relative paths from "/"

(From OE-Core rev: fa5e99a57093877cb2332826ac8e9dae21d30b74)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c57d0c57d00cdef622dab3bf783a10d52f8d9ffb)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-12 08:41:48 +01:00
Alexandre Belloni
4a77431efc pseudo: Fix handling of absolute links
Update to a version of pseudo which has a fix for absolute links,
evaluating them from the chroot path.

(From OE-Core rev: 33147b89bc3c9e9bdd53a942a5551d8a1d06130c)

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-05 22:23:40 +01:00
Richard Purdie
3d62a6cc5c pseudo: Add patch to workaround paths with crazy lengths
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: 67dfa32d82b8862e6e543c37315f211aba3ec28b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-23 12:13:49 +00:00
Richard Purdie
3ae309ea06 pseudo: Add fcntl64 wrapper
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: f26867fe4daec7299f59a82ae4a0d70cceb3e082)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 22:31:52 +01:00
Richard Purdie
a6f6bcb9db pseudo: Add in ability to flush database with shutdown request
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: 0882095d608ce3abbcc9814517434c21ea549063)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-26 14:36:48 +01:00
Richard Purdie
b063499763 pseudo: Update with fcntl and glibc 2.34 fixes
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: 71b549924a7fa7973a8e03e11f3db45fdc29889d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-10 09:25:39 +01:00
Hongxu Jia
b3d2fde4f3 nativesdk-pseudo: Fix to work with glibc 2.34 systems
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: d6d116b5db78645958ea30be3d0572e0f6d7bd92)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-27 11:54:33 +01:00
Richard Purdie
4cc61c81f7 pseudo: Fix to work with glibc 2.34 systems
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: dd3e46a043c81cd4d81731a0f691868d3c059742)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-25 21:53:34 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Richard Purdie
fcc5db6991 pseudo: Update to latest version including statx fix
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: 58cc70940ff998be49a9b89e1ad0538242cb7998)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-11 23:00:52 +01:00
Richard Purdie
773f19df44 pseudo: Upgrade to add trailing slashes ignore path fix
Pull in:
  client: strip trailing slashes when opening an ignored path

(From OE-Core rev: 9fb92bc13b8a78ef98798f14e728058feb180ba6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:23 +01:00
Richard Purdie
f162c34fdb pseudo: Update to include fixes for glibc 2.33
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: dfcb1c5eb2690046f96c2bb6724e091028ddc3ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-15 20:54:38 +00:00
Richard Purdie
064e203987 pseudo: Update for rename and faccessat fixes
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: 330c232e4f756296331f9026e91ac26fd45f0315)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-12 23:29:51 +00:00
Richard Purdie
77d9b5f02a pseudo: Update to work with glibc 2.33
Update to a pseudo version which contains some heqader fixes for
glibc 2.33.

(From OE-Core rev: c897ac317926b132547578b1f6bd347fe5677dfc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-05 12:00:54 +00:00
Richard Purdie
e1caf4f305 pseudo: Update to include passwd and file renaming fixes
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: 44d11b56001f40622c055069b0901cc4ae15c76c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-29 21:21:53 +00:00
Richard Purdie
8398c8576d pseudo: Update for arm host and memleak fixes/cleanup
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: 11a3a9203ad595e7fa92acf442a7f3216d6e3830)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-10 12:34:40 +00:00
Richard Purdie
5f8a32de9d pseudo: Add lchmod wrapper
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: 20a645664977530e602e1ac97e8dc0962e730e6c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-08 10:10:15 +00:00
Richard Purdie
72329ca939 pseudo: Drop patches merged into upstream branch
(From OE-Core rev: 7386a116222979e6de60c39d2c094d5f216fb101)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18 22:52:24 +00:00
Tomasz Dziendzielski
1c3e8209f8 pseudo: Update to print PSEUDO_LOGFILE in abort message on path mismatches
(From OE-Core rev: 9259d684415e3e7923de74359a4ed3487e0e9da7)

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-09 12:20:32 +00:00
Peter Kjellerstedt
7548e8755e pseudo: Simplify pseudo_client_ignore_path_chroot()
This also plugs a memory leak in pseudo_client_ignore_path_chroot().

(From OE-Core rev: d8dddd5054a1c4e20a3e32fa9ab31f5859d6fbb6)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03 22:53:09 +00:00
Richard Purdie
d446d8b818 pseudo: Upgrade to include mkostemp64 wrapper
Newer systems are using this currently unwrapped glibc function,
add it.

[YOCTO #14080]

(From OE-Core rev: cba4f51f0166e2c20e854ee0344be0c58769eaca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-09 12:03:31 +01:00
Richard Purdie
78b2a07710 pseudo: Update to account for patches merged on branch
(From OE-Core rev: ea22fb3aa1c5dd3edcd1d8b415a0843a9ee4677c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-09 12:03:31 +01:00
Richard Purdie
a5d7936202 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>
2020-10-08 08:08:32 +01:00
Richard Purdie
ed9789d54d pseudo: Add pathfix patch
Add a path to fix up handling of dirfd being passed as a full file
and with path="".

(From OE-Core rev: 3006bbe7768e4efe33d3d2d3f5786a561ecbe96f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Richard Purdie
bd34ad3c2a pseudo: Add may unlink patch
Mark files which are unlinked (nlink == 0) but open with fd's as
"may-unlink" to avoid problematic database entries.

(From OE-Core rev: e1e481f3608c05ab14c61bf45cd0837d7287b6a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Richard Purdie
958447ff2f pseudo: Fix xattr segfault
Fix a NULL pointer dereference exposed by the path ignore code in
xattr handling.

(From OE-Core rev: 929a27bf6cbca94d1141d2094ae0c915d93bd3f4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Richard Purdie
842de9dbba psuedo: Add tracking of linked files for fds
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: 9ce621fa2099608ca0ccbb8420b31d71cdd7b00e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Richard Purdie
84e0642ed6 pseudo: Abort on mismatch patch
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: 2db491d97da08d44ebd257f98489550a82a7935c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Richard Purdie
84d006b9fb pseudo: Add support for ignoring paths from the pseudo DB
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: 8defb687a2c0ffac232c4d0d63a590871c453a2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Richard Purdie
b5c5d84b8b pseudo: Ignore mismatched inodes from the db
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: 1c13149b81e03a1ac48b27a208a139d5493c3ce7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-07 11:18:38 +01:00
Joe Slater
8fa41af2ca pseudo: fix renaming to self
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: 6b3d109f42385ad1cf1f297a6c06ea7eb6509f26)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-27 08:25:44 +01:00
Richard Purdie
4a523ac32b pseudo: Update to add OFC fcntl lock updates
This adds in support for the OFC fcntl ioctl lock flags, removing
warnings on some more recent linux kernels.

(From OE-Core rev: 234168f803bee2e5b0955aabaddb1d967349fb82)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-22 12:45:56 +01:00
Richard Purdie
704a245460 pseudo: merge in fixes for setfacl issue
[YOCTO #13959]

(From OE-Core rev: 18fbd28c9aa0276d110839c4282a9ab75fc9f28e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-28 08:36:00 +01:00
Richard Purdie
9f5f390500 pseudo: Switch to oe-core branch in git repo
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: f09088eaa803ce396726368626a35dee70168d91)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-28 08:36:00 +01:00
Richard Purdie
4be590b19d 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>
2020-06-23 12:31:03 +01:00