tor-relay-configurator icon indicating copy to clipboard operation
tor-relay-configurator copied to clipboard

50unattended-upgrades config causes autoupdate in ubuntu to fail

Open hsmalley opened this issue 3 years ago • 0 comments

Ubuntu 20.04 fails to auto update with the 50unattended-upgrades config. Running stock config has no such problems. Was able to reproduce by doing an apt purge unattended-upgrades then reinstalling unattended-upgrades and manually adding the lines in the config. I'm unsure if the error can be replicated in Debian 11 as I have not tested it

The lines:

      "origin=Debian,codename=${distro_codename},label=Debian-Security";
      "origin=TorProject";

Will cause the following error when running unattended upgrades.

# unattended-upgrade -v
Starting unattended upgrades script
Unable to parse Unattended-Upgrade::Allowed-Origins.
An error occurred: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 1985, in main
    res = run(options, rootdir, mem_log, logfile_dpkg,
  File "/usr/bin/unattended-upgrade", line 2126, in run
    cache = UnattendedUpgradesCache(rootdir=rootdir)
  File "/usr/bin/unattended-upgrade", line 156, in __init__
    self.allowed_origins = get_allowed_origins()
  File "/usr/bin/unattended-upgrade", line 785, in get_allowed_origins
    allowed_origins = get_allowed_origins_legacy()
  File "/usr/bin/unattended-upgrade", line 764, in get_allowed_origins_legacy
    (distro_id, distro_codename) = s.split()
ValueError: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 2514, in <module>
    sys.exit(main(options))
  File "/usr/bin/unattended-upgrade", line 1985, in main
    res = run(options, rootdir, mem_log, logfile_dpkg,
  File "/usr/bin/unattended-upgrade", line 2126, in run
    cache = UnattendedUpgradesCache(rootdir=rootdir)
  File "/usr/bin/unattended-upgrade", line 156, in __init__
    self.allowed_origins = get_allowed_origins()
  File "/usr/bin/unattended-upgrade", line 785, in get_allowed_origins
    allowed_origins = get_allowed_origins_legacy()
  File "/usr/bin/unattended-upgrade", line 764, in get_allowed_origins_legacy
    (distro_id, distro_codename) = s.split()
ValueError: not enough values to unpack (expected 2, got 1)

hsmalley avatar Feb 09 '22 15:02 hsmalley