diff options
| -rw-r--r-- | debian/changelog | 15 | ||||
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 11 | ||||
| -rw-r--r-- | src/Propellor/Property/Borg.hs | 2 | ||||
| -rw-r--r-- | src/Propellor/Property/Restic.hs | 8 |
4 files changed, 25 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog index e41a58f8..8383f0a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +propellor (5.4.0) UNRELEASED; urgency=medium + + * Restic.installed: stop trying to install a backport on jessie, because no + such backport exists. + * Apt.installedBackport replaced with Apt.backportInstalled. (API change) + The old property would install dependencies from backports even when + the versions in stable satisfy the requested backport's dependencies. + The new property installs only the listed packages from backports; + all other dependencies come from stable. + So in some cases, you may need to list additional backports to install, + that would not have needed to be listed before. Due to this behavior + change the property has been renamed so uses of it will be checked. + + -- Sean Whitton <spwhitton@spwhitton.name> Thu, 17 May 2018 00:12:42 -0700 + propellor (5.3.6) unstable; urgency=medium * Fix build with ghc 8.4, which broke due to the Semigroup Monoid change. diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 5080b1e2..064221f9 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -247,12 +247,17 @@ installed' params ps = robustly $ check (not <$> isInstalled' ps) go where go = runApt (params ++ ["install"] ++ ps) -installedBackport :: [Package] -> Property Debian -installedBackport ps = withOS desc $ \w o -> case o of +-- | Install packages from the stable-backports suite. +-- +-- If installing the backport requires installing versions of a package's +-- dependencies from stable-backports too, you will need to include those +-- dependencies in the list of packages passed to this function. +backportInstalled :: [Package] -> Property Debian +backportInstalled ps = withOS desc $ \w o -> case o of (Just (System (Debian _ suite) _)) -> case backportSuite suite of Nothing -> unsupportedOS' Just bs -> ensureProperty w $ - runApt (["install", "-t", bs, "-y"] ++ ps) + runApt (["install", "-y"] ++ ((++ '/':bs) <$> ps)) `changesFile` dpkgStatus _ -> unsupportedOS' where diff --git a/src/Propellor/Property/Borg.hs b/src/Propellor/Property/Borg.hs index 49259206..dab07985 100644 --- a/src/Propellor/Property/Borg.hs +++ b/src/Propellor/Property/Borg.hs @@ -57,7 +57,7 @@ runBorgEnv (BorgRepoUsing os _) = map go os installed :: Property DebianLike installed = withOS desc $ \w o -> case o of (Just (System (Debian _ (Stable "jessie")) _)) -> ensureProperty w $ - Apt.installedBackport ["borgbackup"] + Apt.backportInstalled ["borgbackup", "python3-msgpack"] _ -> ensureProperty w $ Apt.installed ["borgbackup"] where diff --git a/src/Propellor/Property/Restic.hs b/src/Propellor/Property/Restic.hs index 9415f4bf..01b56510 100644 --- a/src/Propellor/Property/Restic.hs +++ b/src/Propellor/Property/Restic.hs @@ -35,13 +35,7 @@ instance ConfigurableValue ResticRepo where val (REST url) = "rest:" ++ url installed :: Property DebianLike -installed = withOS desc $ \w o -> case o of - (Just (System (Debian _ (Stable "jessie")) _)) -> ensureProperty w $ - Apt.installedBackport ["restic"] - _ -> ensureProperty w $ - Apt.installed ["restic"] - where - desc = "installed restic" +installed = Apt.installed ["restic"] `describe` "installed restic" repoExists :: ResticRepo -> IO Bool repoExists repo = boolSystem "restic" |
