Debian Bug report logs -
#443487
hwclock.sh is running too late
Reported by: "Theodore Ts'o" <tytso@mit.edu>
Date: Fri, 21 Sep 2007 17:51:03 UTC
Severity: normal
Tags: patch
Merged with 220012,
353250,
426188
Found in versions util-linux/2.12r-14, util-linux/2.12r-19, util-linux/2.12r-6
Fixed in version util-linux/2.13-7
Done: LaMont Jones <lamont@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to "Theodore Ts'o" <tytso@mit.edu>:
New Bug report received and forwarded. Copy sent to LaMont Jones <lamont@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: util-linux
Version: 2.12r-14
The priority of hwclock.sh keeps getting bounced around, and currently
it is priority 11, as of 2.12r-14 (and it still is, as of 2.13~rc3-6):
util-linux (2.12r-14) unstable; urgency=low
* Make that 11 for hwclock.sh, since we need / to be writable for the
adjfile.
It really needs to be before S10, so that the time is correct for those
people who want their CMOS clock to tick localtime, and who live east of
the GMT timezone. It was at 8, which worked, but per the problem of /
needing to be writable for adjfile:
util-linux (2.12r-13) unstable; urgency=low
* Move hwclock.sh to 8 since localtime is now a file, not a symlink.
Adds Depends: tzdata (>=2006c-2)
Closes: #342887
The real fix for this is to have hwclock.sh and hwclockfirst.sh, which
unfortunately disappeared here:
util-linux (2.12r-12) unstable; urgency=low
* drop hwclockfirst.sh, and put hwclock.sh back at 50. See #50572 and
Closes: #342887
If you read through all of the bug report for #342887 it makes it very
clear that hwclock needs to be run before S10checkroot, and that
/etc/localtime must be on the root filesystem. The reason for
hwclockfirst.sh was precisely because hwclock needs to be run to adjust
the time before / is remounted read/write.
Hence, I believe the correct answer is to restore hwclockfirst.sh, and
to make it be at run at /etc/rcS.d/S08hwclockfirst.sh.
Thanks for your consideration.
- Ted
P.S. I have my own workaround for this, which involves adding an entry
to /etc/e2fsck.conf
[options]
buggy_init_scripts = 1
which I'm going to have to do for Ubuntu, because of an intransigence
with their installer people (apparently they think users shouldn't be
bothered to set the clock correctly at install time, or be asked what
timezone they are in, so the clock might always be busted after
the install). But hopefully this is one place where Debian can be
better than Ubuntu. :-)
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to LaMont Jones <lamont@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #10 received at 443487@bugs.debian.org (full text, mbox, reply):
On Fri, Sep 21, 2007 at 01:48:43PM -0400, Theodore Ts'o wrote:
> Hence, I believe the correct answer is to restore hwclockfirst.sh, and
> to make it be at run at /etc/rcS.d/S08hwclockfirst.sh.
Feel up to testing my fix? Otherwise, I'll find a machine and get it
tested.
lamont
Tags added: pending
Request was from LaMont Jones <lamont@debian.org>
to control@bugs.debian.org.
(Fri, 21 Sep 2007 23:00:05 GMT) (full text, mbox, link).
Merged 353250 443487.
Request was from LaMont Jones <lamont@debian.org>
to control@bugs.debian.org.
(Fri, 21 Sep 2007 23:00:07 GMT) (full text, mbox, link).
Reply sent to LaMont Jones <lamont@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to "Theodore Ts'o" <tytso@mit.edu>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #23 received at 443487-close@bugs.debian.org (full text, mbox, reply):
Source: util-linux
Source-Version: 2.13-7
We believe that the bug you reported is fixed in the latest version of
util-linux, which is due to be installed in the Debian FTP archive:
bsdutils_2.13-7_i386.deb
to pool/main/u/util-linux/bsdutils_2.13-7_i386.deb
cfdisk-udeb_2.13-7_i386.udeb
to pool/main/u/util-linux/cfdisk-udeb_2.13-7_i386.udeb
fdisk-udeb_2.13-7_i386.udeb
to pool/main/u/util-linux/fdisk-udeb_2.13-7_i386.udeb
mount_2.13-7_i386.deb
to pool/main/u/util-linux/mount_2.13-7_i386.deb
util-linux-locales_2.13-7_all.deb
to pool/main/u/util-linux/util-linux-locales_2.13-7_all.deb
util-linux_2.13-7.diff.gz
to pool/main/u/util-linux/util-linux_2.13-7.diff.gz
util-linux_2.13-7.dsc
to pool/main/u/util-linux/util-linux_2.13-7.dsc
util-linux_2.13-7_i386.deb
to pool/main/u/util-linux/util-linux_2.13-7_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 443487@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
LaMont Jones <lamont@debian.org> (supplier of updated util-linux package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Fri, 21 Sep 2007 22:10:20 -0600
Source: util-linux
Binary: util-linux cfdisk-udeb fdisk-udeb util-linux-locales bsdutils mount
Architecture: all i386 source
Version: 2.13-7
Distribution: unstable
Urgency: low
Maintainer: LaMont Jones <lamont@debian.org>
Changed-By: LaMont Jones <lamont@debian.org>
Description:
bsdutils - Basic utilities from 4.4BSD-Lite
cfdisk-udeb - Partition a hard drive (cfdisk)
fdisk-udeb - Partition a hard drive (manual)
mount - Tools for mounting and manipulating filesystems
util-linux - Miscellaneous system utilities
util-linux-locales - Locales files for util-linux
Closes: 245236 295487 443466 443487
Changes:
util-linux (2.13-7) unstable; urgency=low
.
* cfdisk.8: mention slang next to curses. Closes: #295487
* util-linux.postrm: remove /etc/adjtime on purge. Closes: #245236
* hwclock: Reintroduce hwclockfirst.sh on Debian machines. Closes: #443487
* mount.preinst: chroot-check was broken. Closes: #443466
Files:
2a010b496b0d0fc9c572a1896b200f48 171625 base required util-linux_2.13-7.diff.gz
3d0ec212d4f785cd62dd8c453a1d77ee 65850 debian-installer extra fdisk-udeb_2.13-7_i386.udeb
85b0b4b9cdad0d58dd635f5222a736f5 938 base required util-linux_2.13-7.dsc
9001e9152939e2568c94c732636a4a47 1325664 utils optional util-linux-locales_2.13-7_all.deb
baf1983cc8692002e67cdccb7afcf30d 135754 admin required mount_2.13-7_i386.deb
bed3ff29c387bbc73523519b51c80aa1 89094 utils required bsdutils_2.13-7_i386.deb
e6f08a5e4e14e6411387107807781946 433248 utils required util-linux_2.13-7_i386.deb
edb33f528718f64096e1283d24c02b3e 1319202 debian-installer extra cfdisk-udeb_2.13-7_i386.udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFG9JZuzN/kmwoKyScRAmGTAJsETbECYl0m0xa4TyRDxV140++eDwCeJvHz
AeZt0SsCh1iWESKLEPmLWRc=
=OYIc
-----END PGP SIGNATURE-----
Reply sent to LaMont Jones <lamont@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Alexey Toptygin <alexeyt@freeshell.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Reply sent to LaMont Jones <lamont@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Ron Murray <rjmx@rjmx.net>:
Bug acknowledged by developer.
(full text, mbox, link).
Reply sent to LaMont Jones <lamont@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Seth Lang <sethlang@yahoo.com>:
Bug acknowledged by developer.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>.
(full text, mbox, link).
Message #43 received at 443487@bugs.debian.org (full text, mbox, reply):
On Fri, Sep 21, 2007 at 02:07:57PM -0600, LaMont Jones wrote:
> On Fri, Sep 21, 2007 at 01:48:43PM -0400, Theodore Ts'o wrote:
> > Hence, I believe the correct answer is to restore hwclockfirst.sh, and
> > to make it be at run at /etc/rcS.d/S08hwclockfirst.sh.
>
> Feel up to testing my fix? Otherwise, I'll find a machine and get it
> tested.
Sure, I have a crash and burn machine that I can use for testing;
Where do you want me to grab your fix? I'll grab it, set my clock to
tick localtime with a European timezone, and give it a whirl....
Thanks,
- Ted
Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to Theodore Tso <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>.
(full text, mbox, link).
Message #48 received at 443487@bugs.debian.org (full text, mbox, reply):
On Sat, Sep 22, 2007 at 09:21:17AM -0600, LaMont Jones wrote:
> On Sat, Sep 22, 2007 at 08:25:24AM -0400, Theodore Tso wrote:
> > Sure, I have a crash and burn machine that I can use for testing;
> > Where do you want me to grab your fix? I'll grab it, set my clock to
> > tick localtime with a European timezone, and give it a whirl....
>
> I did some testing yesterday afternoon - would still love you to pound
> on it more.
>
> http://incoming.debian.org/util-linux_2.13-7_i386.deb for starters,
> source is there too. After today's dinstall run (2:50ish ET), it'll be
> in the archive for sid. If I didn't fix the bug, please let me know
> which case I missed...
I tested on my laptop with the hwclock ticking Germany local time, and
it worked just fine. Many thanks for getting this fixed! It's been
broken for a long time.
Fortunately not too many Debianites in Europe apparently run with
hwclock ticking loclatime, but I'm getting a lot more complaints from
folks running Ubuntu; I'm guessing Ubuntu users are more likely
dual-booting with Windows...
- Ted
Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to Alain Guibert <alguibert+bts@free.fr>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>.
(full text, mbox, link).
Message #53 received at 443487@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hello LaMont,
On Saturday, September 22, 2007 at 9:21:17 -0600, LaMont Jones wrote:
> http://incoming.debian.org/util-linux_2.13-7_i386.deb for starters,
> source is there too. After today's dinstall run (2:50ish ET), it'll
> be in the archive for sid. If I didn't fix the bug, please let me
> know which case I missed...
There are 3 minor problems in hwclock.sh 2.13-7:
-1) The README.Debian.hwclock ".gz" extension lacks in comments (the
return of the revenge of the recently closed bug #393539).
-2) If /etc/adjtime is not writable, the --noadjfile option will be
added to hwclock. This --noadjfile will force --hctosys to ignore an
existing /etc/adjtime, it will then be unable to compensate past drift,
and will set a wrong system time (corrected only later at S11).
The goal here is to use --noadjfile when /etc/adjtime does not exist and
can't be created, not when it is readable. I'd propose to change the
test to [ ! -r /etc/adjtime ].
-3) If the --hctosys call requires $HWCLOCKPARS (perhaps --directisa),
the --adjust call most probably requires it also.
The attached patch should fix those 3 quirks, and add a short comment
about where to set --directisa when necessary (helps bugs #435102 and
#439593).
Alain.
[3-quirks.patch (text/plain, attachment)]
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to LaMont Jones <lamont@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #58 received at 443487@bugs.debian.org (full text, mbox, reply):
On Tue, Sep 25, 2007 at 03:20:53PM +0200, Alain Guibert wrote:
> On Saturday, September 22, 2007 at 9:21:17 -0600, LaMont Jones wrote:
> -1) The README.Debian.hwclock ".gz" extension lacks in comments (the
> return of the revenge of the recently closed bug #393539).
-rw-r--r-- root/root 2916 2007-09-21 22:12 ./usr/share/doc/util-linux/README.Debian.hwclock
I see no .gz on that file as delivered. There was previously, and now
there is not.
> -2) If /etc/adjtime is not writable, the --noadjfile option will be
> added to hwclock. This --noadjfile will force --hctosys to ignore an
> existing /etc/adjtime, it will then be unable to compensate past drift,
> and will set a wrong system time (corrected only later at S11).
>
> The goal here is to use --noadjfile when /etc/adjtime does not exist and
> can't be created, not when it is readable. I'd propose to change the
> test to [ ! -r /etc/adjtime ].
When I was testing, it was failing attempting to _WRITE_ /etc/adjtime in
that invocation. Hence the test for writablility.
> -3) If the --hctosys call requires $HWCLOCKPARS (perhaps --directisa),
> the --adjust call most probably requires it also.
This one actually makese sense to apply. I'll add it.
lamont
Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#443487; Package util-linux.
(full text, mbox, link).
Acknowledgement sent to Alain Guibert <alguibert+bts@free.fr>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>.
(full text, mbox, link).
Message #63 received at 443487@bugs.debian.org (full text, mbox, reply):
On Tuesday, September 25, 2007 at 13:42:36 -0600, LaMont Jones wrote:
> -rw-r--r-- root/root 2916 2007-09-21 22:12 ./usr/share/doc/util-linux/README.Debian.hwclock
> I see no .gz on that file as delivered. There was previously, and now
> there is not.
Ok, I had not noticed.
> When I was testing, it was failing attempting to _WRITE_ /etc/adjtime
> in that invocation. Hence the test for writablility.
hwclock --hctosys never writes to an existing adjfile. There are only
two meaningfull cases for hwclock --hctosys without --noadjfile on a
read-only filesystem:
-1) If the adjfile doesn't exist: hwclock tries to create it, and
fails.
-2) If the adjfile exists and is readable: hwclock reads it, and
everything works OK.
Using --noadjfile if [ ! -w /etc/adjtime ] saves case #1, but breaks
case #2 (because --noadjfile prevents reading /etc/adjtime).
Using --noadjfile if [ ! -r /etc/adjtime ] saves case #1 (because ! -e
implies ! -r), and preserves case #2. Clearly better, isn't it?
Alain.
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 25 Oct 2007 07:26:07 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Jan 6 01:16:41 2018;
Machine Name:
beach
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.