From 2b422fb9aa6d236e20d98127a59388faf13a1ac9 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sun, 3 Dec 2023 14:41:04 -0500 Subject: [PATCH 1/6] raft: update to 0.19.1 --- common/shlibs | 2 +- srcpkgs/raft/template | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/common/shlibs b/common/shlibs index d3e2fafb0e0f49..fd5216da96feb9 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3839,7 +3839,7 @@ libigraph.so.3 igraph-0.10.2_1 libgtk-layer-shell.so.0 gtk-layer-shell-0.1.0_1 librdkafka.so.1 librdkafka-1.4.4_3 librdkafka++.so.1 librdkafka-1.4.4_3 -libraft.so.2 raft-0.13.0_1 +libraft.so.0 raft-0.18.2_1 libmdnsd.so.1 libmdnsd-0.9_1 libosdGPU.so.3.4.3 OpenSubdiv-3.4.3_1 libosdCPU.so.3.4.3 OpenSubdiv-3.4.3_1 diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template index 234a5a6da37f98..fad1a0ad84e49b 100644 --- a/srcpkgs/raft/template +++ b/srcpkgs/raft/template @@ -1,7 +1,7 @@ # Template file for 'raft' pkgname=raft -version=0.16.0 -revision=2 +version=0.19.1 +revision=1 build_style=gnu-configure configure_args="--enable-example=no" hostmakedepends="pkg-config autoconf automake libtool" @@ -9,11 +9,9 @@ makedepends="libuv-devel liblz4-devel" short_desc="C implementation of the Raft consensus protocol" maintainer="Cameron Nemo " license="custom:LGPL-3.0-only-linking-exception" -homepage="https://github.com/canonical/raft" -distfiles="https://github.com/canonical/raft/archive/v${version}.tar.gz" -checksum=ab5480c051bfbf482074f62c9c306d08ca68b8f0ad0c2db2ebf0488cfe692336 -# test/unit/uv and test/integration/uv fail on CI -make_check=ci-skip +homepage="https://raft.readthedocs.io" +distfiles="https://github.com/cowsql/raft/archive/v${version}.tar.gz" +checksum=fb75ec93c4f8c161f73e08a4d0273f36817a20c91b89035abe793ca9b3dd6fba pre_configure() { autoreconf -i From 4e14ee74b1927480b602875c53abdc31eeb6fcf2 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 6 Jan 2024 17:57:46 +0100 Subject: [PATCH 2/6] dqlite: update to 1.15.1 --- srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------- srcpkgs/dqlite/template | 6 +++--- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 srcpkgs/dqlite/patches/musl.patch diff --git a/srcpkgs/dqlite/patches/musl.patch b/srcpkgs/dqlite/patches/musl.patch deleted file mode 100644 index ab6a0395494e79..00000000000000 --- a/srcpkgs/dqlite/patches/musl.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit dcc017a506a5d616d1ff511cfc590a7255f28de1 -Author: Cameron Nemo -Date: Wed Dec 14 15:41:15 2022 -0800 - - vfs: fix include on musl - - On musl, this fails to compile due to -Werror=cpp: - - CC src/vfs.lo - In file included from src/vfs.c:6: - /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] - 1 | #warning redirecting incorrect #include to - | ^~~~~~~ - cc1: all warnings being treated as errors - make: *** [Makefile:1314: src/vfs.lo] Error 1 - - Signed-off-by: Cameron Nemo - -diff --git a/src/vfs.c b/src/vfs.c -index 03df980..1760c62 100644 ---- a/src/vfs.c -+++ b/src/vfs.c -@@ -3,7 +3,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template index f4539b9623d986..411e8f2990a02f 100644 --- a/srcpkgs/dqlite/template +++ b/srcpkgs/dqlite/template @@ -1,7 +1,7 @@ # Template file for 'dqlite' pkgname=dqlite -version=1.13.0 -revision=2 +version=1.15.1 +revision=1 build_style=gnu-configure hostmakedepends="pkg-config automake libtool" makedepends="sqlite-devel raft-devel" @@ -10,7 +10,7 @@ maintainer="Cameron Nemo " license="custom:LGPL-3.0-only-linking-exception" homepage="https://github.com/canonical/dqlite" distfiles="https://github.com/canonical/dqlite/archive/v${version}.tar.gz" -checksum=14334a72389322d047576697f112da4cd6e1a5257d652d6162f195f2855fcd12 +checksum=f5bb8bf2de732fe188bfcbb09c3c4fd02707d267734043dbb27d1215da68af4e pre_configure() { autoreconf -i From 5f66cf04b2cfb4b2eb3cf2c5003a4df3d4a03602 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 6 Jan 2024 17:57:46 +0100 Subject: [PATCH 3/6] lxd: update to 5.20 --- srcpkgs/lxd/template | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template index 46954e9de94759..bafbfc5d551025 100644 --- a/srcpkgs/lxd/template +++ b/srcpkgs/lxd/template @@ -1,9 +1,9 @@ # Template file for 'lxd' pkgname=lxd -version=5.9 -revision=3 +version=5.20 +revision=1 build_style=go -go_import_path=github.com/lxc/lxd +go_import_path=github.com/canonical/lxd go_build_tags=libsqlite3 go_package="${go_import_path}/lxd ${go_import_path}/lxc @@ -18,9 +18,9 @@ short_desc="Next generation system container manager" maintainer="Cameron Nemo " license="Apache-2.0" homepage="https://linuxcontainers.org/lxd" -changelog="https://github.com/lxc/lxd/releases" -distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz" -checksum=a24cf7fbe3e5527a34deda7e8e92f17c05a51498723821f69b146d1e8e58117f +changelog="https://github.com/canonical/lxd/releases" +distfiles="https://github.com/canonical/lxd/archive/refs/tags/lxd-${version}.tar.gz" +checksum=bddfa7b8091ab6bdb5cdaf13b6c09f5a548976cd3118e8c73c3b7881adf94307 system_groups="lxd" # whitelist dqlite LDFLAGS @@ -28,8 +28,8 @@ export CGO_LDFLAGS_ALLOW='-Wl,-z,now' post_build() { # these need special tags and/or LDFLAGS - CGO_LDFLAGS="$CGO_LDFLAGS -static" go install -p "$XBPS_MAKEJOBS" -mod=vendor -x -tags "agent" -ldflags "${go_ldflags}" "${go_import_path}/lxd-agent" - go install -p "$XBPS_MAKEJOBS" -mod=vendor -x -tags "netgo" -ldflags "${go_ldflags}" "${go_import_path}/lxd-migrate" + CGO_LDFLAGS="$CGO_LDFLAGS -static" go install -p "$XBPS_MAKEJOBS" -mod=readonly -x -tags "agent" -ldflags "${go_ldflags}" "${go_import_path}/lxd-agent" + go install -p "$XBPS_MAKEJOBS" -mod=readonly -x -tags "netgo" -ldflags "${go_ldflags}" "${go_import_path}/lxd-migrate" } post_install() { From b6d41e1c16bc6dc6bdfefa282bc7e273c000448e Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 6 Jan 2024 17:57:47 +0100 Subject: [PATCH 4/6] lxd-lts: update to 5.0.2 --- srcpkgs/lxd-lts/template | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template index 5aacd6712c7d2e..ea064b3714bea9 100644 --- a/srcpkgs/lxd-lts/template +++ b/srcpkgs/lxd-lts/template @@ -1,7 +1,7 @@ # Template file for 'lxd-lts' pkgname=lxd-lts -version=5.0.1 -revision=2 +version=5.0.2 +revision=1 build_style=go go_import_path=github.com/lxc/lxd go_build_tags=libsqlite3 @@ -18,9 +18,9 @@ short_desc="Next generation system container manager (long term support channel) maintainer="Cameron Nemo " license="Apache-2.0" homepage="https://linuxcontainers.org/lxd" -changelog="https://github.com/lxc/lxd/releases" -distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz" -checksum=63be0ec206da6914251271d2778124242029e3d3c0bf4aa2381d921ee0133382 +changelog="https://github.com/canonical/lxd/releases" +distfiles="https://github.com/canonical/lxd/archive/refs/tags/lxd-${version}.tar.gz" +checksum=6ea9272b39f078422c9520c05d0fa01a043028ad8ce61c2957380727a6fab914 conflicts="lxd" provides="lxd-${version}_${revision}" system_groups="lxd" @@ -30,8 +30,8 @@ export CGO_LDFLAGS_ALLOW='-Wl,-z,now' post_build() { # these need special tags and/or LDFLAGS - CGO_LDFLAGS="$CGO_LDFLAGS -static" go install -p "$XBPS_MAKEJOBS" -mod=vendor -x -tags "agent" -ldflags "${go_ldflags}" "${go_import_path}/lxd-agent" - go install -p "$XBPS_MAKEJOBS" -mod=vendor -x -tags "netgo" -ldflags "${go_ldflags}" "${go_import_path}/lxd-migrate" + CGO_LDFLAGS="$CGO_LDFLAGS -static" go install -p "$XBPS_MAKEJOBS" -mod=readonly -x -tags "agent" -ldflags "${go_ldflags}" "${go_import_path}/lxd-agent" + go install -p "$XBPS_MAKEJOBS" -mod=readonly -x -tags "netgo" -ldflags "${go_ldflags}" "${go_import_path}/lxd-migrate" } post_install() { From 4e3a3c8338d5fee18ff03c9657ed28e93450ab61 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sun, 3 Dec 2023 14:41:23 -0500 Subject: [PATCH 5/6] new package: cowsql --- common/shlibs | 1 + srcpkgs/cowsql-devel | 1 + srcpkgs/cowsql/template | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 120000 srcpkgs/cowsql-devel create mode 100644 srcpkgs/cowsql/template diff --git a/common/shlibs b/common/shlibs index fd5216da96feb9..25024f8a01687d 100644 --- a/common/shlibs +++ b/common/shlibs @@ -53,6 +53,7 @@ libcidn.so.1 glibc-2.38_1 libmvec.so.1 glibc-2.38_1 libcddgmp.so.0 cddlib-0.94m_1 libcdd.so.0 cddlib-0.94m_1 +libcowsql.so.0 cowsql-1.15.4_1 libz.so.1 zlib-1.2.3_1 libb2.so.1 libb2-0.98.1_1 libbz2.so.1 bzip2-1.0.5_1 diff --git a/srcpkgs/cowsql-devel b/srcpkgs/cowsql-devel new file mode 120000 index 00000000000000..6ca7d46dc18701 --- /dev/null +++ b/srcpkgs/cowsql-devel @@ -0,0 +1 @@ +cowsql \ No newline at end of file diff --git a/srcpkgs/cowsql/template b/srcpkgs/cowsql/template new file mode 100644 index 00000000000000..7189bea57bb956 --- /dev/null +++ b/srcpkgs/cowsql/template @@ -0,0 +1,33 @@ +# Template file for 'cowsql' +pkgname=cowsql +version=1.15.4 +revision=1 +build_style=gnu-configure +configure_args="--enable-example" +hostmakedepends="automake libtool pkg-config" +makedepends="sqlite-devel libuv-devel raft-devel" +short_desc="Embeddable, replicated and fault tolerant SQL engine" +maintainer="dkwo " +license="custom:LGPL-3.0-only-linking-exception" +homepage="https://github.com/cowsql/cowsql" +distfiles="https://github.com/cowsql/cowsql/archive/refs/tags/v${version}.tar.gz" +checksum=f37ac775e8165ccf5cee4c981672072ac11e8d23c25c92e94bd25a299d170668 + +pre_configure() { + autoreconf -fi +} + +post_install() { + vlicense LICENSE +} + +cowsql-devel_package() { + depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} From bf7344daff95fcb39f4fc91ad881da21ecbea74a Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 2 Dec 2023 21:43:28 -0500 Subject: [PATCH 6/6] new package: incus --- srcpkgs/incus-client | 1 + srcpkgs/incus-tools | 1 + srcpkgs/incus/files/incus-user/check | 3 ++ srcpkgs/incus/files/incus-user/run | 3 ++ srcpkgs/incus/files/incus/run | 4 ++ srcpkgs/incus/template | 69 ++++++++++++++++++++++++++++ 6 files changed, 81 insertions(+) create mode 120000 srcpkgs/incus-client create mode 120000 srcpkgs/incus-tools create mode 100644 srcpkgs/incus/files/incus-user/check create mode 100644 srcpkgs/incus/files/incus-user/run create mode 100644 srcpkgs/incus/files/incus/run create mode 100644 srcpkgs/incus/template diff --git a/srcpkgs/incus-client b/srcpkgs/incus-client new file mode 120000 index 00000000000000..569b6284ef01d2 --- /dev/null +++ b/srcpkgs/incus-client @@ -0,0 +1 @@ +incus \ No newline at end of file diff --git a/srcpkgs/incus-tools b/srcpkgs/incus-tools new file mode 120000 index 00000000000000..569b6284ef01d2 --- /dev/null +++ b/srcpkgs/incus-tools @@ -0,0 +1 @@ +incus \ No newline at end of file diff --git a/srcpkgs/incus/files/incus-user/check b/srcpkgs/incus/files/incus-user/check new file mode 100644 index 00000000000000..d4d7293364e8d8 --- /dev/null +++ b/srcpkgs/incus/files/incus-user/check @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec incus config show >/dev/null diff --git a/srcpkgs/incus/files/incus-user/run b/srcpkgs/incus/files/incus-user/run new file mode 100644 index 00000000000000..dacdf36bc1cd83 --- /dev/null +++ b/srcpkgs/incus/files/incus-user/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/libexec/incus/incus-user --group _incus diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run new file mode 100644 index 00000000000000..d189b4395b90ff --- /dev/null +++ b/srcpkgs/incus/files/incus/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +[ -r conf ] && . ./conf +exec /usr/libexec/incus/incusd --group _incus-admin --syslog ${OPTS:- --verbose} diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template new file mode 100644 index 00000000000000..7b0911f1cd1d83 --- /dev/null +++ b/srcpkgs/incus/template @@ -0,0 +1,69 @@ +# Template file for 'incus' +pkgname=incus +version=0.4.0 +revision=1 +build_style=go +go_import_path=github.com/lxc/incus +go_build_tags="libsqlite3" +go_package="${go_import_path}/cmd/incus + ${go_import_path}/cmd/incus-benchmark + ${go_import_path}/cmd/incus-user + ${go_import_path}/cmd/incusd + ${go_import_path}/cmd/lxc-to-incus + ${go_import_path}/cmd/fuidshift" +hostmakedepends="pkg-config" +makedepends="lxc-devel acl-devel cowsql-devel raft-devel + libcap-devel libuv-devel sqlite-devel eudev-libudev-devel" +depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs" +short_desc="Powerful system container and virtual machine manager" +maintainer="dkwo " +license="Apache-2.0" +homepage="https://linuxcontainers.org/incus" +distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz" +checksum=1195d8aecaf838806b88580dfc8b48302dcbb4612addcb6d6bfa480f14d97a0d +system_groups="_incus-admin _incus" +make_dirs=" + /var/lib/incus 0755 root root + /var/log/incus 0755 root root" + +export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" +export GOFLAGS="-buildmode=pie" + +post_build() { + CGO_ENABLED=0 go install -p "${XBPS_MAKEJOBS}" -v -tags netgo -buildmode=default "${go_import_path}/cmd/incus-migrate" + CGO_ENABLED=0 go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -buildmode=default "${go_import_path}/cmd/incus-agent" + cd cmd/lxd-to-incus && go install -v ./ +} + +do_check() { + go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./... +} + +post_install() { + vmkdir usr/libexec/incus + for f in ${DESTDIR}/usr/bin/{incusd,incus-user}; do + vinstall "${f}" 700 usr/libexec/incus && rm "${f}" + done + vsv incus + # avoid conflict with lxd, lxd-lts + mv ${DESTDIR}/usr/bin/{fuidshift,fuidshift-incus} +} + +incus-client_package() { + short_desc+=" - client" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/bin/incus + vsv incus-user + vcompletion scripts/bash/incus bash + } +} + +incus-tools_package() { + short_desc+=" - tools" + pkg_install() { + for _tool in fuidshift-incus lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do + vmove usr/bin/${_tool} + done + } +}