diff --git a/util-linux-2.19-rc1-loop-offset.diff b/util-linux-2.19-rc1-loop-offset.diff new file mode 100644 index 0000000..389f5fa --- /dev/null +++ b/util-linux-2.19-rc1-loop-offset.diff @@ -0,0 +1,42 @@ +From e31694761ca0165bda8a4b8f4b3bdbac548ba464 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Fri, 21 Jan 2011 11:56:52 +0100 +Subject: [PATCH] fix parsing offset= followed by more options + +Signed-off-by: Ludwig Nussel +--- + mount/mount.c | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +Index: util-linux-2.19-rc1/mount/mount.c +=================================================================== +--- util-linux-2.19-rc1.orig/mount/mount.c ++++ util-linux-2.19-rc1/mount/mount.c +@@ -2044,12 +2044,21 @@ is_fstab_entry_mounted(struct mntentchn + char *p = strstr(mc->m.mnt_opts, "offset="); + uintmax_t offset = 0; + +- if (p && strtosize(p + 7, &offset) != 0) { +- if (verbose) +- printf(_("mount: ignore %s " +- "(unparsable offset= option)\n"), +- mc->m.mnt_fsname); +- return -1; ++ if (p) { ++ char buf[128]; ++ buf[0] = 0; ++ strncat(buf, p+7, sizeof(buf)-1); ++ ++ if (p = strchr(buf, ',')) ++ *p = '\0'; ++ ++ if (strtosize(buf, &offset) != 0) { ++ if (verbose) ++ printf(_("mount: ignore %s " ++ "(unparsable offset= option)\n"), ++ mc->m.mnt_fsname); ++ return -1; ++ } + } + if (is_mounted_same_loopfile(mc->m.mnt_dir, mc->m.mnt_fsname, offset)) + goto yes; diff --git a/util-linux.changes b/util-linux.changes index a754555..3388335 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Jan 25 09:29:15 UTC 2011 - lnussel@suse.de + +- don't mess with /etc/mtab in %post. aaa_base does that for us + already. + +------------------------------------------------------------------- +Fri Jan 21 12:34:35 UTC 2011 - lnussel@suse.de + +- fix parsing offset= followed by more options (bnc#666150) + ------------------------------------------------------------------- Tue Jan 18 09:47:11 UTC 2011 - bwiedemann@novell.com diff --git a/util-linux.spec b/util-linux.spec index 3bbf709..7a9b0a1 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -83,6 +83,8 @@ Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch # crypto patch Patch3: util-linux-2.17.1-mount_losetup_crypto.patch Patch4: util-linux-2.17.1-losetup-honor-documented-c-option +# +Patch5: util-linux-2.19-rc1-loop-offset.diff ## ## adjtimex ## @@ -184,6 +186,7 @@ Files to develop applications using the libmount library. %patch1 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # cd adjtimex-* @@ -392,12 +395,6 @@ if [ -f etc/fstab ]; then sed -i 's:code=:codepage=:' etc/fstab fi -# if /etc/mtab is a regular file, replace it with a symlink to /proc/self/mounts -# (regular mtab is not written/cleaned-up/supported by systemd) -if [ -f /etc/mtab -o ! -e /etc/mtab ]; then - ln -sf /proc/self/mounts /etc/mtab || : -fi - %postun %install_info_delete --info-dir=%{_infodir} %{_infodir}/ipc.info.gz %install_info_delete --info-dir=%{_infodir} %{_infodir}/time.info.gz