diff --git a/.gitignore b/.gitignore index 3e7f767..e27a90a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /util-linux-2.20.1.tar.bz2 /util-linux-2.21-rc2.tar.xz /util-linux-2.21.tar.xz +/util-linux-2.21.1.tar.xz diff --git a/sources b/sources index 75b605a..d4c2bff 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2 -208aa058f4117759d2939d1be7d662fc util-linux-2.21.tar.xz +ad602dcd528f340b1329cfa6200d8f80 util-linux-2.21.1.tar.xz diff --git a/util-linux-2.21-canonicalize-slash.patch b/util-linux-2.21-canonicalize-slash.patch deleted file mode 100644 index c14e0d0..0000000 --- a/util-linux-2.21-canonicalize-slash.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 28074a0952469aebf021821d95238cfb964d13ff Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 24 Feb 2012 21:26:11 +0100 -Subject: [PATCH] lib/canonicalize: always remove tailing slash - -Signed-off-by: Karel Zak ---- - lib/canonicalize.c | 13 ++++++++++--- - 1 files changed, 10 insertions(+), 3 deletions(-) - -diff --git a/lib/canonicalize.c b/lib/canonicalize.c -index ab32c10..fd18af4 100644 ---- a/lib/canonicalize.c -+++ b/lib/canonicalize.c -@@ -174,9 +174,16 @@ canonicalize_path(const char *path) - if (path == NULL) - return NULL; - -- if (!myrealpath(path, canonical, PATH_MAX+1)) -- return strdup(path); -- -+ if (!myrealpath(path, canonical, PATH_MAX+1)) { -+ char *res = strdup(path); -+ if (res) { -+ p = strrchr(res, '/'); -+ /* delete trailing slash */ -+ if (p && p > res && *(p + 1) == '\0') -+ *p = '\0'; -+ } -+ return res; -+ } - - p = strrchr(canonical, '/'); - if (p && strncmp(p, "/dm-", 4) == 0 && isdigit(*(p + 4))) { --- -1.7.7.6 - diff --git a/util-linux-2.21-libmount-NFS.patch b/util-linux-2.21-libmount-NFS.patch deleted file mode 100644 index 346f7aa..0000000 --- a/util-linux-2.21-libmount-NFS.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 9bf9690114b7432144caf815e149e35640bc3ad0 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Mon, 27 Feb 2012 16:43:12 +0100 -Subject: [PATCH] libmount: use mount. -s for NFS only - -Unfortunately, it seems that for example mount.cifs don't care about -the API, so we need exception like the original mount(8). - -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index 8cbc25b..a0c5951 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -369,7 +369,12 @@ static int exec_helper(struct libmnt_context *cxt) - args[i++] = mnt_fs_get_srcpath(cxt->fs);/* 2 */ - args[i++] = mnt_fs_get_target(cxt->fs); /* 3 */ - -- if (mnt_context_is_sloppy(cxt)) -+ /* -+ * TODO: remove the exception for "nfs", -s is documented -+ * for years should be usable everywhere. -+ */ -+ if (mnt_context_is_sloppy(cxt) && -+ type && startswith(type, "nfs")) - args[i++] = "-s"; /* 4 */ - if (mnt_context_is_fake(cxt)) - args[i++] = "-f"; /* 5 */ --- -1.7.7.6 - diff --git a/util-linux-2.21-libmount-empty.patch b/util-linux-2.21-libmount-empty.patch deleted file mode 100644 index 6b0d41d..0000000 --- a/util-linux-2.21-libmount-empty.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 772cce373f693096c2ae6f156306acf9e20c09e8 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 28 Feb 2012 00:02:30 +0100 -Subject: [PATCH] libmount: allow empty source for mount(2) syscall - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797438 -Signed-off-by: Karel Zak ---- - libmount/src/context_mount.c | 4 +++- - sys-utils/mount.c | 6 +++++- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c -index a0c5951..098243b 100644 ---- a/libmount/src/context_mount.c -+++ b/libmount/src/context_mount.c -@@ -451,8 +451,10 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type) - src = mnt_fs_get_srcpath(cxt->fs); - target = mnt_fs_get_target(cxt->fs); - -- if (!src || !target) -+ if (!target) - return -EINVAL; -+ if (!src) -+ src = "none"; - - type = try_type ? : mnt_fs_get_fstype(cxt->fs); - -diff --git a/sys-utils/mount.c b/sys-utils/mount.c -index 3fbac04..23abc91 100644 ---- a/sys-utils/mount.c -+++ b/sys-utils/mount.c -@@ -347,7 +347,11 @@ try_readonly: - return MOUNT_EX_USAGE; - } - -- if (src == NULL || tgt == NULL) { -+ /* -+ * TODO: add mnt_context_fstab_applied() to check if we found -+ * target/source in the file. -+ */ -+ if (!tgt) { - if (mflags & MS_REMOUNT) - warnx(_("%s not mounted"), src ? src : tgt); - else --- -1.7.7.6 - diff --git a/util-linux-2.21-libmount-fstab.patch b/util-linux-2.21-libmount-fstab.patch deleted file mode 100644 index 05870da..0000000 --- a/util-linux-2.21-libmount-fstab.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 59e32a1f240c5f6a1d64d5e71a4a357245c34eaf Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 24 Feb 2012 20:25:43 +0100 -Subject: [PATCH] libmount: canonicalize all paths from (fs)tab - -Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797216 -Signed-off-by: Karel Zak ---- - libmount/src/tab.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/libmount/src/tab.c b/libmount/src/tab.c -index 37f47bd..f10c1de 100644 ---- a/libmount/src/tab.c -+++ b/libmount/src/tab.c -@@ -456,7 +456,7 @@ struct libmnt_fs *mnt_table_find_target(struct libmnt_table *tb, const char *pat - while(mnt_table_next_fs(tb, &itr, &fs) == 0) { - char *p; - -- if (!fs->target || !mnt_fs_is_swaparea(fs) || -+ if (!fs->target || mnt_fs_is_swaparea(fs) || - (*fs->target == '/' && *(fs->target + 1) == '\0')) - continue; - --- -1.7.7.6 - diff --git a/util-linux-2.21-mount-a.patch b/util-linux-2.21-mount-a.patch deleted file mode 100644 index 103d59b..0000000 --- a/util-linux-2.21-mount-a.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 6eba938376c2c870d9258ef9d7b6a3690cfa78dd Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Fri, 24 Feb 2012 22:52:45 +0100 -Subject: [PATCH] libmount: canonicalize targets from fstab on mount -a - -Signed-off-by: Karel Zak ---- - libmount/src/tab.c | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/libmount/src/tab.c b/libmount/src/tab.c -index 66a9e4d..21b05c7 100644 ---- a/libmount/src/tab.c -+++ b/libmount/src/tab.c -@@ -830,8 +830,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) - { - char *root = NULL; - struct libmnt_fs *src_fs; -- const char *src, *tgt; -- char *xsrc = NULL; -+ const char *src; -+ char *xsrc = NULL, *tgt; - int flags = 0, rc = 0; - - assert(tb); -@@ -852,7 +852,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) - src = xsrc = mnt_resolve_spec(mnt_fs_get_source(fstab_fs), - tb->cache); - -- tgt = mnt_fs_get_target(fstab_fs); -+ tgt = mnt_resolve_path(mnt_fs_get_target(fstab_fs), tb->cache); - - if (tgt && src && root) { - struct libmnt_iter itr; -@@ -870,7 +870,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) - * network filesystem source paths. - */ - if (t && s && r && -- strcmp(t, tgt) == 0 && -+ streq_except_trailing_slash(t, tgt) && - streq_except_trailing_slash(s, src) && - strcmp(r, root) == 0) - break; -@@ -881,6 +881,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs) - - if (xsrc && !tb->cache) - free(xsrc); -+ if (!tb->cache) -+ free(tgt); - - free(root); - return rc; --- -1.7.7.6 - diff --git a/util-linux.spec b/util-linux.spec index cc43da2..38d6bca 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,8 +1,8 @@ ### Header Summary: A collection of basic system utilities Name: util-linux -Version: 2.21 -Release: 2%{?dist} +Version: 2.21.1 +Release: 1%{?dist} License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://kernel.org/~kzak/util-linux/ @@ -77,16 +77,6 @@ Patch3: util-linux-ng-2.21-login-lastlog.patch # 231192 - ipcs is not printing correct values on pLinux Patch4: util-linux-2.21-ipcs-32bit.patch -# 797216 - f17 cannot mount filesystem at boot time systemd refuses -Patch5: util-linux-2.21-libmount-fstab.patch -Patch6: util-linux-2.21-canonicalize-slash.patch - -Patch7: util-linux-2.21-mount-a.patch -Patch8: util-linux-2.21-libmount-NFS.patch -# 797438 - systemd always fails systemd-remount-api-vfs.service -Patch9: util-linux-2.21-libmount-empty.patch - - %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among @@ -202,11 +192,6 @@ cp %{SOURCE8} %{SOURCE9} . %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 %build unset LINGUAS || : @@ -722,6 +707,9 @@ fi %changelog +* Fri Mar 30 2012 Karel Zak 2.21.1-1 +- upgrade to bugfix release 2.21.1 + * Thu Mar 01 2012 Michal Luscon 2.21-2 - fix #797216 - cannot mount filesystem at boot time systemd refuses - fix #797438 - systemd always fails systemd-remount-api-vfs.service