Skip to content
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

glibc 2.33+ compatibility #85

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

glibc 2.33+ compatibility #85

wants to merge 6 commits into from

Conversation

lipnitsk
Copy link

Should fix #82 and similar

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Arch 2021.02.01 bootstrap tarball still has old glibc.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
@roberth
Copy link

roberth commented Oct 1, 2021

I'm experiencing an issue where expand_chroot_path_at gets called twice per stat64, fstatat, and probably more stat functions. This only occurs with glibc 2.33 and this PR, when using fakeroot fakechroot chroot /some/dir some-command as opposed to fakechroot chroot /some/dir fakeroot some-command.
Sadly, this means it's the more common and easier to use variation of the two that breaks.

Stepping through the call, I see the following trace

#0  0x00007ffff7f995e0 in stat64 () from [...]/lib/libfakeroot.so
#1  0x00007ffff7fb8d73 in stat64 () from [...]/lib/fakechroot/libfakechroot.so

and after one step this becomes

#0  0x00007ffff7fa8f70 in __xstat64 () from [...]/lib/fakechroot/libfakechroot.so
#1  0x00007ffff7fb8d73 in stat64 () from [...]/lib/fakechroot/libfakechroot.so

which shows the problem, because both of these functions expand the chroot path, which must only happen once.
Note that glibc implements stat64 by calling __xstat64. Removing one is not an option because both need to be intercepted, but it seems that it would suffice for libfakechroot to implement its stat64 by calling its own __xstat64 directly. While duplicating a line from glibc isn't great, it's tiny and that code hasn't changed in 24 years. I don't know if it's the best idea, but it may do the job.

vt-alt pushed a commit to altlinux/specs that referenced this pull request Oct 13, 2021
- Updated to glibc-2.34-33-ga996d13b8a from 2.34 branch.

fakechroot-2.20.1-alt3

- Added glibc 2.33+ support patches from
  dex4er/fakechroot#85 (thanks to Ilya Lipnitskiy), and
  dex4er/fakechroot#86 (thanks to neok-m4700).

apitrace-10.0-alt2

- Fixed build with glibc 2.32.
gportay added a commit to gportay/linux-distros-br2-external that referenced this pull request Dec 17, 2021
@kloczek
Copy link

kloczek commented Jun 15, 2022

Any update about merge this PR? 😋

josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 24, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 25, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 25, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Aug 25, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Oct 28, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Oct 28, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
josch pushed a commit to josch/fakechroot that referenced this pull request Oct 28, 2022
dex4er#85

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fakechroot-2.20.1-7.fc34 FTBFS on Fedora rawhide
3 participants