Merge lp:~vorlon/ubuntu/saucy/sysvinit/lp.1184006 into lp:ubuntu/saucy/sysvinit

Proposed by Steve Langasek on 2013-05-25
Status: Needs review
Proposed branch: lp:~vorlon/ubuntu/saucy/sysvinit/lp.1184006
Merge into: lp:ubuntu/saucy/sysvinit
Diff against target: 48 lines (+17/-3)
3 files modified
debian/changelog (+7/-0)
debian/initscripts.preinst (+10/-0)
debian/src/initscripts/etc/default/rcS (+0/-3)
To merge this branch: bzr merge lp:~vorlon/ubuntu/saucy/sysvinit/lp.1184006
Reviewer Review Type Date Requested Status
Colin Watson 2013-05-25 Pending
Review via email: mp+165722@code.launchpad.net

Description of the change

Colin, can you review this to see if it seems sane to you?

It's possible there needs to be a corresponding change to the installer -
dunno if we expose the option to set UTC=no nowadays.

To post a comment you must log in.
191. By Steve Langasek on 2013-05-28

Merge from trunk, and adjust the version check in the preinst to account for
an intervening upload

Colin Watson (cjwatson) wrote :

The general approach more or less makes sense to me, but a few things:

 * Yes, we'll need corresponding changes to the installer; unfortunately
   this is one of the things that's duplicated between d-i and ubiquity,
   so changes need to be in both clock-setup and ubiquity.

 * We'll need to think about upload coordination. You have a version
   guard, but what about the overlap case with a daily build where an
   older installer installs a newer initscripts? That suggests to me
   that you shouldn't write to /etc/init/hwclock.override or
   /etc/init/hwclock-save.override if they already contain UTC settings;
   I think if we changed the installer first to handle either old or
   new, and then changed sysvinit with that refinement, then that would
   work.

 * I don't quite understand what "sed -i -e's/^UTC=.*/UTC=yes/'
   /etc/default/rcS" is for. Is that so that dpkg conffile replacement
   works? Would it be better to forcibly remove the option in the
   postinst, instead or perhaps as well? Editing conffiles is of course
   always a bit scary, so I suppose go with whatever approach
   initscripts has historically taken here ...

Steve Langasek (vorlon) wrote :

On Fri, May 31, 2013 at 06:16:26PM -0000, Colin Watson wrote:
> The general approach more or less makes sense to me, but a few things:

> * Yes, we'll need corresponding changes to the installer; unfortunately
> this is one of the things that's duplicated between d-i and ubiquity,
> so changes need to be in both clock-setup and ubiquity.

> * We'll need to think about upload coordination. You have a version
> guard, but what about the overlap case with a daily build where an
> older installer installs a newer initscripts? That suggests to me
> that you shouldn't write to /etc/init/hwclock.override or
> /etc/init/hwclock-save.override if they already contain UTC settings;
> I think if we changed the installer first to handle either old or
> new, and then changed sysvinit with that refinement, then that would
> work.

Ok. Should I prepare the changes to clock-setup and ubiquity?

> * I don't quite understand what "sed -i -e's/^UTC=.*/UTC=yes/'
> /etc/default/rcS" is for. Is that so that dpkg conffile replacement
> works? Would it be better to forcibly remove the option in the
> postinst, instead or perhaps as well? Editing conffiles is of course
> always a bit scary, so I suppose go with whatever approach
> initscripts has historically taken here ...

This is to suppress the wrong conffile replacement prompt, yes, by ensuring
that the copy of the file on disk doesn't have any spurious delta caused by
the UTC setting that we're moving out of the way. I'm confident that this
part of the code is doing the right thing, neither incorrectly losing any
user preferences nor mangling the file in a way that will *cause* conffile
prompts incorrectly on upgrade. (This is a sed to UTC=yes, rather than a
removal, because that ensures it matches the interim version of the conffile
as shipped in the package currently in saucy, giving the correct results for
both pre-saucy and saucy upgrades.)

Colin Watson (cjwatson) wrote :

On Fri, May 31, 2013 at 06:28:28PM -0000, Steve Langasek wrote:
> Ok. Should I prepare the changes to clock-setup and ubiquity?

If you could, that would be great. Obviously if you don't have time
then let me know.

> > * I don't quite understand what "sed -i -e's/^UTC=.*/UTC=yes/'
> > /etc/default/rcS" is for. Is that so that dpkg conffile replacement
> > works? Would it be better to forcibly remove the option in the
> > postinst, instead or perhaps as well? Editing conffiles is of course
> > always a bit scary, so I suppose go with whatever approach
> > initscripts has historically taken here ...
>
> This is to suppress the wrong conffile replacement prompt, yes, by ensuring
> that the copy of the file on disk doesn't have any spurious delta caused by
> the UTC setting that we're moving out of the way. I'm confident that this
> part of the code is doing the right thing, neither incorrectly losing any
> user preferences nor mangling the file in a way that will *cause* conffile
> prompts incorrectly on upgrade. (This is a sed to UTC=yes, rather than a
> removal, because that ensures it matches the interim version of the conffile
> as shipped in the package currently in saucy, giving the correct results for
> both pre-saucy and saucy upgrades.)

OK. Most things relating to conffile mangling in maintainer scripts
still give me the shivers, but this seems reasonable enough.

Unmerged revisions

191. By Steve Langasek on 2013-05-28

Merge from trunk, and adjust the version check in the preinst to account for
an intervening upload

190. By Steve Langasek on 2013-05-24

Move the UTC setting out of /etc/default/rcS, which is now a conffile,
to /etc/init/hwclock{,-save}.override. LP: #1184006.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-05-28 19:23:46 +0000
+++ debian/changelog 2013-05-28 19:58:43 +0000
@@ -1,3 +1,10 @@
1sysvinit (2.88dsf-41ubuntu3) UNRELEASED; urgency=low
2
3 * Move the UTC setting out of /etc/default/rcS, which is now a conffile,
4 to /etc/init/hwclock{,-save}.override. LP: #1184006.
5
6 -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 24 May 2013 16:39:58 -0700
7
1sysvinit (2.88dsf-41ubuntu2) saucy; urgency=low8sysvinit (2.88dsf-41ubuntu2) saucy; urgency=low
29
3 * debian/src/sysv-rc/sbin/invoke-rc.d: tweak behavior of invoke-rc.d when10 * debian/src/sysv-rc/sbin/invoke-rc.d: tweak behavior of invoke-rc.d when
411
=== modified file 'debian/initscripts.preinst'
--- debian/initscripts.preinst 2013-05-17 19:02:36 +0000
+++ debian/initscripts.preinst 2013-05-28 19:58:43 +0000
@@ -60,6 +60,16 @@
60 if [ "$2" ] && dpkg --compare-versions "$2" lt "2.88dsf-23" ; then60 if [ "$2" ] && dpkg --compare-versions "$2" lt "2.88dsf-23" ; then
61 eliminate_conffile "/etc/init.d/mountoverflowtmp"61 eliminate_conffile "/etc/init.d/mountoverflowtmp"
62 fi62 fi
63
64 if dpkg --compare-versions "$2" lt-nl 2.88dsf-41ubuntu3; then
65 UTC=yes
66 . /etc/default/rcS
67 if [ "$UTC" != yes ]; then
68 echo "env UTC=\"$UTC\"" >> /etc/init/hwclock.override
69 echo "env UTC=\"$UTC\"" >> /etc/init/hwclock-save.override
70 fi
71 sed -i -e's/^UTC=.*/UTC=yes/' /etc/default/rcS
72 fi
63 # rcS was made a conffile in removed in 2.88dsf-26. Replace73 # rcS was made a conffile in removed in 2.88dsf-26. Replace
64 # unmodified older versions, including automated commenting of74 # unmodified older versions, including automated commenting of
65 # removed variables.75 # removed variables.
6676
=== modified file 'debian/src/initscripts/etc/default/rcS'
--- debian/src/initscripts/etc/default/rcS 2013-05-17 06:03:10 +0000
+++ debian/src/initscripts/etc/default/rcS 2013-05-28 19:58:43 +0000
@@ -17,9 +17,6 @@
17# do not allow users to log in until the boot has completed17# do not allow users to log in until the boot has completed
18#DELAYLOGIN=no18#DELAYLOGIN=no
1919
20# assume that the BIOS clock is set to UTC time (recommended)
21UTC=yes
22
23# be more verbose during the boot process20# be more verbose during the boot process
24#VERBOSE=no21#VERBOSE=no
2522

Subscribers

People subscribed via source and target branches