util-linux: fix mount(8) helpers arg order with musl.
Before this patch mount(8) would execute something like: /sbin/mount.helper src dest <opts> After this patch: /sbin/mount.helper <opts> src dest The reason is that musl does not reorder args to check for options, so that options must appear before real arguments to make this work. This makes zfs work correctly on musl. Thanks to @chneukirchen for help in finding the issue.
This commit is contained in:
parent
15ca8ce032
commit
195aaf0811
|
@ -11,3 +11,43 @@ Fixes rendering issue with chsh
|
|||
if (sz == -1)
|
||||
return NULL;
|
||||
|
||||
--- libmount/src/context_mount.c.orig 2016-01-12 17:33:25.902659537 +0100
|
||||
+++ libmount/src/context_mount.c 2016-01-12 17:34:31.198503965 +0100
|
||||
@@ -605,27 +605,27 @@ static int exec_helper(struct libmnt_con
|
||||
type = mnt_fs_get_fstype(cxt->fs);
|
||||
|
||||
args[i++] = cxt->helper; /* 1 */
|
||||
- args[i++] = mnt_fs_get_srcpath(cxt->fs);/* 2 */
|
||||
- args[i++] = mnt_fs_get_target(cxt->fs); /* 3 */
|
||||
|
||||
if (mnt_context_is_sloppy(cxt))
|
||||
- args[i++] = "-s"; /* 4 */
|
||||
+ args[i++] = "-s"; /* 2 */
|
||||
if (mnt_context_is_fake(cxt))
|
||||
- args[i++] = "-f"; /* 5 */
|
||||
+ args[i++] = "-f"; /* 3 */
|
||||
if (mnt_context_is_nomtab(cxt))
|
||||
- args[i++] = "-n"; /* 6 */
|
||||
+ args[i++] = "-n"; /* 4 */
|
||||
if (mnt_context_is_verbose(cxt))
|
||||
- args[i++] = "-v"; /* 7 */
|
||||
+ args[i++] = "-v"; /* 5 */
|
||||
if (o) {
|
||||
- args[i++] = "-o"; /* 8 */
|
||||
- args[i++] = o; /* 9 */
|
||||
+ args[i++] = "-o"; /* 6 */
|
||||
+ args[i++] = o; /* 7 */
|
||||
}
|
||||
if (type
|
||||
&& strchr(type, '.')
|
||||
&& !endswith(cxt->helper, type)) {
|
||||
- args[i++] = "-t"; /* 10 */
|
||||
- args[i++] = type; /* 11 */
|
||||
+ args[i++] = "-t"; /* 8 */
|
||||
+ args[i++] = type; /* 9 */
|
||||
}
|
||||
+ args[i++] = mnt_fs_get_srcpath(cxt->fs);/* 10 */
|
||||
+ args[i++] = mnt_fs_get_target(cxt->fs); /* 11 */
|
||||
args[i] = NULL; /* 12 */
|
||||
for (i = 0; args[i]; i++)
|
||||
DBG(CXT, ul_debugobj(cxt, "argv[%d] = \"%s\"",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'util-linux'
|
||||
pkgname=util-linux
|
||||
version=2.27.1
|
||||
revision=2
|
||||
revision=3
|
||||
short_desc="Miscellaneous linux utilities"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
|
||||
|
|
Loading…
Reference in New Issue