diff options
| author | Evan Cofsky <evan@theunixman.com> | 2016-03-29 13:05:35 -0500 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-30 16:26:44 -0400 |
| commit | 49255357459cd2f5661e5f6832ac1f611bb37967 (patch) | |
| tree | 4de6ddb88223c8261bfa4cb6b9691df234fd09a5 /src | |
| parent | 4cf53da295be13e99d00f9c59f45454e42a87b1d (diff) | |
Adding support for software-properties-common to OS properties branch.
The config-simple file now shows:
1. Adding PPAs
2. Adding apt keys from a remote keyserver
3. Adding apt sources
4. Installing signed packages from a new repository.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apt/PPA.hs (renamed from src/Propellor/Property/AptSoftwarePropertiesCommon.hs) | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Propellor/Property/AptSoftwarePropertiesCommon.hs b/src/Propellor/Property/Apt/PPA.hs index 484f7b08..9831ff30 100644 --- a/src/Propellor/Property/AptSoftwarePropertiesCommon.hs +++ b/src/Propellor/Property/Apt/PPA.hs @@ -1,5 +1,5 @@ --- | This module provides properties for Buntish. -module Propellor.Property.AptSoftwarePropertiesCommon where +-- | This module provides properties software-properties-common. +module Propellor.Property.Apt.PPA where import Data.List import Control.Applicative @@ -11,7 +11,7 @@ import qualified Propellor.Property.Apt as Apt -- | Ensure it's installed in case it's not. It's part of Buntish's defaults so -- one might assume... -installed :: Property NoInfo +installed :: Property DebianLike installed = Apt.installed ["software-properties-common"] -- | Personal Package Archives are people's individual package contributions to @@ -39,7 +39,7 @@ instance IsString PPA where PPA acct arch -- | Adds a PPA to the local system repositories. -addPpa :: PPA -> Property NoInfo +addPpa :: PPA -> Property DebianLike addPpa p = cmdPropertyEnv "apt-add-repository" ["--yes", show p] Apt.noninteractiveEnv `assume` MadeChange @@ -57,13 +57,13 @@ instance Show AptKeyId where show k = unwords ["Apt Key", akiName k, akiId k, "from", akiServer k] -- | Adds an 'AptKeyId' from the specified GPG server. -addKeyId :: AptKeyId -> Property NoInfo +addKeyId :: AptKeyId -> Property DebianLike addKeyId keyId = check keyTrusted akcmd `describe` (unwords ["Add third-party Apt key", show keyId]) where akcmd = - cmdProperty "apt-key" ["adv", "--keyserver", akiServer keyId, "--recv-keys", akiId keyId] + tightenTargets $ cmdProperty "apt-key" ["adv", "--keyserver", akiServer keyId, "--recv-keys", akiId keyId] keyTrusted = let pks ls = concatMap (drop 1 . split "/") @@ -105,7 +105,7 @@ instance IsString AptSource where data AptRepository = AptRepositoryPPA PPA | AptRepositorySource AptSource -- | Adds an 'AptRepository' using apt-add-source. -addRepository :: AptRepository -> Property NoInfo +addRepository :: AptRepository -> Property DebianLike addRepository (AptRepositoryPPA p) = addPpa p addRepository (AptRepositorySource src) = check repoExists addSrc |
