summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2016-02-29 17:58:59 -0400
committerJoey Hess2016-02-29 17:58:59 -0400
commit4d458bd60a8d7dbf28ad3b24c6fbd293a753d204 (patch)
treeeac87d7690ea6e920ccdb50a012e83b60062cc61
parentb44742500185c4e1bd5357645c8b2b5c49e9c4ab (diff)
parentdf8bf03acf82c701713630857beec443d5291a17 (diff)
Merge branch 'joeyconfig'
-rw-r--r--config-joey.hs8
-rw-r--r--debian/changelog8
-rw-r--r--src/Propellor/Property/Apt.hs23
3 files changed, 31 insertions, 8 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"
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 <id@joeyh.name> 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