** Description changed: [Impact] - unattended-upgrades does not work (reliably) in (bionic and) cosmic with the mirror:// method, as it tries to open the mirror file - which recent apt versions store in auxfiles - as a .deb: + unattended-upgrades does not work (reliably) in (bionic and) cosmic with + the mirror:// method, as it tries to open the mirror file - which recent + apt versions store in auxfiles - as a .deb: 2018-10-04 08:58:46,801 ERROR failed to read deb file /var/lib/apt/lists/auxfiles/_etc_apt_mirrors.list (E:Invalid archive signature) 2018-10-04 08:58:46,801 ERROR failed to read deb file /var/lib/apt/lists/auxfiles/_etc_apt_mirrors.list (E:Invalid archive signature) 2018-10-04 08:58:46,807 ERROR Apt returned an error, exiting 2018-10-04 08:58:46,807 ERROR error message: E:Invalid archive signature 2018-10-04 08:58:46,808 ERROR An error occurred: E:Invalid archive signature Traceback (most recent call last): + File "/usr/bin/unattended-upgrade", line 1595, in main + install_start_time) + File "/usr/bin/unattended-upgrade", line 1800, in run + if conffile_prompt(item.destfile): + File "/usr/bin/unattended-upgrade", line 860, in conffile_prompt + deb = apt_inst.DebFile(destFile) + apt_pkg.Error: E:Invalid archive signature + + [Test case] + + 1. Start with a not fully upgrades system, then configure it to use + mirror:// : + + root@cc-apt:~# echo 'deb mirror+file:/etc/apt/mirrors.list cosmic main + restricted' > /etc/apt/sources.list.d/mirrors-cosmic.list + + root@cc-apt:~# echo 'http://ftp.kfki.hu/linux/ubuntu/' > /etc/apt/mirrors.list + root@cc-apt:~# echo 'Unattended-Upgrade::DevRelease "true";' > /etc/apt/apt.conf.d/51unattended-upgrades-on-deb + root@cc-apt:~# apt update + Get:1 file:/etc/apt/mirrors.list Mirrorlist [33 B] + Get:2 http://ftp.kfki.hu/linux/ubuntu cosmic InRelease [242 kB] + ... + Translation-en [73.7 kB] + Fetched 27.1 MB in 10s (2812 kB/s) + Reading package lists... Done + Building dependency tree + Reading state information... Done + 280 packages can be upgraded. Run 'apt list --upgradable' to see them. + + 2. Clean downloaded files to make u-u redownload them: + root@cc-apt:~# apt-get clean + root@cc-apt:~# rm -f /var/lib/apt/lists/auxfiles/* + + 3. Run u-u and observe it crashing with the not fixed version and + proceeding properly after the fix is applied. + + root@cc-apt:~# unattended-upgrade --dry-run + Apt returned an error, exiting + error message: E:Invalid archive signature + Traceback (most recent call last): + File "/usr/bin/unattended-upgrade", line 2064, in <module> + sys.exit(main(options)) File "/usr/bin/unattended-upgrade", line 1595, in main install_start_time) File "/usr/bin/unattended-upgrade", line 1800, in run if conffile_prompt(item.destfile): File "/usr/bin/unattended-upgrade", line 860, in conffile_prompt deb = apt_inst.DebFile(destFile) apt_pkg.Error: E:Invalid archive signature - [Test case] - To figure out. It did work for me sometimes, so... [Regression potential] - To figure out. + + The fix makes u-u check only files with .deb extension if they may raise + configuration prompt. For supporting other file extensions the file name + pattern will need to be updated.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1796100 Title: crashes while trying to open auxfiles as .deb To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1796100/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
