summaryrefslogtreecommitdiff
path: root/doc/forum
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forum')
-rw-r--r--doc/forum/Getting_Info_from_containers/comment_4_db1a195688aa23e99b0aca9e776fd4ac._comment41
-rw-r--r--doc/forum/WIP_adding_dhcp_records_to_libvirt.mdwn31
-rw-r--r--doc/forum/WIP_adding_dhcp_records_to_libvirt/comment_1_9feaf88f735f6571835502cc9e15524b._comment12
-rw-r--r--doc/forum/build_propellor_binary/comment_3_5fa856434db0d285874ac3f468ab792e._comment38
-rw-r--r--doc/forum/build_propellor_binary/comment_4_d5bf3e9f7a7e01fd6b55b2e761c8cc2e._comment7
-rw-r--r--doc/forum/commands_that_need_files.mdwn9
-rw-r--r--doc/forum/commands_that_need_files/comment_1_4ffacadef38a131fa7e22204f9c4f882._comment8
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo.mdwn21
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_1_e522e00ee4d4b072d80faef748450a52._comment10
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_2_3dcd6f95340abed0accfecda716fd1f6._comment16
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_3_a273b2f5a904e7b16576a750538296dc._comment8
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_4_26738f91fe511b49552a68e70f201059._comment49
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_5_05439bebb8c0dee0850fb2ffe3e117c3._comment8
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_6_c7f1e82b71c3317a25230e076eb0a330._comment9
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_7_de411d55ffbd72c5a4182168dead6b29._comment46
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_8_ba9fabe0096cd8808c4a50ea3ebe543c._comment10
-rw-r--r--doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_9_49c03760f833632a50b88be792395a5f._comment25
17 files changed, 348 insertions, 0 deletions
diff --git a/doc/forum/Getting_Info_from_containers/comment_4_db1a195688aa23e99b0aca9e776fd4ac._comment b/doc/forum/Getting_Info_from_containers/comment_4_db1a195688aa23e99b0aca9e776fd4ac._comment
new file mode 100644
index 00000000..f6d33302
--- /dev/null
+++ b/doc/forum/Getting_Info_from_containers/comment_4_db1a195688aa23e99b0aca9e776fd4ac._comment
@@ -0,0 +1,41 @@
+[[!comment format=mdwn
+ username="Nicolas.Schodet"
+ avatar="http://cdn.libravatar.org/avatar/0d7ec808ec329d04ee9a93c0da3c0089"
+ subject="comment 4"
+ date="2019-04-20T21:54:16Z"
+ content="""
+After thinking about it, it would be nicer if an Host could give information about
+several of its children, that would be a larger change, but having the wrapper
+would then be useless and propellor would be able to find containers
+automatically.
+
+As a container is created by a property, a container Host could be included in
+Info of a Host. If an entry is to be propagated, then it is added as an entry
+of the host, else it is kept as an entry of the container.
+
+When looking up a host, we have to search for one Host of a [Host] list, but
+also for any Host listed in the containersInfo of all the listed Host.
+
+Not sure this is clear, here is a example to try to make it clearer:
+
+ hard_node :: Host
+ hostName = \"hard-node.example.org\"
+ hostProperties = ...
+ hostInfo =
+ [ a HostKeyInfo for riva
+ , a DnsInfoUnpropagated for riva
+ , a DnsInfoPropagated from container-web
+ , a ContainersInfo =
+ [ container_web :: Host
+ hostName = \"container-web\"
+ hostProperties = ...
+ hostInfo =
+ [ a HostKeyInfo for container-web
+ , a DnsInfoUnpropagated for container-web
+ ]
+ , container_git :: Host
+ ...
+ ]
+ ]
+
+"""]]
diff --git a/doc/forum/WIP_adding_dhcp_records_to_libvirt.mdwn b/doc/forum/WIP_adding_dhcp_records_to_libvirt.mdwn
new file mode 100644
index 00000000..118f01ab
--- /dev/null
+++ b/doc/forum/WIP_adding_dhcp_records_to_libvirt.mdwn
@@ -0,0 +1,31 @@
+I'm working on adding static (predictable) dhcp records to libvirt guests (code at the end). It seems like I might need to either do the equivalent of
+[[!format bash """
+virsh net-update default delete ip-dhcp-host "<host mac='52:54:00:f0:62:01'/>" --config --live || /bin/true
+virsh net-update default add ip-dhcp-host "<host mac='52:54:00:f0:62:01' ip='192.168.122.32'/>" --config --live
+"""]]
+or parse the xml output of "virsh net-dumpxml". Is there some simple lightweight xml parsing option? Last time I tried something like this was a decade ago using HXT.Arrow, which didn't really end well.
+
+[[!format haskell """
+staticDHCP :: Host -> IPAddr -> Maybe Network.Gateway -> Property UnixLike
+staticDHCP h ip gw = property "assign ip to host via dhcp" $ do
+ mac <- liftIO $ macAddress
+ case mac of
+ Nothing -> errorMessage "no interface"
+ Just addr -> makeChange $ unlessM (updateIt addr) $
+ errorMessage "failed to update network"
+ where
+ updateIt mac = boolSystem "virsh" [ Param "net-update"
+ , Param "default"
+ , Param "add-last"
+ , Param "ip-dhcp-host"
+ , Param $ "<host mac=\""++mac++"\" ip=\""++(ifaceToString ip)++"\"/>"
+ , Param "--config"
+ , Param "--live"]
+ ifaceToString (IPv6 ipstr) = ipstr
+ ifaceToString (IPv4 ipstr) = ipstr
+ macAddress = do
+ ifaces <- virshGetColumns ["domiflist", hostName h]
+ case ifaces of
+ [] -> return Nothing
+ (i:_) -> return $ Just $ Propellor.Base.last i
+"""]]
diff --git a/doc/forum/WIP_adding_dhcp_records_to_libvirt/comment_1_9feaf88f735f6571835502cc9e15524b._comment b/doc/forum/WIP_adding_dhcp_records_to_libvirt/comment_1_9feaf88f735f6571835502cc9e15524b._comment
new file mode 100644
index 00000000..a7173577
--- /dev/null
+++ b/doc/forum/WIP_adding_dhcp_records_to_libvirt/comment_1_9feaf88f735f6571835502cc9e15524b._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2019-06-15T16:35:46Z"
+ content="""
+The former seems easier than parsing the XML.
+
+I mean, aeson is quite good and easy to parse XML with,
+but I prefer to keep propellor's haskell dependencies minimal
+and so if you used aeson there would be a big question about merging the
+result into propellor core.
+"""]]
diff --git a/doc/forum/build_propellor_binary/comment_3_5fa856434db0d285874ac3f468ab792e._comment b/doc/forum/build_propellor_binary/comment_3_5fa856434db0d285874ac3f468ab792e._comment
new file mode 100644
index 00000000..5173511c
--- /dev/null
+++ b/doc/forum/build_propellor_binary/comment_3_5fa856434db0d285874ac3f468ab792e._comment
@@ -0,0 +1,38 @@
+[[!comment format=mdwn
+ username="desired.mta@88576fa3c90538abed47d3f0aa48d00bcc903b23"
+ nickname="desired.mta"
+ avatar="http://cdn.libravatar.org/avatar/d93af7ba58088a39d04c7da13fc176ee"
+ subject="comment 3"
+ date="2019-04-20T09:10:52Z"
+ content="""
+Thanks for your responses! I wasn't aware there was prior work done on this.
+
+`origin/precompiled` did not build for me. But when I merged master into it, and patching around a trivial merge conflict, I got this:
+
+```
+[ 58 of 182] Compiling Propellor.Property ( src/Propellor/Property.hs, dist/build/Propellor/Property.o )
+
+src/Propellor/Property.hs:364:13: error:
+ * Could not deduce (Monoid (Property (MetaTypes t)))
+ arising from a use of `mempty'
+ from the context: SingI t
+ bound by the type signature for:
+ doNothing :: forall k (t :: k). SingI t => Property (MetaTypes t)
+ at src/Propellor/Property.hs:363:1-46
+ * In the expression: mempty
+ In an equation for `doNothing': doNothing = mempty
+ |
+364 | doNothing = mempty
+ | ^^^^^^
+```
+
+Unfortunately, I am not versed enough in Haskell to understand the error.
+
+
+```
+$ ghc --version
+The Glorious Glasgow Haskell Compilation System, version 8.4.4
+```
+
+Here is my merged fork (based on 38b4da93 and origin/precompiled at 7d550c75): if you can `make` it: [github.com/motiejus/propellor](https://github.com/motiejus/propellor), and tell me how to fix the above error, I would try to test it functionally further.
+"""]]
diff --git a/doc/forum/build_propellor_binary/comment_4_d5bf3e9f7a7e01fd6b55b2e761c8cc2e._comment b/doc/forum/build_propellor_binary/comment_4_d5bf3e9f7a7e01fd6b55b2e761c8cc2e._comment
new file mode 100644
index 00000000..eff55db0
--- /dev/null
+++ b/doc/forum/build_propellor_binary/comment_4_d5bf3e9f7a7e01fd6b55b2e761c8cc2e._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2019-04-22T17:14:20Z"
+ content="""
+I've fixed the build of origin/precompiled
+"""]]
diff --git a/doc/forum/commands_that_need_files.mdwn b/doc/forum/commands_that_need_files.mdwn
new file mode 100644
index 00000000..e4adf063
--- /dev/null
+++ b/doc/forum/commands_that_need_files.mdwn
@@ -0,0 +1,9 @@
+I want to run "virsh update-device guest-name snippet.xml", for the moment from Cmd.cmdProperty. snippet.xml should contain the actual configuration information. I'm wondering what the best approach is.
+
+1. create a persistent copy of this file using File.hasContent or similar
+2. generate a temporary file when running the property.
+3. Use a file from the propellor repo
+
+(1) is slightly gross because the persistent copy is used only when running propellor.
+(2) I don't really know how to do in propellor; I guess it has to do with monads.
+(3) I don't know if this will work or is frowned upon for some reason.
diff --git a/doc/forum/commands_that_need_files/comment_1_4ffacadef38a131fa7e22204f9c4f882._comment b/doc/forum/commands_that_need_files/comment_1_4ffacadef38a131fa7e22204f9c4f882._comment
new file mode 100644
index 00000000..c16fc161
--- /dev/null
+++ b/doc/forum/commands_that_need_files/comment_1_4ffacadef38a131fa7e22204f9c4f882._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 1"
+ date="2019-06-02T00:35:19Z"
+ content="""
+I would use (2). Look for the string `withTmpFile` in Libvirt.hs to see how it's done.
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo.mdwn b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo.mdwn
new file mode 100644
index 00000000..50578473
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo.mdwn
@@ -0,0 +1,21 @@
+When there were upstream changes available, propellor used to prompt me to
+merge upstream changes into my local propellor repo with:
+
+ git merge upstream/master
+
+Of late, propellor has not been prompting me to merge upstream changes and
+my local propellor repo is stuck at ~version 5.3.5
+
+Is there is (another manual) way to merge upstream changes into my local propellor
+repo?
+
+My propellor repo is at
+
+ git clone git://git.ricketyspace.net/propellor.git
+
+Note that I've have some minor updates under the `src/` directory. [Some][0] [of][1] [them][2] were
+merged into upstream.
+
+[0]: https://propellor.branchable.com/forum/DNS_-_Support_for_Multiline_TXT_records/
+[1]: https://propellor.branchable.com/forum/Make_clean_fails_in_openbsd/
+[2]: https://propellor.branchable.com/forum/__96__Propellor.Bootstrap.cabalBuild__96___fails_in_openbsd/
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_1_e522e00ee4d4b072d80faef748450a52._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_1_e522e00ee4d4b072d80faef748450a52._comment
new file mode 100644
index 00000000..3c3623de
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_1_e522e00ee4d4b072d80faef748450a52._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 1"
+ date="2019-06-02T00:34:48Z"
+ content="""
+The `upstream/master` thing is probably propellor's code looking in `/usr/src/propellor` for a new upstream version.
+
+Do you perhaps no longer have the Debian package of propellor installed?
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_2_3dcd6f95340abed0accfecda716fd1f6._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_2_3dcd6f95340abed0accfecda716fd1f6._comment
new file mode 100644
index 00000000..d59d2ca9
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_2_3dcd6f95340abed0accfecda716fd1f6._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="s@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd"
+ nickname="s"
+ avatar="http://cdn.libravatar.org/avatar/81bf27f8b35011d1846711fa37a5588f"
+ subject="comment 2"
+ date="2019-06-02T01:10:43Z"
+ content="""
+[@spwhitton](https://propellor.branchable.com/user/spwhitton/), My current host machine is OpenBSD. So, I get propellor from `cabal`.
+
+Currently I've propellor 5.8.0 installed from cabal.
+
+My local propellor repo is itself is stuck at 5.3.5 (<https://git.ricketyspace.net/propellor/files.html>).
+
+I wanted to know if there was a way to manually merge upstream changes into my local propellor repo?
+
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_3_a273b2f5a904e7b16576a750538296dc._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_3_a273b2f5a904e7b16576a750538296dc._comment
new file mode 100644
index 00000000..b2043e80
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_3_a273b2f5a904e7b16576a750538296dc._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 3"
+ date="2019-06-03T03:43:33Z"
+ content="""
+You can always just fetch and merge upstream's release tags.
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_4_26738f91fe511b49552a68e70f201059._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_4_26738f91fe511b49552a68e70f201059._comment
new file mode 100644
index 00000000..ca112817
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_4_26738f91fe511b49552a68e70f201059._comment
@@ -0,0 +1,49 @@
+[[!comment format=mdwn
+ username="s@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd"
+ nickname="s"
+ avatar="http://cdn.libravatar.org/avatar/81bf27f8b35011d1846711fa37a5588f"
+ subject="comment 4"
+ date="2019-06-04T00:38:58Z"
+ content="""
+[@spwhitton](spwhittonhttps://propellor.branchable.com/user/spwhitton/), Sorry I should've mentioned it before. I've already tried merging upstream changes using `git merge`, I'm unable to merge it due to different commit histories:
+
+```
+cygnus$ git remote -v
+s g@git.rs:~/c/propellor.git (fetch)
+s g@git.rs:~/c/propellor.git (push)
+u git://propellor.branchable.com/propellor (fetch)
+u git://propellor.branchable.com/propellor (push)
+
+
+cygnus$ git tag -l | grep 5.8.0
+5.8.0
+
+cygnus$ git merge 5.8.0
+fatal: refusing to merge unrelated histories
+cygnus$ git merge u/master
+fatal: refusing to merge unrelated histories
+```
+
+First commit in upstream repo:
+
+```
+cygnus$ git log --reverse u/master | head -n 5
+commit d9af8bac5eb7836a3c90e37e870fd73d30b841fd
+Author: Joey Hess <joey@kitenet.net>
+Date: Sat Mar 29 23:10:52 2014 -0400
+
+ initial check-in
+```
+
+First commit in my repo:
+
+```
+cygnus$ git log --reverse s/master | head -n 5
+commit ff6173d6cd45e383da0f315bc80b52d486306cbc
+Author: build <build@buildhost>
+Date: Tue Nov 22 14:16:29 2016 -0700
+
+ distributed version of propellor
+
+```
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_5_05439bebb8c0dee0850fb2ffe3e117c3._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_5_05439bebb8c0dee0850fb2ffe3e117c3._comment
new file mode 100644
index 00000000..2b169a57
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_5_05439bebb8c0dee0850fb2ffe3e117c3._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 5"
+ date="2019-06-05T15:08:02Z"
+ content="""
+You can pass `-X theirs --allow-unrelated-histories` or similar.
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_6_c7f1e82b71c3317a25230e076eb0a330._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_6_c7f1e82b71c3317a25230e076eb0a330._comment
new file mode 100644
index 00000000..eadab877
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_6_c7f1e82b71c3317a25230e076eb0a330._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="s@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd"
+ nickname="s"
+ avatar="http://cdn.libravatar.org/avatar/81bf27f8b35011d1846711fa37a5588f"
+ subject="comment 6"
+ date="2019-06-06T03:00:43Z"
+ content="""
+[@spwhitton](https://propellor.branchable.com/user/spwhitton/), Thank you very much. That worked!
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_7_de411d55ffbd72c5a4182168dead6b29._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_7_de411d55ffbd72c5a4182168dead6b29._comment
new file mode 100644
index 00000000..9f6afc6b
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_7_de411d55ffbd72c5a4182168dead6b29._comment
@@ -0,0 +1,46 @@
+[[!comment format=mdwn
+ username="s@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd"
+ nickname="s"
+ avatar="http://cdn.libravatar.org/avatar/81bf27f8b35011d1846711fa37a5588f"
+ subject="comment 7"
+ date="2019-06-06T03:13:02Z"
+ content="""
+Documenting it (in case there is another user who wishes to do the same):
+
+Add upstream repo and fetch tags:
+
+```
+$ cd ~/.propellor
+
+$ git remote add u git://propellor.branchable.com/propellor
+$ git fetch u --tags
+```
+
+Look for the list releases:
+
+```
+$ git tag -l
+0.1
+0.1.1
+0.1.2
+0.2.0
+0.2.1
+...
+...
+...
+X.Y.Z
+```
+
+To merge release `X.Y.Z` into your master branch, do:
+
+```
+$ git merge -X theirs --allow-unrelated-histories X.Y.Z
+```
+
+Fix any conflicts and:
+
+```
+$ git commit
+```
+
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_8_ba9fabe0096cd8808c4a50ea3ebe543c._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_8_ba9fabe0096cd8808c4a50ea3ebe543c._comment
new file mode 100644
index 00000000..b1344a10
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_8_ba9fabe0096cd8808c4a50ea3ebe543c._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb"
+ subject="comment 8"
+ date="2019-06-08T20:21:57Z"
+ content="""
+The `git://` protocol is unencrypted and unauthenticated and you're not verifying Joey's PGP signature on the tag that you merge, so this approach is dangerous.
+
+I would insert a `git verify-tag` step in there. You'd want to make a record of (and perhaps locally sign) Joey's PGP key.
+"""]]
diff --git a/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_9_49c03760f833632a50b88be792395a5f._comment b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_9_49c03760f833632a50b88be792395a5f._comment
new file mode 100644
index 00000000..94d697fd
--- /dev/null
+++ b/doc/forum/merging_upstream_changes_into_my_local_propellor_repo/comment_9_49c03760f833632a50b88be792395a5f._comment
@@ -0,0 +1,25 @@
+[[!comment format=mdwn
+ username="s@aa9ff9ce06b08acfd2a93ebd342ce6879430fbdd"
+ nickname="s"
+ avatar="http://cdn.libravatar.org/avatar/81bf27f8b35011d1846711fa37a5588f"
+ subject="comment 9"
+ date="2019-06-15T16:04:22Z"
+ content="""
+Thanks again [@spwhitton](https://propellor.branchable.com/user/spwhitton/). I've verified the tag with Joey's GPG keys.
+
+Documenting here:
+
+Get Joey's [GPG keys](https://joeyh.name/contact/)
+
+```
+gpg2 --recv-keys 'E85A 5F63 B31D 24C1 EBF0 D81C C910 D922 2512 E3C7'
+```
+
+Verify the release tag before merging it into your local repo:
+
+```
+cd ~/.propellor
+git verify-tag X.Y.Z
+```
+
+"""]]