diff options
author | Julian Andres Klode <jak@debian.org> | 2017-04-26 20:03:56 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-05-05 14:50:39 +0200 |
commit | 55100ab1e47d24224d2fa1abb3ccce2130469884 (patch) | |
tree | 94fba0ca141ca5bafcc030077048860a870b4add /debian | |
parent | 82579d3ef511d553d374150b18e6ad6f3cfd872b (diff) |
Split apt-daily timer into two
The timer doing downloading runs throughout the day, whereas
automatic upgrade and clean actions only happen in the morning.
The upgrade service and timer have After= ordering requirements
on their non-upgrade counterparts to ensure that upgrading at
boot takes place after downloading.
LP: #1686470
(cherry picked from commit 496313fb8e83af2ba71f6ce3d729be687c293dfd)
(cherry picked from commit a234cfe1466066aa1f404cf01e544f16cb517846)
Diffstat (limited to 'debian')
-rw-r--r-- | debian/apt-daily-upgrade.service | 9 | ||||
-rw-r--r-- | debian/apt-daily-upgrade.timer | 11 | ||||
-rw-r--r-- | debian/apt-daily.service | 4 | ||||
-rw-r--r-- | debian/apt-daily.timer | 6 | ||||
-rwxr-xr-x | debian/rules | 4 |
5 files changed, 27 insertions, 7 deletions
diff --git a/debian/apt-daily-upgrade.service b/debian/apt-daily-upgrade.service new file mode 100644 index 000000000..bf2776ac8 --- /dev/null +++ b/debian/apt-daily-upgrade.service @@ -0,0 +1,9 @@ +[Unit] +Description=Daily apt upgrade and clean activities +Documentation=man:apt(8) +ConditionACPower=true +After=apt-daily.service + +[Service] +Type=oneshot +ExecStart=/usr/lib/apt/apt.systemd.daily install diff --git a/debian/apt-daily-upgrade.timer b/debian/apt-daily-upgrade.timer new file mode 100644 index 000000000..79caf3b5c --- /dev/null +++ b/debian/apt-daily-upgrade.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Daily apt upgrade and clean activities +After=apt-daily.timer + +[Timer] +OnCalendar=*-*-* 6:00 +RandomizedDelaySec=60m +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/debian/apt-daily.service b/debian/apt-daily.service index 904ed5d51..4a946afdd 100644 --- a/debian/apt-daily.service +++ b/debian/apt-daily.service @@ -1,9 +1,9 @@ [Unit] -Description=Daily apt activities +Description=Daily apt download activities Documentation=man:apt(8) ConditionACPower=true [Service] Type=oneshot -ExecStart=/usr/lib/apt/apt.systemd.daily +ExecStart=/usr/lib/apt/apt.systemd.daily update diff --git a/debian/apt-daily.timer b/debian/apt-daily.timer index 8ac13b0e9..735da2440 100644 --- a/debian/apt-daily.timer +++ b/debian/apt-daily.timer @@ -1,11 +1,11 @@ [Unit] -Description=Daily apt activities +Description=Daily apt download activities After=network-online.target Wants=network-online.target [Timer] -OnCalendar=*-*-* 6:00 -RandomizedDelaySec=60m +OnCalendar=*-*-* 6,18:00 +RandomizedDelaySec=12h Persistent=true [Install] diff --git a/debian/rules b/debian/rules index 7b7df7ad9..621f79b40 100755 --- a/debian/rules +++ b/debian/rules @@ -231,8 +231,8 @@ apt: build-binary build-manpages debian/apt.install dh_installexamples -p$@ $(BLD)/docs/examples/* dh_installman -p$@ $(wildcard $(patsubst %,doc/en/%.[158],$(apt_MANPAGES)) $(patsubst %,doc/*/%.*.[158],$(apt_MANPAGES))) dh_installcron -p$@ --name=apt-compat - dh_systemd_enable -p$@ apt-daily.timer - dh_systemd_start -p$@ apt-daily.timer + dh_systemd_enable -p$@ apt-daily.timer apt-daily-upgrade.timer + dh_systemd_start -p$@ apt-daily.timer apt-daily-upgrade.timer dh_installdocs -p$@ dh_installchangelogs -p$@ dh_installlogrotate -p$@ |