8

I wanted to upgrade a production system (through staging, first) to 20.04. Backups and recovery options were in place. All went smoothly as expected. I did do-release-upgrade -d, because I didn't want to wait until the first point release (20.04.1).

However, reviewing all the configuration changes (a combination of looking at diffs from etckeeper and matching with debsums -ce), I noticed /etc/apt/apt.conf.d/50unattended-upgrades now has this line:

Unattended-Upgrade::DevRelease "auto";

This was previously set to:

Unattended-Upgrade::DevRelease "false";

And so I was wondering if this in line with my desired configuration. I'd like to be able to use unattended-upgrades as before, but I definitely don't want anything other than LTS releases.

I looked at the manual pages for apt.conf, apt_preferences, apt-config and unattended-upgrade, but could not find a description of that configuration option. This community help page also didn't list the option. This question here on AskUbuntu was the only one referencing this particular option, but doesn't answer my question either.

Q: So what does Unattended-Upgrade::DevRelease do when set to "auto" and where can I find more information about the settings and their respective effect?

muru
  • 197,895
  • 55
  • 485
  • 740
0xC0000022L
  • 5,720

1 Answers1

9

The documentation seems sparse, so I had a look at the code:

if apt_pkg.config.find("Unattended-Upgrade::DevRelease") == "auto":
    # snip
        if ((devel.series == DISTRO_CODENAME
             and devel.release is not None
             and devel.release - date.today() > DEVEL_UNTIL_RELEASE)):
            syslog.syslog((_("Not running on this development "
                             "release before %s") %
                          (devel.release - DEVEL_UNTIL_RELEASE
                           - datetime.timedelta(days=1))))
            logging.warning(_("Not running on this development "
                              "release before %s") %
                            (devel.release - DEVEL_UNTIL_RELEASE
                             - datetime.timedelta(days=1)))
            return UnattendedUpgradesResult(True)
        logging.debug("Running on the development release")

elif "(development branch)" in DISTRO_DESC and not
apt_pkg.config.find_b("Unattended-Upgrade::DevRelease", True): syslog.syslog(("Not running on the development release.")) logging.info(("Not running on the development release.")) return UnattendedUpgradesResult(True)

It's pretty readable. Essentially this option only affects users of the current development release (aka Ubuntu+1) (right now, that's Ubuntu 20.10, "Groovy Gorilla"). And if you're on a development release, this enables unattended upgrades if:

  • DevRelease is auto and you're within a window of the release date (set by DEVEL_UNTIL_RELEASE, seems to be 21 days)
  • DevRelease is True.

If you're not on a development release, which you're not if you're on 20.04 after it was officially released, then this option makes no difference one way or the other.

muru
  • 197,895
  • 55
  • 485
  • 740