From 137a8613fb427dcf6fe532485dd4643f506ecdf2 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sun, 3 Dec 2023 14:41:04 -0500 Subject: [PATCH 1/7] 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 7696ecd17f832..69b8cca4bf246 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3836,7 +3836,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 234a5a6da37f9..fad1a0ad84e49 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 96fff27dba54c0fb2e620cc85552218debfd56dd Mon Sep 17 00:00:00 2001 From: dkwo Date: Sun, 3 Dec 2023 14:41:23 -0500 Subject: [PATCH 2/7] 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 69b8cca4bf246..009f2e0783ff5 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 0000000000000..6ca7d46dc1870 --- /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 0000000000000..7189bea57bb95 --- /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 c48465c2ab72fb401cfb588aac52a98cd6b0a441 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 2 Dec 2023 21:43:28 -0500 Subject: [PATCH 3/7] new package: incus --- srcpkgs/incus-client | 1 + srcpkgs/incus-tools | 1 + srcpkgs/incus/files/incus-user/check | 2 + srcpkgs/incus/files/incus-user/run | 3 ++ srcpkgs/incus/files/incus/run | 12 +++++ srcpkgs/incus/template | 68 ++++++++++++++++++++++++++++ 6 files changed, 87 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 0000000000000..569b6284ef01d --- /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 0000000000000..569b6284ef01d --- /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 0000000000000..bfa18333ccbc9 --- /dev/null +++ b/srcpkgs/incus/files/incus-user/check @@ -0,0 +1,2 @@ +#!/bin/sh +incus config show >/dev/null 2>&1 diff --git a/srcpkgs/incus/files/incus-user/run b/srcpkgs/incus/files/incus-user/run new file mode 100644 index 0000000000000..7450feaa1a32d --- /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 0000000000000..c92c6265941f9 --- /dev/null +++ b/srcpkgs/incus/files/incus/run @@ -0,0 +1,12 @@ +#!/bin/sh +exec 2>&1 +_systemd_cgrp="/sys/fs/cgroup/systemd" +if [ ! -d ${_systemd_cgrp} ]; then + mkdir ${_systemd_cgrp} +fi +if ! mountpoint -q "${_systemd_cgrp}"; then + mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp} +fi + +[ -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 0000000000000..9bdce5249ddf4 --- /dev/null +++ b/srcpkgs/incus/template @@ -0,0 +1,68 @@ +# 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/lxc-to-incus + ${go_import_path}/cmd/incus-benchmark + ${go_import_path}/cmd/incusd + ${go_import_path}/cmd/incus-user" +# temporarily don't build fluidshift, as it conflicts with lxd, lxd-lts +# later on it should be part of incus-tools +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_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags netgo "${go_import_path}/cmd/incus-migrate" + CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo "${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 +} + +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 lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do + vmove usr/bin/${_tool} + done + } +} From ca73d7fb21c8384f7506540289ee8adec528c078 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 6 Jan 2024 17:57:46 +0100 Subject: [PATCH 4/7] 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 ab6a0395494e7..0000000000000 --- 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 f4539b9623d98..411e8f2990a02 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 1731386aef51b808d308f5f7429fb28c407af57e Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 6 Jan 2024 17:57:46 +0100 Subject: [PATCH 5/7] 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 46954e9de9475..bafbfc5d55102 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 971119f016b1735ca1b1da65724d400ad03c0566 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 6 Jan 2024 17:57:47 +0100 Subject: [PATCH 6/7] 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 5aacd6712c7d2..ea064b3714bea 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 6ee2128d8362a9b85f36e92e096e24200037397c Mon Sep 17 00:00:00 2001 From: dkwo Date: Sun, 7 Jan 2024 14:36:09 +0100 Subject: [PATCH 7/7] incus experim --- srcpkgs/incus/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template index 9bdce5249ddf4..981521eeddace 100644 --- a/srcpkgs/incus/template +++ b/srcpkgs/incus/template @@ -28,11 +28,11 @@ make_dirs=" /var/log/incus 0755 root root" export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" -export GOFLAGS="-buildmode=pie" +# export GOFLAGS="-buildmode=pie" post_build() { - CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags netgo "${go_import_path}/cmd/incus-migrate" - CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo "${go_import_path}/cmd/incus-agent" + CGO_ENABLED=0 go install -p "${XBPS_MAKEJOBS}" -v -tags netgo "${go_import_path}/cmd/incus-migrate" + CGO_ENABLED=0 go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo "${go_import_path}/cmd/incus-agent" cd cmd/lxd-to-incus && go install -v ./ }