summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------config.hs2
-rw-r--r--doc/forum/Compatibility_between_different_software_versions.mdwn1
-rw-r--r--doc/forum/Compatibility_between_different_software_versions/comment_1_1bc12b78e09c7060f4b5c434004b4b7f._comment12
-rw-r--r--doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_11_b1ad266b5c34b600d2d724bf5ffc40de._comment8
-rw-r--r--doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_12_4baf7efcc6f9c50e3aebd663b7792279._comment23
-rw-r--r--doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_13_2f8c7bb7f8ffb734a99ac3d7b28e2d62._comment15
-rw-r--r--doc/forum/How_to_create_a_property_with_info.mdwn65
-rw-r--r--doc/forum/How_to_create_a_property_with_info/comment_1_819902ee6b8e571f735dd2c9c93c49a9._comment29
-rw-r--r--doc/forum/How_to_create_a_property_with_info/comment_2_1c2b3cb54f27fb6b6bb5de9d159dd34f._comment15
-rw-r--r--doc/forum/How_to_create_a_property_with_info/comment_3_6cf0360b4922a131bca33d33acf078be._comment11
-rw-r--r--doc/forum/creating_Bind9_configuration/comment_3_6b4d73b17d87d00845fda26431ded422._comment10
-rw-r--r--doc/todo/LVM_logical_volume_creation__44___resize__44___format___38___removal.mdwn7
-rw-r--r--privdata/relocate1
13 files changed, 197 insertions, 2 deletions
diff --git a/config.hs b/config.hs
index 97d90636..ec313725 120000
--- a/config.hs
+++ b/config.hs
@@ -1 +1 @@
-joeyconfig.hs \ No newline at end of file
+config-simple.hs \ No newline at end of file
diff --git a/doc/forum/Compatibility_between_different_software_versions.mdwn b/doc/forum/Compatibility_between_different_software_versions.mdwn
new file mode 100644
index 00000000..b2de3439
--- /dev/null
+++ b/doc/forum/Compatibility_between_different_software_versions.mdwn
@@ -0,0 +1 @@
+I'm just asking myself how (or if) we can guarantee compatibility between different versions of an application. Let's take "prosody" as an example. Even if we use the "DebianLike" property, there might be different versions of "prosody" in Debian Stable and Debian Unstable and therefore different configurations options available. Is there a way to catch those cases? Another example would be a "generic" property (which works for DebianLike and ArchLinux) for a specific software, but inside these distributions are different versions of the application. Even a "Prosody.installed" might be problematic, if the package has been renamed in a newer Debian release.
diff --git a/doc/forum/Compatibility_between_different_software_versions/comment_1_1bc12b78e09c7060f4b5c434004b4b7f._comment b/doc/forum/Compatibility_between_different_software_versions/comment_1_1bc12b78e09c7060f4b5c434004b4b7f._comment
new file mode 100644
index 00000000..97ab02e8
--- /dev/null
+++ b/doc/forum/Compatibility_between_different_software_versions/comment_1_1bc12b78e09c7060f4b5c434004b4b7f._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-08-31T22:26:42Z"
+ content="""
+`withOS` or `getOS` is often used to deal with such differences,
+varying behavior depending on the Host's defined OS. For example,
+Propellor.Property.Borg.installed does one thing on Debian jessie
+and another thing on other versions of Debian. And
+Propellor.Property.Apt.getMirror generates different urls for Debian and
+Ubuntu.
+"""]]
diff --git a/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_11_b1ad266b5c34b600d2d724bf5ffc40de._comment b/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_11_b1ad266b5c34b600d2d724bf5ffc40de._comment
new file mode 100644
index 00000000..79debc75
--- /dev/null
+++ b/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_11_b1ad266b5c34b600d2d724bf5ffc40de._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="picca"
+ avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c"
+ subject="comment 11"
+ date="2017-08-24T18:36:12Z"
+ content="""
+Thanks a lot joey.
+"""]]
diff --git a/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_12_4baf7efcc6f9c50e3aebd663b7792279._comment b/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_12_4baf7efcc6f9c50e3aebd663b7792279._comment
new file mode 100644
index 00000000..b6de7d0a
--- /dev/null
+++ b/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_12_4baf7efcc6f9c50e3aebd663b7792279._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="picca"
+ avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c"
+ subject="comment 12"
+ date="2017-08-24T19:11:24Z"
+ content="""
+If I understand correctly, the new typeclass need to provide a method which return the
+(RawDiskImage filename). In the process we have at least 2 cache level
+One for the chroot, and one for the RawImage.
+
+I was wondering if these cache (side effect) could not be regrouped
+under /var/cache/propellor instead of putting this randomly everywhere on the disk.
+
+This way It should be possible to \"reset\" propellor by removing the cache in order to force
+a cache rebuild.
+
+I think about this because I am not aware as a user of all these \"side effects\".
+
+propellor --purge-cache ;)
+
+cheers and thanks again
+
+"""]]
diff --git a/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_13_2f8c7bb7f8ffb734a99ac3d7b28e2d62._comment b/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_13_2f8c7bb7f8ffb734a99ac3d7b28e2d62._comment
new file mode 100644
index 00000000..74dc528e
--- /dev/null
+++ b/doc/forum/DiskImage_creation_does_not_work_on_my_system/comment_13_2f8c7bb7f8ffb734a99ac3d7b28e2d62._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 13"""
+ date="2017-08-24T21:11:07Z"
+ content="""
+Yes, there are two levels of caches. This does make updating the images a
+whole lot faster!
+
+Some systems don't have a very large /var partition and so I think it's
+better to let the user pick where they go. The documentation could
+certainly (always) be improved.
+
+Note that reverting any of the properties in DiskImage will clean up
+all the cache files as well as the final disk image.
+"""]]
diff --git a/doc/forum/How_to_create_a_property_with_info.mdwn b/doc/forum/How_to_create_a_property_with_info.mdwn
new file mode 100644
index 00000000..ea8babe5
--- /dev/null
+++ b/doc/forum/How_to_create_a_property_with_info.mdwn
@@ -0,0 +1,65 @@
+Hello Joey,
+
+I try to setup a debomatic service on one of my computer.
+So I created a data which will store on which host it was installed
+
+ data DebOMaticHostMirror = DebOMaticHostMirror Url
+ deriving (Eq, Show, Typeable)
+
+So now I try to create a property which get the hostname and set the info,
+BUT I did not find the right way to do this. Here an attempt
+
+ debomaticHostMirror :: Property (HasInfo + UnixLike)
+ debomaticHostMirror = property' desc $ \w -> do
+ hostname <- asks hostName
+ ensureProperty $ pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname))
+ where
+ desc = "setup the Deb-O-Matic host name for other properties"
+
+but I get this error message
+
+ src/propellor-config.hs:935:3: error:
+ • Couldn't match expected type ‘Propellor Result’
+ with actual type ‘Property
+ (Propellor.Types.MetaTypes.MetaTypes inner0)
+ -> Propellor Result’
+ • In a stmt of a 'do' block:
+ ensureProperty
+ $ pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname))
+ In the expression:
+ do { hostname <- asks hostName;
+ ensureProperty
+ $ pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname)) }
+ In the second argument of ‘($)’, namely
+ ‘\ w
+ -> do { hostname <- asks hostName;
+ ensureProperty
+ $ pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname)) }’
+
+ src/propellor-config.hs:935:20: error:
+ • Couldn't match expected type ‘OuterMetaTypesWitness outer0’
+ with actual type ‘Property (HasInfo + UnixLike)’
+ • In the second argument of ‘($)’, namely
+ ‘pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname))’
+ In a stmt of a 'do' block:
+ ensureProperty
+ $ pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname))
+ In the expression:
+ do { hostname <- asks hostName;
+ ensureProperty
+ $ pureInfoProperty desc (InfoVal (DebOMaticHostMirror hostname)) }
+
+the Idea after is to create a property which will take the DeboMatic Info and generate the
+/etc/apt/sourses.list.d/debomatic.list on a bunch of hosts.
+
+Maybe we could have a
+
+ typeclass Mirror a where
+ toSourceListDLines :: a -> [Line]
+
+ instance Mirror DebOMaticHostMirror where
+ toSourceListDLines (DebOMaticHostMirror hostname) = ...
+
+then the stdSourceListD property should be change to use toSourceListDLines
+
+but this is another story :)
diff --git a/doc/forum/How_to_create_a_property_with_info/comment_1_819902ee6b8e571f735dd2c9c93c49a9._comment b/doc/forum/How_to_create_a_property_with_info/comment_1_819902ee6b8e571f735dd2c9c93c49a9._comment
new file mode 100644
index 00000000..853e6e86
--- /dev/null
+++ b/doc/forum/How_to_create_a_property_with_info/comment_1_819902ee6b8e571f735dd2c9c93c49a9._comment
@@ -0,0 +1,29 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-08-25T23:07:12Z"
+ content="""
+It's not allowed for the content of Info to come from an IO action.
+Info has to be static. This allows one Host to introspect the Info of
+another Host. The Dns properties rely on that.
+
+So, the type checker is right in preventing this. It's also not allowed
+to use ensureProperty with a property that HasInfo, as the info would
+not propigate to the outer property. The type checker is also preventing
+you making that mistake.
+
+(You also forgot to pass the `w` parameter to `ensureProperty`,
+which made the type checker unhappy as well and probably confused the error
+messages.)
+
+To accomplish your goal, you could use:
+
+ data DebOMaticHostMirror = DebOMaticHostMirror
+
+If a Host has this in its Info, you know that Host is the one with
+debomatic installed. You can then get its hostname using the `hostName`
+field accessor on the Host.
+
+The property that does that will need to be passed a `[Host]` which will
+typically be the `hosts` list defined in config.hs.
+"""]]
diff --git a/doc/forum/How_to_create_a_property_with_info/comment_2_1c2b3cb54f27fb6b6bb5de9d159dd34f._comment b/doc/forum/How_to_create_a_property_with_info/comment_2_1c2b3cb54f27fb6b6bb5de9d159dd34f._comment
new file mode 100644
index 00000000..6034e6e5
--- /dev/null
+++ b/doc/forum/How_to_create_a_property_with_info/comment_2_1c2b3cb54f27fb6b6bb5de9d159dd34f._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="picca"
+ avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c"
+ subject="comment 2"
+ date="2017-08-26T06:29:44Z"
+ content="""
+I could have multiple host with debomatic install on it.
+I need to create a property which take a list of hosts (all with the Debomatic info) in order to generate the sources.list files.
+This way it is possible for me to select per host the sources of packages.
+
+what should be done in order to type check this ?
+I would like the compiler to says. Hey you ask for a source list from this host but it dos not contain a Debian mirror.
+
+Cheers
+"""]]
diff --git a/doc/forum/How_to_create_a_property_with_info/comment_3_6cf0360b4922a131bca33d33acf078be._comment b/doc/forum/How_to_create_a_property_with_info/comment_3_6cf0360b4922a131bca33d33acf078be._comment
new file mode 100644
index 00000000..ac4ca94b
--- /dev/null
+++ b/doc/forum/How_to_create_a_property_with_info/comment_3_6cf0360b4922a131bca33d33acf078be._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2017-08-28T22:38:55Z"
+ content="""
+Finding a way to type check that, I don't know. It would certianly be nice
+to be able to statically check such things. The way that Info is
+implemented as a monoid that contains many different types seems to
+preclude exposing enough information for the type checker to catch such a
+problem. So it would have to be changed somehow, I don't know how.
+"""]]
diff --git a/doc/forum/creating_Bind9_configuration/comment_3_6b4d73b17d87d00845fda26431ded422._comment b/doc/forum/creating_Bind9_configuration/comment_3_6b4d73b17d87d00845fda26431ded422._comment
new file mode 100644
index 00000000..c61feaab
--- /dev/null
+++ b/doc/forum/creating_Bind9_configuration/comment_3_6b4d73b17d87d00845fda26431ded422._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="Nicolas.Schodet"
+ avatar="http://cdn.libravatar.org/avatar/0d7ec808ec329d04ee9a93c0da3c0089"
+ subject="comment 3"
+ date="2017-08-28T14:03:35Z"
+ content="""
+It might be a configuration from my server provider, maybe I should do a clean install :)
+
+If not using a full clone, I also have problem because I cannot use things like Utility.Units.
+"""]]
diff --git a/doc/todo/LVM_logical_volume_creation__44___resize__44___format___38___removal.mdwn b/doc/todo/LVM_logical_volume_creation__44___resize__44___format___38___removal.mdwn
new file mode 100644
index 00000000..0910ef5d
--- /dev/null
+++ b/doc/todo/LVM_logical_volume_creation__44___resize__44___format___38___removal.mdwn
@@ -0,0 +1,7 @@
+I have made a new property to handle logical volume with propellor.
+
+I am not confident my haskell code is good looking as this is my first real life haskell code, can you please have a look?
+
+You can pull the lvm branch at http://git.ni.fr.eu.org/nicolas/propellor.git
+
+Thanks!
diff --git a/privdata/relocate b/privdata/relocate
deleted file mode 100644
index 271692d8..00000000
--- a/privdata/relocate
+++ /dev/null
@@ -1 +0,0 @@
-.joeyconfig