Bug#940151: unattended-upgrades: i configure my unattended-upgrade conf with following Origins:

2024-03-30 Thread Wesley Schwengle


Hi,

> Unattended-Upgrade::Allowed-Origins {
> "o=Debian, a=stable";
> "o=Debian Backports, a=buster-backports"; };

The problem with the example is that it uses a=CODENAME-backports and not
a=stable-backports. The a= should be n= or codename= when using the CODENAME.

I've created PR https://github.com/mvo5/unattended-upgrades/pull/359 for this.

Cheers,
Wesley



Bug#940151: unattended-upgrades: i configure my unattended-upgrade conf with following Origins:

2019-09-13 Thread Karsten Schöke
Package: unattended-upgrades
Version: 1.11.2
Severity: normal

Dear Maintainer,

i configure my unattended-upgrade conf with following Origins:

Unattended-Upgrade::Allowed-Origins {
"o=Debian, a=stable";
"o=Debian Backports, a=buster-backports"; };

sudo unattended-upgrade -d --dry-run go to error:

Ein Fehler ist aufgetreten: too many values to unpack (expected 2) Traceback 
(most recent call last):
  File "/usr/bin/unattended-upgrade", line 1663, in main
install_start_time)
  File "/usr/bin/unattended-upgrade", line 1758, in run
allowed_origins = get_allowed_origins()
  File "/usr/bin/unattended-upgrade", line 537, in get_allowed_origins
allowed_origins = get_allowed_origins_legacy()
  File "/usr/bin/unattended-upgrade", line 516, in get_allowed_origins_legacy
(distro_id, distro_codename) = s.split()
ValueError: too many values to unpack (expected 2) Extracting content from 
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log since 2019-09-12 
12:36:26 Traceback (most recent call last):
  File "/usr/bin/unattended-upgrade", line 2195, in 
sys.exit(main(options))
  File "/usr/bin/unattended-upgrade", line 1663, in main
install_start_time)
  File "/usr/bin/unattended-upgrade", line 1758, in run
allowed_origins = get_allowed_origins()
  File "/usr/bin/unattended-upgrade", line 537, in get_allowed_origins
allowed_origins = get_allowed_origins_legacy()
  File "/usr/bin/unattended-upgrade", line 516, in get_allowed_origins_legacy
(distro_id, distro_codename) = s.split()
ValueError: too many values to unpack (expected 2)

I patched the /usr/bin/unattended-upgrade script on line 516
-  (distro_id, distro_codename) = s.split()
+ (distro_id, distro_codename) = s.split(", ")

And unattended-upgrade runs without errors.


-- System Information:
Debian Release: 10.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages unattended-upgrades depends on:
ii  debconf [debconf-2.0]  1.5.71
ii  lsb-base   10.2019051400
ii  lsb-release10.2019051400
ii  python33.7.3-1
ii  python3-apt1.8.4
ii  python3-dbus   1.2.8-3
ii  python3-distro-info0.21
ii  ucf3.0038+nmu1
ii  xz-utils   5.2.4-1

Versions of packages unattended-upgrades recommends:
ii  cron [cron-daemon]  3.0pl1-134
ii  systemd-sysv241-7~deb10u1

Versions of packages unattended-upgrades suggests:
pn  bsd-mailx   
ii  needrestart 3.4-5
ii  postfix [mail-transport-agent]  3.4.5-1
pn  powermgmt-base  
ii  python3-gi  3.30.4-1

-- debconf information:
* unattended-upgrades/enable_auto_updates: false