upgrades: Improve handling of backports

- Merge backports functionality into upgrades module.

- No need to enable systemd timer as dh_installsystemd automatically enables
  this during package installation and upgrade.

- Use https:// and deb.debian.org for repository checking. When using Tor for
  package installations request the URL via Tor.

- Make daily checking service more generic for all kind of future apt repository
  updates.

- Force removal of repository file during purge to avoid failures.

- Don't add contrib/non-free as backports is intended to be enabled for just the
  freedombox package and it is free. When the need arises, we can introduce
  contrib/non-free. This also eliminates an issue that adding these components
  doesn't work without the usage of tor.

- Allow generate apt preferences file to avoid lintian complaining about its
  presence. Remove on purge.

- Add unattended upgrades origin pattern to allow it to upgrade from backports
  repositories.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa committed 2019-02-05 14:58:55 -08:00
1 parent c0de223ae4
commit 5a159f7d39
11 files changed
+120 -190

No files matched your search

@@ -16,9 +16,8 @@
#
[Unit]
Description=Service to check for buster backports and enable them
ConditionPathExists=!/etc/apt/sources.list.d/freedombox-backports.list
Description=FreedomBox: Setup software repositories
[Service]
ExecStart=/usr/share/plinth/actions/backports check-backports
ExecStart=/usr/share/plinth/actions/upgrades setup-repositories
Type=oneshot
@@ -16,7 +16,7 @@
#
[Unit]
Description=Daily check of whether buster backports are available yet
Description=FreedomBox: Daily check for setting up software repositories
[Timer]
OnCalendar=daily