From 7c423cb1a89d2076a33ed66075eb559bad96fb5d Mon Sep 17 00:00:00 2001 From: kzak Date: Fri, 6 Apr 2007 10:57:45 +0000 Subject: [PATCH] - fix #150493 - hwclock --systohc sets clock 0.5 seconds slow - fix #220873 - starting RPC idmapd: Error: RPC MTAB does not exist. (added rpc_pipefs to util-linux-2.13-umount-sysfs.patch) - fix #227903 - mount -f does not work with NFS-mounted --- util-linux-2.13-hwclock-systohc.patch | 46 +++++++++++++++++++++++++++ util-linux-2.13-mount-fake.patch | 11 +++++++ util-linux-2.13-umount-sysfs.patch | 2 +- util-linux.spec | 15 ++++++++- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 util-linux-2.13-hwclock-systohc.patch create mode 100644 util-linux-2.13-mount-fake.patch diff --git a/util-linux-2.13-hwclock-systohc.patch b/util-linux-2.13-hwclock-systohc.patch new file mode 100644 index 0000000..d0d1eb0 --- /dev/null +++ b/util-linux-2.13-hwclock-systohc.patch @@ -0,0 +1,46 @@ +commit 99c392d8ba163e35b9d562dd4bcf7dd476ad3573 +Author: Karel Zak +Date: Tue Mar 20 00:32:37 2007 +0100 + + hwclock: fix --systohc sets clock 0.5 seconds slow + + quote from rh150493: + + The kernel code, when setting the BIOS clock notes that the clock time + ticks to the next second 0.5 seconds after adjusting it (see + linux/arch/i386/kernel/time.c). + + hwclock --systohc sets the CMOS clock at the 1 second boundry and thus + causes the clock to be wrong by 500ms each time it is reset. If the + clock is set every shutdown then the clock will have a reboot-count + related drift as well as the natural drift problems of the clock. Note + that this also mucks up the drift calculations, of course. + + Signed-off-by: Karel Zak + +diff --git a/hwclock/hwclock.c b/hwclock/hwclock.c +index 9731dad..820c388 100644 +--- a/hwclock/hwclock.c ++++ b/hwclock/hwclock.c +@@ -517,14 +517,19 @@ set_hardware_clock_exact(const time_t sethwtime, + "Delaying further to reach the next full second.\n"), + time_diff(beginsystime, refsystime)); + +- /* Now delay some more until Hardware Clock time newhwtime arrives */ ++ /* ++ * Now delay some more until Hardware Clock time newhwtime arrives. The -500 ++ * ms is because the Hardware Clock always sets to your set time plus 500 ms ++ * (because it is designed to update to the next second precisely 500 ms ++ * after you finish the setting). ++ */ + do { + float tdiff; + gettimeofday(&nowsystime, NULL); + tdiff = time_diff(nowsystime, beginsystime); + if (tdiff < 0) + goto time_resync; /* probably time was reset */ +- } while (time_diff(nowsystime, refsystime) < newhwtime - sethwtime); ++ } while (time_diff(nowsystime, refsystime) - 0.5 < newhwtime - sethwtime); + + set_hardware_clock(newhwtime, universal, testing); + } diff --git a/util-linux-2.13-mount-fake.patch b/util-linux-2.13-mount-fake.patch new file mode 100644 index 0000000..627b1e2 --- /dev/null +++ b/util-linux-2.13-mount-fake.patch @@ -0,0 +1,11 @@ +--- util-linux-2.13-pre7/mount/mount.c.kzak 2007-02-09 12:54:20.000000000 +0100 ++++ util-linux-2.13-pre7/mount/mount.c 2007-02-09 12:54:14.000000000 +0100 +@@ -602,6 +602,8 @@ + mountargs[i++] = node; + if (sloppy && (strcmp(type, "nfs")==0 || strcmp(type, "nfs4")==0)) + mountargs[i++] = "-s"; ++ if (fake) ++ mountargs[i++] = "-f"; + if (nomtab) + mountargs[i++] = "-n"; + if (verbose) diff --git a/util-linux-2.13-umount-sysfs.patch b/util-linux-2.13-umount-sysfs.patch index 0d2d9f0..5d92a9c 100644 --- a/util-linux-2.13-umount-sysfs.patch +++ b/util-linux-2.13-umount-sysfs.patch @@ -5,7 +5,7 @@ /* nodev stuff: sysfs, usbfs, oprofilefs, ... */ if (types == NULL) - types = "noproc,nodevfs,nodevpts"; -+ types = "noproc,nodevfs,nodevpts,nosysfs"; ++ types = "noproc,nodevfs,nodevpts,nosysfs,rpc_pipefs"; result = umount_all (types, test_opts); } else if (argc < 1) { usage (stderr, 2); diff --git a/util-linux.spec b/util-linux.spec index a3e0f92..e3500e6 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -9,7 +9,7 @@ Summary: A collection of basic system utilities. Name: util-linux Version: 2.13 -Release: 0.50%{?dist} +Release: 0.51%{?dist} License: distributable Group: System Environment/Base @@ -243,6 +243,11 @@ Patch260: util-linux-2.13-more-CLOEXEC.patch Patch261: util-linux-2.13-namei-logic.patch # 222293 - undocumented partx,addpart, delpart Patch262: util-linux-2.13-partx-man.patch +# 150493 - hwclock --systohc sets clock 0.5 seconds slow +Patch263: util-linux-2.13-hwclock-systohc.patch +# 227903 - mount -f does not work with NFS-mounted +Patch264: util-linux-2.13-mount-fake.patch + # When adding patches, please make sure that it is easy to find out what bug # the # patch fixes. @@ -344,6 +349,8 @@ cp %{SOURCE8} %{SOURCE9} . %patch260 -p1 %patch261 -p1 %patch262 -p1 +%patch263 -p1 +%patch264 -p1 %build unset LINGUAS || : @@ -757,6 +764,12 @@ exit 0 /sbin/losetup %changelog +* Fri Apr 6 2007 Karel Zak 2.13-0.51 +- fix #150493 - hwclock --systohc sets clock 0.5 seconds slow +- fix #220873 - starting RPC idmapd: Error: RPC MTAB does not exist. + (added rpc_pipefs to util-linux-2.13-umount-sysfs.patch) +- fix #227903 - mount -f does not work with NFS-mounted + * Sat Mar 3 2007 David Zeuthen 2.13-0.50 - include ConsoleKit session module by default (#229172)