propellor spin
This commit is contained in:
parent
a552434370
commit
73fcd794e4
|
@ -60,9 +60,10 @@ setSourcesList :: [Line] -> Property
|
||||||
setSourcesList ls = sourcesList `File.hasContent` ls `onChange` update
|
setSourcesList ls = sourcesList `File.hasContent` ls `onChange` update
|
||||||
|
|
||||||
runApt :: [String] -> Property
|
runApt :: [String] -> Property
|
||||||
runApt ps = cmdProperty' "apt-get" ps env
|
runApt ps = cmdProperty' "apt-get" ps noninteractiveEnv
|
||||||
where
|
|
||||||
env =
|
noninteractiveEnv :: [(String, String)]
|
||||||
|
noninteractiveEnv =
|
||||||
[ ("DEBIAN_FRONTEND", "noninteractive")
|
[ ("DEBIAN_FRONTEND", "noninteractive")
|
||||||
, ("APT_LISTCHANGES_FRONTEND", "none")
|
, ("APT_LISTCHANGES_FRONTEND", "none")
|
||||||
]
|
]
|
||||||
|
@ -95,8 +96,17 @@ buildDep ps = robustly go
|
||||||
where
|
where
|
||||||
go = runApt $ ["-y", "build-dep"] ++ ps
|
go = runApt $ ["-y", "build-dep"] ++ ps
|
||||||
|
|
||||||
{- Package installation may fail becuse the archive has changed.
|
-- | Installs the build deps for the source package unpacked
|
||||||
- Run an update in that case and retry. -}
|
-- in the specifed directory, with a dummy package also
|
||||||
|
-- installed so that autoRemove won't remove them.
|
||||||
|
buildDepIn :: FilePath -> Property
|
||||||
|
buildDepIn dir = go `requires` installed ["devscripts"]
|
||||||
|
where
|
||||||
|
go = cmdProperty' "sh" ["-c", "cd '" ++ dir ++ "' && mk-build-deps debian/control --install --remove"]
|
||||||
|
noninteractiveEnv
|
||||||
|
|
||||||
|
-- | Package installation may fail becuse the archive has changed.
|
||||||
|
-- Run an update in that case and retry. -}
|
||||||
robustly :: Property -> Property
|
robustly :: Property -> Property
|
||||||
robustly p = Property (propertyDesc p) $ do
|
robustly p = Property (propertyDesc p) $ do
|
||||||
r <- ensureProperty p
|
r <- ensureProperty p
|
||||||
|
|
|
@ -17,8 +17,7 @@ builder arch crontimes rsyncupload = combineProperties "gitannexbuilder"
|
||||||
[ Apt.stdSourcesList Unstable
|
[ Apt.stdSourcesList Unstable
|
||||||
, Apt.buildDep ["git-annex"]
|
, Apt.buildDep ["git-annex"]
|
||||||
, Apt.installed ["git", "rsync", "moreutils", "ca-certificates",
|
, Apt.installed ["git", "rsync", "moreutils", "ca-certificates",
|
||||||
"liblockfile-simple-perl", "cabal-install", "vim", "less",
|
"liblockfile-simple-perl", "cabal-install", "vim", "less"]
|
||||||
"libghc-fdo-notify-dev"]
|
|
||||||
, serviceRunning "cron" `requires` Apt.installed ["cron"]
|
, serviceRunning "cron" `requires` Apt.installed ["cron"]
|
||||||
, User.accountFor builduser
|
, User.accountFor builduser
|
||||||
, check (lacksdir builddir) $ userScriptProperty builduser
|
, check (lacksdir builddir) $ userScriptProperty builduser
|
||||||
|
@ -31,6 +30,9 @@ builder arch crontimes rsyncupload = combineProperties "gitannexbuilder"
|
||||||
[ "cd " ++ builddir
|
[ "cd " ++ builddir
|
||||||
, "git clone git://git-annex.branchable.com/ build"
|
, "git clone git://git-annex.branchable.com/ build"
|
||||||
]
|
]
|
||||||
|
, Property "git-annex source build deps installed" $ do
|
||||||
|
d <- homedir
|
||||||
|
ensureProperty $ Apt.buildDepIn (d </> builddir </> "build")
|
||||||
, Cron.niceJob "gitannexbuilder" crontimes builduser ("~/" ++ builddir) "git pull ; ./autobuild"
|
, Cron.niceJob "gitannexbuilder" crontimes builduser ("~/" ++ builddir) "git pull ; ./autobuild"
|
||||||
-- The builduser account does not have a password set,
|
-- The builduser account does not have a password set,
|
||||||
-- instead use the password privdata to hold the rsync server
|
-- instead use the password privdata to hold the rsync server
|
||||||
|
|
Loading…
Reference in New Issue