diff options
Diffstat (limited to 'testing/lxd')
-rw-r--r-- | testing/lxd/APKBUILD | 52 | ||||
-rw-r--r-- | testing/lxd/__NR_mknod.patch | 64 | ||||
-rw-r--r-- | testing/lxd/error-h-not-avail.patch | 12 | ||||
-rw-r--r-- | testing/lxd/fix-ppc64le-build.patch | 10 | ||||
-rw-r--r-- | testing/lxd/lxd-dont-go-get.patch | 16 |
5 files changed, 33 insertions, 121 deletions
diff --git a/testing/lxd/APKBUILD b/testing/lxd/APKBUILD index 2a70ed86fd..0fef740d72 100644 --- a/testing/lxd/APKBUILD +++ b/testing/lxd/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=lxd -pkgver=3.15 -pkgrel=1 +pkgver=3.16 +pkgrel=0 pkgdesc="a container hypervisor and a new user experience for LXC" url="https://linuxcontainers.org/lxd/" arch="all !aarch64" @@ -51,7 +51,6 @@ source="https://linuxcontainers.org/downloads/$pkgname/$pkgname-$pkgver.tar.gz $pkgname.confd $pkgname.initd lxd-dont-go-get.patch - error-h-not-avail.patch " # avoid conflict with system libsqlite3.so.0 by adding a soname prefix. # this makes lxd-libs provide so:lxd:libsqlite3.so.0 and lxd depend on @@ -62,31 +61,31 @@ sonameprefix="$pkgname:" _project="github.com/lxc/lxd" prepare() { - export GOPATH="$builddir/dist" + export GOPATH="$builddir/_dist" default_prepare update_config_guess for p in raft sqlite dqlite; do - cd "$GOPATH"/$p + cd "$GOPATH"/deps/$p autoreconf -i done } build() { - export GOPATH="$builddir/dist" - export CGO_CFLAGS="-I${GOPATH}/sqlite/ -I${GOPATH}/libco/ -I${GOPATH}/raft/include/ -I${GOPATH}/dqlite/include/" - export CGO_LDFLAGS="$CGO_LDFLAGS -L${GOPATH}/sqlite/.libs/ -L${GOPATH}/libco/ -L${GOPATH}/raft/.libs -L${GOPATH}/dqlite/.libs/ -lintl" - export LD_LIBRARY_PATH="$ldpath ${GOPATH}/sqlite/.libs/:${GOPATH}/libco/:${GOPATH}/raft/.libs/:${GOPATH}/dqlite/.libs/" + export GOPATH="$builddir/_dist" + export CGO_CFLAGS="-I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/libco/ -I${GOPATH}/deps/raft/include/ -I${GOPATH}/deps/dqlite/include/" + export CGO_LDFLAGS="$CGO_LDFLAGS -L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/libco/ -L${GOPATH}/deps/raft/.libs -L${GOPATH}/deps/dqlite/.libs/ -lintl" + export LD_LIBRARY_PATH="$ldpath ${GOPATH}/deps/sqlite/.libs/:${GOPATH}/deps/libco/:${GOPATH}/deps/raft/.libs/:${GOPATH}/deps/dqlite/.libs/" - cd "$GOPATH"/raft - PKG_CONFIG_PATH="${GOPATH}/raft/" ./configure \ + cd "$GOPATH"/deps/raft + PKG_CONFIG_PATH="${GOPATH}/deps/raft/" ./configure \ --prefix=/usr \ --libdir=/usr/lib/lxd make - cd "$GOPATH"/libco + cd "$GOPATH"/deps/libco make - cd "$GOPATH"/sqlite + cd "$GOPATH"/deps/sqlite ./configure \ --prefix=/usr \ --enable-replication \ @@ -95,29 +94,28 @@ build() { --libdir=/usr/lib/lxd make - cd "$GOPATH"/dqlite - PKG_CONFIG_PATH="${GOPATH}/sqlite/:${GOPATH}/libco/:${GOPATH}/raft/" ./configure \ + cd "$GOPATH"/deps/dqlite + PKG_CONFIG_PATH="${GOPATH}/deps/sqlite/:${GOPATH}/deps/libco/:${GOPATH}/deps/raft/" ./configure \ --prefix=/usr \ --libdir=/usr/lib/lxd - make CFLAGS="-I${GOPATH}/sqlite/ -I${GOPATH}/libco/ -I${GOPATH}/raft/include/" LDFLAGS="-L${GOPATH}/sqlite/.libs/ -L${GOPATH}/libco/ -L${GOPATH}/raft/.libs/" + make CFLAGS="-I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/libco/ -I${GOPATH}/deps/raft/include/" LDFLAGS="-L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/libco/ -L${GOPATH}/deps/raft/.libs/" cd "$builddir" - go install -v -x $_project/lxc go install -v -x -tags libsqlite3 $_project/lxd - for tool in fuidshift lxc-to-lxd lxd-benchmark lxd-p2c; do - go install -v -x $_project/$tool + for bin in lxc fuidshift lxc-to-lxd lxd-benchmark lxd-p2c; do + go install -v -x $_project/$bin done } package() { for r in sqlite dqlite; do - cd "$GOPATH"/$r + cd "$GOPATH"/deps/$r make DESTDIR="$pkgdir" install done - cp ${GOPATH}/libco/libco.so* "$pkgdir"/usr/lib/lxd - cp ${GOPATH}/raft/.libs/libraft.so* "$pkgdir"/usr/lib/lxd + cp ${GOPATH}/deps/libco/libco.so* "$pkgdir"/usr/lib/lxd + cp ${GOPATH}/deps/raft/.libs/libraft.so* "$pkgdir"/usr/lib/lxd rm $pkgdir/usr/bin/sqlite3 rm -r $pkgdir/usr/include @@ -148,27 +146,27 @@ scripts() { pkgdesc="LXD scripts" depends="$pkgname py3-lxc" - export GOPATH="$builddir/dist" + export GOPATH="$builddir/_dist" cd $GOPATH for tool in fuidshift lxc-to-lxd lxd-benchmark lxd-p2c; do install -Dm755 bin/$tool "$subpkgdir"/usr/bin/$tool done + install -Dm755 ../scripts/empty-lxd.sh "$subpkgdir"/usr/bin/empty-lxd.sh } libs() { pkgdesc="LXD bundled libraries" - depends= mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ patchelf --set-rpath "/usr/lib/lxd" "${subpkgdir}/usr/lib/lxd/libdqlite.so" patchelf --set-rpath "/usr/lib/lxd" "${subpkgdir}/usr/lib/lxd/libsqlite3.so" rm -rf "$subpkgdir"/usr/lib/lxd/pkgconfig \ "$subpkgdir"/usr/lib/lxd/*.a + rm -r "$pkgdir"/etc } -sha512sums="de7ad00c8827d13513eb7d01469441bce6b64554939b6cc8c2a106d457b1b959ff21dbc81d28b13551c121f74b2d4c3a5024926fa28f82d2e3f1de670f23250f lxd-3.15.tar.gz +sha512sums="11c6c5c49ceb23c31979829937e1baad340b8920481ef5b89b2b6d0b6b05967ec1f446f8b0330c11008f6fecea077eed0858af7fe802c50b52148757584fdfb9 lxd-3.16.tar.gz bc32c71f2ce10f508433e1e4651c08c18e8a17e9419a7ce391c0f127fc7cf378c665178926b35eae8813e290d9c5eab3ceb605679fd32efdf2cf98a57cee4127 lxd.confd 94de0c0d5ab63463a929a4151359950b1117d0ada5ccf0944311cc70c6b6d4c437ccb4158734ab35db67bfb4abc437074c3f3515be4531f63adc74da21fefb5b lxd.initd -a77a74950110c94727956457843cd3f64c0db901fb05b95ab0edaa966f7fe76a993d86c8a51d14724a11846a69261199594f683dfefa1db633f4ca35c7f23607 lxd-dont-go-get.patch -64d0cb8c3555bcf4fec106d86262ec5075b813df12b5ae59808b4d7776abf73380eddfef1504c975fe44aaed8b637cb8a9323b914e564306e97494d213986db3 error-h-not-avail.patch" +7453a02f003b2b3ccc2695649ca6b39157f1bd30070815e6addaacb280ea935d79bc5d265925aeec379a16f0235387d8333c3f25519c959b980fe15ad2d5728c lxd-dont-go-get.patch" diff --git a/testing/lxd/__NR_mknod.patch b/testing/lxd/__NR_mknod.patch deleted file mode 100644 index d75d41034f..0000000000 --- a/testing/lxd/__NR_mknod.patch +++ /dev/null @@ -1,64 +0,0 @@ -From a181ed43172755cf9fcd3e1068f914c373e7091b Mon Sep 17 00:00:00 2001 -From: Christian Brauner <christian.brauner@ubuntu.com> -Date: Fri, 14 Jun 2019 01:05:52 +0200 -Subject: [PATCH] seccomp: define __NR_mknod if missing - -Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> ---- - lxd/seccomp.go | 42 ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 42 insertions(+) - -diff --git a/lxd/seccomp.go b/lxd/seccomp.go -index 0afad7cacc..071859d6a2 100644 ---- a/lxd/seccomp.go -+++ b/lxd/seccomp.go -@@ -109,6 +109,48 @@ static int device_allowed(dev_t dev, mode_t mode) - return -EPERM; - } - -+#ifndef __NR_mknod -+ #ifdef __x86_64__ -+ #define __NR_mknod 133 -+ #elif defined __arm__ -+ #define __NR_mknod 14 -+ #elif defined __aarch64__ -+ #define __NR_mknod 14 -+ #elif defined __s390__ -+ #define __NR_mknod 14 -+ #elif defined __s390x__ -+ #define __NR_mknod 14 -+ #elif __mips__ && _MIPSEB && _MIPS_SIM ==_ABIO32 -+ #define __NR_mknod 14 -+ #elif __mips__ && _MIPSEL && _MIPS_SIM==_ABIO32 -+ #define __NR_mknod 14 -+ #elif __mips__ && _MIPSEB && _MIPS_SIM==_ABI64 -+ #define __NR_mknod 131 -+ #elif __mips__ && _MIPSEL && _MIPS_SIM==_ABI64 -+ #define __NR_mknod 131 -+ #elif __mips__ && _MIPSEB && _MIPS_SIM==_ABIN32 -+ #define __NR_mknod 131 -+ #elif __mips__ && _MIPSEL && _MIPS_SIM==_ABIN32 -+ #define __NR_mknod 131 -+ #elif defined __i386__ -+ #define __NR_mknod 14 -+ #elif defined __alpha__ -+ #define __NR_mknod 14 -+ #elif defined __ia64__ -+ #define __NR_mknod 13 -+ #elif defined __m68k__ -+ #define __NR_mknod 14 -+ #elif defined __sparc__ -+ #define __NR_mknod 14 -+ #elif defined __powerpc__ -+ #define __NR_mknod 14 -+ #elif defined __sh__ -+ #define __NR_mknod 14 -+ #else -+ #warning "__NR_mknod unknown for your architecture" -+ #endif -+#endif -+ - static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg, - char *buf, size_t size, - mode_t *mode, dev_t *dev, - diff --git a/testing/lxd/error-h-not-avail.patch b/testing/lxd/error-h-not-avail.patch deleted file mode 100644 index f1dea0904d..0000000000 --- a/testing/lxd/error-h-not-avail.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/dist/raft/src/replication.c b/dist/raft/src/replication.c -index f9cb5a8..67316bd 100644 ---- a/dist/raft/src/replication.c -+++ b/dist/raft/src/replication.c -@@ -3,7 +3,6 @@ - #include "assert.h" - #include "configuration.h" - #include "convert.h" --#include "error.h" - #include "log.h" - #include "logging.h" - #include "membership.h" diff --git a/testing/lxd/fix-ppc64le-build.patch b/testing/lxd/fix-ppc64le-build.patch deleted file mode 100644 index 1bebfd1a9e..0000000000 --- a/testing/lxd/fix-ppc64le-build.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/dist/src/github.com/lxc/lxd/lxd/main_forkfile.go -+++ b/dist/src/github.com/lxc/lxd/lxd/main_forkfile.go -@@ -17,6 +17,7 @@ - #include <string.h> - #include <sys/stat.h> - #include <unistd.h> -+#include <limits.h> - - extern char* advance_arg(bool required); - extern void error(char *msg); diff --git a/testing/lxd/lxd-dont-go-get.patch b/testing/lxd/lxd-dont-go-get.patch index 22593ef5ed..1d8da1f98d 100644 --- a/testing/lxd/lxd-dont-go-get.patch +++ b/testing/lxd/lxd-dont-go-get.patch @@ -1,5 +1,5 @@ diff --git a/Makefile b/Makefile -index 99f2aa6..4d79b8b 100644 +index 9e17cd4..ed4465a 100644 --- a/Makefile +++ b/Makefile @@ -15,13 +15,11 @@ ifeq ($(TAG_SQLITE3),) @@ -16,7 +16,7 @@ index 99f2aa6..4d79b8b 100644 go install -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./lxc @echo "LXD client built successfully" -@@ -68,7 +66,6 @@ deps: +@@ -100,7 +98,6 @@ deps: .PHONY: update update: @@ -24,7 +24,7 @@ index 99f2aa6..4d79b8b 100644 @echo "Dependencies updated" .PHONY: update-protobuf -@@ -89,15 +86,11 @@ ifeq ($(TAG_SQLITE3),) +@@ -121,15 +118,11 @@ ifeq ($(TAG_SQLITE3),) exit 1 endif @@ -40,15 +40,15 @@ index 99f2aa6..4d79b8b 100644 go test -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./... cd test && ./main.sh -@@ -113,7 +106,6 @@ dist: - ln -s ../../../../lxd-$(VERSION) $(TMP)/dist/src/github.com/lxc/lxd +@@ -145,7 +138,6 @@ dist: + ln -s ../../../../lxd-$(VERSION) $(TMP)/_dist/src/github.com/lxc/lxd # Download dependencies -- cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/dist go get -t -v -d ./... +- cd $(TMP)/lxd-$(VERSION) && GOPATH=$(TMP)/_dist go get -t -v -d ./... # Download the cluster-enabled sqlite/dqlite - git clone --depth=1 https://github.com/CanonicalLtd/dqlite $(TMP)/dist/dqlite -@@ -149,7 +141,6 @@ update-po: + mkdir $(TMP)/_dist/deps/ +@@ -184,7 +176,6 @@ update-po: done update-pot: |