From 6b216e5406b3d3f0804da282c6a7adaf1edca8e9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Feb 2016 13:02:11 -0400 Subject: propellor spin --- config-joey.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config-joey.hs b/config-joey.hs index e84eb360..466a7f8c 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -190,17 +190,15 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "amd64") Nothing fifteenpast "2h") + (System (Debian Unstable) "amd64") Nothing (Cron.Times "15 * * * *") "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "i386") Nothing fifteenpast "2h") + (System (Debian Unstable) "i386") Nothing (Cron.Times "30 * * * *") "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian (Stable "jessie")) "i386") (Just "ancient") fifteenpast "2h") + (System (Debian (Stable "jessie")) "i386") (Just "ancient") (Cron.Times "45 * * * *") "2h") & Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer (Cron.Times "1 1 * * *") "3h") - where - fifteenpast = Cron.Times "15 * * * *" honeybee :: Host honeybee = standardSystem "honeybee.kitenet.net" Testing "armhf" -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From df8bf03acf82c701713630857beec443d5291a17 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Feb 2016 17:58:50 -0400 Subject: apt upgrade improvements * Apt.upgrade: Run dpkg --configure -a first, to recover from interrupted upgrades. * Apt: Add safeupgrade. --- debian/changelog | 8 ++++++++ src/Propellor/Property/Apt.hs | 23 ++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6d85083b..c5b27741 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +propellor (2.16.1) UNRELEASED; urgency=medium + + * Apt.upgrade: Run dpkg --configure -a first, to recover from + interrupted upgrades. + * Apt: Add safeupgrade. + + -- Joey Hess Mon, 29 Feb 2016 17:58:08 -0400 + propellor (2.16.0) unstable; urgency=medium * Obnam: Only let one backup job run at a time when a host has multiple diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index f5d08c1d..bb444463 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -123,10 +123,27 @@ update = runApt ["update"] `assume` MadeChange `describe` "apt update" +-- | Have apt upgrade packages, adding new packages and removing old as +-- necessary. upgrade :: Property NoInfo -upgrade = runApt ["-y", "dist-upgrade"] - `assume` MadeChange - `describe` "apt dist-upgrade" +upgrade = upgrade' "dist-upgrade" + +upgrade' :: String -> Property NoInfo +upgrade' p = combineProperties ("apt " ++ p) + [ runApt ["-y", p] + `assume` MadeChange + , dpkgConfigured + ] + +-- | Have apt upgrade packages, but never add new packages or remove +-- old packages. Not suitable for upgrading acrocess major versions +-- of the distribution. +safeUpgrade :: Property NoInfo +safeUpgrade = upgrade' "upgrade" + +dpkgConfigured :: Property NoInfo +dpkgConfigured = cmdProperty "dpkg" ["--confugure", "--pending"] + `describe` "dpkg configured pending" type Package = String -- cgit v1.2.3