From 2cae0fdb9e12b5a2e247c1f10017746d59c03721 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Thu, 10 Nov 2016 07:46:23 -0800 Subject: add the new shardmasters to iabak You might want to test Group.hasUser; I wasn't actually able to test it. --- joeyconfig.hs | 11 ++++++++--- src/Propellor/Property/Group.hs | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/joeyconfig.hs b/joeyconfig.hs index 49cc05f1..a3e19cff 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -527,13 +527,18 @@ iabak = host "iabak.archiveteam.org" $ props , (SshEcdsa, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHb0kXcrF5ThwS8wB0Hez404Zp9bz78ZxEGSqnwuF4d/N3+bymg7/HAj7l/SzRoEXKHsJ7P5320oMxBHeM16Y+k=") ] & Apt.installed ["etckeeper", "sudo"] - & Apt.installed ["vim", "screen", "tmux", "less", "emax-nox", "netcat"] + & Apt.installed ["vim", "screen", "tmux", "less", "emax-nox", "netcat", "python3", "python3-aiohttp"] & User.hasSomePassword (User "root") & propertyList "admin accounts" - (toProps $ map User.accountFor admins ++ map Sudo.enabledFor admins) + (toProps $ map User.accountFor admins + ++ map (Group.hasUser (Group "staff")) admins + ++ map Sudo.enabledFor admins) & User.hasSomePassword (User "joey") & GitHome.installedFor (User "joey") & Ssh.authorizedKey (User "db48x") "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAIAQDQ6urXcMDeyuFf4Ga7CuGezTShKnEMPHKJm7RQUtw3yXCPX5wnbvPS2+UFnHMzJvWOX5S5b/XpBpOusP0jLpxwOCEg4nA5b7uvWJ2VIChlMqopYMo+tDOYzK/Q74MZiNWi2hvf1tn3N9SnqOa7muBMKMENIX5KJdH8cJ/BaPqAP883gF8r2SwSZFvaB0xYCT/CIylC593n/+0+Lm07NUJIO8jil3n2SwXdVg6ib65FxZoO86M46wTghnB29GXqrz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/29ovHrRooqQFozf7GDW8Mjiu7ChZP9zx2H8JB/AAEFuWMwGV4AHICYdS9lOl/v+cDhgsnXdeuKEuxHhYlRxuRxJk/f17Sm/5H85UIzlu85wi3q/DW2FTZnlw4iJLnL6FArUIMzuBOZyoEhh0SPR41Xc4kkucDhnENybTZSR/yDzb0P1B7qjZ4GqcSEFja/hm/LH1oKJzZg8MEqeUoKYCUdVv9ek4IUGUONtVs53V5SOwFWR/nVuDk2BENr7NadYYVtu6MjBwgjso7NuhoNxVwIEP3BW67OQ8bxfNBtJJQNJejAhgZiqJItI9ucAfjQ== db48x@anglachel" + & Ssh.authorizedKey (User "db48x") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJQkqIgZ7D8WHW5Y3o+fpZC/4xtv/3IQrORJrTPCt7KY db48x@erebor" + & Ssh.authorizedKey (User "hcross") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP5OhU2Lita9RdjPkX9N0w9wZnmVlednUDEx24bVn4Mk IABAK key - Harry C" + & Ssh.authorizedKey (User "kaz") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHhFYMd9Htlf9wPZzIDyqbYYNwuo3m+kWQ9/pfAD/TE9 Kaz IABAK" & Apt.installed ["sudo"] & Ssh.noPasswords & IABak.gitServer monsters @@ -541,7 +546,7 @@ iabak = host "iabak.archiveteam.org" $ props & IABak.graphiteServer & IABak.publicFace where - admins = map User ["joey", "db48x"] + admins = map User ["joey", "db48x", "hcross", "kaz"] --' __|II| ,. ---- __|II|II|__ ( \_,/\ diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs index 58e49a86..30a9c665 100644 --- a/src/Propellor/Property/Group.hs +++ b/src/Propellor/Property/Group.hs @@ -12,3 +12,6 @@ exists (Group group') mgid = check test (cmdProperty "addgroup" (args mgid)) test = not . elem group' . words <$> readProcess "cut" ["-d:", "-f1", groupFile] args Nothing = [group'] args (Just gid) = ["--gid", show gid, group'] + +hasUser :: Group -> User -> Property DebianLike +hasUser (Group group') (User user) = hasGroup user group' -- cgit v1.2.3 From ba7ecada73598674d3d2f411fe7fea05fc7843f8 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Thu, 10 Nov 2016 12:25:57 -0800 Subject: concinnity --- src/Propellor/Property/Group.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs index 30a9c665..b171933a 100644 --- a/src/Propellor/Property/Group.hs +++ b/src/Propellor/Property/Group.hs @@ -14,4 +14,4 @@ exists (Group group') mgid = check test (cmdProperty "addgroup" (args mgid)) args (Just gid) = ["--gid", show gid, group'] hasUser :: Group -> User -> Property DebianLike -hasUser (Group group') (User user) = hasGroup user group' +hasUser = flip hasGroup -- cgit v1.2.3 From 1d689b1e4ce1f5eeedab140bd3c330484a928586 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Thu, 10 Nov 2016 12:33:44 -0800 Subject: update list of installed packages --- joeyconfig.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/joeyconfig.hs b/joeyconfig.hs index a3e19cff..f9807b1a 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -527,7 +527,10 @@ iabak = host "iabak.archiveteam.org" $ props , (SshEcdsa, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHb0kXcrF5ThwS8wB0Hez404Zp9bz78ZxEGSqnwuF4d/N3+bymg7/HAj7l/SzRoEXKHsJ7P5320oMxBHeM16Y+k=") ] & Apt.installed ["etckeeper", "sudo"] - & Apt.installed ["vim", "screen", "tmux", "less", "emax-nox", "netcat", "python3", "python3-aiohttp"] + -- vital but generic tools + & Apt.installed ["vim", "screen", "tmux", "less", "emacs-nox", "netcat", "nano"] + -- tools for creating shards + & Apt.installed ["jq", "python3", "python3-aiohttp"] & User.hasSomePassword (User "root") & propertyList "admin accounts" (toProps $ map User.accountFor admins @@ -539,7 +542,6 @@ iabak = host "iabak.archiveteam.org" $ props & Ssh.authorizedKey (User "db48x") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJQkqIgZ7D8WHW5Y3o+fpZC/4xtv/3IQrORJrTPCt7KY db48x@erebor" & Ssh.authorizedKey (User "hcross") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP5OhU2Lita9RdjPkX9N0w9wZnmVlednUDEx24bVn4Mk IABAK key - Harry C" & Ssh.authorizedKey (User "kaz") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHhFYMd9Htlf9wPZzIDyqbYYNwuo3m+kWQ9/pfAD/TE9 Kaz IABAK" - & Apt.installed ["sudo"] & Ssh.noPasswords & IABak.gitServer monsters & IABak.registrationServer monsters -- cgit v1.2.3 From 15449fa1dcc8e3621e38c53e9bf7bd3be62833fc Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Thu, 10 Nov 2016 22:30:36 -0800 Subject: add yipdw as a shardmaster --- joeyconfig.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/joeyconfig.hs b/joeyconfig.hs index f9807b1a..e7f9d3eb 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -542,13 +542,14 @@ iabak = host "iabak.archiveteam.org" $ props & Ssh.authorizedKey (User "db48x") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJQkqIgZ7D8WHW5Y3o+fpZC/4xtv/3IQrORJrTPCt7KY db48x@erebor" & Ssh.authorizedKey (User "hcross") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP5OhU2Lita9RdjPkX9N0w9wZnmVlednUDEx24bVn4Mk IABAK key - Harry C" & Ssh.authorizedKey (User "kaz") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHhFYMd9Htlf9wPZzIDyqbYYNwuo3m+kWQ9/pfAD/TE9 Kaz IABAK" + & Ssh.authorizedKey (User "yipdw") "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo2mGPw2TTJMHp7G86hMBh6n9/+abzg1oXIIlkwWwzo trythil@aglarond" & Ssh.noPasswords & IABak.gitServer monsters & IABak.registrationServer monsters & IABak.graphiteServer & IABak.publicFace where - admins = map User ["joey", "db48x", "hcross", "kaz"] + admins = map User ["joey", "db48x", "hcross", "kaz", "yipdw"] --' __|II| ,. ---- __|II|II|__ ( \_,/\ -- cgit v1.2.3 From fe064fb77dd3aaa0c566e2c9ee966e522a8cba6d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 14:02:01 -0400 Subject: setting up joeyconfig after merge --- config.hs | 2 +- privdata/relocate | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 privdata/relocate diff --git a/config.hs b/config.hs index ec313725..97d90636 120000 --- a/config.hs +++ b/config.hs @@ -1 +1 @@ -config-simple.hs \ No newline at end of file +joeyconfig.hs \ No newline at end of file diff --git a/privdata/relocate b/privdata/relocate new file mode 100644 index 00000000..271692d8 --- /dev/null +++ b/privdata/relocate @@ -0,0 +1 @@ +.joeyconfig -- cgit v1.2.3 From 16ed29570616359626552327702c8e1e358c430f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 14:04:18 -0400 Subject: build fixes --- joeyconfig.hs | 1 + src/Propellor/Property/Group.hs | 1 + 2 files changed, 2 insertions(+) diff --git a/joeyconfig.hs b/joeyconfig.hs index e7f9d3eb..22744ffc 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -12,6 +12,7 @@ import qualified Propellor.Property.Ssh as Ssh import qualified Propellor.Property.Cron as Cron import qualified Propellor.Property.Sudo as Sudo import qualified Propellor.Property.User as User +import qualified Propellor.Property.Group as Group import qualified Propellor.Property.Hostname as Hostname import qualified Propellor.Property.Tor as Tor import qualified Propellor.Property.Dns as Dns diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs index b171933a..f47867c1 100644 --- a/src/Propellor/Property/Group.hs +++ b/src/Propellor/Property/Group.hs @@ -1,6 +1,7 @@ module Propellor.Property.Group where import Propellor.Base +import Propellor.Property.User (hasGroup) type GID = Int -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From c0d0e57257fe8dee1f9d37a6d49b6322af985a69 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 17:29:11 -0400 Subject: Clean up build warnings about redundant constraints when built with ghc 8.0. Only a couple of the constraints were really redundant. The rest are essential to propellor's tracking of Info propigation, so I silenced the warning for those. It would be better to only silence the warning for the functions with the extra constraints, but IIRC warnings can only be silenced on an entire file basis. This commit was sponsored by Andreas on Patreon. --- debian/changelog | 1 + src/Propellor/Container.hs | 4 ++++ src/Propellor/EnsureProperty.hs | 6 +++++- src/Propellor/Info.hs | 7 +++++++ src/Propellor/Message.hs | 2 +- src/Propellor/PropAccum.hs | 10 ++++++++++ src/Propellor/Property.hs | 2 +- 7 files changed, 29 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 99c296d6..73c9244e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ propellor (3.2.2) UNRELEASED; urgency=medium * Added Linode.serialGrub property. + * Clean up build warnings about redundant constraints when built with ghc 8.0. -- Joey Hess Fri, 21 Oct 2016 14:59:09 -0400 diff --git a/src/Propellor/Container.hs b/src/Propellor/Container.hs index c4d6f864..5c365f59 100644 --- a/src/Propellor/Container.hs +++ b/src/Propellor/Container.hs @@ -1,4 +1,5 @@ {-# LANGUAGE DataKinds, TypeFamilies #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.Container where @@ -43,6 +44,9 @@ propagateContainer :: -- Since the children being added probably have info, -- require the Property's metatypes to have info. + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. ( IncludesInfo metatypes ~ 'True , IsContainer c ) diff --git a/src/Propellor/EnsureProperty.hs b/src/Propellor/EnsureProperty.hs index c4666722..e8602047 100644 --- a/src/Propellor/EnsureProperty.hs +++ b/src/Propellor/EnsureProperty.hs @@ -3,6 +3,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.EnsureProperty ( ensureProperty @@ -37,6 +38,9 @@ import Prelude -- with the property to be lost. ensureProperty :: + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. ( Cannot_ensureProperty_WithInfo inner ~ 'True , (Targets inner `NotSuperset` Targets outer) ~ 'CanCombine ) @@ -45,7 +49,7 @@ ensureProperty -> Propellor Result ensureProperty _ = catchPropellor . getSatisfy --- The name of this was chosen to make type errors a more understandable. +-- The name of this was chosen to make type errors a bit more understandable. type family Cannot_ensureProperty_WithInfo (l :: [a]) :: Bool type instance Cannot_ensureProperty_WithInfo '[] = 'True type instance Cannot_ensureProperty_WithInfo (t ': ts) = diff --git a/src/Propellor/Info.hs b/src/Propellor/Info.hs index e9218291..75f0b76a 100644 --- a/src/Propellor/Info.hs +++ b/src/Propellor/Info.hs @@ -1,4 +1,5 @@ {-# LANGUAGE PackageImports, TypeFamilies, DataKinds, PolyKinds #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.Info ( osDebian, @@ -38,6 +39,9 @@ import Prelude -- -- The new Property will include HasInfo in its metatypes. setInfoProperty + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. :: (MetaTypes metatypes' ~ (+) HasInfo metatypes, SingI metatypes') => Property metatypes -> Info @@ -47,6 +51,9 @@ setInfoProperty (Property _ d a oldi c) newi = -- | Adds more info to a Property that already HasInfo. addInfoProperty + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. :: (IncludesInfo metatypes ~ 'True) => Property metatypes -> Info diff --git a/src/Propellor/Message.hs b/src/Propellor/Message.hs index f728e143..97573516 100644 --- a/src/Propellor/Message.hs +++ b/src/Propellor/Message.hs @@ -73,7 +73,7 @@ actionMessage = actionMessage' Nothing actionMessageOn :: (MonadIO m, MonadMask m, ActionResult r) => HostName -> Desc -> m r -> m r actionMessageOn = actionMessage' . Just -actionMessage' :: (MonadIO m, MonadMask m, ActionResult r) => Maybe HostName -> Desc -> m r -> m r +actionMessage' :: (MonadIO m, ActionResult r) => Maybe HostName -> Desc -> m r -> m r actionMessage' mhn desc a = do liftIO $ outputConcurrent =<< whenConsole (setTitleCode $ "propellor: " ++ desc) diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs index fcac60bf..c7ef946a 100644 --- a/src/Propellor/PropAccum.hs +++ b/src/Propellor/PropAccum.hs @@ -4,6 +4,7 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} +{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.PropAccum ( host @@ -51,6 +52,9 @@ type instance GetMetaTypes (RevertableProperty (MetaTypes t) undo) = MetaTypes t (&) :: ( IsProp p + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. , MetaTypes y ~ GetMetaTypes p , CheckCombinable x y ~ 'CanCombine ) @@ -63,6 +67,9 @@ Props c & p = Props (c ++ [toChildProperty p]) (&^) :: ( IsProp p + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. , MetaTypes y ~ GetMetaTypes p , CheckCombinable x y ~ 'CanCombine ) @@ -73,6 +80,9 @@ Props c &^ p = Props (toChildProperty p : c) -- | Adds a property in reverted form. (!) + -- -Wredundant-constraints is turned off because + -- this constraint appears redundant, but is actually + -- crucial. :: (CheckCombinable x z ~ 'CanCombine) => Props (MetaTypes x) -> RevertableProperty (MetaTypes y) (MetaTypes z) diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs index 7ee9397e..ae4fc914 100644 --- a/src/Propellor/Property.hs +++ b/src/Propellor/Property.hs @@ -345,7 +345,7 @@ revert (RevertableProperty p1 p2) = RevertableProperty p2 p1 -- | Apply a property to each element of a list. applyToList - :: (Foldable t, Functor t, IsProp p, Combines p p, p ~ CombinedType p p) + :: (Foldable t, Functor t, Combines p p, p ~ CombinedType p p) => (b -> p) -> t b -> p -- cgit v1.2.3 From b1038365960693a013d7026f25d026a1fd098062 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 17:40:32 -0400 Subject: turn off redundant constraints warnings in cabal file ghc 7 does not support -fno-warn-redundant-constraints so this can't be done on a per-module basis. It would be good to revert this commit when dropping support for ghc 7. --- propellor.cabal | 2 ++ src/Propellor/Container.hs | 1 - src/Propellor/EnsureProperty.hs | 1 - src/Propellor/Info.hs | 1 - src/Propellor/PropAccum.hs | 1 - 5 files changed, 2 insertions(+), 4 deletions(-) diff --git a/propellor.cabal b/propellor.cabal index 7d145024..db70942a 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -63,6 +63,8 @@ Executable propellor-config Library GHC-Options: -Wall -fno-warn-tabs -O0 + if impl(ghc >= 8.0) + GHC-Options: -fno-warn-redundant-constraints Extensions: TypeOperators Hs-Source-Dirs: src Build-Depends: diff --git a/src/Propellor/Container.hs b/src/Propellor/Container.hs index 5c365f59..26194456 100644 --- a/src/Propellor/Container.hs +++ b/src/Propellor/Container.hs @@ -1,5 +1,4 @@ {-# LANGUAGE DataKinds, TypeFamilies #-} -{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.Container where diff --git a/src/Propellor/EnsureProperty.hs b/src/Propellor/EnsureProperty.hs index e8602047..30dfd5ad 100644 --- a/src/Propellor/EnsureProperty.hs +++ b/src/Propellor/EnsureProperty.hs @@ -3,7 +3,6 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.EnsureProperty ( ensureProperty diff --git a/src/Propellor/Info.hs b/src/Propellor/Info.hs index 75f0b76a..3d7f07a5 100644 --- a/src/Propellor/Info.hs +++ b/src/Propellor/Info.hs @@ -1,5 +1,4 @@ {-# LANGUAGE PackageImports, TypeFamilies, DataKinds, PolyKinds #-} -{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.Info ( osDebian, diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs index c7ef946a..5d1d3afb 100644 --- a/src/Propellor/PropAccum.hs +++ b/src/Propellor/PropAccum.hs @@ -4,7 +4,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} -{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} module Propellor.PropAccum ( host -- cgit v1.2.3 From 33e392ac542cb3e68643675f26b06a0cbacdd8da Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 17:44:52 -0400 Subject: credit --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 73c9244e..2a526c55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ propellor (3.2.2) UNRELEASED; urgency=medium * Added Linode.serialGrub property. * Clean up build warnings about redundant constraints when built with ghc 8.0. + * Added Group.hasUser property. Thanks, Daniel Brooks -- Joey Hess Fri, 21 Oct 2016 14:59:09 -0400 -- cgit v1.2.3 -- cgit v1.2.3 From 8389f3400c4a5b299ec6d4efc81cd9ce35266275 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 17:47:02 -0400 Subject: need to disable warning here too --- propellor.cabal | 2 ++ 1 file changed, 2 insertions(+) diff --git a/propellor.cabal b/propellor.cabal index db70942a..5c04037a 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -53,6 +53,8 @@ Executable propellor Executable propellor-config Main-Is: config.hs GHC-Options: -threaded -Wall -fno-warn-tabs -O0 + if impl(ghc >= 8.0) + GHC-Options: -fno-warn-redundant-constraints Extensions: TypeOperators Hs-Source-Dirs: src Build-Depends: -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From b6cddab178156464df2f0d422968e41c44bdc94d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Nov 2016 17:50:15 -0400 Subject: need to disable warning here too --- propellor.cabal | 2 ++ 1 file changed, 2 insertions(+) diff --git a/propellor.cabal b/propellor.cabal index 5c04037a..dd6a4ebd 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -38,6 +38,8 @@ Description: Executable propellor Main-Is: wrapper.hs GHC-Options: -threaded -Wall -fno-warn-tabs -O0 + if impl(ghc >= 8.0) + GHC-Options: -fno-warn-redundant-constraints Extensions: TypeOperators Hs-Source-Dirs: src Build-Depends: -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3