[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#919507: Reboot required patch for Debian policy

Hello Karl,

Thank you for the updated patch.

On Sat 19 Jan 2019 at 05:33PM -0600, Karl O. Pinc wrote:

>> Are you sure that adding the package name to the .pkgs file is
>> required? I've not seen that file on my system; it seems that only
>> /run/reboot-required is used.  Balint said that the .pkgs is an Ubuntu
>> thing; are you sure it has been upstreamed into Debian?
> Yes:
> https://sources.debian.org/src/unattended-upgrades/1.9/kernel/postinst.d/unattended-upgrades/#L10
> I can't say what's _required_.  I'm following Balint's wording.


> It is clear to me that a reboot will occur whenever
> /var/run/reboot-required exists, regardless of the
> state of /var/run/reboot-required.pkgs.
> It is not clear to me where reboot-required.pkgs is used.

Your current patch suggests that the purpose of reboot-required.pkgs is
to inform users of which package needs a reboot.  I take it this is your
guess as to the file's purpose?  How sure are you about this?  We
shouldn't write something in Policy that we don't properly understand.

> +To inform users as to which package(s)
> +require a reboot, add the name of the package(s) requiring the reboot
> +to ``/run/reboot-required.pkgs``. Programs should not add a package
> +name to ``/run/reboot-required.pkgs`` if it is already present there.

I suggest "It is conventional to append the package name to
``/run/reboot-required.pkgs``" to avoid saying what the file is for,
since we're not sure.

> +An expected time to signal that a reboot is required is upon
> +installation or upgrade of a package.  Signaling is called for when a
> +reboot is needed to fully apply the changes a package introduces.  The
> +appropriate place to manipulate reboot related files is expected to be
> +in the ``postinst`` maintainer script when it is called as ``postinst
> +configure most-recently-configured-version`` because this is when it
> +is known that the package successfully installed and configured.

Expressions like "expected" and "is called for" sound like they are
normative, but it seems like your aim in this paragraph is to describe
the purpose of a feature, rather than to specify how it may and may not
be used.  Let's try to avoid giving the impression of normativity.

How about:

    The ``/run/reboot-required`` mechanism is used when a reboot is
    needed to fully apply the changes introduced by a package
    installation or upgrade.  Typically it is the ``postinst``
    maintainer script that touches ``/run/reboot-required``, at the end
    of a successful configuration of the package.

> +Note that the Operating System is not guaranteed to act on these
> +files.  When, and whether, a reboot occurs is dependent upon the
> +installation and configuration of a package which provides a reboot
> +feature.  The same is true of user notifications involving reboot.

It seems obvious that touching ``/run/reboot-required`` does not trigger
a reboot, and typical Debian systems never reboot by themselves.  IMO
this paragraph is unnecessarily verbose.  How about:

    There are no guarantees provided by the ``/var/reboot-required``
    convention as to when the required reboot will occur.

Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply to: