From f00734ace53a291e64499f95e06c432af203f1b3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 15 Jan 2017 18:55:54 -0700 Subject: add Apt.noPDiffs --- src/Propellor/Property/Apt.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 196fb345..c0d4ac82 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -349,5 +349,10 @@ hasForeignArch arch = check notAdded (add `before` update) add = cmdProperty "dpkg" ["--add-architecture", arch] `assume` MadeChange +-- | Disable the use of PDiffs for machines with high-bandwidth connections. +noPDiffs :: Property DebianLike +noPDiffs = tightenTargets $ "/etc/apt/apt.conf.d/20pdiffs" `File.hasContent` + [ "Acquire::PDiffs \"false\";" ] + dpkgStatus :: FilePath dpkgStatus = "/var/lib/dpkg/status" -- cgit v1.2.3 From 733ff94298a1efda158b5f587e49de7c4cc692f1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 17:10:12 -0700 Subject: pin property prototypes --- src/Propellor/Property/Apt.hs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index c0d4ac82..b3391866 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -100,6 +100,16 @@ stdSourcesList' suite more = tightenTargets $ setSourcesList where generators = [debCdn, kernelOrg, securityUpdates] ++ more +type PinPriority = Int + +-- | Adds an apt source for a suite, and pins that suite to a given pin value +-- (see apt_preferences(5)). Revert to drop the source and unpin the suite. +-- +-- If the requested suite is the host's OS suite, this property does nothing. +-- That apt source should already be available, or you can use a property like +-- 'Apt.stdSourcesList'. +suiteAvailablePinned :: DebianSuite -> PinPriority -> RevertableProperty Debian + setSourcesList :: [Line] -> Property DebianLike setSourcesList ls = sourcesList `File.hasContent` ls `onChange` update @@ -196,6 +206,18 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv where cmd = "cd '" ++ dir ++ "' && mk-build-deps debian/control --install --tool 'apt-get -y --no-install-recommends' --remove" +-- | Pins a list of packages and/or package wildcards to a given suite with a +-- given pin priority (see apt_preferences(5)). Revert to unpin. +-- +-- Note that this will have no effect unless there is an apt source for the +-- suite. One way to add an apt source is 'Apt.suiteAvailablePinned'. +-- +-- For example, to obtain all Emacs Lisp addon packages from sid, you could use +-- +-- > & Apt.suiteAvailablePinned Unstable +-- > & ["elpa-*"] `Apt.pinnedTo` Unstable 990 +pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian + -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. robustly :: Property DebianLike -> Property DebianLike @@ -354,5 +376,11 @@ noPDiffs :: Property DebianLike noPDiffs = tightenTargets $ "/etc/apt/apt.conf.d/20pdiffs" `File.hasContent` [ "Acquire::PDiffs \"false\";" ] +suitePin :: DebianSuite -> String +suitePin s = prefix s ++ showSuite s + where + prefix (Stable _) = "n=" + prefix _ = "a=" + dpkgStatus :: FilePath dpkgStatus = "/var/lib/dpkg/status" -- cgit v1.2.3 From 27255d21f7f7691339c7f5ccea954b67908c09fe Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 17:55:25 -0700 Subject: implement suiteAvailablePinned --- src/Propellor/Property/Apt.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index b3391866..593515a0 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -109,6 +109,30 @@ type PinPriority = Int -- That apt source should already be available, or you can use a property like -- 'Apt.stdSourcesList'. suiteAvailablePinned :: DebianSuite -> PinPriority -> RevertableProperty Debian +suiteAvailablePinned s pin = available unavailable + `onChange` update + where + available = withOS (desc True) $ \w o -> case o of + (Just (System (Debian _ hostSuite) _)) -> + if s == hostSuite then doNothing else ensureProperty w $ + File.hasContent sourceFile + (concatMap (\gen -> gen s) generators) + `requires` File.hasContent prefFile + [ "Package: *" + , "Pin: release " ++ suitePin s + , "Pin-Priority: " ++ show pin + ] + + unavailable = combineProperties (desc False) $ props + & File.notPresent sourceFile + & File.notPresent prefFile + + generators = [debCdn, kernelOrg, securityUpdates] + sourceFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" + prefFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" + + desc True = "Debian " ++ showSuite s ++ " pinned, priority " ++ show pin + desc False = "Debian " ++ showSuite s ++ "not pinned" setSourcesList :: [Line] -> Property DebianLike setSourcesList ls = sourcesList `File.hasContent` ls `onChange` update -- cgit v1.2.3 From 8fcc618914716ad775f6bb800c9c598e51e349b9 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 17:59:37 -0700 Subject: tweak stub --- src/Propellor/Property/Apt.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 593515a0..4eac6670 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -230,8 +230,9 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv where cmd = "cd '" ++ dir ++ "' && mk-build-deps debian/control --install --tool 'apt-get -y --no-install-recommends' --remove" --- | Pins a list of packages and/or package wildcards to a given suite with a --- given pin priority (see apt_preferences(5)). Revert to unpin. +-- | Pins a list of packages, package wildcards and/or regular expressions to a +-- given suite with a given pin priority (see apt_preferences(5)). Revert to +-- unpin. -- -- Note that this will have no effect unless there is an apt source for the -- suite. One way to add an apt source is 'Apt.suiteAvailablePinned'. @@ -241,6 +242,7 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- > & Apt.suiteAvailablePinned Unstable -- > & ["elpa-*"] `Apt.pinnedTo` Unstable 990 pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian +pinnedTo = undefined -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. -- cgit v1.2.3 From e5a581fee717b770600767d59f6edf812967eaf2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 18:12:16 -0700 Subject: pin even if hostSuite == suite --- src/Propellor/Property/Apt.hs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 4eac6670..0990c83b 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -105,23 +105,26 @@ type PinPriority = Int -- | Adds an apt source for a suite, and pins that suite to a given pin value -- (see apt_preferences(5)). Revert to drop the source and unpin the suite. -- --- If the requested suite is the host's OS suite, this property does nothing. --- That apt source should already be available, or you can use a property like --- 'Apt.stdSourcesList'. +-- If the requested suite is the host's OS suite, the suite is pinned, but no +-- source is added. That apt source should already be available, or you can use +-- a property like 'Apt.stdSourcesList'. suiteAvailablePinned :: DebianSuite -> PinPriority -> RevertableProperty Debian suiteAvailablePinned s pin = available unavailable `onChange` update where - available = withOS (desc True) $ \w o -> case o of - (Just (System (Debian _ hostSuite) _)) -> - if s == hostSuite then doNothing else ensureProperty w $ - File.hasContent sourceFile + available = combineProperties (desc True) $ props + & File.hasContent prefFile + [ "Package: *" + , "Pin: release " ++ suitePin s + , "Pin-Priority: " ++ show pin + ] + & withOS (desc True) $ \w o -> case o of + (Just (System (Debian _ hostSuite) _)) -> + | s /= hostSuite = ensureProperty w $ + File.hasContent sourceFile (concatMap (\gen -> gen s) generators) - `requires` File.hasContent prefFile - [ "Package: *" - , "Pin: release " ++ suitePin s - , "Pin-Priority: " ++ show pin - ] + | otherwise = doNothing + _ -> doNothing unavailable = combineProperties (desc False) $ props & File.notPresent sourceFile -- cgit v1.2.3 From 77c1f36116b1e3a6c2d3936504dfdd7e8bdb5241 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 18:38:39 -0700 Subject: refactor to fix type errors --- src/Propellor/Property/Apt.hs | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 0990c83b..56b42eb6 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -108,28 +108,37 @@ type PinPriority = Int -- If the requested suite is the host's OS suite, the suite is pinned, but no -- source is added. That apt source should already be available, or you can use -- a property like 'Apt.stdSourcesList'. -suiteAvailablePinned :: DebianSuite -> PinPriority -> RevertableProperty Debian +suiteAvailablePinned + :: DebianSuite + -> PinPriority + -> RevertableProperty Debian Debian suiteAvailablePinned s pin = available unavailable - `onChange` update where - available = combineProperties (desc True) $ props + available :: Property Debian + available = tightenTargets $ combineProperties (desc True) $ props & File.hasContent prefFile [ "Package: *" , "Pin: release " ++ suitePin s , "Pin-Priority: " ++ show pin ] - & withOS (desc True) $ \w o -> case o of - (Just (System (Debian _ hostSuite) _)) -> - | s /= hostSuite = ensureProperty w $ - File.hasContent sourceFile - (concatMap (\gen -> gen s) generators) - | otherwise = doNothing - _ -> doNothing - - unavailable = combineProperties (desc False) $ props + & setSourceFile + + unavailable :: Property Debian + unavailable = tightenTargets $ combineProperties (desc False) $ props & File.notPresent sourceFile + `onChange` update & File.notPresent prefFile + setSourceFile :: Property Debian + setSourceFile = withOS (desc True) $ \w o -> case o of + (Just (System (Debian _ hostSuite) _)) + | s /= hostSuite -> ensureProperty w $ + File.hasContent + sourceFile + (concatMap (\gen -> gen s) generators) + `onChange` update + _ -> noChange + generators = [debCdn, kernelOrg, securityUpdates] sourceFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" prefFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" @@ -244,7 +253,7 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- -- > & Apt.suiteAvailablePinned Unstable -- > & ["elpa-*"] `Apt.pinnedTo` Unstable 990 -pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian +pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian Debian pinnedTo = undefined -- | Package installation may fail becuse the archive has changed. -- cgit v1.2.3 From 384d435868d2cec88c44a5b73c4a46ba114acde9 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 18:48:21 -0700 Subject: fix swapped sourceFile & prefFile --- src/Propellor/Property/Apt.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 56b42eb6..b89d12c6 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -140,8 +140,8 @@ suiteAvailablePinned s pin = available unavailable _ -> noChange generators = [debCdn, kernelOrg, securityUpdates] - sourceFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" - prefFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" + prefFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" + sourceFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" desc True = "Debian " ++ showSuite s ++ " pinned, priority " ++ show pin desc False = "Debian " ++ showSuite s ++ "not pinned" -- cgit v1.2.3 From c64b712867e5c30b635184a351164ecb139249c4 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 19:04:03 -0700 Subject: TODO --- src/Propellor/Property/Apt.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index b89d12c6..061bef83 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -114,6 +114,8 @@ suiteAvailablePinned -> RevertableProperty Debian Debian suiteAvailablePinned s pin = available unavailable where + -- TODO have to pin -backports too? is that sensible? maybe avoid + -- adding it, instead available :: Property Debian available = tightenTargets $ combineProperties (desc True) $ props & File.hasContent prefFile -- cgit v1.2.3 From ec22249085439af2f4dbcceafffd95afb17c57d1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 30 Jan 2017 19:27:05 -0700 Subject: commented hacking --- src/Propellor/Property/Apt.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 061bef83..1de84b87 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -258,6 +258,29 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian Debian pinnedTo = undefined +-- ps `pinnedTo` suite pin = (f `File.containsLines` ls) (f `File.lacksLines` ls) +-- `describe` unwords (ps ++ ["pinned to " ++ showSuite suite]) +-- where +-- ls = [ "Package: " ++ unwords ps +-- , "Pin: release " ++ suitePin suite +-- , "Pin-Priority: " ++ show pin +-- ] +-- f = "/etc/apt/preferences.d/10propellor" + +-- -- Apt supports multiple entries in each "Package:" line, so we could use a +-- -- single configuration block for each pinnedTo property that is applied to the +-- -- host. However, that would make it hard to sensibly revert the pin. + +-- pinnedTo' :: String -> DebianSuite -> PinPriority -> RevertableProperty Debian +-- p `pinnedTo` suite pin = (f `File.containsLines` ls) (f `File.lacksLines` ls) +-- where +-- ls = [ "" +-- , "Package: " ++ p +-- , "Pin: release " ++ suitePin suite +-- , "Pin-Priority: " ++ show pin +-- ] +-- f = "/etc/apt/preferences.d/10" ++ p + -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. robustly :: Property DebianLike -> Property DebianLike -- cgit v1.2.3 From 04f237e8f336dc6501f8b3c3a8e0be72ffab25c3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:06:35 -0700 Subject: implement Apt.pinnedTo --- src/Propellor/Property/Apt.hs | 45 +++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 25 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 1de84b87..6f8fb9dd 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -255,31 +255,26 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- -- > & Apt.suiteAvailablePinned Unstable -- > & ["elpa-*"] `Apt.pinnedTo` Unstable 990 -pinnedTo :: [String] -> DebianSuite -> PinPriority -> RevertableProperty Debian Debian -pinnedTo = undefined - --- ps `pinnedTo` suite pin = (f `File.containsLines` ls) (f `File.lacksLines` ls) --- `describe` unwords (ps ++ ["pinned to " ++ showSuite suite]) --- where --- ls = [ "Package: " ++ unwords ps --- , "Pin: release " ++ suitePin suite --- , "Pin-Priority: " ++ show pin --- ] --- f = "/etc/apt/preferences.d/10propellor" - --- -- Apt supports multiple entries in each "Package:" line, so we could use a --- -- single configuration block for each pinnedTo property that is applied to the --- -- host. However, that would make it hard to sensibly revert the pin. - --- pinnedTo' :: String -> DebianSuite -> PinPriority -> RevertableProperty Debian --- p `pinnedTo` suite pin = (f `File.containsLines` ls) (f `File.lacksLines` ls) --- where --- ls = [ "" --- , "Package: " ++ p --- , "Pin: release " ++ suitePin suite --- , "Pin-Priority: " ++ show pin --- ] --- f = "/etc/apt/preferences.d/10" ++ p +pinnedTo + :: [String] + -> DebianSuite + -> PinPriority + -> RevertableProperty UnixLike UnixLike +pinnedTo ps suite pin = (\p -> pinnedTo' p suite pin) `applyToList` ps + +pinnedTo' + :: String + -> DebianSuite + -> PinPriority + -> RevertableProperty UnixLike UnixLike +pinnedTo' p suite pin = + "/etc/apt/preferences.d/10propellor" `File.containsBlock` + [ "Package: " ++ p + , "Pin: release " ++ suitePin suite + , "Pin-Priority: " ++ show pin + ] + +-- TODO should be RevertableProperty Debian Debian -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. -- cgit v1.2.3 From f5d5a99e23e59dd010f8a1778dab75fa318a95c3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:18:03 -0700 Subject: suiteAvailablePinned avoids pinning backports --- src/Propellor/Property/Apt.hs | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 6f8fb9dd..d1958412 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -114,8 +114,6 @@ suiteAvailablePinned -> RevertableProperty Debian Debian suiteAvailablePinned s pin = available unavailable where - -- TODO have to pin -backports too? is that sensible? maybe avoid - -- adding it, instead available :: Property Debian available = tightenTargets $ combineProperties (desc True) $ props & File.hasContent prefFile @@ -123,27 +121,34 @@ suiteAvailablePinned s pin = available unavailable , "Pin: release " ++ suitePin s , "Pin-Priority: " ++ show pin ] - & setSourceFile + & setSourcesFile unavailable :: Property Debian unavailable = tightenTargets $ combineProperties (desc False) $ props - & File.notPresent sourceFile + & File.notPresent sourcesFile `onChange` update & File.notPresent prefFile - setSourceFile :: Property Debian - setSourceFile = withOS (desc True) $ \w o -> case o of + setSourcesFile :: Property Debian + setSourcesFile = withOS (desc True) $ \w o -> case o of (Just (System (Debian _ hostSuite) _)) | s /= hostSuite -> ensureProperty w $ - File.hasContent - sourceFile - (concatMap (\gen -> gen s) generators) - `onChange` update + File.hasContent sourcesFile sources + `onChange` update _ -> noChange + -- Unless we are pinning a backports suite, filter out any backports + -- sources that were added by our generators. The user probably doesn't + -- want those to be pinned to the same value + sources = dropBackports $ concatMap (\gen -> gen s) generators + where + dropBackports + | "-backports" `isSuffixOf` (showSuite s) = id + | otherwise = filter (not . isInfixOf "-backports") + generators = [debCdn, kernelOrg, securityUpdates] prefFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" - sourceFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" + sourcesFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" desc True = "Debian " ++ showSuite s ++ " pinned, priority " ++ show pin desc False = "Debian " ++ showSuite s ++ "not pinned" -- cgit v1.2.3 From 2220efc954a49a156942b3566350980ed483a64f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:27:23 -0700 Subject: pass a tuple to Apt.pinnedTo This permits calling Apt.pinnedTo infix --- src/Propellor/Property/Apt.hs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index d1958412..314cfef1 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -258,21 +258,19 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- -- For example, to obtain all Emacs Lisp addon packages from sid, you could use -- --- > & Apt.suiteAvailablePinned Unstable --- > & ["elpa-*"] `Apt.pinnedTo` Unstable 990 +-- > & Apt.suiteAvailablePinned Unstable (-10) +-- > & ["elpa-*"] `Apt.pinnedTo` (Unstable, 990) pinnedTo :: [String] - -> DebianSuite - -> PinPriority + -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike -pinnedTo ps suite pin = (\p -> pinnedTo' p suite pin) `applyToList` ps +pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps pinnedTo' :: String - -> DebianSuite - -> PinPriority + -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike -pinnedTo' p suite pin = +pinnedTo' p (suite, pin) = "/etc/apt/preferences.d/10propellor" `File.containsBlock` [ "Package: " ++ p , "Pin: release " ++ suitePin suite -- cgit v1.2.3 From ba5ae39d1a80e1741971571f7843e877a7a271ff Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:33:50 -0700 Subject: describe Apt.pinnedTo --- src/Propellor/Property/Apt.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 314cfef1..b18626c6 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -265,6 +265,7 @@ pinnedTo -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps + `describe` unwords (("pinned to" ++ showSuite suite):ps) pinnedTo' :: String -- cgit v1.2.3 From c49aded57e0a01ed2fb3611a713f7292c619a09c Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:34:43 -0700 Subject: spacing --- src/Propellor/Property/Apt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index b18626c6..eb74dc89 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -265,7 +265,7 @@ pinnedTo -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps - `describe` unwords (("pinned to" ++ showSuite suite):ps) + `describe` unwords (("pinned to " ++ showSuite suite):ps) pinnedTo' :: String -- cgit v1.2.3 From 2f5a3ee09b78ec18df4e81f87644e5babb4dc2cc Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:38:58 -0700 Subject: neaten the prefs file Apt.pinnedTo generates --- src/Propellor/Property/Apt.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index eb74dc89..f3c21f98 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -272,10 +272,11 @@ pinnedTo' -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo' p (suite, pin) = - "/etc/apt/preferences.d/10propellor" `File.containsBlock` + "/etc/apt/preferences.d/10propellor.pref" `File.containsBlock` [ "Package: " ++ p , "Pin: release " ++ suitePin suite , "Pin-Priority: " ++ show pin + , "" ] -- TODO should be RevertableProperty Debian Debian -- cgit v1.2.3 From dce47e8fd085e60e359004fd22ff27e178d50af2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 20:46:00 -0700 Subject: more spacing --- src/Propellor/Property/Apt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index f3c21f98..8539c4a6 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -151,7 +151,7 @@ suiteAvailablePinned s pin = available unavailable sourcesFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" desc True = "Debian " ++ showSuite s ++ " pinned, priority " ++ show pin - desc False = "Debian " ++ showSuite s ++ "not pinned" + desc False = "Debian " ++ showSuite s ++ " not pinned" setSourcesList :: [Line] -> Property DebianLike setSourcesList ls = sourcesList `File.hasContent` ls `onChange` update -- cgit v1.2.3 From bd8396406c4f86fba598fb98e097d657e72f2ab0 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 20:51:51 -0700 Subject: Apt.pinnedTo uses File.configFileName --- src/Propellor/Property/Apt.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 8539c4a6..ef3387ca 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -272,12 +272,16 @@ pinnedTo' -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo' p (suite, pin) = - "/etc/apt/preferences.d/10propellor.pref" `File.containsBlock` + (prefFile `File.hasContent` prefs) File.notPresent prefFile + where + prefs = [ "Package: " ++ p , "Pin: release " ++ suitePin suite , "Pin-Priority: " ++ show pin , "" ] + prefFile = "/etc/apt/preferences.d/10propellor_" + ++ File.configFileName p <.> "pref" -- TODO should be RevertableProperty Debian Debian -- cgit v1.2.3 From 10cb6c5c4e69d5d7617bedf2b439e371e4ff07ab Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 20:56:29 -0700 Subject: AptPrefPackage type --- src/Propellor/Property/Apt.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index ef3387ca..e426b26f 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -249,6 +249,11 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv where cmd = "cd '" ++ dir ++ "' && mk-build-deps debian/control --install --tool 'apt-get -y --no-install-recommends' --remove" +-- | The name of a package, a glob to match the names of packages, or a regexp +-- surrounded by slashes to match the names of packages. See +-- apt_preferences(5), "Regular expressions and glob(7) syntax" +type AptPrefPackage = String + -- | Pins a list of packages, package wildcards and/or regular expressions to a -- given suite with a given pin priority (see apt_preferences(5)). Revert to -- unpin. @@ -261,14 +266,14 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- > & Apt.suiteAvailablePinned Unstable (-10) -- > & ["elpa-*"] `Apt.pinnedTo` (Unstable, 990) pinnedTo - :: [String] + :: [AptPrefPackage] -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps `describe` unwords (("pinned to " ++ showSuite suite):ps) pinnedTo' - :: String + :: AptPrefPackage -> (DebianSuite, PinPriority) -> RevertableProperty UnixLike UnixLike pinnedTo' p (suite, pin) = -- cgit v1.2.3 From 0a2d07bae428d3be077daf028999bf3e669e6bb7 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 20:59:28 -0700 Subject: fix type of Apt.pinnedTo --- src/Propellor/Property/Apt.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index e426b26f..c21931a9 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -268,16 +268,17 @@ type AptPrefPackage = String pinnedTo :: [AptPrefPackage] -> (DebianSuite, PinPriority) - -> RevertableProperty UnixLike UnixLike + -> RevertableProperty Debian Debian pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps `describe` unwords (("pinned to " ++ showSuite suite):ps) pinnedTo' :: AptPrefPackage -> (DebianSuite, PinPriority) - -> RevertableProperty UnixLike UnixLike + -> RevertableProperty Debian Debian pinnedTo' p (suite, pin) = - (prefFile `File.hasContent` prefs) File.notPresent prefFile + (tightenTargets $ prefFile `File.hasContent` prefs) + (tightenTargets $ File.notPresent prefFile) where prefs = [ "Package: " ++ p -- cgit v1.2.3 From 626f13c408deb7b8e6940b213f7a0081bbf8fe23 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 21:04:58 -0700 Subject: drop a superfluous blank line in pref file --- src/Propellor/Property/Apt.hs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index c21931a9..ba5fd5e7 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -284,7 +284,6 @@ pinnedTo' p (suite, pin) = [ "Package: " ++ p , "Pin: release " ++ suitePin suite , "Pin-Priority: " ++ show pin - , "" ] prefFile = "/etc/apt/preferences.d/10propellor_" ++ File.configFileName p <.> "pref" -- cgit v1.2.3 From 2c53b0f0f098f3112782a52f4b9575ec36369b16 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 2 Feb 2017 21:06:47 -0700 Subject: add Explanation: lines to pref files --- src/Propellor/Property/Apt.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index ba5fd5e7..218c7197 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -117,7 +117,8 @@ suiteAvailablePinned s pin = available unavailable available :: Property Debian available = tightenTargets $ combineProperties (desc True) $ props & File.hasContent prefFile - [ "Package: *" + [ "Explanation: This file added by propellor" + , "Package: *" , "Pin: release " ++ suitePin s , "Pin-Priority: " ++ show pin ] @@ -281,7 +282,8 @@ pinnedTo' p (suite, pin) = (tightenTargets $ File.notPresent prefFile) where prefs = - [ "Package: " ++ p + [ "Explanation: This file added by propellor" + , "Package: " ++ p , "Pin: release " ++ suitePin suite , "Pin-Priority: " ++ show pin ] -- cgit v1.2.3 From eae8fe777c141b34ec586e9af5bde278a33cc0c3 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 4 Feb 2017 11:30:28 -0700 Subject: rm superfluous TODO --- src/Propellor/Property/Apt.hs | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 218c7197..fef4a700 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -290,8 +290,6 @@ pinnedTo' p (suite, pin) = prefFile = "/etc/apt/preferences.d/10propellor_" ++ File.configFileName p <.> "pref" --- TODO should be RevertableProperty Debian Debian - -- | Package installation may fail becuse the archive has changed. -- Run an update in that case and retry. robustly :: Property DebianLike -> Property DebianLike -- cgit v1.2.3 From 3829c41dc936b742be6aaae885f771b560f3a96f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 4 Feb 2017 11:32:34 -0700 Subject: factor out suitePinBlock --- src/Propellor/Property/Apt.hs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index fef4a700..61596914 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -116,12 +116,7 @@ suiteAvailablePinned s pin = available unavailable where available :: Property Debian available = tightenTargets $ combineProperties (desc True) $ props - & File.hasContent prefFile - [ "Explanation: This file added by propellor" - , "Package: *" - , "Pin: release " ++ suitePin s - , "Pin-Priority: " ++ show pin - ] + & File.hasContent prefFile (suitePinBlock "*" s pin) & setSourcesFile unavailable :: Property Debian @@ -281,12 +276,7 @@ pinnedTo' p (suite, pin) = (tightenTargets $ prefFile `File.hasContent` prefs) (tightenTargets $ File.notPresent prefFile) where - prefs = - [ "Explanation: This file added by propellor" - , "Package: " ++ p - , "Pin: release " ++ suitePin suite - , "Pin-Priority: " ++ show pin - ] + prefs = suitePinBlock p suite pin prefFile = "/etc/apt/preferences.d/10propellor_" ++ File.configFileName p <.> "pref" @@ -454,5 +444,13 @@ suitePin s = prefix s ++ showSuite s prefix (Stable _) = "n=" prefix _ = "a=" +suitePinBlock :: AptPrefPackage -> DebianSuite -> PinPriority +suitePinBlock p suite pin = + [ "Explanation: This file added by propellor" + , "Package: " ++ p + , "Pin: release " ++ suitePin suite + , "Pin-Priority: " ++ show pin + ] + dpkgStatus :: FilePath dpkgStatus = "/var/lib/dpkg/status" -- cgit v1.2.3 From 50986da33afb5b170a5336e4714e79130959b6c9 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 4 Feb 2017 11:46:07 -0700 Subject: Apt.pinnedTo takes a list of suites and pin priorities --- src/Propellor/Property/Apt.hs | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 61596914..d0f25e81 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -251,32 +251,41 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv type AptPrefPackage = String -- | Pins a list of packages, package wildcards and/or regular expressions to a --- given suite with a given pin priority (see apt_preferences(5)). Revert to --- unpin. +-- list of suites and corresponding pin priorities (see apt_preferences(5)). +-- Revert to unpin. -- --- Note that this will have no effect unless there is an apt source for the --- suite. One way to add an apt source is 'Apt.suiteAvailablePinned'. +-- Each package, package wildcard or regular expression will be pinned to all of +-- the specified suites. -- --- For example, to obtain all Emacs Lisp addon packages from sid, you could use +-- Note that this will have no effect unless there is an apt source for each of +-- the suites. One way to add an apt source is 'Apt.suiteAvailablePinned'. -- +-- For example, to obtain Emacs Lisp addon packages not present in your release +-- of Debian from testing, falling back to sid if they're not available in +-- testing, you could use +-- +-- > & Apt.suiteAvailablePinned Testing (-10) -- > & Apt.suiteAvailablePinned Unstable (-10) --- > & ["elpa-*"] `Apt.pinnedTo` (Unstable, 990) +-- > & ["elpa-*"] `Apt.pinnedTo` [(Testing, 100), (Unstable, 50)] pinnedTo :: [AptPrefPackage] - -> (DebianSuite, PinPriority) + -> [(DebianSuite, PinPriority)] -> RevertableProperty Debian Debian -pinnedTo ps (suite, pin) = (\p -> pinnedTo' p (suite, pin)) `applyToList` ps - `describe` unwords (("pinned to " ++ showSuite suite):ps) +pinnedTo ps pins = (\p -> pinnedTo' p pins) `applyToList` ps + `describe` unwords (("pinned to " ++ showSuites):ps) + where + showSuites = intercalate "," $ showSuite . fst <$> pins pinnedTo' :: AptPrefPackage - -> (DebianSuite, PinPriority) + -> [(DebianSuite, PinPriority)] -> RevertableProperty Debian Debian -pinnedTo' p (suite, pin) = +pinnedTo' p pins = (tightenTargets $ prefFile `File.hasContent` prefs) (tightenTargets $ File.notPresent prefFile) where - prefs = suitePinBlock p suite pin + prefs = foldr step [] pins + step (suite, pin) ls = ls ++ suitePinBlock p suite pin ++ [""] prefFile = "/etc/apt/preferences.d/10propellor_" ++ File.configFileName p <.> "pref" @@ -444,7 +453,7 @@ suitePin s = prefix s ++ showSuite s prefix (Stable _) = "n=" prefix _ = "a=" -suitePinBlock :: AptPrefPackage -> DebianSuite -> PinPriority +suitePinBlock :: AptPrefPackage -> DebianSuite -> PinPriority -> [Line] suitePinBlock p suite pin = [ "Explanation: This file added by propellor" , "Package: " ++ p -- cgit v1.2.3 From 8638b56b36b8abf06cbb6d107a4bd058bd915437 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 4 Feb 2017 11:52:43 -0700 Subject: AptPrefPackage -> AptPackagePref This reads much better: it's an "apt package preference". --- src/Propellor/Property/Apt.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index d0f25e81..724f6d05 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -248,7 +248,7 @@ buildDepIn dir = cmdPropertyEnv "sh" ["-c", cmd] noninteractiveEnv -- | The name of a package, a glob to match the names of packages, or a regexp -- surrounded by slashes to match the names of packages. See -- apt_preferences(5), "Regular expressions and glob(7) syntax" -type AptPrefPackage = String +type AptPackagePref = String -- | Pins a list of packages, package wildcards and/or regular expressions to a -- list of suites and corresponding pin priorities (see apt_preferences(5)). @@ -268,7 +268,7 @@ type AptPrefPackage = String -- > & Apt.suiteAvailablePinned Unstable (-10) -- > & ["elpa-*"] `Apt.pinnedTo` [(Testing, 100), (Unstable, 50)] pinnedTo - :: [AptPrefPackage] + :: [AptPackagePref] -> [(DebianSuite, PinPriority)] -> RevertableProperty Debian Debian pinnedTo ps pins = (\p -> pinnedTo' p pins) `applyToList` ps @@ -277,7 +277,7 @@ pinnedTo ps pins = (\p -> pinnedTo' p pins) `applyToList` ps showSuites = intercalate "," $ showSuite . fst <$> pins pinnedTo' - :: AptPrefPackage + :: AptPackagePref -> [(DebianSuite, PinPriority)] -> RevertableProperty Debian Debian pinnedTo' p pins = @@ -453,7 +453,7 @@ suitePin s = prefix s ++ showSuite s prefix (Stable _) = "n=" prefix _ = "a=" -suitePinBlock :: AptPrefPackage -> DebianSuite -> PinPriority -> [Line] +suitePinBlock :: AptPackagePref -> DebianSuite -> PinPriority -> [Line] suitePinBlock p suite pin = [ "Explanation: This file added by propellor" , "Package: " ++ p -- cgit v1.2.3 From 33767d2d86c81f285ce253459f34c9f8f3a285a1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Feb 2017 12:28:04 -0400 Subject: deb.debian.org * Apt: Removed the mirrors.kernel.org line from stdSourcesList etc. The mirror CDN has a new implementation that should avoid the problems with httpredir that made an extra mirror sometimes be needed. * Switch Debian CDN address to deb.debian.org. httpredir.debian.org points to the same IPs as deb.debian.org now, so this shouldn't change anything except to use the now preferred name. --- debian/changelog | 9 +++++++++ src/Propellor/Property/Apt.hs | 12 +++--------- src/Propellor/Property/DebianMirror.hs | 2 +- src/Propellor/Property/Sbuild.hs | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/debian/changelog b/debian/changelog index 7a2fe693..ef67c673 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +propellor (3.3.1) UNRELEASED; urgency=medium + + * Apt: Removed the mirrors.kernel.org line from stdSourcesList etc. + The mirror CDN has a new implementation that should avoid the problems + with httpredir that made an extra mirror sometimes be needed. + * Switch Debian CDN address to deb.debian.org. + + -- Joey Hess Mon, 13 Feb 2017 12:23:42 -0400 + propellor (3.3.0) unstable; urgency=medium * Arch Linux is now supported by Propellor! diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 724f6d05..9a55c367 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -62,10 +62,7 @@ binandsrc url suite = catMaybes return $ debLine bs url stdSections debCdn :: SourcesGenerator -debCdn = binandsrc "http://httpredir.debian.org/debian" - -kernelOrg :: SourcesGenerator -kernelOrg = binandsrc "http://mirrors.kernel.org/debian" +debCdn = binandsrc "http://deb.debian.org/debian" -- | Only available for Stable and Testing securityUpdates :: SourcesGenerator @@ -77,9 +74,6 @@ securityUpdates suite -- | Makes sources.list have a standard content using the Debian mirror CDN, -- with the Debian suite configured by the os. --- --- Since the CDN is sometimes unreliable, also adds backup lines using --- kernel.org. stdSourcesList :: Property Debian stdSourcesList = withOS "standard sources.list" $ \w o -> case o of (Just (System (Debian _ suite) _)) -> @@ -98,7 +92,7 @@ stdSourcesList' suite more = tightenTargets $ setSourcesList (concatMap (\gen -> gen suite) generators) `describe` ("standard sources.list for " ++ show suite) where - generators = [debCdn, kernelOrg, securityUpdates] ++ more + generators = [debCdn, securityUpdates] ++ more type PinPriority = Int @@ -142,7 +136,7 @@ suiteAvailablePinned s pin = available unavailable | "-backports" `isSuffixOf` (showSuite s) = id | otherwise = filter (not . isInfixOf "-backports") - generators = [debCdn, kernelOrg, securityUpdates] + generators = [debCdn, securityUpdates] prefFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" sourcesFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" diff --git a/src/Propellor/Property/DebianMirror.hs b/src/Propellor/Property/DebianMirror.hs index d8a9c423..ad15f9a2 100644 --- a/src/Propellor/Property/DebianMirror.hs +++ b/src/Propellor/Property/DebianMirror.hs @@ -79,7 +79,7 @@ data DebianMirror = DebianMirror mkDebianMirror :: FilePath -> Cron.Times -> DebianMirror mkDebianMirror dir crontimes = DebianMirror - { _debianMirrorHostName = "httpredir.debian.org" + { _debianMirrorHostName = "deb.debian.org" , _debianMirrorDir = dir , _debianMirrorSuites = [] , _debianMirrorArchitectures = [] diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index c3e55bbf..db5982cd 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -501,7 +501,7 @@ schrootFromSystem system@(System _ arch) = >>= \suite -> return $ SbuildSchroot suite arch stdMirror :: System -> Maybe Apt.Url -stdMirror (System (Debian _ _) _) = Just "http://httpredir.debian.org/debian" +stdMirror (System (Debian _ _) _) = Just "http://deb.debian.org/debian" stdMirror (System (Buntish _) _) = Just "mirror://mirrors.ubuntu.com/" stdMirror _ = Nothing -- cgit v1.2.3