summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/DebianMirror.hs
diff options
context:
space:
mode:
authorFélix Sipma2015-09-11 11:09:09 +0200
committerJoey Hess2015-09-11 11:24:30 -0400
commitaef9f836ffba8ffbac669f0060b5963d5b10bfd7 (patch)
tree6e0b3f2a7955fe3e6ee6be3e3162cba4cff8c2b7 /src/Propellor/Property/DebianMirror.hs
parent815673962625221ded45d98177f19970d66dd525 (diff)
DebianMirror: add Url argument; add mirrorCdn
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
Diffstat (limited to 'src/Propellor/Property/DebianMirror.hs')
-rw-r--r--src/Propellor/Property/DebianMirror.hs9
1 files changed, 6 insertions, 3 deletions
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"