The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc-ci/pull/190
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) ===
From 6f360463dc63eae7854757c5ac8053c643048912 Mon Sep 17 00:00:00 2001 From: Free Ekanayaka <free.ekanay...@canonical.com> Date: Fri, 11 Sep 2020 14:51:39 +0200 Subject: [PATCH 1/2] Drop custom SQLite and libco builds --- bin/build-cache | 2 +- bin/build-cache-lxd | 34 +++------------------------------- bin/build-lxd | 6 +++--- bin/test-lxd-kernel | 8 ++++---- 4 files changed, 11 insertions(+), 39 deletions(-) diff --git a/bin/build-cache b/bin/build-cache index 7bb9944..c17a834 100755 --- a/bin/build-cache +++ b/bin/build-cache @@ -47,7 +47,7 @@ apt-get update --yes # Install dependencies apt-get install --yes --no-install-recommends \ - git build-essential libtool libuv1-dev make pkg-config tcl \ + git build-essential libtool libuv1-dev libsqlite3-dev make pkg-config tcl \ autoconf automake autopoint curl apt-get clean diff --git a/bin/build-cache-lxd b/bin/build-cache-lxd index eeb0fd5..13a6ae3 100755 --- a/bin/build-cache-lxd +++ b/bin/build-cache-lxd @@ -79,32 +79,6 @@ rm -rf "${TEMP_DIR}/image" cd "${TEMP_DIR}" # Clustering bits -git clone -q https://github.com/canonical/sqlite "${TEMP_DIR}/sqlite" -cd "${TEMP_DIR}/sqlite" -git log -1 --format=format:%ci%n | sed -e 's/ [-+].*$//;s/ /T/;s/^/D /' > manifest -git log -1 --format=format:%H > manifest.uuid -./configure --enable-debug --enable-replication >/dev/null 2>&1 -make >/dev/null 2>&1 -cd "${TEMP_DIR}" - -git clone -q https://github.com/canonical/libco "${TEMP_DIR}/libco" -cd "${TEMP_DIR}/libco" -gcc -c -Wall -fpic libco.c >/dev/null 2>&1 -gcc -shared -o libco.so libco.o >/dev/null 2>&1 -ar rcs libco.a libco.o >/dev/null 2>&1 -cat > libco.pc <<EOF -prefix=/usr -libdir=\${prefix}/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) -includedir=\${prefix}/include - -Name: libco -Description: Cooperative multithreading library written in C89C -Version: 18 -Libs: -L\${libdir} -lco -Cflags: -I\${includedir} -EOF -cd "${TEMP_DIR}" - git clone -q https://github.com/canonical/raft "${TEMP_DIR}/raft" cd "${TEMP_DIR}/raft" autoreconf -i >/dev/null 2>&1 @@ -114,9 +88,9 @@ cd "${TEMP_DIR}" git clone -q https://github.com/canonical/dqlite "${TEMP_DIR}/dqlite" cd "${TEMP_DIR}/dqlite" -export PKG_CONFIG_PATH="${TEMP_DIR}/sqlite:${TEMP_DIR}/libco:${TEMP_DIR}/raft" -export CFLAGS="-I${TEMP_DIR}/sqlite -I${TEMP_DIR}/libco -I${TEMP_DIR}/raft/include" -export LDFLAGS="-L${TEMP_DIR}/sqlite/.libs -L${TEMP_DIR}/libco -L${TEMP_DIR}/raft/.libs" +export PKG_CONFIG_PATH="${TEMP_DIR}/raft" +export CFLAGS="-I${TEMP_DIR}/raft/include" +export LDFLAGS="-L${TEMP_DIR}/raft/.libs" autoreconf -i >/dev/null 2>&1 ./configure --enable-debug >/dev/null 2>&1 make >/dev/null 2>&1 @@ -172,8 +146,6 @@ mkdir -p /lxc-ci/build/cache.new rm -Rf "${TEMP_DIR}/go/pkg" "${TEMP_DIR}/go/bin" mv "${TEMP_DIR}/gimme" /lxc-ci/build/cache.new/gimme mv "${TEMP_DIR}/go" /lxc-ci/build/cache.new/go -mv "${TEMP_DIR}/sqlite" /lxc-ci/build/cache.new/sqlite -mv "${TEMP_DIR}/libco" /lxc-ci/build/cache.new/libco mv "${TEMP_DIR}/raft" /lxc-ci/build/cache.new/raft mv "${TEMP_DIR}/dqlite" /lxc-ci/build/cache.new/dqlite mv "${TEMP_DIR}/testimage.tar.xz" /lxc-ci/build/cache.new/testimage.tar.xz diff --git a/bin/build-lxd b/bin/build-lxd index 4968979..6ef0208 100755 --- a/bin/build-lxd +++ b/bin/build-lxd @@ -88,9 +88,9 @@ echo "==> ENVIRONMENT BEGIN" # Clustering if [ -e "lxd/cluster" ]; then echo "===> Setting up for LXD clustering" - export CGO_CFLAGS="-I/lxc-ci/build/cache/sqlite/ -I/lxc-ci/build/cache/libco/ -I/lxc-ci/build/cache/raft/include/ -I/lxc-ci/build/cache/dqlite/include/" - export CGO_LDFLAGS="-L/lxc-ci/build/cache/sqlite/.libs/ -L/lxc-ci/build/cache/libco/ -L/lxc-ci/build/cache/raft/.libs/ -L/lxc-ci/build/cache/dqlite/.libs/" - export LD_LIBRARY_PATH="/lxc-ci/build/cache/sqlite/.libs/:/lxc-ci/build/cache/libco/:/lxc-ci/build/cache/raft/.libs/:/lxc-ci/build/cache/dqlite/.libs/" + export CGO_CFLAGS="-I/lxc-ci/build/cache/raft/include/ -I/lxc-ci/build/cache/dqlite/include/" + export CGO_LDFLAGS="-L/lxc-ci/build/cache/raft/.libs/ -L/lxc-ci/build/cache/dqlite/.libs/" + export LD_LIBRARY_PATH="/lxc-ci/build/cache/raft/.libs/:/lxc-ci/build/cache/dqlite/.libs/" fi # Networking diff --git a/bin/test-lxd-kernel b/bin/test-lxd-kernel index d36ca89..6d6cc6f 100755 --- a/bin/test-lxd-kernel +++ b/bin/test-lxd-kernel @@ -11,16 +11,16 @@ curl -s http://canonical-lxd.stgraber.org/config/snapd.sh | sh snap install go --classic apt-add-repository ppa:ubuntu-lxc/daily --yes apt-get dist-upgrade --yes -apt-get install libudev-dev liblxc-dev libacl1-dev libuv1-dev tcl libcap-dev dh-autoreconf build-essential acl attr easy-rsa ebtables jq pkg-config socat sqlite3 dnsmasq-base dnsutils --yes +apt-get install libudev-dev liblxc-dev libacl1-dev libuv1-dev tcl libsqlite3-dev libcap-dev dh-autoreconf build-essential acl attr easy-rsa ebtables jq pkg-config socat sqlite3 dnsmasq-base dnsutils --yes apt-get remove --purge uidmap --yes rm -f /etc/subuid* /etc/subgid* snap remove lxd # Environment export GOPATH=/root/go -export CGO_CFLAGS="-I/root/go/deps/sqlite/ -I/root/go/deps/libco/ -I/root/go/deps/raft/include/ -I/root/go/deps/dqlite/include/" -export CGO_LDFLAGS="-L/root/go/deps/sqlite/.libs/ -L/root/go/deps/libco/ -L/root/go/deps/raft/.libs -L/root/go/deps/dqlite/.libs/" -export LD_LIBRARY_PATH="/root/go/deps/sqlite/.libs/:/root/go/deps/libco/:/root/go/deps/raft/.libs/:/root/go/deps/dqlite/.libs/" +export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/dqlite/include/" +export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/dqlite/.libs/" +export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/dqlite/.libs/" export PATH=${PATH}:/root/go/bin # Build LXD From dea06879dfec7e504041e942bf0f147b53a30ed7 Mon Sep 17 00:00:00 2001 From: Free Ekanayaka <free.ekanay...@canonical.com> Date: Fri, 11 Sep 2020 14:52:27 +0200 Subject: [PATCH 2/2] Don't set DQLITE_ENGINE_V2, it's the default now --- bin/build-lxd | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/build-lxd b/bin/build-lxd index 6ef0208..95c012c 100755 --- a/bin/build-lxd +++ b/bin/build-lxd @@ -166,9 +166,6 @@ if [ "$(uname -m)" != "x86_64" ]; then unset LXD_CEPH_CLUSTER fi -# Enable dqlite engine V2 (TODO: drop this once V2 is the default) -export DQLITE_ENGINE_V2=1 - # Run the unit tests if [ "${LXD_BACKEND}" = "dir" ]; then echo "==> UNIT BEGIN: all tests"
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel