diff options
6 files changed, 113 insertions, 3 deletions
diff --git a/doc/forum/5.3.5_errors_building_with_Stack.mdwn b/doc/forum/5.3.5_errors_building_with_Stack.mdwn new file mode 100644 index 00000000..bdda6bca --- /dev/null +++ b/doc/forum/5.3.5_errors_building_with_Stack.mdwn @@ -0,0 +1,38 @@ +I'm able to reproduce the following with a freshly cloned Propellor: + + > stack build + propellor-5.3.5: build (lib + exe) + Preprocessing library propellor-5.3.5... + [ 43 of 171] Compiling Propellor.Types ( src/Propellor/Types.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/Propellor/Types.o ) + + /home/jayess/code/propellor/src/Propellor/Types.hs:251:37: error: + • Could not deduce (Monoid (Property setupmetatypes)) + arising from a use of ‘<>’ + from the context: (Sem.Semigroup (Property setupmetatypes), + Sem.Semigroup (Property undometatypes)) + bound by the instance declaration + at src/Propellor/Types.hs:(245,9)-(248,74) + • In the first argument of ‘RevertableProperty’, namely + ‘(s1 <> s2)’ + In the expression: RevertableProperty (s1 <> s2) (u2 <> u1) + In an equation for ‘<>’: + (RevertableProperty s1 u1) <> (RevertableProperty s2 u2) + = RevertableProperty (s1 <> s2) (u2 <> u1) + + /home/jayess/code/propellor/src/Propellor/Types.hs:251:48: error: + • Could not deduce (Monoid (Property undometatypes)) + arising from a use of ‘<>’ + from the context: (Sem.Semigroup (Property setupmetatypes), + Sem.Semigroup (Property undometatypes)) + bound by the instance declaration + at src/Propellor/Types.hs:(245,9)-(248,74) + • In the second argument of ‘RevertableProperty’, namely + ‘(u2 <> u1)’ + In the expression: RevertableProperty (s1 <> s2) (u2 <> u1) + In an equation for ‘<>’: + (RevertableProperty s1 u1) <> (RevertableProperty s2 u2) + = RevertableProperty (s1 <> s2) (u2 <> u1) + + -- While building package propellor-5.3.5 using: + /home/jayess/.stack/setup-exe-cache/x86_64-linux-nopie/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0 build lib:propellor exe:propellor exe:propellor-config --ghc-options " -ddump-hi -ddump-to-file" + Process exited with code: ExitFailure 1 diff --git a/doc/forum/5.3.5_import_errors.mdwn b/doc/forum/5.3.5_import_errors.mdwn new file mode 100644 index 00000000..f69934f2 --- /dev/null +++ b/doc/forum/5.3.5_import_errors.mdwn @@ -0,0 +1,35 @@ +Hello, with the new 5.3.5 version,I have these errors now. + +At least for the two first I know that I need to add the dependencies to the executable. +but for the last one, I do not know how to proceed properly. + +Cheers + + + Building executable 'propellor-config' for propellor-5.3.5.. + [1 of 1] Compiling Main ( executables/propellor-config.hs, dist/build/propellor-config/propellor-config-tmp/Main.o ) + + executables/propellor-config.hs:14:1-25: error: + Could not find module ‘System.Posix.Files’ + Perhaps you meant System.Posix.Types (from base-4.10.1.0) + Use -v to see a list of the files searched for. + | + 14 | import System.Posix.Files + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + + executables/propellor-config.hs:15:1-66: error: + Could not find module ‘System.FilePath.Posix’ + Use -v to see a list of the files searched for. + | + 15 | import System.FilePath.Posix ((</>), dropExtension, takeDirectory) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + executables/propellor-config.hs:28:1-23: error: + Could not find module ‘Utility.FileMode’ + it is a hidden module in the package ‘propellor-5.3.5’ + Use -v to see a list of the files searched for. + | + 28 | import Utility.FileMode + | ^^^^^^^^^^^^^^^^^^^^^^^ + + HsCompilation exited abnormally with code 1 at Sun Apr 29 09:35:08 diff --git a/doc/forum/5.3.5_import_errors/comment_1_13d5f4cc224ad25ab3f1c78061ff4423._comment b/doc/forum/5.3.5_import_errors/comment_1_13d5f4cc224ad25ab3f1c78061ff4423._comment new file mode 100644 index 00000000..e06e4683 --- /dev/null +++ b/doc/forum/5.3.5_import_errors/comment_1_13d5f4cc224ad25ab3f1c78061ff4423._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="picca" + avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c" + subject="comment 1" + date="2018-04-29T16:05:18Z" + content=""" +I solved my problem by creating a SiteSpecific module directly in the library part of Propellor +"""]] diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_15_35822590f6eeab15f6d1b25ac2bcbba7._comment b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_15_35822590f6eeab15f6d1b25ac2bcbba7._comment new file mode 100644 index 00000000..70e31058 --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_15_35822590f6eeab15f6d1b25ac2bcbba7._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="picca" + avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c" + subject="comment 15" + date="2018-04-29T16:06:12Z" + content=""" +Hello, + +--allow-unrelated-history is your friend :) +"""]] diff --git a/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn new file mode 100644 index 00000000..16c791cd --- /dev/null +++ b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn @@ -0,0 +1,17 @@ +It would be useful to have a property to set key value pairs in /etc/default configs. The code is in Grub.configured. I have not written a patch yet because I am not sure what the module should be called. Possibilities are: + + & EtcDefault.set "anacron" "ANACRON_RUN_ON_BATTERY_POWER" "no" + +or maybe + + & ConfFile.hasShellSetting "/etc/default/anacron" ("ANACRON_RUN_ON_BATTERY_POWER", "no") + +Or possibly both of these, with the former implemented in terms of the latter. + +Notes: + +* The use of a tuple for the last two parameters ensures that the property can be used infix. + +* I think this property should deduplicate the config key after setting it. I.e. after uncommenting and modifying ANACRON_RUN_ON_BATTERY_POWER it should remove any further ANACRON_RUN_ON_BATTERY_POWER settings further down the config. This allows a seamless transition from just using File.containsLine to add to the end of the file. + +--spwhitton diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs index c3926229..4b4378a9 100644 --- a/src/Propellor/Types.hs +++ b/src/Propellor/Types.hs @@ -242,10 +242,12 @@ instance SingI metatypes => Monoid (Property (MetaTypes metatypes)) -- property has a description like "x and y". -- Note that when x fails to be ensured, it will not try to ensure y. instance - ( Sem.Semigroup (Property setupmetatypes) - , Sem.Semigroup (Property undometatypes) + ( Sem.Semigroup (Property (MetaTypes setupmetatypes)) + , Sem.Semigroup (Property (MetaTypes undometatypes)) + , SingI setupmetatypes + , SingI undometatypes ) - => Sem.Semigroup (RevertableProperty setupmetatypes undometatypes) + => Sem.Semigroup (RevertableProperty (MetaTypes setupmetatypes) (MetaTypes undometatypes)) where RevertableProperty s1 u1 <> RevertableProperty s2 u2 = RevertableProperty (s1 <> s2) (u2 <> u1) |
