I've always been a fan of unattended upgrades, but have had some fun and games getting Palemoon to update through that process.
So, I thought I would document it here in case anyone else is having the same problems with either Debian or Ubuntu and distros based on them.
With Debian the line needed in 50unattended-upgrades is
Code: Select all
"o=obs://build.opensuse.org/home:stevenpusser/Debian_8.0,n=Debian_8.0,l=home:stevenpusser";
With Ubuntu it gets a little more interesting due to the default Origin::Archive syntax.
Running
Code: Select all
egrep '^(Origin|Label|Suite|Codename)' /var/lib/apt/lists/*Release > repos.txt
download.opensuse.org_repositories_home:_stevenpusser_xUbuntu%5f16.04_Release:Codename: xUbuntu_16.04
download.opensuse.org_repositories_home:_stevenpusser_xUbuntu%5f16.04_Release:Origin: obs://build.opensuse.org/home:stevenpusser/xUbuntu_16.04
download.opensuse.org_repositories_home:_stevenpusser_xUbuntu%5f16.04_Release:Label: home:stevenpusser
The resulting line for 50-unattended upgrades is therefore:-
Code: Select all
"build.opensuse.org/home:stevenpusser/xUbuntu_16.04";
This does not retrieve updates from the repo. Having gone round the houses for a few days and running with debug I realised that it was never going to work.
The solution is to add the following to the start of 50-unattended-upgrades - marked as code. This broadens the scope of what u-a will accept by just using the Origin. You could go even further by using Site instead of Origin
// Automatically upgrade packages from these (origin:archive) pairs
Code: Select all
Unattended-Upgrade::Origins-Pattern {
"origin=*";
};
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESM:${distro_codename}";
"${distro_id}:${distro_codename}-updates";
"${distro_id}:${distro_codename}-proposed";
"${distro_id}:${distro_codename}-backports";
"build.opensuse.org/home:stevenpusser/xUbuntu_16.04";
};
Actually getting unattended upgrades to work in what I call a predictable fashion on a single user laptop with Ubuntu 16.04 was a bit of a pain too.
The short answer which does work is to modify the content of /lib/systemd/system/apt-daily.timer as follows
Code: Select all
[Unit]
Description=Daily apt download activities
DefaultDependencies=yes
[Timer]
#OnCalendar=*-*-* 6,18:00
#RandomizedDelaySec=12h
#Persistent=true
OnBootSec=5min
OnUnitActiveSec=1d
[Install]
WantedBy=timers.target
Code: Select all
[Unit]
Description=Daily apt upgrade and clean activities
After=apt-daily.timer
[Timer]
#OnCalendar=*-*-* 6:00
#RandomizedDelaySec=10m
OnBootSec=15min
Persistent=true
[Install]
WantedBy=timers.target
Hope this is of some help to someone.