Merge branch 'joeyconfig'

This commit is contained in:
Joey Hess 2015-07-05 15:52:46 -04:00
commit 0349cf076b
4 changed files with 16 additions and 4 deletions

2
debian/changelog vendored
View File

@ -5,6 +5,8 @@ propellor (2.6.0) UNRELEASED; urgency=medium
Thanks, Antoine Eiche. Thanks, Antoine Eiche.
* Added --unset to delete a privdata field. * Added --unset to delete a privdata field.
* Version dependency on exceptions. * Version dependency on exceptions.
* Systemd: Add masked property.
Thanks, Sean Whitton
-- Joey Hess <id@joeyh.name> Tue, 16 Jun 2015 14:49:12 -0400 -- Joey Hess <id@joeyh.name> Tue, 16 Jun 2015 14:49:12 -0400

View File

@ -67,7 +67,6 @@ tree buildarch = combineProperties "gitannexbuilder tree" $ props
buildDepsApt :: Property HasInfo buildDepsApt :: Property HasInfo
buildDepsApt = combineProperties "gitannexbuilder build deps" $ props buildDepsApt = combineProperties "gitannexbuilder build deps" $ props
& Apt.buildDep ["git-annex"] & Apt.buildDep ["git-annex"]
& Apt.installed ["liblockfile-simple-perl"]
& buildDepsNoHaskellLibs & buildDepsNoHaskellLibs
& Apt.buildDepIn builddir & Apt.buildDepIn builddir
`describe` "git-annex source build deps installed" `describe` "git-annex source build deps installed"
@ -86,7 +85,7 @@ haskellPkgsInstalled :: String -> Property NoInfo
haskellPkgsInstalled dir = flagFile go ("/haskellpkgsinstalled") haskellPkgsInstalled dir = flagFile go ("/haskellpkgsinstalled")
where where
go = userScriptProperty (User builduser) go = userScriptProperty (User builduser)
[ "cd " ++ builddir ++ " && ./standalone/ " ++ dir ++ "/install-haskell-packages" [ "cd " ++ builddir ++ " && ./standalone/" ++ dir ++ "/install-haskell-packages"
] ]
-- Installs current versions of git-annex's deps from cabal, but only -- Installs current versions of git-annex's deps from cabal, but only
@ -150,7 +149,6 @@ androidContainer name setupgitannexdir gitannexdir = Systemd.container name boot
& File.ownerGroup homedir (User builduser) (Group builduser) & File.ownerGroup homedir (User builduser) (Group builduser)
& flagFile chrootsetup ("/chrootsetup") & flagFile chrootsetup ("/chrootsetup")
`requires` setupgitannexdir `requires` setupgitannexdir
& buildDepsApt
& haskellPkgsInstalled "android" & haskellPkgsInstalled "android"
where where
-- Use git-annex's android chroot setup script, which will install -- Use git-annex's android chroot setup script, which will install
@ -159,5 +157,5 @@ androidContainer name setupgitannexdir gitannexdir = Systemd.container name boot
chrootsetup = scriptProperty chrootsetup = scriptProperty
[ "cd " ++ gitannexdir ++ " && ./standalone/android/buildchroot-inchroot" [ "cd " ++ gitannexdir ++ " && ./standalone/android/buildchroot-inchroot"
] ]
osver = System (Debian Testing) "i386" osver = System (Debian (Stable "jessie")) "i386"
bootstrap = Chroot.debootstrapped osver mempty bootstrap = Chroot.debootstrapped osver mempty

View File

@ -859,6 +859,8 @@ legacyWebSites = propertyList "legacy web sites" $ props
, " AllowOverride None" , " AllowOverride None"
, Apache.allowAll , Apache.allowAll
, "</Directory>" , "</Directory>"
, "RewriteEngine On"
, "RewriteRule .* http://www.sowsearpoetry.org/ [L]"
] ]
& alias "wortroot.kitenet.net" & alias "wortroot.kitenet.net"
& alias "www.wortroot.kitenet.net" & alias "www.wortroot.kitenet.net"

View File

@ -7,6 +7,7 @@ module Propellor.Property.Systemd (
stopped, stopped,
enabled, enabled,
disabled, disabled,
masked,
running, running,
restarted, restarted,
networkd, networkd,
@ -89,6 +90,15 @@ disabled :: ServiceName -> Property NoInfo
disabled n = trivial $ cmdProperty "systemctl" ["disable", n] disabled n = trivial $ cmdProperty "systemctl" ["disable", n]
`describe` ("service " ++ n ++ " disabled") `describe` ("service " ++ n ++ " disabled")
-- | Masks a systemd service.
masked :: ServiceName -> RevertableProperty
masked n = systemdMask <!> systemdUnmask
where
systemdMask = trivial $ cmdProperty "systemctl" ["mask", n]
`describe` ("service " ++ n ++ " masked")
systemdUnmask = trivial $ cmdProperty "systemctl" ["unmask", n]
`describe` ("service " ++ n ++ " unmasked")
-- | Ensures that a service is both enabled and started -- | Ensures that a service is both enabled and started
running :: ServiceName -> Property NoInfo running :: ServiceName -> Property NoInfo
running n = trivial $ started n `requires` enabled n running n = trivial $ started n `requires` enabled n