On Mon, Oct 27, 2014 at 02:57:17PM +0000, Paul Sherwood wrote:
repo:
git://git.baserock.org/baserock/baserock/definitions.git
branch: baserock/ps/docker
Now that build-systems exist, and have added ruby and node to
devel-system, I'm proposing we go the whole nine yards of trendiness
and add docker :)
If this is approved I'll work on the equivalent patch for jetson
---
.../bsp-x86_64-generic/linux-x86-64-generic.morph | 11 +++++++++++
strata/go-docker.morph | 23
++++++++++++++++++++++
strata/go-docker/docker.morph | 10 ++++++++++
strata/go-docker/go.morph | 13 ++++++++++++
systems/devel-system-x86_64-generic.morph | 2 ++
5 files changed, 59 insertions(+)
create mode 100644 strata/go-docker.morph
create mode 100644 strata/go-docker/docker.morph
create mode 100644 strata/go-docker/go.morph
diff --git a/strata/bsp-x86_64-generic/linux-x86-64-generic.morph
b/strata/bsp-x86_64-generic/linux-x86-64-generic.morph
index 4b18b53..923727c 100644
--- a/strata/bsp-x86_64-generic/linux-x86-64-generic.morph
+++ b/strata/bsp-x86_64-generic/linux-x86-64-generic.morph
@@ -78,6 +78,17 @@ configure-commands:
- scripts/config -e FB_VESA
- scripts/config -e HOTPLUG_PCI
- scripts/config -e HOTPLUG_PCI_ACPI
+- scripts/config -e DEVPTS_MULTIPLE_INSTANCES
+- scripts/config -e VETH
+- scripts/config -e CGROUP_DEVICE
+- scripts/config -e MACVLAN
+- scripts/config -e NF_NAT_NEEDED
+- scripts/config -e NETFILTER_ADVANCED
+- scripts/config -e NETFILTER_XT_MATCH_ADDRTYPE
+- scripts/config -e NETFILTER_XT_MATCH_CONNTRACK
+- scripts/config -e MEMCG_SWAP
+- scripts/config -e AUFS_FS
+- scripts/config -e DM_THIN_PROVISIONING
- yes '' | make oldconfig
build-commands:
- make $MAKEFLAGS
Every time we need to add flags to our kernels I wish I'd gotten around
to implementing chunk inheritance/flexible build-system definitions and
a kernel build system.
diff --git a/strata/go-docker.morph b/strata/go-docker.morph
new file mode 100644
index 0000000..1beddab
--- /dev/null
+++ b/strata/go-docker.morph
@@ -0,0 +1,23 @@
+name: go-docker
+kind: stratum
+build-depends:
+- morph: strata/tools.morph
+chunks:
+- name: go
+ repo: upstream:go
+ morph: strata/go-docker/go.morph
+ ref: 536a6e6905993f1270f7a8b742352ce832cbf144
+ unpetrify-ref: go1.3.3
+ build-depends: []
+- name: docker
+ repo: upstream:docker
+ morph: strata/go-docker/docker.morph
+ ref: c78088fe3d1b90640c637d8c3457de3caa0c7a24
+ unpetrify-ref: v1.3.0
+ build-depends:
+ - go
I don't like the use of upstream tags, but we haven't concluded that
discussion yet, and at least we've got the sha1s, which gives us a
chance of reproducing if the upstream tag changes, though it would
require someone to push a branch post-hoc to ensure we've still got an
anchor for that commit.
+- name: iptables
+ repo: upstream:iptables
+ ref: 3e6fa55d5e28c93f417afeae7a7d4f349ddffcf4
+ unpetrify-ref: baserock/morph
+ build-depends: []
We've got iptables in the connectivity stratum, it may make more sense
to include that in more systems.
diff --git a/strata/go-docker/docker.morph
b/strata/go-docker/docker.morph
new file mode 100644
index 0000000..0247e19
--- /dev/null
+++ b/strata/go-docker/docker.morph
@@ -0,0 +1,10 @@
+name: docker
+kind: chunk
+build-commands:
+- export AUTO_GOPATH=1 && export
DOCKER_BUILDTAGS='exclude_graphdriver_devicemapper' && export
TMPDIR=/tmp && ./hack/make.sh binary
+#- export DOCKER_CLIENTONLY=1
+#- ./hack/make.sh dynbinary
Probably easier to read this as:
- |
export AUTO_GOPATH=1
export DOCKER_BUILDTAGS='exclude_graphdriver_devicemapper'
export TMPDIR=/tmp
./hack/make.sh binary
I'm not sure why you're excliding the device-mapper graph driver while
also turning it on in the kernel, or why you need to explicitly tell it
what its tempdir should be though.
+install-commands:
+- mkdir -p "$DESTDIR$PREFIX/bin"
+- cp ./bundles/*/binary/docker "$DESTDIR$PREFIX/bin/docker"
The `install` command has a handy `-D` option for creating leading
directories while also copying the binary to its target.
install -D bundles/*/binary/docker "$DESTDIR$PREFIX/bin/docker"
+- cp ./contrib/check-config.sh "$DESTDIR$PREFIX/bin"
I'm not a fan of putting an executable called check-config.sh in your
PATH.
install -D contrib/check-config.sh
"$DESTDIR$PREFIX/bin/check-docker-config"
diff --git a/strata/go-docker/go.morph b/strata/go-docker/go.morph
new file mode 100644
index 0000000..1c8a979
--- /dev/null
+++ b/strata/go-docker/go.morph
@@ -0,0 +1,13 @@
+name: go
+kind: chunk
+build-commands:
+- export GOROOT_FINAL="$PREFIX/lib/go" && export TMPDIR=/tmp
&& cd
src && bash ./make.bash
Similarly to before, this would probably be easier to read as:
- |
export GOROOT_FINAL="$PREFIX/lib/go"
export TMPDIR=/tmp
cd src && bash ./make.bash
+install-commands:
+- mkdir -p "$DESTDIR$PREFIX/lib/go"
+- cp -r bin "$DESTDIR$PREFIX/lib/go"
+- cp -r lib "$DESTDIR$PREFIX/lib/go"
+- cp -r src "$DESTDIR$PREFIX/lib/go"
+- cp -r pkg "$DESTDIR$PREFIX/lib/go"
+- mkdir -p "$DESTDIR$PREFIX/bin"
+- ln -s "$PREFIX/lib/go/bin/go" "$DESTDIR$PREFIX/bin/go"
I was surprised that you needed to do this, but apparently go decided
to delete all their Makefiles 2 years ago.