-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All changes to fakechroot we carry in Debian for glibc >= 2.37 #104
base: master
Are you sure you want to change the base?
Conversation
d28622c
to
e2e1622
Compare
First commit is already in master , can you rebase with master please? |
dex4er#85 Signed-off-by: Ilya Lipnitskiy <[email protected]>
dex4er#85 Signed-off-by: Ilya Lipnitskiy <[email protected]>
dex4er#85 Signed-off-by: Ilya Lipnitskiy <[email protected]>
Starting with glibc 2.32 the compat nss module for getpwnam calls __nss_files_fopen (which is a GLIBC_PRIVATE symbol provided by glibc) instead of fopen (see 299210c1fa67e2dfb564475986fce11cd33db9ad). This leads to getpwnam calls accessing /etc/passwd from *outside* the chroot and as a result programs like adduser do not work correctly anymore under fakechroot. Starting with glibc 2.34 the __nss_files_fopen was moved from nss to libc.so and thus wrapping it with LD_PRELOAD has no affect anymore (see 6212bb67f4695962748a5981e1b9fea105af74f6). So now we also wrap all the functions accessing /etc/passwd, /etc/group and /etc/shadow. This solution will ignore NIS, LDAP or other local files as potentially configured in /etc/nsswitch.conf. dex4er#98
as note #98 for glibc 2.32 added src/__nss_files_fopen.c and later for glibc 2.34 remove it |
I added two more commits which are needed to prevent #107 under glibc 2.34. |
It failed to build on "../build-aux/test-driver: line 107: ./t/rm.t: Permission denied". Thank you. [1] |
Thank you @sergiomb2 I added the executable flag to the test. I also added a new commit that fixes ldd.fakechroot on mips64el, ppc64el and s390x -- see #111 for details. |
30d6b95
to
fc707f6
Compare
- test/t/rm.t will fail under glibc 2.34 unless __stat64_time64 functions are wrapped - test/t/touch.t will fail under glibc 2.34 unless __lstat64_time64 is wrapped
…nsat,s,}64 These functions are only wrapped on 32 bit platforms like i386, armel or armhf. On 64 bit platforms, the corresponding HAVE_* macros will not be defined. * __fstatat64_time64 * __lstat64_time64 * __stat64_time64 * __utime64 * __utimensat64 * __utimes64
…he linker in `objdump -p` like mips64el, ppc64el and s390x
- the variable is set in test/common.inc.sh and includes `basename $0 .t` - otherwise test/t/touch.t will always get skipped
I found a rather important problem with my patch stack. The fix is: diff --git a/src/__lstat64_time64.c b/src/__lstat64_time64.c
index e3e8400..1637b9c 100644
--- a/src/__lstat64_time64.c
+++ b/src/__lstat64_time64.c
@@ -20,7 +20,7 @@
#include <config.h>
-#ifdef HAVE___lstat64_time64
+#ifdef HAVE___LSTAT64_TIME64
#define _ATFILE_SOURCE
#define _POSIX_C_SOURCE 200809L Because of that "typo" (probably some copy-paste mess-up of mine), In the process I also observed that during a normal build, I pushed all fixes here as well as to #108. |
- updated urls (lives on github now) - statx patch from master - debian patches gathered in dex4er/fakechroot#104
I pushed another commit which wraps |
this fix " __readlink_chk, __readlinkat_chk: properly pass buffer length " seems to me that fixes cp.t . but now socket test fail with "af_unix server socket created bind: File name too long" Anyway I need to reduce my workload , and fakechroot seems abandoned to me , I think it was replaced with fakeroot , I most probably I will orphan the package in Fedora . It was a pleasure meet you |
I think it is.
No. fakeroot makes the wrapped program appear as if the user running it is actually root (uid 0). fakechroot makes the program believe it is run inside a chroot. You usually use both fakeroot and fakechroot at the same time. They work together.
I think that makes sense. I will continue maintaining it in Debian but it's not much fun at this point... |
OK , I'm building it for Fedora 41 without socket-af_unix.t . |
I'm creating this merge request to keep track of the patch stack we carry in Debian on top of fakechroot 2.20.1.
These are mostly the same patches that are also applied by Fedora: https://src.fedoraproject.org/rpms/fakechroot
This pull request contains commits from the following pull requests:
As well as the last useful commit that was pushed to master since the release of 2.20.1: b42d1fb
This is the current patch stack in Debian: https://sources.debian.org/src/fakechroot/unstable/debian/patches/