Compare commits

...

7 Commits
rawhide ... f17

Author SHA1 Message Date
Karel Zak 8027d4fd80 2.21.2-3: #885314 #864227
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-03 17:38:16 +01:00
Kyle McMartin fa5b149b5d _default_patch_flags is undefined in f18, makes it impossible to prep tree 2013-01-30 17:17:27 -05:00
Karel Zak dfde8dec4c 2.21.2-3: #873983 #875461
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-16 12:32:02 +01:00
Karel Zak caa3318d49 2.21.2-2: fix uuidd start, and mount -s
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-19 11:46:21 +02:00
Karel Zak 2093f601bb 2.21.2-1: upgrade to bugfix release 2.21.1
- fix #814699 - namei(1) incorrectly resolves relative symlinks
- fix #820707 - Impossible to unmount nfsv4/krb5 mounts after network disconnect
- fix #816877 - libmount does not close device fd before mount(2)
- fix #822705 - unable to login after installing

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-25 13:27:38 +02:00
Karel Zak 1fbd38ec35 2.21.1-1: upgrade to stable release
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 13:59:27 +02:00
Michal Luscon 20d9cb6488 2.21-2: fix #797216
fix #797438
	canonicalize targets from fstab
	use mount.<type> -s for NFS only

Signed-off-by: Michal Luscon <mluscon@redhat.com>
2012-03-01 16:04:52 +01:00
10 changed files with 294 additions and 10 deletions

2
.gitignore vendored
View File

@ -16,3 +16,5 @@
/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
/util-linux-2.21.2.tar.xz

View File

@ -0,0 +1,30 @@
diff --git a/text-utils/parse.c b/text-utils/parse.c
index 5f1e2bd..bd96961 100644
--- a/text-utils/parse.c
+++ b/text-utils/parse.c
@@ -421,13 +421,15 @@ isint2: switch(fu->bcnt) {
!(fu->flags&F_SETREP) && fu->bcnt)
fu->reps += (blocksize - fs->bcnt) / fu->bcnt;
if (fu->reps > 1) {
- for (pr = fu->nextpr;; pr = pr->nextpr)
- if (!pr->nextpr)
- break;
- for (p1 = pr->fmt, p2 = NULL; *p1; ++p1)
- p2 = isspace((unsigned char)*p1) ? p1 : NULL;
- if (p2)
- pr->nospace = p2;
+ if (fu->nextpr) {
+ for (pr = fu->nextpr; ; pr = pr->nextpr)
+ if (!pr->nextpr)
+ break;
+ for (p1 = pr->fmt, p2 = NULL; *p1; ++p1)
+ p2 = isspace((unsigned char)*p1) ? p1 : NULL;
+ if (p2)
+ pr->nospace = p2;
+ }
}
}
}
--
1.8.1

View File

@ -0,0 +1,81 @@
diff -up util-linux-2.21.2/sys-utils/mount.c.orig util-linux-2.21.2/sys-utils/mount.c
--- util-linux-2.21.2/sys-utils/mount.c.orig 2013-02-03 17:33:05.248888432 +0100
+++ util-linux-2.21.2/sys-utils/mount.c 2013-02-03 17:34:31.856571865 +0100
@@ -238,6 +238,29 @@ static int mount_all(struct libmnt_conte
return rc;
}
+static void success_message(struct libmnt_context *cxt)
+{
+ unsigned long mflags = 0;
+ const char *tgt, *src;
+
+ if (mnt_context_helper_executed(cxt)
+ || mnt_context_get_status(cxt) != 1)
+ return;
+
+ mnt_context_get_mflags(cxt, &mflags);
+ tgt = mnt_context_get_target(cxt);
+ src = mnt_context_get_source(cxt);
+
+ if (mflags & MS_MOVE)
+ warnx(_("%s moved to %s"), src, tgt);
+ else if (mflags & MS_BIND)
+ warnx(_("%s binded on %s"), src, tgt);
+ else if (mflags & MS_PROPAGATION)
+ warnx(_("%s propagation flags changed"), tgt);
+ else
+ warnx(_("%s mounted on %s"), src, tgt);
+}
+
/*
* Handles generic errors like ENOMEM, ...
*
@@ -913,6 +936,8 @@ int main(int argc, char **argv)
rc = mnt_context_mount(cxt);
rc = mk_exit_code(cxt, rc);
+ if (rc == MOUNT_EX_SUCCESS && mnt_context_is_verbose(cxt))
+ success_message(cxt);
done:
free(srcbuf);
mnt_free_context(cxt);
diff -up util-linux-2.21.2/sys-utils/umount.c.orig util-linux-2.21.2/sys-utils/umount.c
--- util-linux-2.21.2/sys-utils/umount.c.orig 2012-05-25 11:44:59.043195664 +0200
+++ util-linux-2.21.2/sys-utils/umount.c 2013-02-03 17:33:05.266888574 +0100
@@ -119,6 +119,25 @@ static void __attribute__((__noreturn__)
errx(MOUNT_EX_USAGE, _("only root can do that"));
}
+static void success_message(struct libmnt_context *cxt)
+{
+ const char *tgt, *src;
+
+ if (mnt_context_helper_executed(cxt)
+ || mnt_context_get_status(cxt) != 1)
+ return;
+
+ tgt = mnt_context_get_target(cxt);
+ if (!tgt)
+ return;
+
+ src = mnt_context_get_source(cxt);
+ if (src)
+ warnx(_("%s (%s) unmounted"), tgt, src);
+ else
+ warnx(_("%s unmounted"), tgt);
+}
+
/*
* Handles generic errors like ENOMEM, ...
*
@@ -273,6 +292,9 @@ static int umount_one(struct libmnt_cont
rc = mnt_context_umount(cxt);
rc = mk_exit_code(cxt, rc);
+ if (rc == MOUNT_EX_SUCCESS && mnt_context_is_verbose(cxt))
+ success_message(cxt);
+
mnt_reset_context(cxt);
return rc;
}

View File

@ -1,2 +1,2 @@
10d940dec87902bff7e6f9f2adcd0236 util-linux-2.21.2.tar.xz
a02aac97c74259ca1b24972c89147ca4 floppy-0.18.tar.bz2
208aa058f4117759d2939d1be7d662fc util-linux-2.21.tar.xz

View File

@ -0,0 +1,36 @@
diff -up util-linux-2.21.2/sys-utils/lscpu.c.kzak util-linux-2.21.2/sys-utils/lscpu.c
--- util-linux-2.21.2/sys-utils/lscpu.c.kzak 2012-05-25 11:44:59.041195655 +0200
+++ util-linux-2.21.2/sys-utils/lscpu.c 2012-11-16 11:50:59.350150439 +0100
@@ -605,16 +605,26 @@ read_topology(struct lscpu_desc *desc, i
/* threads within one core */
nthreads = CPU_COUNT_S(setsize, thread_siblings);
+ if (!nthreads)
+ nthreads = 1;
+
/* cores within one socket */
ncores = CPU_COUNT_S(setsize, core_siblings) / nthreads;
- /* number of sockets within one book.
- * Because of odd / non-present cpu maps and to keep
- * calculation easy we make sure that nsockets and
- * nbooks is at least 1.
+ if (!ncores)
+ ncores = 1;
+
+ /* number of sockets within one book. Because of odd /
+ * non-present cpu maps and to keep calculation easy we make
+ * sure that nsockets and nbooks is at least 1.
*/
- nsockets = desc->ncpus / nthreads / ncores ?: 1;
+ nsockets = desc->ncpus / nthreads / ncores;
+ if (!nsockets)
+ nsockets = 1;
+
/* number of books */
- nbooks = desc->ncpus / nthreads / ncores / nsockets ?: 1;
+ nbooks = desc->ncpus / nthreads / ncores / nsockets;
+ if (!nbooks)
+ nbooks = 1;
/* all threads, see also read_basicinfo()
* -- fallback for kernels without

View File

@ -0,0 +1,36 @@
From 5e7b834002aa0ce97a1b0104e8710664ad954595 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Sun, 3 Jun 2012 12:25:47 -0400
Subject: [PATCH] libmount: trim leading commas from each options string
Fixes a bug in option string parsing wherein a line such as:
ro,relatime,,nosuid,nodev
Will be seen as only the tokens "ro" and "relatime" after the parser
encounters a zero length (and erroneously declared NULL) option.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
libmount/src/optstr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
index af5953b..66d2a06 100644
--- a/libmount/src/optstr.c
+++ b/libmount/src/optstr.c
@@ -62,6 +62,11 @@ static int mnt_optstr_parse_next(char **optstr, char **name, size_t *namesz,
if (valsz)
*valsz = 0;
+ /* trim leading commas as to not invalidate option
+ * strings with multiple consecutive commas */
+ while (optstr0 && *optstr0 == ',')
+ optstr0++;
+
for (p = optstr0; p && *p; p++) {
if (!start)
start = p; /* begin of the option item */
--
1.7.11.7

View File

@ -0,0 +1,27 @@
From e26de525e21677c680d87f63e4dafbe4859365bf Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 14 Jun 2012 14:43:21 +0200
Subject: [PATCH] mount: (new) allow sloppy for non-root
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=825836
Signed-off-by: Karel Zak <kzak@redhat.com>
---
sys-utils/mount.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 2b8843c..9cc2db3 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -731,7 +731,7 @@ int main(int argc, char **argv)
longopts, NULL)) != -1) {
/* only few options are allowed for non-root users */
- if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpri", c))
+ if (mnt_context_is_restricted(cxt) && !strchr("hlLUVvpris", c))
exit_non_root(option_to_longopt(c, longopts));
switch(c) {
--
1.7.7.6

View File

@ -0,0 +1,26 @@
From 1425948c8ceaf128c9cfcf4db680be4144f89314 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 18 Jun 2012 15:46:20 +0200
Subject: [PATCH] uuidd: move from /var/run/uuidd to /run/uuidd
Signed-off-by: Karel Zak <kzak@redhat.com>
---
libuuid/src/uuidd.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libuuid/src/uuidd.h b/libuuid/src/uuidd.h
index 27b79c2..ff7e6d7 100644
--- a/libuuid/src/uuidd.h
+++ b/libuuid/src/uuidd.h
@@ -35,7 +35,7 @@
#ifndef _UUID_UUIDD_H
#define _UUID_UUIDD_H
-#define UUIDD_DIR "/var/run/uuidd"
+#define UUIDD_DIR "/run/uuidd"
#define UUIDD_SOCKET_PATH UUIDD_DIR "/request"
#define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid"
#define UUIDD_PATH "/usr/sbin/uuidd"
--
1.7.7.6

View File

@ -1,8 +1,8 @@
### Header
Summary: A collection of basic system utilities
Name: util-linux
Version: 2.21
Release: 1%{?dist}
Version: 2.21.2
Release: 4%{?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/
@ -34,6 +34,7 @@ Source8: nologin.c
Source9: nologin.8
Source10: uuidd.init
Source11: http://downloads.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2
Source12: uuidd.tmpfiles
### Obsoletes & Conflicts & Provides
# old versions of e2fsprogs contain fsck, uuidgen
@ -77,6 +78,21 @@ 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
### Upstream patches
### 825836 - Problems with automount map using quota
Patch5: util-linux-2.21-mount-sloppy.patch
# 826122 - uuidd fails to start
Patch6: util-linux-2.21-uuidd-rundir.patch
# 873983 - mount: /dev/mapper/myvg-usrlv is already mounted or /usr busy
Patch7: util-linux-2.21-mount-commas.patch
# 875461 - read_topology: Process /usr/bin/lscpu was killed by signal 8 (SIGFPE)
Patch8: util-linux-2.21-lscpu-SIGFPE.patch
# 885314 - hexdump segfault
Patch9: hexdump-do-not-segfault-when-iterating-over-an-empty.patch
# 864227 - mount option -v or --verbose does not work
Patch10: mount-add-verbose-messages.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
@ -187,11 +203,9 @@ SMP systems.
%setup -q -a 11 -n %{name}-%{upstream_version}
cp %{SOURCE8} %{SOURCE9} .
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
for p in %{patches}; do
%{__patch} -p1 -F%{_default_patch_fuzz} -s -i "$p"
done
%build
unset LINGUAS || :
@ -264,8 +278,10 @@ mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw
# Our own initscript for uuidd
install -D -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/uuidd
# And a dirs uuidd needs that the makefiles don't create
install -d ${RPM_BUILD_ROOT}/var/run/uuidd
install -d ${RPM_BUILD_ROOT}/run/uuidd
install -d ${RPM_BUILD_ROOT}/var/lib/libuuid
install -d ${RPM_BUILD_ROOT}/etc/tmpfiles.d
install -m 0644 %{SOURCE12} ${RPM_BUILD_ROOT}/etc/tmpfiles.d/uuidd.conf
# libtool junk
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la
@ -651,7 +667,8 @@ fi
%{_mandir}/man8/uuidd.8*
%attr(-, uuidd, uuidd) %{_sbindir}/uuidd
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
%dir %attr(2775, uuidd, uuidd) /var/run/uuidd
%dir %attr(0710, uuidd, uuidd) /run/uuidd
%config(noreplace) %{_sysconfdir}/tmpfiles.d/uuidd.conf
%files -n libmount
@ -707,6 +724,34 @@ fi
%changelog
* Sun Feb 3 2013 Karel Zak <kzak@redhat.com> 2.21.2-4
- fix #885314 - hexdump segfault
- fix #864227 - mount option -v or --verbose does not work
* Fri Nov 16 2012 Karel Zak <kzak@redhat.com> 2.21.2-3
- fix #873983 - mount: /dev/mapper/myvg-usrlv is already mounted or /usr busy
- fix #875461 - read_topology: Process /usr/bin/lscpu was killed by signal 8 (SIGFPE)
* Mon Jun 18 2012 Karel Zak <kzak@redhat.com> 2.21.2-2
- fix #825836 - Problems with automount map using quota
- fix #826122 - uuidd fails to start
* Fri May 25 2012 Karel Zak <kzak@redhat.com> 2.21.2-1
- upgrade to bugfix release 2.21.1
- fix #814699 - namei(1) incorrectly resolves relative symlinks
- fix #820707 - Impossible to unmount nfsv4/krb5 mounts after network disconnect
- fix #816877 - libmount does not close device fd before mount(2)
- fix #822705 - unable to login after installing
* Fri Mar 30 2012 Karel Zak <kzak@redhat.com> 2.21.1-1
- upgrade to bugfix release 2.21.1
* Thu Mar 01 2012 Michal Luscon <mluscon@redhat.com> 2.21-2
- fix #797216 - cannot mount filesystem at boot time systemd refuses
- fix #797438 - systemd always fails systemd-remount-api-vfs.service
- canonicalize targets from fstab on mount -a
- use mount.<type> -s for NFS only
* Fri Feb 24 2012 Karel Zak <kzak@redhat.com> 2.21-1
- upgrade to release 2.21

1
uuidd.tmpfiles Normal file
View File

@ -0,0 +1 @@
d /run/uuidd 0710 uuidd uuidd -