Debian Bug report logs - #156489
util-linux: [hwclock] adjtime should be moved to /var/lib/hwclock/ (FHS 2.2)

version graph

Package: util-linux; Maintainer for util-linux is LaMont Jones <lamont@debian.org>; Source for util-linux is src:util-linux.

Reported by: Jörg Sommer <joerg@alea.gnuu.de>

Date: Mon, 12 Aug 2002 23:48:04 UTC

Severity: normal

Tags: wontfix

Found in version 2.11n-4

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>, util-linux@packages.qa.debian.org:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Jörg Sommer <joerg@alea.gnuu.de>:
New Bug report received and forwarded. Copy sent to LaMont Jones <lamont@debian.org>, util-linux@packages.qa.debian.org. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jörg Sommer <joerg@alea.gnuu.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: util-linux: adjtime on /var
Date: Tue, 13 Aug 2002 01:27:01 +0200
Package: util-linux
Version: 2.11n-4
Severity: normal
File: /sbin/hwclock

Hi,

on a readonly /etc, /e/i/hwclock.sh reports an error on stop. It couldn't
write to /etc/adjtime. So there should be an option to add --noadjfile to
the calls of hwclock. And the script uses the variable HWCLOCKACCESS, but
it isn't defined in /etc/defaults/rcS.

The other way is, why you don't write the adjtime file to var? hwclock.sh
(where the adjtime is called, the first time) is called in rcS.d/S50. At
this time /var is mounted (by rcS.d/S35mountall.sh) and will be unmounted
by rc{0,6}.d/S40umountfs, where K25hwclock.sh is called before. So it
should be possible to hwclock, to write his data to /var.

Joerg.

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux joerg 2.4.19 #1 Son Aug 11 11:35:10 MEST 2002 i586
Locale: LANG=de_DE, LC_CTYPE=de_DE

Versions of packages util-linux depends on:
ii  libc6                    2.2.5-6         GNU C Library: Shared libraries an
ii  libncurses5              5.2.20020112a-8 Shared libraries for terminal hand
ii  slang1                   1.4.4-7.2       The S-Lang programming library - r



Changed Bug title. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `wishlist'. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to Jörg Sommer <joerg@alea.gnuu.de>:
Bug#156489. Full text and rfc822 format available.

Message #12 received at 156489-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489-submitter@bugs.debian.org
Subject: Please move adjtime out of /etc
Date: 07 Apr 2003 09:55:58 +0200
retitle 156489 Please move adjtime out of /etc
severity 156489 wishlist
thanks

Adjtime can, and therefore should, be stored under /var/lib
and not under /etc.

Please let me know if there is some obstacle to implementing
this change.

-- 
Thomas Hood <jdthood@yahoo.co.uk>




Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>, util-linux@packages.qa.debian.org:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>, util-linux@packages.qa.debian.org. Full text and rfc822 format available.

Message #17 received at 156489@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489@bugs.debian.org
Subject: /etc/adjtime no longer allowed by FHS
Date: 10 Apr 2003 08:35:21 +0200
N.B.: adjtime was listed as being stored in /etc/ in FHS 1.4
but it is no longer listed in FHS 1.5.

-- 
Thomas Hood <jdthood@yahoo.co.uk>




Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>, util-linux@packages.qa.debian.org:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>, util-linux@packages.qa.debian.org. Full text and rfc822 format available.

Message #22 received at 156489@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489@bugs.debian.org
Subject: Make that "2.2"
Date: 10 Apr 2003 16:06:24 +0200
I wrote:
> N.B.: adjtime was listed as being stored in /etc/ in FHS 1.4
> but it is no longer listed in FHS 1.5.

Oops, I should have said:
   "... is no longer listed in FHS 2.2."

The relevant section is 3.7.

-- 
Thomas Hood <jdthood@yahoo.co.uk>




Message sent on to Jörg Sommer <joerg@alea.gnuu.de>:
Bug#156489. Full text and rfc822 format available.

Message #25 received at 156489-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489-submitter@bugs.debian.org
Subject: #156489 followup
Date: 18 Apr 2003 15:55:05 +0200
So ... Will it be possible to move adjtime out of /etc/ ?

-- 
Thomas Hood <jdthood@yahoo.co.uk>




Information forwarded to util-linux@packages.qa.debian.org:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Jörg Sommer <joerg@alea.gnuu.de>:
Extra info received and filed, but not forwarded. Copy sent to util-linux@packages.qa.debian.org. Full text and rfc822 format available.

Message #30 received at 156489-quiet@bugs.debian.org (full text, mbox):

From: Jörg Sommer <joerg@alea.gnuu.de>
To: Thomas Hood <jdthood@yahoo.co.uk>, 156489-quiet@bugs.debian.org
Subject: Re: Bug#156489: #156489 followup
Date: Sat, 19 Apr 2003 10:23:04 +0200
Thomas Hood schrieb am Fri 18. Apr, 15:55 (+0200) :
> So ... Will it be possible to move adjtime out of /etc/ ?

I think, yes.

The first time /etc/adjtime is touched is in /etc/init.d/hwclock.sh and
this is started (as 50th) after mountnfs (45th). So at this time there
are all file systems mounted and var must be available.

Jörg.



Information forwarded to util-linux@packages.qa.debian.org:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and filed, but not forwarded. Copy sent to util-linux@packages.qa.debian.org. Full text and rfc822 format available.

Message #35 received at 156489-quiet@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: Jörg Sommer <joerg@alea.gnuu.de>
Cc: 156489-quiet@bugs.debian.org
Subject: Re: #156489
Date: 19 Apr 2003 23:09:39 +0200
On Sat, 2003-04-19 at 10:23, Jörg Sommer wrote:
> I think, yes.
> 
> The first time /etc/adjtime is touched is in /etc/init.d/hwclock.sh and
> this is started (as 50th) after mountnfs (45th). So at this time there
> are all file systems mounted and var must be available.

Excellent.
-- 
Thomas Hood <jdthood@yahoo.co.uk>




Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>. Full text and rfc822 format available.

Message #40 received at 156489@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489@bugs.debian.org
Subject: Update re: read-only /etc/
Date: 20 Jun 2003 21:14:24 +0200
Hi.  Now that printcap.cups, pppconfig temporary files,
laptop-net temporary files, sysvinit temporary files,
ioctl.save, etc., have all been moved out from under /etc/ ,
adjtime is one of very few remaining files in /etc/ that is
changed at run-time.  Do you think you will be able to move it 
under /var/ soon?  Would it help if someone submitted a
patch?

Cheers
--
Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>. Full text and rfc822 format available.

Message #45 received at 156489@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489@bugs.debian.org
Subject: Dealing with adjtime relatively easily
Date: 21 Jun 2003 13:00:43 +0200
I have just looked at the hwclock code and I think that /etc/adjtime
could be replaced by a symlink without breaking anything.  Therefore,
I think that the wish for adjtime to be moved out of etc could be
fulfilled symply by including directory /var/lib/util-linux/ and
symlink /etc/adjtime -> /var/lib/util-linux/adjtime in the
util-linux package. (The maintainer scripts would have to take care
to move any existing /etc/adjtime file to /var/lib/util-linux/
before installation of the symlink.  A debconf note would probably
be in order too.)

--
Thomas




Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>. Full text and rfc822 format available.

Message #50 received at 156489@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489@bugs.debian.org
Cc: 156489-submitter@bugs.debian.org
Subject: adjtime should be in /var/lib/hwclock/
Date: 11 Jul 2003 18:52:40 +0200
severity 156489 normal
thanks

I just noticed that FHS 2.2 specifies the location of the
adjtime file.  Section 5.8.5.1 says that it must be
/var/lib/hwclock/adjtime .  So, to be compatible with FHS
in the future this file will have to be moved.

--
Thomas Hood




Severity set to `normal'. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to Jörg Sommer <joerg@alea.gnuu.de>:
Bug#156489. Full text and rfc822 format available.

Changed Bug title. Request was from Göran Weinholt <weinholt@dtek.chalmers.se> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#156489; Package util-linux. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>. Full text and rfc822 format available.

Message #62 received at 156489@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 156489@bugs.debian.org
Subject: Moving adjtime to /var/lib/hwclock/
Date: Thu, 15 Dec 2005 13:04:10 +0100
I see that accesses to adjtime have been moved earlier in the boot sequence.
This doesn't bring us closer to the goal of moving the file to /var/lib/hwclock/adjtime.

jdthood@turmeric:/etc/rcS.d$ grep adjtime *
S18hwclockfirst.sh:             if [ ! -f /etc/adjtime ] && [ ! -e /etc/adjtime ]; then
S18hwclockfirst.sh:                 echo "0.0 0 0.0" > /etc/adjtime
S18hwclockfirst.sh:                 # hwclock --systohc, or you must delete /etc/adjtime
S18hwclockfirst.sh:                 # /etc/adjtime if you ever need to set the system clock
S22hwclock.sh:          if [ ! -f /etc/adjtime ] && [ ! -e /etc/adjtime ]; then
S22hwclock.sh:              echo "0.0 0 0.0" > /etc/adjtime
S22hwclock.sh:              # hwclock --systohc, or you must delete /etc/adjtime
S22hwclock.sh:              # /etc/adjtime if you ever need to set the system clock

I also see that base-files.postinst initializes /etc/adjtime, so the removal
of the file to /var/lib/hwclock/ will have to be coordinated with base-files.

jdthood@turmeric:/var/lib/dpkg/info$ grep adjtime *.p*
base-files.postinst:if [ ! -f /etc/adjtime ]; then
base-files.postinst:  echo "0.000000 1121000000 0.000000" > /etc/adjtime
base-files.postinst:  echo "1121000000" >> /etc/adjtime
base-files.postinst:  echo "UTC" >> /etc/adjtime
base-files.postinst:  chmod 644 /etc/adjtime

-- 
Thomas Hood



Severity set to 'serious' from 'normal' Request was from Piotr Lewandowski <piotr.lewandowski@gmail.com> to control@bugs.debian.org. (Thu, 26 Nov 2009 14:06:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, LaMont Jones <lamont@debian.org>:
Bug#156489; Package util-linux. (Thu, 26 Nov 2009 15:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Biebl <biebl@debian.org>:
Extra info received and forwarded to list. Copy sent to LaMont Jones <lamont@debian.org>. (Thu, 26 Nov 2009 15:42:06 GMT) Full text and rfc822 format available.

Message #69 received at 156489@bugs.debian.org (full text, mbox):

From: Michael Biebl <biebl@debian.org>
To: 156489@bugs.debian.org
Cc: Piotr Lewandowski <piotr.lewandowski@gmail.com>, "LaMont Jones (util-linux for {156489})" <lamont@debian.org>
Subject: Re: Processed: severity of 156489 is serious
Date: Thu, 26 Nov 2009 16:39:31 +0100
[Message part 1 (text/plain, inline)]
Debian Bug Tracking System wrote:
> Processing commands for control@bugs.debian.org:
> 
>> severity 156489 serious
> Bug #156489 [util-linux] util-linux: [hwclock] adjtime should be moved to /var/lib/hwclock/ (FHS 2.2)
> Severity set to 'serious' from 'normal'
> 

How could that possibly work given that mountall.sh runs after hwclockfirst.sh
and hwclock.sh, i.e. when /var is on a separate file system.

Michael

[signature.asc (application/pgp-signature, attachment)]

Severity set to 'normal' from 'serious' Request was from Luk Claes <luk@debian.org> to control@bugs.debian.org. (Sat, 28 Nov 2009 17:33:18 GMT) Full text and rfc822 format available.

Added tag(s) wontfix. Request was from LaMont Jones <lamont@debian.org> to control@bugs.debian.org. (Sun, 21 Nov 2010 03:54:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#156489; Package util-linux. (Sun, 21 Nov 2010 03:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to LaMont Jones <lamont@debian.org>:
Extra info received and forwarded to list. (Sun, 21 Nov 2010 03:57:03 GMT) Full text and rfc822 format available.

Message #78 received at 156489@bugs.debian.org (full text, mbox):

From: LaMont Jones <lamont@debian.org>
To: Michael Biebl <biebl@debian.org>
Cc: 156489@bugs.debian.org, Piotr Lewandowski <piotr.lewandowski@gmail.com>, "LaMont Jones (util-linux for {156489})" <lamont@debian.org>
Subject: Re: Processed: severity of 156489 is serious
Date: Sat, 20 Nov 2010 20:53:16 -0700
On Thu, Nov 26, 2009 at 04:39:31PM +0100, Michael Biebl wrote:
> How could that possibly work given that mountall.sh runs after hwclockfirst.sh
> and hwclock.sh, i.e. when /var is on a separate file system.

In fact, /etc/adjtime MUST live on the root filesystem, since it must be accessed
before (re)mounting the root filesystem.  Moving it to /var, especially when the
primary motivation is have it not be on the root filesystem, is a non-starter.

lamont




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 13:13:38 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.