packages feed

propellor 4.7.5 → 4.7.6

raw patch · 5 files changed

+52/−5 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Propellor.Property.Sbuild: userConfig :: User -> Property DebianLike

Files

CHANGELOG view
@@ -1,3 +1,12 @@+propellor (4.7.6) unstable; urgency=medium++  * Sbuild: Add Sbuild.userConfig property.+    Thanks, Sean Whitton+  * Locale: Make sure that the locales package is installed when enabling+    locales.++ -- Joey Hess <id@joeyh.name>  Tue, 01 Aug 2017 17:59:07 -0400+ propellor (4.7.5) unstable; urgency=medium    * Avoid crashing when getTerminalName fails due to eg, being in a chroot.
debian/changelog view
@@ -1,3 +1,12 @@+propellor (4.7.6) unstable; urgency=medium++  * Sbuild: Add Sbuild.userConfig property.+    Thanks, Sean Whitton+  * Locale: Make sure that the locales package is installed when enabling+    locales.++ -- Joey Hess <id@joeyh.name>  Tue, 01 Aug 2017 17:59:07 -0400+ propellor (4.7.5) unstable; urgency=medium    * Avoid crashing when getTerminalName fails due to eg, being in a chroot.
propellor.cabal view
@@ -1,5 +1,5 @@ Name: propellor-Version: 4.7.5+Version: 4.7.6 Cabal-Version: >= 1.20 License: BSD2 Maintainer: Joey Hess <id@joeyh.name>
src/Propellor/Property/Locale.hs view
@@ -4,6 +4,7 @@  import Propellor.Base import Propellor.Property.File+import qualified Propellor.Property.Apt as Apt  import Data.List (isPrefixOf) @@ -50,7 +51,8 @@ -- Per Debian bug #684134 we cannot ensure a locale is generated by means of -- Apt.reConfigure.  So localeAvailable edits /etc/locale.gen manually. available :: Locale -> RevertableProperty DebianLike DebianLike-available locale = ensureAvailable <!> ensureUnavailable+available locale = ensureAvailable `requires` Apt.installed ["locales"]+	<!> ensureUnavailable   where 	f = "/etc/locale.gen" 	desc = (locale ++ " locale generated")
src/Propellor/Property/Sbuild.hs view
@@ -32,16 +32,13 @@  In @~/.sbuildrc@ (sbuild 0.71.0 or newer): ->  $run_piuparts = 1; >  $piuparts_opts = [ >      '--no-eatmydata', >      '--schroot', >      '%r-%a-sbuild', >      '--fail-if-inadequate',->      '--fail-on-broken-symlinks', >      ]; >->  $run_autopkgtest = 1; >  $autopkgtest_root_args = ""; >  $autopkgtest_opts = ["--", "schroot", "%r-%a-sbuild"]; @@ -81,6 +78,7 @@ 	keypairGenerated, 	keypairInsecurelyGenerated, 	usableBy,+	userConfig, ) where  import Propellor.Base@@ -447,6 +445,35 @@ -- 	<> Firewall.NotDestination -- 		[Firewall.IPWithNumMask (IPv4 "127.0.0.1") 8]) -- 	`requires` installed 	-- sbuild group must exist++-- | Maintain recommended ~/.sbuildrc for a user, and adds them to the+-- sbuild group+--+-- You probably want a custom ~/.sbuildrc on your workstation, but+-- this property is handy for quickly setting up build boxes.+userConfig :: User -> Property DebianLike+userConfig user@(User u) = go+	`requires` usableBy user+	`requires` Apt.installed ["piuparts", "autopkgtest", "lintian"]+  where+	go :: Property DebianLike+	go = property' ("~/.sbuildrc for " ++ u) $ \w -> do+    		h <- liftIO (User.homedir user)+    		ensureProperty w $ File.hasContent (h </> ".sbuildrc")+			[ "$run_lintian = 1;"+			, ""+			, "$run_piuparts = 1;"+			, "$piuparts_opts = ["+			, "    '--no-eatmydata',"+			, "    '--schroot',"+			, "    '%r-%a-sbuild',"+			, "    '--fail-if-inadequate',"+			, "    ];"+			, ""+			, "$run_autopkgtest = 1;"+			, "$autopkgtest_root_args = \"\";"+			, "$autopkgtest_opts = [\"--\", \"schroot\", \"%r-%a-sbuild\"];"+			]  -- ==== utility functions ====