openat2 in introduced in upcoming 2.43 release of glibc. Pseudo needs to be aware of this function and create an intercept for it.
For tar on stream9 we need to intercept the syscall too: https://git.yoctoproject.org/pseudo/tree/ports/linux/guts/syscall.c https://git.yoctoproject.org/pseudo/tree/ports/linux/guts/syscall.c
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16117
psseudo master has a syscall intercept for SYS_openat2 that returns ENOSYS. This should unblock immediate users. Additionally, I've adapted 'openat' as a possible 'openat2' implementation. See: https://git.yoctoproject.org/pseudo/commit/?h=fray/master-wip&id=022e103f0b1223fb6557d730471196cb2223ac27 This is a first version. Once the function (not syscall) is mainstream, we'll likely want to have 'openat' call 'openat2', as well and adjust it to pass through whatever openat2 interface glibc ends up with, but until then this SHOULD work and is good enough for testing purposes.
Lower to M+. We've got a patch to return ENOSYS for now and there is a plan for a proper implementation.
Based on Zoltan's testing, it looks like we'll need full openat2() handling to build on Fedora 44 [1]. [1]: https://lore.kernel.org/openembedded-core/1b979680925d535d3cd344a8b736b8f862d52498.camel@pbarker.dev/
We could use the gnulib openat2() implementation, relying on the fact that it calls openat() which we already handle. https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/openat2.c;h=2be62c921c5b90e8b0d528b33501ed3e1f2d7f92;hb=HEAD
https://git.yoctoproject.org/pseudo/log/?h=rpurdie/openat2 has a one idea of how we could make it work, I found and worked around the issue in Mark's implementation. I am worried there may be chroot issues with that change though.
https://git.yoctoproject.org/pseudo/commit/?id=6533a536f93a13ec39e5fd42e3385798729e093f and following commit.