Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Unbreak for real 🎉
Browse files Browse the repository at this point in the history
Running `go generate` is not possible with the current go infrastructure
in the ports.  So run it on my machine, and add the generated files as
patches for the actual build.

While here, disable one of the plugins as recommended by upstream.
  • Loading branch information
smortex committed Sep 21, 2019
1 parent 64e2bc1 commit ecce8b4
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sysutils/choria/Makefile
Expand Up @@ -100,6 +100,13 @@ post-patch:
${REINPLACE_CMD} -e 's/{{cpkg_name}}/choria-server/' \
${WRKSRC}/packager/templates/debian/global/server.conf

x-pre-build:
cd ${GO_WRKSRC} && ${GO_CMD} generate
@echo "---------------------------------------------------------"
@echo "patchtool -a ${WRKSRC}/plugin_*.go"
@echo "---------------------------------------------------------"
false

post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/choria
${INSTALL_DATA} ${WRKSRC}/packager/templates/debian/global/broker.conf ${STAGEDIR}${PREFIX}/etc/choria/broker.conf.sample
Expand Down
7 changes: 7 additions & 0 deletions sysutils/choria/files/patch-packager_plugins.yaml
@@ -0,0 +1,7 @@
--- packager/plugins.yaml.orig
+++ packager/plugins.yaml
@@ -2,4 +2,3 @@
golangmco: github.com/choria-io/mcorpc-agent-provider/mcorpc/golang
rubymco: github.com/choria-io/mcorpc-agent-provider/mcorpc/ruby
externalmco: github.com/choria-io/mcorpc-agent-provider/mcorpc/external
-choria_provision: github.com/choria-io/provisioning-agent/agent
18 changes: 18 additions & 0 deletions sysutils/choria/files/patch-plugin__1__externalmco.go
@@ -0,0 +1,18 @@
--- /dev/null
+++ plugin_1_externalmco.go
@@ -0,0 +1,15 @@
+// auto generated 2019-09-21 12:57:46.899869855 -1000 -10 m=+0.002999960
+package main
+
+import (
+ "github.com/choria-io/go-choria/plugin"
+ p "github.com/choria-io/mcorpc-agent-provider/mcorpc/external"
+
+)
+
+func init() {
+ err := plugin.Register("externalmco", p.ChoriaPlugin())
+ if err != nil {
+ panic(err)
+ }
+}
18 changes: 18 additions & 0 deletions sysutils/choria/files/patch-plugin__2__golangmco.go
@@ -0,0 +1,18 @@
--- /dev/null
+++ plugin_2_golangmco.go
@@ -0,0 +1,15 @@
+// auto generated 2019-09-21 12:57:46.90002488 -1000 -10 m=+0.003154987
+package main
+
+import (
+ "github.com/choria-io/go-choria/plugin"
+ p "github.com/choria-io/mcorpc-agent-provider/mcorpc/golang"
+
+)
+
+func init() {
+ err := plugin.Register("golangmco", p.ChoriaPlugin())
+ if err != nil {
+ panic(err)
+ }
+}
18 changes: 18 additions & 0 deletions sysutils/choria/files/patch-plugin__3__rubymco.go
@@ -0,0 +1,18 @@
--- /dev/null
+++ plugin_3_rubymco.go
@@ -0,0 +1,15 @@
+// auto generated 2019-09-21 12:57:46.900166016 -1000 -10 m=+0.003296111
+package main
+
+import (
+ "github.com/choria-io/go-choria/plugin"
+ p "github.com/choria-io/mcorpc-agent-provider/mcorpc/ruby"
+
+)
+
+func init() {
+ err := plugin.Register("rubymco", p.ChoriaPlugin())
+ if err != nil {
+ panic(err)
+ }
+}

0 comments on commit ecce8b4

Please sign in to comment.