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

libmount: exec mount helpers with posixly correct argument order #3309

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

nilfsuser5678
Copy link
Contributor

libmount: exec mount helpers with posixly correct argument order

This improves compatibility with non-gnu userspaces.

On distributions such as Chimera Linux and Void Linux Musl where the libc provides posix getopt instead of gnu getopt, mount helpers which use getopt to parse arguments will not parse options which appear after non-option arguments. In particular, mount.nilfs2 from nilfs-utils is affected by this and on such systems, mounting NILFS filesystems fails in some situations when the mount utility is from util-linux and the nilfs mount helper is present. This patch ensures mount/unmount work as expected on such systems with no negative effects or compromises for ordinary GNU/linux.

Fixes nilfs-dev/nilfs-utils#12 and chimera-linux/cports#3214

@nilfsuser5678 nilfsuser5678 changed the title Posix argument order libmount: exec mount helpers with posixly correct argument order Nov 29, 2024
This improves compatibility with non-gnu userspaces.

On systems where the libc provides posix getopt instead of gnu getopt,
mount helpers which use getopt to parse arguments will not parse
options which appear after non-option arguments. This patch ensures
mount/unmount work as expected in this situation.

mount: fix expected argument order for mount helpers in tests
@karelzak
Copy link
Collaborator

karelzak commented Dec 3, 2024

The failed rpm-build:fedora-rawhide-i386 is irrelevant (related to the lsns/filter magic).

@karelzak karelzak merged commit e39941a into util-linux:master Dec 6, 2024
32 of 33 checks passed
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.

[musl] NILFS2 root mounted read-only on Void Linux musl libc system
3 participants