Skip to content

gh-101857: Allow xattr detection on musl libc #101858

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

Merged
merged 3 commits into from
Feb 14, 2023
Merged

Conversation

thesamesam
Copy link
Contributor

@thesamesam thesamesam commented Feb 12, 2023

Previously, we checked exclusively for GLIBC (AND'd with some other conditions). Checking for linux instead should be fine.

This fixes using e.g. os.listxattr() on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

Previously, we checked exclusively for __GLIBC__ (AND'd with some other
conditions). Checking for __linux__ instead should be fine.

This fixes using e.g. os.listxattr() on systems using musl libc.

Bug: https://bugs.gentoo.org/894130
@arhadthedev arhadthedev added the extension-modules C modules in the Modules dir label Feb 13, 2023
@arhadthedev
Copy link
Member

@gpshead (as the posixmodule expert)

Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall: Makes sense to me, and a quick search seems to suggest that Android's libc (aka Bionic) includes xattr support.

we can adjust more in the future if anything needs it.

@gpshead gpshead self-assigned this Feb 13, 2023
for future reference w/o digging up this PR comment thread.
@gpshead gpshead added the needs backport to 3.11 only security fixes label Feb 14, 2023
@gpshead gpshead merged commit 8be8101 into python:main Feb 14, 2023
@miss-islington
Copy link
Contributor

Thanks @thesamesam for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-101894 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Feb 14, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 14, 2023
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

(cherry picked from commit 8be8101)

Co-authored-by: Sam James <[email protected]>
Co-authored-by: Gregory P. Smith <[email protected]>
@thesamesam
Copy link
Contributor Author

Thanks for the rapid review & merge!

@thesamesam thesamesam deleted the musl-xattr branch February 14, 2023 07:40
gpshead added a commit that referenced this pull request May 21, 2023
…1894)

gh-101857: Allow xattr detection on musl libc (GH-101858)

Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

(cherry picked from commit 8be8101)

Co-authored-by: Sam James <[email protected]>
Co-authored-by: Gregory P. Smith <[email protected]>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request May 21, 2024
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

Co-authored-by: Gregory P. Smith <[email protected]>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request May 21, 2024
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

Co-authored-by: Gregory P. Smith <[email protected]>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

Co-authored-by: Gregory P. Smith <[email protected]>
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Sep 19, 2024
Previously, we checked exclusively for `__GLIBC__` (AND'd with some other
conditions). Checking for `__linux__` instead should be fine.

This fixes using e.g. `os.listxattr()` on systems using musl libc.

Bug: https://bugs.gentoo.org/894130

Co-authored-by: Gregory P. Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants