From aef9f836ffba8ffbac669f0060b5963d5b10bfd7 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Fri, 11 Sep 2015 11:09:09 +0200 Subject: DebianMirror: add Url argument; add mirrorCdn Signed-off-by: Félix Sipma --- src/Propellor/Property/DebianMirror.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/DebianMirror.hs b/src/Propellor/Property/DebianMirror.hs index 271b386e..37a22ae0 100644 --- a/src/Propellor/Property/DebianMirror.hs +++ b/src/Propellor/Property/DebianMirror.hs @@ -23,8 +23,8 @@ showPriority Standard = "standard" showPriority Optional = "optional" showPriority Extra = "extra" -mirror :: FilePath -> [DebianSuite] -> [Architecture] -> [Apt.Section] -> Bool -> [DebianPriority] -> Cron.Times -> Property NoInfo -mirror dir suites archs sections source priorities crontimes = propertyList +mirror :: Url -> FilePath -> [DebianSuite] -> [Architecture] -> [Apt.Section] -> Bool -> [DebianPriority] -> Cron.Times -> Property NoInfo +mirror url dir suites archs sections source priorities crontimes = propertyList ("Debian mirror " ++ dir) [ Apt.installed ["debmirror"] , File.dirExists dir @@ -47,8 +47,11 @@ mirror dir suites archs sections source priorities crontimes = propertyList ++ (if source then [] else ["--nosource"]) ++ - [ "--host", "ftp.fr.debian.org" + [ "--host", url , "--method", "http" , "--keyring", "/usr/share/keyrings/debian-archive-keyring.gpg" , dir ] + +mirrorCdn :: FilePath -> [DebianSuite] -> [Architecture] -> [Apt.Section] -> Bool -> [DebianPriority] -> Cron.Times -> Property NoInfo +mirrorCdn = mirror "http://httpredir.debian.org/debian" -- cgit v1.2.3