From 5cdfebb274c6bcfa4e26d7f30bd9d907a1940872 Mon Sep 17 00:00:00 2001 From: jsza Date: Sat, 28 Apr 2018 16:40:32 +0000 Subject: --- doc/forum/5.3.5_errors_building_with_Stack.mdwn | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/forum/5.3.5_errors_building_with_Stack.mdwn 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..e612579d --- /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 -- cgit v1.2.3 From 29a7d875c3f366d576a6c193a8903403362d57a3 Mon Sep 17 00:00:00 2001 From: jsza Date: Sat, 28 Apr 2018 16:41:02 +0000 Subject: --- doc/forum/5.3.5_errors_building_with_Stack.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/forum/5.3.5_errors_building_with_Stack.mdwn b/doc/forum/5.3.5_errors_building_with_Stack.mdwn index e612579d..bdda6bca 100644 --- a/doc/forum/5.3.5_errors_building_with_Stack.mdwn +++ b/doc/forum/5.3.5_errors_building_with_Stack.mdwn @@ -1,6 +1,6 @@ I'm able to reproduce the following with a freshly cloned Propellor: -> stack build + > 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 ) -- cgit v1.2.3 From bc1e2b4057770551fcbaa4f1c53b0eb59675a8fb Mon Sep 17 00:00:00 2001 From: picca Date: Sun, 29 Apr 2018 07:41:16 +0000 Subject: --- doc/forum/5.3.5_import_errors.mdwn | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/forum/5.3.5_import_errors.mdwn 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 -- cgit v1.2.3 From c95911232b0824ad1f2b0ab8b96034ecd97a4928 Mon Sep 17 00:00:00 2001 From: picca Date: Sun, 29 Apr 2018 16:05:18 +0000 Subject: Added a comment --- .../comment_1_13d5f4cc224ad25ab3f1c78061ff4423._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/5.3.5_import_errors/comment_1_13d5f4cc224ad25ab3f1c78061ff4423._comment 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 +"""]] -- cgit v1.2.3 From 5ab5f69e2729cceb85840305a46e7f296a04c4f9 Mon Sep 17 00:00:00 2001 From: picca Date: Sun, 29 Apr 2018 16:06:12 +0000 Subject: Added a comment --- .../comment_15_35822590f6eeab15f6d1b25ac2bcbba7._comment | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_15_35822590f6eeab15f6d1b25ac2bcbba7._comment 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 :) +"""]] -- cgit v1.2.3 From 828e7d1ebefeeaf152910ad61f928a2f65607509 Mon Sep 17 00:00:00 2001 From: spwhitton Date: Sun, 29 Apr 2018 16:27:55 +0000 Subject: we should factor out code in Grub.configured --- ....configured_for_any___47__etc__47__default_config.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn 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..6a97f8fb --- /dev/null +++ b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn @@ -0,0 +1,15 @@ +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. -- cgit v1.2.3 From 75c4b6d9cff82a1184603426902f337adb03c016 Mon Sep 17 00:00:00 2001 From: spwhitton Date: Sun, 29 Apr 2018 16:28:06 +0000 Subject: signature --- ...actor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn | 2 ++ 1 file changed, 2 insertions(+) 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 index 6a97f8fb..16c791cd 100644 --- 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 @@ -13,3 +13,5 @@ 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 -- cgit v1.2.3 From 96ea8e04251bc23dd27faf1f486a2a9f9c29ff98 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 30 Apr 2018 07:34:30 -0400 Subject: fix build with ghc 8.2 Seems newer ghc can figure out that metatypes is SingI, but not this one? --- src/Propellor/Types.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) -- cgit v1.2.3