aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/distrobuilder/APKBUILD73
-rw-r--r--testing/distrobuilder/glide-0_git20181004.lock48
-rw-r--r--testing/distrobuilder/glide-0_git20181004.yaml15
3 files changed, 136 insertions, 0 deletions
diff --git a/testing/distrobuilder/APKBUILD b/testing/distrobuilder/APKBUILD
new file mode 100644
index 0000000000..bd87513555
--- /dev/null
+++ b/testing/distrobuilder/APKBUILD
@@ -0,0 +1,73 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer:
+pkgname=distrobuilder
+pkgver=0_git20181004
+_commit=d2329be9569d45028a38836186d2353b8ddfe1ca
+pkgrel=0
+pkgdesc="System container image builder"
+url="https://linuxcontainers.org/"
+arch="all"
+license="Apache-2.0"
+depends="xz gnupg1"
+makedepends="go linux-headers glide"
+subpackages="$pkgname-lxc::noarch $pkgname-lxd::noarch"
+options="!check" # has no check
+source="$pkgname-$pkgver.tar.gz::https://github.com/lxc/distrobuilder/archive/$_commit.tar.gz
+ glide-$pkgver.yaml
+ glide-$pkgver.lock
+ "
+builddir="$srcdir/src/github.com/lxc/$pkgname"
+
+prepare() {
+ mkdir -p ${builddir%/*}
+ mv "$srcdir"/$pkgname-$_commit "$builddir"/
+ cd "$builddir"
+ cp "$srcdir"/glide-$pkgver.yaml glide.yaml
+ cp "$srcdir"/glide-$pkgver.lock glide.lock
+ export GLIDE_HOME="$srcdir/.glide"
+ export GOPATH="$srcdir"
+ glide install --skip-test
+ default_prepare
+}
+
+glide_init() {
+ abuild clean deps unpack prepare
+ cd "$builddir"
+ export GLIDE_HOME="$srcdir/.glide"
+ export GOPATH="$srcdir"
+ rm -f glide.yaml glide.lock
+ glide init --non-interactive
+ glide update
+ cp glide.yaml "$startdir"/glide-$pkgver.yaml
+ cp glide.lock "$startdir"/glide-$pkgver.lock
+ cd "$startdir" && abuild checksum clean
+}
+
+build() {
+ cd "$builddir"
+ export GOPATH="$srcdir"
+ go build -o bin/$pkgname ./$pkgname
+}
+
+package() {
+ cd "$builddir"
+ install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
+}
+
+lxc() {
+ pkgdesc="$pkgdesc (for LXC)"
+ depends="$pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel lxc"
+ mkdir -p "$subpkgdir"
+}
+
+lxd() {
+ pkgdesc="$pkgdesc (for LXD)"
+ depends="$pkgname squashfs-tools"
+ install_if="$pkgname=$pkgver-r$pkgrel lxd"
+ mkdir -p "$subpkgdir"
+}
+
+sha512sums="de50479ab6de5bca80c48ca14ae29ad712a5c6ac1ec7661d28da5b42c77ef0bbc4c00f95080abad2838663c3cf015466c2e2d1ba75168a440df18dfebc2bc0a5 distrobuilder-0_git20181004.tar.gz
+602a97b07d6c0b0eca1cec26e3b66223cf0148842ccef429de273d77be2d91c24d98732977fc42b1f068f6f08807faebb061607bf27384bc1555daa8137d235f glide-0_git20181004.yaml
+1d941f26aaaebff4bccf6bc50688cd38f315e819f0521a1a0fa43acca00173c561376dd5ef7d2bf42d0fe03a016a5bb303e7c42786b847033215ebb2d74e5ba7 glide-0_git20181004.lock"
diff --git a/testing/distrobuilder/glide-0_git20181004.lock b/testing/distrobuilder/glide-0_git20181004.lock
new file mode 100644
index 0000000000..312979bf00
--- /dev/null
+++ b/testing/distrobuilder/glide-0_git20181004.lock
@@ -0,0 +1,48 @@
+hash: 556e42e36a49892bd4f9b6d826ced7c93825099add910613c0007ce7be1caf5c
+updated: 2018-12-16T13:51:16.459312047Z
+imports:
+- name: code.cloudfoundry.org/systemcerts
+ version: ca00b2f806f2fa1ded784ade357bad1ea3f1fbbe
+- name: github.com/flosch/pongo2
+ version: 24195e6d38b06020d7a92c7b11960cf2e7cad2f2
+- name: github.com/gorilla/websocket
+ version: 95ba29eb981bbb27d92e1f70bf8a1949452d926b
+- name: github.com/inconshreveable/mousetrap
+ version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
+- name: github.com/juju/errors
+ version: 089d3ea4e4d597bd98acac068193d341983326a3
+- name: github.com/lxc/lxd
+ version: ae0a67076b879e32620c4e31a993f14a4a167408
+ subpackages:
+ - shared
+ - shared/api
+ - shared/cancel
+ - shared/ioprogress
+ - shared/logger
+ - shared/osarch
+- name: github.com/pkg/errors
+ version: 059132a15dd08d6704c67711dae0cf35ab991756
+- name: github.com/spf13/cobra
+ version: d2d81d9a96e23f0255397222bb0b4e3165e492dc
+- name: github.com/spf13/pflag
+ version: 916c5bf2d89aff6fd3e10e7811337218dfa81cb5
+- name: gopkg.in/flosch/pongo2.v3
+ version: 5e81b817a0c48c1c57cdf1a9056cf76bdee02ca9
+- name: gopkg.in/robfig/cron.v2
+ version: be2e0b0deed5a68ffee390b4583a13aff8321535
+- name: gopkg.in/yaml.v2
+ version: 51d6538a90f86fe93ac480b35f37b2be17fef232
+testImports:
+- name: github.com/davecgh/go-spew
+ version: d8f796af33cc11cb798c1aaeb27a4ebc5099927d
+ subpackages:
+ - spew
+- name: github.com/pmezard/go-difflib
+ version: 792786c7400a136282c1664665ae0a8db921c6c2
+ subpackages:
+ - difflib
+- name: github.com/stretchr/testify
+ version: 5b93e2dc01fd8fbf32aa74a198b0ebe78f6f6b6f
+ subpackages:
+ - assert
+ - require
diff --git a/testing/distrobuilder/glide-0_git20181004.yaml b/testing/distrobuilder/glide-0_git20181004.yaml
new file mode 100644
index 0000000000..f16d150e22
--- /dev/null
+++ b/testing/distrobuilder/glide-0_git20181004.yaml
@@ -0,0 +1,15 @@
+package: github.com/lxc/distrobuilder
+import:
+- package: github.com/lxc/lxd
+ subpackages:
+ - shared
+ - shared/api
+ - shared/ioprogress
+ - shared/osarch
+- package: github.com/spf13/cobra
+- package: gopkg.in/flosch/pongo2.v3
+- package: gopkg.in/yaml.v2
+testImport:
+- package: github.com/stretchr/testify
+ subpackages:
+ - require