summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess2017-11-29 11:45:06 -0400
committerJoey Hess2017-11-29 11:45:06 -0400
commit578ebbf861a074c33050f4fb927f6f88d442947d (patch)
treed3d3787e4c8ee4c1b4f9413174497a09eee8b525 /doc
parent3fc6850ee79ecf3e084cf99b19cf695b90a0129b (diff)
parentfbcfa185eb4cb79380a0db0c1772082d5619ba1d (diff)
Merge branch 'master' into joeyconfig
Diffstat (limited to 'doc')
-rw-r--r--doc/forum/How_to_add_a_privdata_for_Gitlab_cookies.mdwn30
-rw-r--r--doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_1_17d2452b602a867862e688ad39f50ebe._comment21
-rw-r--r--doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_2_ab81471e6466944810906284f9a523cc._comment66
-rw-r--r--doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_3_32aaf0dd4d2a33d3ac7596bc47c15028._comment16
-rw-r--r--doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_4_ec1136accf484b572a1bcdfee40dcc92._comment14
-rw-r--r--doc/news/version_5.0.0.mdwn20
-rw-r--r--doc/news/version_5.1.0.mdwn18
-rw-r--r--doc/todo/spin_without_remote_compilation/comment_6_513dededf5872a51eb443a211cee13fa._comment11
8 files changed, 176 insertions, 20 deletions
diff --git a/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies.mdwn b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies.mdwn
new file mode 100644
index 00000000..c222e613
--- /dev/null
+++ b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies.mdwn
@@ -0,0 +1,30 @@
+Hello joey,
+
+First let me thank you and other contributors for this great tool, it helps me a lot in my day to day work :))
+
+
+I need to checkout something from a private area of a gitlab instance.
+In order to authenticate, I setup a personnal access token [1].
+
+It seems to me that PrivData is the right type to use in order to store it and avoid to have the token in clear text in the config.hs file.
+
+I will use it in order to generate the url of the Git type.
+
+(Git "https://<user name>:<token>@gitlab.xxxx.yy/user name/blabla.git" Nothing "<project>")
+
+This is the first time I will try to use the privdata and I do not know how to proceed.
+
+I saw that only a certain amount of constructors are available for these privdata.
+Should I add a new one for my gitlab personnal access token ?.
+
+What is the context which can be attach to the privdata in order to have something as flexible as possible ?
+It seems to me that the contex should be the gitlab url and the user name, but maybe you could think about a better solution.
+
+Could you explain with a code snipset how to proceed, becasue it is not really clear to me.
+Or point to an available example.
+
+thanks for your help
+
+Frederic
+
+[1] https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
diff --git a/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_1_17d2452b602a867862e688ad39f50ebe._comment b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_1_17d2452b602a867862e688ad39f50ebe._comment
new file mode 100644
index 00000000..0a10baaf
--- /dev/null
+++ b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_1_17d2452b602a867862e688ad39f50ebe._comment
@@ -0,0 +1,21 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2017-11-22T19:14:32Z"
+ content="""
+Privdata uses the combination of the Context and the PrivDataField
+to identify the piece of private data to use. So, you don't
+need to add a new constructor to PrivDataField as long as you can
+find a context that is sufficiently specific for your needs.
+The gitlab url (without the password) would make a fine context.
+
+So, I'd suggest something like `withPrivData (Password "thegitlaburl") (Context "thegitlaburl")`
+
+See the example in the haddock for withPrivData to for how to use that.
+
+(The only possible problem with that is you're claiming it's a password
+when it's really an API key. Propellor won't care, but it you wanted
+to store the actual gitlab password too, then you'd need to use a different
+username. It may make sense to add a new constructor to PrivDataField for
+an API key or something like that.)
+"""]]
diff --git a/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_2_ab81471e6466944810906284f9a523cc._comment b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_2_ab81471e6466944810906284f9a523cc._comment
new file mode 100644
index 00000000..a9b50d81
--- /dev/null
+++ b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_2_ab81471e6466944810906284f9a523cc._comment
@@ -0,0 +1,66 @@
+[[!comment format=mdwn
+ username="picca"
+ avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c"
+ subject="comment 2"
+ date="2017-11-27T15:50:08Z"
+ content="""
+Hello, joey
+
+I try this but It ends up with an error during the compilation
+
+ blabla' :: Property (HasInfo + DebianLike)
+ blabla' = withPrivData (Password \"xxxxxxxxxxxxxx\") (Context \"yyyyyyyyyyyyy\") $ \getdata ->
+ property' \"blabla\" $ \w -> getdata $ \privdata -> ensureProperty w
+ (buildAndInstall (Git (\"https://toto:\" ++ (privDataVal privdata) ++ \"@xxxxxxxxxxxxxx\") Nothing \"blabla\"))
+
+ blabla :: Property (HasInfo + DebianLike)
+ blabla = withOS \"Install BlaBla Stack\" $ \w o -> case o of
+ (Just (System (Debian _ Unstable) _)) -> ensureProperty w $ unstable
+ (Just (System (Debian _ (Stable \"jessie\")) _)) -> ensureProperty w $ jessie
+ (Just (System (Debian _ (Stable \"stretch\")) _)) -> ensureProperty w $ stretch
+ _ -> error $ \"Blabla installation not yet implemented on \" ++ show o
+ where
+ unstable :: Property (HasInfo + DebianLike)
+ unstable = propertyList \"Stretch Blabla\" $ props
+ & Apt.installed [\"python3-gpyfft\"]
+ & blabla'
+
+ jessie :: Property (HasInfo + Debian)
+ jessie = propertyList \"Jessie Blabla\" $ props
+ & Apt.installedBackport [\"cython\", \"cython3\"]
+ & Apt.installedBackport [\"python-sphinx\", \"python3-sphinx\"]
+ & buildAndInstall (Backport \"appdirs\" Nothing Nothing)
+ & buildAndInstall (Backport \"pytools\" Nothing Nothing)
+ & buildAndInstall (Backport \"pyopencl\" Nothing (Just \"nodocs\"))
+ & buildAndInstall (Backport \"clfft\" Nothing Nothing)
+ & buildAndInstall (Backport \"gpyfft\" (Just \"nostrip\") Nothing)
+ & blabla'
+
+ stretch :: Property (HasInfo + DebianLike)
+ stretch = propertyList \"Stretch Blabla\" $ props
+ & buildAndInstall (Backport \"gpyfft\" (Just \"nostrip\") Nothing)
+ & blabla'
+
+
+
+here the error
+
+ src/propellor-config.hs:810:60-75: error:
+ • Couldn't match type ‘'False’ with ‘'True’
+ arising from a use of ‘ensureProperty’
+ • In the expression: ensureProperty w
+ In the expression: ensureProperty w $ unstable
+ In a case alternative:
+ (Just (System (Debian _ (Unstable)) _))
+ -> ensureProperty w $ stretch
+
+It seems to me that this is an error with the HasInfo, but I could not manage to solve this problem by myself.
+
+do you have a Idea in ordert o solve this ?
+
+thanks
+
+Frederic
+
+
+"""]]
diff --git a/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_3_32aaf0dd4d2a33d3ac7596bc47c15028._comment b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_3_32aaf0dd4d2a33d3ac7596bc47c15028._comment
new file mode 100644
index 00000000..beaa631f
--- /dev/null
+++ b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_3_32aaf0dd4d2a33d3ac7596bc47c15028._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2017-11-27T20:41:40Z"
+ content="""
+Yes, ensureProperty cannot be used with a Property HasInfo as that would
+prevent propellor from collecting that Info.
+
+You could avoid that by factoring the `blabla'` out of the properties
+that install packages, to the top level of the property:
+
+ blabla = blabla' `requires` installpackages
+ where
+ installpackages = withOS "Install BlaBla Stack" $ \w o -> case o of
+ ...
+"""]]
diff --git a/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_4_ec1136accf484b572a1bcdfee40dcc92._comment b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_4_ec1136accf484b572a1bcdfee40dcc92._comment
new file mode 100644
index 00000000..596e2141
--- /dev/null
+++ b/doc/forum/How_to_add_a_privdata_for_Gitlab_cookies/comment_4_ec1136accf484b572a1bcdfee40dcc92._comment
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="picca"
+ avatar="http://cdn.libravatar.org/avatar/7e61c80d28018b10d31f6db7dddb864c"
+ subject="comment 4"
+ date="2017-11-28T06:37:34Z"
+ content="""
+Thanks a lot,
+
+if I understand correctly,it means that it is not possible to use withPrivData with ensureProperty if the property HasInfo.
+
+Cheers
+
+Fred
+"""]]
diff --git a/doc/news/version_5.0.0.mdwn b/doc/news/version_5.0.0.mdwn
deleted file mode 100644
index dbf678cc..00000000
--- a/doc/news/version_5.0.0.mdwn
+++ /dev/null
@@ -1,20 +0,0 @@
-propellor 5.0.0 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * Debootstrap.built now supports bootstrapping chroots for foreign
- OS's, using qemu-user-static.
- * Machine: New module collecting machine-specific properties for
- building bootable images for ARM boards.
- Tested working boards: Olimex Lime, CubieTruck, Banana Pi, SheevaPlug.
- * Diskimage.imageBuiltFor: New property to build a disk image for a Host,
- using partition table information configured via the new properties
- hasPartitionTableType, hasPartition and adjustPartition.
- * Chroot.noServices moved to Service.noServices and its type changed.
- (API change)
- * Service: Avoid starting services when noServices is used.
- * Add Typeable instance to OriginUrl, fixing build with old versions
- of ghc.
- * Added Propellor.Property.impossible
- * Fail2Ban: Added several additional properties.
- Thanks, Félix Sipma.
- * Fail2Ban: Renamed jail.d conf file to use .local.
- Thanks, Félix Sipma."""]] \ No newline at end of file
diff --git a/doc/news/version_5.1.0.mdwn b/doc/news/version_5.1.0.mdwn
new file mode 100644
index 00000000..dd007a24
--- /dev/null
+++ b/doc/news/version_5.1.0.mdwn
@@ -0,0 +1,18 @@
+propellor 5.1.0 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * [ Sean Whitton ]
+ * File.isSymlinkedTo now revertable. (minor API change)
+ * Sbuild module changes:
+ - Type of Sbuild.built changed to accept additional properties to be
+ ensured inside schroots. (API change)
+ See the suggested usage in module's documentation for new syntax.
+ - Drop Sbuild.installed, Sbuild.builtFor, Sbuild.updated,
+ Sbuild.updatedFor. (API change)
+ Use Sbuild.built instead. See suggested usage in module's documentation.
+ - Propellor no longer sets up apt proxies in sbuild chroots automatically.
+ Instead, pass the new Sbuild.useHostProxy to Sbuild.built to have
+ Propellor propagate the host's Apt proxy configuration into the chroot.
+ See suggested usage in module's documentation.
+ - Internally, Propellor no longer invokes sbuild-createchroot(1) to build
+ schroots.
+ - Update documentation."""]] \ No newline at end of file
diff --git a/doc/todo/spin_without_remote_compilation/comment_6_513dededf5872a51eb443a211cee13fa._comment b/doc/todo/spin_without_remote_compilation/comment_6_513dededf5872a51eb443a211cee13fa._comment
new file mode 100644
index 00000000..5e9325da
--- /dev/null
+++ b/doc/todo/spin_without_remote_compilation/comment_6_513dededf5872a51eb443a211cee13fa._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="np"
+ avatar="http://cdn.libravatar.org/avatar/54743cddf009909589217983a7aac25f"
+ subject="Bounty"
+ date="2017-11-24T13:23:13Z"
+ content="""
+Hi!
+
+What's left to be done for this issue.
+If there is any work to sponsor to have this feature integrated I would gladly do so.
+"""]]