Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
alpine
aports
Commits
ef6bcbc0
Commit
ef6bcbc0
authored
Aug 19, 2019
by
Francesco Colista
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/lxd: upgrade to 3.16
parent
2cea8f96
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
121 deletions
+33
-121
testing/lxd/APKBUILD
testing/lxd/APKBUILD
+25
-27
testing/lxd/__NR_mknod.patch
testing/lxd/__NR_mknod.patch
+0
-64
testing/lxd/error-h-not-avail.patch
testing/lxd/error-h-not-avail.patch
+0
-12
testing/lxd/fix-ppc64le-build.patch
testing/lxd/fix-ppc64le-build.patch
+0
-10
testing/lxd/lxd-dont-go-get.patch
testing/lxd/lxd-dont-go-get.patch
+8
-8
No files found.
testing/lxd/APKBUILD
View file @
ef6bcbc0
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname
=
lxd
pkgname
=
lxd
pkgver
=
3.1
5
pkgver
=
3.1
6
pkgrel
=
1
pkgrel
=
0
pkgdesc
=
"a container hypervisor and a new user experience for LXC"
pkgdesc
=
"a container hypervisor and a new user experience for LXC"
url
=
"https://linuxcontainers.org/lxd/"
url
=
"https://linuxcontainers.org/lxd/"
arch
=
"all !aarch64"
arch
=
"all !aarch64"
...
@@ -51,7 +51,6 @@ source="https://linuxcontainers.org/downloads/$pkgname/$pkgname-$pkgver.tar.gz
...
@@ -51,7 +51,6 @@ source="https://linuxcontainers.org/downloads/$pkgname/$pkgname-$pkgver.tar.gz
$pkgname
.confd
$pkgname
.confd
$pkgname
.initd
$pkgname
.initd
lxd-dont-go-get.patch
lxd-dont-go-get.patch
error-h-not-avail.patch
"
"
# avoid conflict with system libsqlite3.so.0 by adding a soname prefix.
# 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
# this makes lxd-libs provide so:lxd:libsqlite3.so.0 and lxd depend on
...
@@ -62,31 +61,31 @@ sonameprefix="$pkgname:"
...
@@ -62,31 +61,31 @@ sonameprefix="$pkgname:"
_project
=
"github.com/lxc/lxd"
_project
=
"github.com/lxc/lxd"
prepare
()
{
prepare
()
{
export
GOPATH
=
"
$builddir
/dist"
export
GOPATH
=
"
$builddir
/
_
dist"
default_prepare
default_prepare
update_config_guess
update_config_guess
for
p
in
raft sqlite dqlite
;
do
for
p
in
raft sqlite dqlite
;
do
cd
"
$GOPATH
"
/
$p
cd
"
$GOPATH
"
/
deps/
$p
autoreconf
-i
autoreconf
-i
done
done
}
}
build
()
{
build
()
{
export
GOPATH
=
"
$builddir
/dist"
export
GOPATH
=
"
$builddir
/
_
dist"
export
CGO_CFLAGS
=
"-I
${
GOPATH
}
/sqlite/ -I
${
GOPATH
}
/libco/ -I
${
GOPATH
}
/raft/include/ -I
${
GOPATH
}
/dqlite/include/"
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
}
/sqlite/.libs/ -L
${
GOPATH
}
/libco/ -L
${
GOPATH
}
/raft/.libs -L
${
GOPATH
}
/dqlite/.libs/ -lintl"
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
}
/sqlite/.libs/:
${
GOPATH
}
/libco/:
${
GOPATH
}
/raft/.libs/:
${
GOPATH
}
/dqlite/.libs/"
export
LD_LIBRARY_PATH
=
"
$ldpath
${
GOPATH
}
/
deps/
sqlite/.libs/:
${
GOPATH
}
/
deps/
libco/:
${
GOPATH
}
/
deps/
raft/.libs/:
${
GOPATH
}
/
deps/
dqlite/.libs/"
cd
"
$GOPATH
"
/raft
cd
"
$GOPATH
"
/
deps/
raft
PKG_CONFIG_PATH
=
"
${
GOPATH
}
/raft/"
./configure
\
PKG_CONFIG_PATH
=
"
${
GOPATH
}
/
deps/
raft/"
./configure
\
--prefix
=
/usr
\
--prefix
=
/usr
\
--libdir
=
/usr/lib/lxd
--libdir
=
/usr/lib/lxd
make
make
cd
"
$GOPATH
"
/libco
cd
"
$GOPATH
"
/
deps/
libco
make
make
cd
"
$GOPATH
"
/sqlite
cd
"
$GOPATH
"
/
deps/
sqlite
./configure
\
./configure
\
--prefix
=
/usr
\
--prefix
=
/usr
\
--enable-replication
\
--enable-replication
\
...
@@ -95,29 +94,28 @@ build() {
...
@@ -95,29 +94,28 @@ build() {
--libdir
=
/usr/lib/lxd
--libdir
=
/usr/lib/lxd
make
make
cd
"
$GOPATH
"
/dqlite
cd
"
$GOPATH
"
/
deps/
dqlite
PKG_CONFIG_PATH
=
"
${
GOPATH
}
/sqlite/:
${
GOPATH
}
/libco/:
${
GOPATH
}
/raft/"
./configure
\
PKG_CONFIG_PATH
=
"
${
GOPATH
}
/
deps/
sqlite/:
${
GOPATH
}
/
deps/
libco/:
${
GOPATH
}
/
deps/
raft/"
./configure
\
--prefix
=
/usr
\
--prefix
=
/usr
\
--libdir
=
/usr/lib/lxd
--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
"
cd
"
$builddir
"
go
install
-v
-x
$_project
/lxc
go
install
-v
-x
-tags
libsqlite3
$_project
/lxd
go
install
-v
-x
-tags
libsqlite3
$_project
/lxd
for
tool
in
fuidshift lxc-to-lxd lxd-benchmark lxd-p2c
;
do
for
bin
in
lxc
fuidshift lxc-to-lxd lxd-benchmark lxd-p2c
;
do
go
install
-v
-x
$_project
/
$
tool
go
install
-v
-x
$_project
/
$
bin
done
done
}
}
package
()
{
package
()
{
for
r
in
sqlite dqlite
;
do
for
r
in
sqlite dqlite
;
do
cd
"
$GOPATH
"
/
$r
cd
"
$GOPATH
"
/
deps/
$r
make
DESTDIR
=
"
$pkgdir
"
install
make
DESTDIR
=
"
$pkgdir
"
install
done
done
cp
${
GOPATH
}
/libco/libco.so
*
"
$pkgdir
"
/usr/lib/lxd
cp
${
GOPATH
}
/
deps/
libco/libco.so
*
"
$pkgdir
"
/usr/lib/lxd
cp
${
GOPATH
}
/raft/.libs/libraft.so
*
"
$pkgdir
"
/usr/lib/lxd
cp
${
GOPATH
}
/
deps/
raft/.libs/libraft.so
*
"
$pkgdir
"
/usr/lib/lxd
rm
$pkgdir
/usr/bin/sqlite3
rm
$pkgdir
/usr/bin/sqlite3
rm
-r
$pkgdir
/usr/include
rm
-r
$pkgdir
/usr/include
...
@@ -148,27 +146,27 @@ scripts() {
...
@@ -148,27 +146,27 @@ scripts() {
pkgdesc
=
"LXD scripts"
pkgdesc
=
"LXD scripts"
depends
=
"
$pkgname
py3-lxc"
depends
=
"
$pkgname
py3-lxc"
export
GOPATH
=
"
$builddir
/dist"
export
GOPATH
=
"
$builddir
/
_
dist"
cd
$GOPATH
cd
$GOPATH
for
tool
in
fuidshift lxc-to-lxd lxd-benchmark lxd-p2c
;
do
for
tool
in
fuidshift lxc-to-lxd lxd-benchmark lxd-p2c
;
do
install
-Dm755
bin/
$tool
"
$subpkgdir
"
/usr/bin/
$tool
install
-Dm755
bin/
$tool
"
$subpkgdir
"
/usr/bin/
$tool
done
done
install
-Dm755
../scripts/empty-lxd.sh
"
$subpkgdir
"
/usr/bin/empty-lxd.sh
}
}
libs
()
{
libs
()
{
pkgdesc
=
"LXD bundled libraries"
pkgdesc
=
"LXD bundled libraries"
depends
=
mkdir
-p
"
$subpkgdir
"
/usr
mkdir
-p
"
$subpkgdir
"
/usr
mv
"
$pkgdir
"
/usr/lib
"
$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/libdqlite.so"
patchelf
--set-rpath
"/usr/lib/lxd"
"
${
subpkgdir
}
/usr/lib/lxd/libsqlite3.so"
patchelf
--set-rpath
"/usr/lib/lxd"
"
${
subpkgdir
}
/usr/lib/lxd/libsqlite3.so"
rm
-rf
"
$subpkgdir
"
/usr/lib/lxd/pkgconfig
\
rm
-rf
"
$subpkgdir
"
/usr/lib/lxd/pkgconfig
\
"
$subpkgdir
"
/usr/lib/lxd/
*
.a
"
$subpkgdir
"
/usr/lib/lxd/
*
.a
rm
-r
"
$pkgdir
"
/etc
}
}
sha512sums
=
"
de7ad00c8827d13513eb7d01469441bce6b64554939b6cc8c2a106d457b1b959ff21dbc81d28b13551c121f74b2d4c3a5024926fa28f82d2e3f1de670f23250f
lxd-3.1
5
.tar.gz
sha512sums
=
"
11c6c5c49ceb23c31979829937e1baad340b8920481ef5b89b2b6d0b6b05967ec1f446f8b0330c11008f6fecea077eed0858af7fe802c50b52148757584fdfb9
lxd-3.1
6
.tar.gz
bc32c71f2ce10f508433e1e4651c08c18e8a17e9419a7ce391c0f127fc7cf378c665178926b35eae8813e290d9c5eab3ceb605679fd32efdf2cf98a57cee4127 lxd.confd
bc32c71f2ce10f508433e1e4651c08c18e8a17e9419a7ce391c0f127fc7cf378c665178926b35eae8813e290d9c5eab3ceb605679fd32efdf2cf98a57cee4127 lxd.confd
94de0c0d5ab63463a929a4151359950b1117d0ada5ccf0944311cc70c6b6d4c437ccb4158734ab35db67bfb4abc437074c3f3515be4531f63adc74da21fefb5b lxd.initd
94de0c0d5ab63463a929a4151359950b1117d0ada5ccf0944311cc70c6b6d4c437ccb4158734ab35db67bfb4abc437074c3f3515be4531f63adc74da21fefb5b lxd.initd
a77a74950110c94727956457843cd3f64c0db901fb05b95ab0edaa966f7fe76a993d86c8a51d14724a11846a69261199594f683dfefa1db633f4ca35c7f23607 lxd-dont-go-get.patch
7453a02f003b2b3ccc2695649ca6b39157f1bd30070815e6addaacb280ea935d79bc5d265925aeec379a16f0235387d8333c3f25519c959b980fe15ad2d5728c lxd-dont-go-get.patch"
64d0cb8c3555bcf4fec106d86262ec5075b813df12b5ae59808b4d7776abf73380eddfef1504c975fe44aaed8b637cb8a9323b914e564306e97494d213986db3 error-h-not-avail.patch"
testing/lxd/__NR_mknod.patch
deleted
100644 → 0
View file @
2cea8f96
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,
testing/lxd/error-h-not-avail.patch
deleted
100644 → 0
View file @
2cea8f96
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"
testing/lxd/fix-ppc64le-build.patch
deleted
100644 → 0
View file @
2cea8f96
--- 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);
testing/lxd/lxd-dont-go-get.patch
View file @
ef6bcbc0
diff --git a/Makefile b/Makefile
diff --git a/Makefile b/Makefile
index 9
9f2aa6..4d79b8b
100644
index 9
e17cd4..ed4465a
100644
--- a/Makefile
--- a/Makefile
+++ b/Makefile
+++ b/Makefile
@@ -15,13 +15,11 @@
ifeq ($(TAG_SQLITE3),)
@@ -15,13 +15,11 @@
ifeq ($(TAG_SQLITE3),)
...
@@ -16,7 +16,7 @@ index 99f2aa6..4d79b8b 100644
...
@@ -16,7 +16,7 @@ index 99f2aa6..4d79b8b 100644
go install -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./lxc
go install -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./lxc
@echo "LXD client built successfully"
@echo "LXD client built successfully"
@@ -
68
,7 +
66
,6 @@
deps:
@@ -
100
,7 +
98
,6 @@
deps:
.PHONY: update
.PHONY: update
update:
update:
...
@@ -24,7 +24,7 @@ index 99f2aa6..4d79b8b 100644
...
@@ -24,7 +24,7 @@ index 99f2aa6..4d79b8b 100644
@echo "Dependencies updated"
@echo "Dependencies updated"
.PHONY: update-protobuf
.PHONY: update-protobuf
@@ -
89
,15 +8
6
,11 @@
ifeq ($(TAG_SQLITE3),)
@@ -
121
,15 +
11
8,11 @@
ifeq ($(TAG_SQLITE3),)
exit 1
exit 1
endif
endif
...
@@ -40,15 +40,15 @@ index 99f2aa6..4d79b8b 100644
...
@@ -40,15 +40,15 @@ index 99f2aa6..4d79b8b 100644
go test -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./...
go test -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./...
cd test && ./main.sh
cd test && ./main.sh
@@ -1
13
,7 +1
06
,6 @@
dist:
@@ -1
45
,7 +1
38
,6 @@
dist:
ln -s ../../../../lxd-$(VERSION) $(TMP)/dist/src/github.com/lxc/lxd
ln -s ../../../../lxd-$(VERSION) $(TMP)/
_
dist/src/github.com/lxc/lxd
# Download dependencies
# 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
# Download the cluster-enabled sqlite/dqlite
git clone --depth=1 https://github.com/CanonicalLtd/dqlite
$(TMP)/dist/d
qlite
mkdir
$(TMP)/
_
dist/d
eps/
@@ -14
9
,7 +1
41
,6 @@
update-po:
@@ -1
8
4,7 +1
76
,6 @@
update-po:
done
done
update-pot:
update-pot:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment