Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [wip] new package: incus (replaces lxd)
@ 2023-12-04 16:30 dkwo
  2023-12-04 16:43 ` [PR PATCH] [Updated] " dkwo
                   ` (69 more replies)
  0 siblings, 70 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 16:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

There is a new pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback
(I'll update srcpkgs/removed-packages later)

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 16137 bytes --]

From 30a42bbdf561787114cca0aced2a9074525d2564 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 3 files changed, 64 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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 45d467c793b07ca96e5de40d7a4bc0c06926ca4f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 5 files changed, 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"

From 996e312c1c6d3c23a51d229c81250f2fe17f279d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 4 files changed, 66 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'

From 700b24325db1b7b315b12f53c17981c7e0d7a936 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..2a9564c7c9108 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3827,7 +3827,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..692fdc0fdb7da 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.18.2
+revision=1
 build_style=gnu-configure
 configure_args="--enable-example=no"
 hostmakedepends="pkg-config autoconf automake libtool"
@@ -9,9 +9,9 @@ makedepends="libuv-devel liblz4-devel"
 short_desc="C implementation of the Raft consensus protocol"
 maintainer="Cameron Nemo <cam@nohom.org>"
 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
+homepage="https://raft.readthedocs.io"
+distfiles="https://github.com/cowsql/raft/archive/v${version}.tar.gz"
+checksum=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 # test/unit/uv and test/integration/uv fail on CI
 make_check=ci-skip
 

From 5c15d34e78e34211cfd170036fcf4801d2676135 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 2a9564c7c9108..5c9ac61df3790 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 e8cf10732ece231d060fef483f3564c97263473c Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 27 +++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..8da909791bfca
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec incus --group incus-admin ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..eb7ce71efa094
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,27 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/cmd/incus-agent
+ ${go_import_path}/cmd/incus
+ ${go_import_path}/cmd/incus-migrate"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW='-Wl,-z,now'
+export GOFLAGS="-buildmode=pie"
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
@ 2023-12-04 16:43 ` dkwo
  2023-12-04 18:09 ` dkwo
                   ` (68 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 16:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback
(I'll update srcpkgs/removed-packages later)

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18208 bytes --]

From 462d57f4b108a27c357991ea77925572e602b68a Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From f2d51e5b55cb0437bd10b88a640d716f6554b6e1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 80290ef637ece87a44d9d22bdbde71ffacf2b5a0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 879bf2fddfceb94f20b68e8963cbade6f7a04e49 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..692fdc0fdb7da 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.18.2
+revision=1
 build_style=gnu-configure
 configure_args="--enable-example=no"
 hostmakedepends="pkg-config autoconf automake libtool"
@@ -9,9 +9,9 @@ makedepends="libuv-devel liblz4-devel"
 short_desc="C implementation of the Raft consensus protocol"
 maintainer="Cameron Nemo <cam@nohom.org>"
 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
+homepage="https://raft.readthedocs.io"
+distfiles="https://github.com/cowsql/raft/archive/v${version}.tar.gz"
+checksum=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 # test/unit/uv and test/integration/uv fail on CI
 make_check=ci-skip
 

From e398a54318b856e5d4bc3a7e2ec1f0b13cde8b9b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 9b9eebb2ab87eefe4fdd61841e776ffc7d0fd110 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 27 +++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..8da909791bfca
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec incus --group incus-admin ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..eb7ce71efa094
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,27 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/cmd/incus-agent
+ ${go_import_path}/cmd/incus
+ ${go_import_path}/cmd/incus-migrate"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW='-Wl,-z,now'
+export GOFLAGS="-buildmode=pie"
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
  2023-12-04 16:43 ` [PR PATCH] [Updated] " dkwo
@ 2023-12-04 18:09 ` dkwo
  2023-12-04 21:52 ` dkwo
                   ` (67 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18993 bytes --]

From 8e5da49d3bce99d8a9b76de640ff492701c9dce6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/7] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 04f7b194d5df50a1e278ec650fdad99efc7d450b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/7] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b216084c9bbda44dc7c9cee6031f6a683a5eede4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/7] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 619cd7d90090e06aa9689428af58463c37b1f3b6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/7] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..692fdc0fdb7da 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.18.2
+revision=1
 build_style=gnu-configure
 configure_args="--enable-example=no"
 hostmakedepends="pkg-config autoconf automake libtool"
@@ -9,9 +9,9 @@ makedepends="libuv-devel liblz4-devel"
 short_desc="C implementation of the Raft consensus protocol"
 maintainer="Cameron Nemo <cam@nohom.org>"
 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
+homepage="https://raft.readthedocs.io"
+distfiles="https://github.com/cowsql/raft/archive/v${version}.tar.gz"
+checksum=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 # test/unit/uv and test/integration/uv fail on CI
 make_check=ci-skip
 

From a10e9692f2941e7f7a96bd24400c93be0d9d55d5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:23 -0500
Subject: [PATCH 5/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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 df28dd10c6fc97c7ad7a8bc1ac6014b82ca99d02 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/7] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 27 +++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..8da909791bfca
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec incus --group incus-admin ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..eb7ce71efa094
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,27 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/cmd/incus-agent
+ ${go_import_path}/cmd/incus
+ ${go_import_path}/cmd/incus-migrate"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW='-Wl,-z,now'
+export GOFLAGS="-buildmode=pie"
+
+post_install() {
+	vsv incus
+}

From 1116bf485aebff1f50f272abff119ac093e7b9a6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 4 Dec 2023 13:08:48 -0500
Subject: [PATCH 7/7] raft: try to run test on ci

---
 srcpkgs/raft/template | 2 --
 1 file changed, 2 deletions(-)

diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template
index 692fdc0fdb7da..68f5044aead47 100644
--- a/srcpkgs/raft/template
+++ b/srcpkgs/raft/template
@@ -12,8 +12,6 @@ license="custom:LGPL-3.0-only-linking-exception"
 homepage="https://raft.readthedocs.io"
 distfiles="https://github.com/cowsql/raft/archive/v${version}.tar.gz"
 checksum=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
-# test/unit/uv and test/integration/uv fail on CI
-make_check=ci-skip
 
 pre_configure() {
 	autoreconf -i

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
  2023-12-04 16:43 ` [PR PATCH] [Updated] " dkwo
  2023-12-04 18:09 ` dkwo
@ 2023-12-04 21:52 ` dkwo
  2023-12-04 22:16 ` dkwo
                   ` (66 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 21:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18341 bytes --]

From 8e5da49d3bce99d8a9b76de640ff492701c9dce6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 04f7b194d5df50a1e278ec650fdad99efc7d450b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b216084c9bbda44dc7c9cee6031f6a683a5eede4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ed566a9821545e46668a8f231654d69fa3100170 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From f434260106991d92594586aae818725db84af603 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 785b8149b9f4340e16c62eb3ea28bc140a2cc5df Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..3921ac60ae836
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec incusd --group incus-admin ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..1fe618744b46b
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,34 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/..."
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	make incus-agent incus-migrate
+}
+
+do_check() {
+	go test -v -tags ${go_build_tags} ./...
+	cd test && ./main.sh
+}
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (2 preceding siblings ...)
  2023-12-04 21:52 ` dkwo
@ 2023-12-04 22:16 ` dkwo
  2023-12-04 23:02 ` dkwo
                   ` (65 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 22:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18349 bytes --]

From 8e5da49d3bce99d8a9b76de640ff492701c9dce6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 04f7b194d5df50a1e278ec650fdad99efc7d450b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b216084c9bbda44dc7c9cee6031f6a683a5eede4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ed566a9821545e46668a8f231654d69fa3100170 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From f434260106991d92594586aae818725db84af603 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 5d82020396a3d2f7d8d92c4d035769ed56f4ba17 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..bfee08ea3a2db
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec 'incus admin init' --group incus-admin
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..95ee7b5b86e63
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,35 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/..."
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
+ libcap-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	make incus-agent incus-migrate
+}
+
+do_check() {
+	go test -v -tags ${go_build_tags} ./...
+	cd test && ./main.sh
+}
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (3 preceding siblings ...)
  2023-12-04 22:16 ` dkwo
@ 2023-12-04 23:02 ` dkwo
  2023-12-04 23:31 ` dkwo
                   ` (64 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 23:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18493 bytes --]

From 8e5da49d3bce99d8a9b76de640ff492701c9dce6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 04f7b194d5df50a1e278ec650fdad99efc7d450b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b216084c9bbda44dc7c9cee6031f6a683a5eede4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ed566a9821545e46668a8f231654d69fa3100170 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From f434260106991d92594586aae818725db84af603 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 ee4734a8d2a831712998aa5c5a1f274a56164cf0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 36 +++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..bfee08ea3a2db
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec 'incus admin init' --group incus-admin
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..bcf9dd54a10a7
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,36 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/..."
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
+ libcap-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	CGO_LDFLAGS="${CGO_LDFLAGS} -static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo "${go_import_path}/cmd/incus-agent"
+}
+
+do_check() {
+	go test -v -tags ${go_build_tags} ./...
+	cd test && ./main.sh
+}
+
+post_install() {
+	rm ${DESTDIR}/usr/bin/{sysinfo,incus-migrate}
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (4 preceding siblings ...)
  2023-12-04 23:02 ` dkwo
@ 2023-12-04 23:31 ` dkwo
  2023-12-05 19:30 ` dkwo
                   ` (63 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-04 23:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 19278 bytes --]

From 8e5da49d3bce99d8a9b76de640ff492701c9dce6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/7] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 04f7b194d5df50a1e278ec650fdad99efc7d450b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/7] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b216084c9bbda44dc7c9cee6031f6a683a5eede4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/7] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ed566a9821545e46668a8f231654d69fa3100170 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/7] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From f434260106991d92594586aae818725db84af603 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:23 -0500
Subject: [PATCH 5/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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 ee4734a8d2a831712998aa5c5a1f274a56164cf0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/7] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 36 +++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..bfee08ea3a2db
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec 'incus admin init' --group incus-admin
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..bcf9dd54a10a7
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,36 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.0
+revision=1
+build_style=go
+go_import_path=github.com/lxc/incus
+go_build_tags=libsqlite3
+go_package="${go_import_path}/..."
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
+ libcap-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 <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	CGO_LDFLAGS="${CGO_LDFLAGS} -static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo "${go_import_path}/cmd/incus-agent"
+}
+
+do_check() {
+	go test -v -tags ${go_build_tags} ./...
+	cd test && ./main.sh
+}
+
+post_install() {
+	rm ${DESTDIR}/usr/bin/{sysinfo,incus-migrate}
+	vsv incus
+}

From 5ab9a1f043b331291831f7bb42c843e52296fa06 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Mon, 4 Dec 2023 18:30:58 -0500
Subject: [PATCH 7/7] incus: try to fix checks

---
 srcpkgs/incus/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
index bcf9dd54a10a7..3b568e2d01127 100644
--- a/srcpkgs/incus/template
+++ b/srcpkgs/incus/template
@@ -5,7 +5,8 @@ revision=1
 build_style=go
 go_import_path=github.com/lxc/incus
 go_build_tags=libsqlite3
-go_package="${go_import_path}/..."
+go_package="${go_import_path}/cmd/incus
+ ${go_import_path}/cmd/fuidshift"
 hostmakedepends="pkg-config"
 makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
  libcap-devel"

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (5 preceding siblings ...)
  2023-12-04 23:31 ` dkwo
@ 2023-12-05 19:30 ` dkwo
  2023-12-05 22:18 ` dkwo
                   ` (62 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-05 19:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18771 bytes --]

From aaa96cd0fda5d45991c722414d3d9c060849423b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1b25a12956eeb..b2a6524cd758a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3521,7 +3521,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 35f0e1a8e626cc6a32da620a1e2de24a567678d8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 7dd7e0210fd206bd0cba2f171b0f73452efade79 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 33a9fba04f5fc1cb813fea4fec98775114a9a6dd Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b2a6524cd758a..c5bd49b502bfd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3826,7 +3826,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From 25a2c2bac9ffd6703af0971e0851e509fbb6db1c Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c5bd49b502bfd..fb54c76356705 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 0df844c88c646774906bf9061dc4c06a7d04dced Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 43 +++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..bfee08ea3a2db
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec 'incus admin init' --group incus-admin
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..59905ca901450
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,43 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incus-migrate
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+# ${go_import_path}/cmd/lxd-to-incus
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
+ libcap-devel"
+depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
+checkdepends="curl jq git gettext socat"
+short_desc="Powerful system container and virtual machine manager"
+maintainer="dkwo <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	CGO_LDFLAGS="${CGO_LDFLAGS} -static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+}
+
+do_check() {
+	go test -v -tags ${go_build_tags} ./...
+	cd test && ./main.sh
+}
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (6 preceding siblings ...)
  2023-12-05 19:30 ` dkwo
@ 2023-12-05 22:18 ` dkwo
  2023-12-06 15:26 ` dkwo
                   ` (61 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-05 22:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18759 bytes --]

From a630cacadbdbe4c4462d0d4ad704904b6eec0c31 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 1a1324543c48a..438f9eed052c3 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3522,7 +3522,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 3aaa2a591da21e7f369cc7b5f1e395a1153332a6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 5452160f42bd631ab8cf342e809ca86e7e4671db Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From df1d46fb3ff8af91e5b3897be528f04745505028 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 438f9eed052c3..faa0c5865f0ba 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3827,7 +3827,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From d6d201130254b6b04c8d2101707919983654ae78 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 faa0c5865f0ba..83180fad4782d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 b959ad179c037e81d1768eaa3af48bf965745df5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 42 +++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..bfee08ea3a2db
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec 'incus admin init' --group incus-admin
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..0fdc377d4da63
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,42 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incus-migrate
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+# ${go_import_path}/cmd/lxd-to-incus
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
+ libcap-devel"
+depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
+# checkdepends="curl jq git gettext socat aclprogs"
+short_desc="Powerful system container and virtual machine manager"
+maintainer="dkwo <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	CGO_LDFLAGS="${CGO_LDFLAGS} -static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+}
+
+do_check() {
+	go test -v -tags ${go_build_tags} ./...
+}
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (7 preceding siblings ...)
  2023-12-05 22:18 ` dkwo
@ 2023-12-06 15:26 ` dkwo
  2023-12-24 18:29 ` ahesford
                   ` (60 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-06 15:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

@leahneukirchen @CameronNemo #46536 still working on this, maybe you can provide feedback

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18767 bytes --]

From bb18ba875368e1350501ee825f14c867e1505dad Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index f7046cbb6c206..b90bff728972f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3522,7 +3522,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 512d1bce049bc..d2eb99b1d22d2 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 0a40e5aeeddcc850c3075d0d1798b6d44d6cff18 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d2eb99b1d22d2..d212c840a8eb3 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From f66eb526b8e20861c417cae4102c9abb938b3be4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index d212c840a8eb3..3e78e812dbd1e 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ada6a4d272e884fbefd51b158e0ce066f7d52376 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.2

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index b90bff728972f..c437f4decc026 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3827,7 +3827,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..68f5044aead47 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.18.2
+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 <cam@nohom.org>"
 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=cc3e12877150cb9cdfa82486a9bfe39e4050dba8a6e8a55aa27c86b7d21237b9
 
 pre_configure() {
 	autoreconf -i

From 13972ac375b7a529d6cd754ea34ee2c202811436 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c437f4decc026..1d77ee6133ec1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,7 @@ libcidn.so.1 glibc-2.36_1
 libmvec.so.1 glibc-2.36_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 <npiazza@disroot.org>"
+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 034537980835b8e64e2f7726308c24f705f44c23 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/6] new package: incus (wip)

---
 srcpkgs/incus/files/incus/run |  4 ++++
 srcpkgs/incus/template        | 42 +++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/incus/files/incus/run
 create mode 100644 srcpkgs/incus/template

diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..bfee08ea3a2db
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+[ -r conf ] && . ./conf
+exec 'incus admin init' --group incus-admin
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..9a29315134a3a
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,42 @@
+# Template file for 'incus'
+pkgname=incus
+version=0.3.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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incus-migrate
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+# ${go_import_path}/cmd/lxd-to-incus
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-devel eudev-libudev-devel
+ libcap-devel"
+depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
+# checkdepends="curl jq git gettext socat aclprogs"
+short_desc="Powerful system container and virtual machine manager"
+maintainer="dkwo <npiazza@disroot.org>"
+license="Apache-2.0"
+homepage="https://linuxcontainers.org/incus"
+distfiles="https://github.com/lxc/incus/archive/refs/tags/v${version}.tar.gz"
+checksum=e49b8ad5a292acbb15635415c159f081e595daa55da6f3bb61bac4c3f326787c
+system_groups="incus-admin"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	CGO_LDFLAGS="${CGO_LDFLAGS} -static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+}
+
+do_check() {
+	go test -v -skip TestConvertNetworkConfig ./...
+}
+
+post_install() {
+	vsv incus
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (8 preceding siblings ...)
  2023-12-06 15:26 ` dkwo
@ 2023-12-24 18:29 ` ahesford
  2023-12-26 18:05 ` dkwo
                   ` (59 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ahesford @ 2023-12-24 18:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1868572813

Comment:
I don't think we should drop `lxd` in this PR.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (9 preceding siblings ...)
  2023-12-24 18:29 ` ahesford
@ 2023-12-26 18:05 ` dkwo
  2023-12-26 20:19 ` sbromberger
                   ` (58 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-26 18:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 346 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1869696130

Comment:
when building incus, i need to update raft, which makes it harder to bump dqlite and lxd.
the current lxd is also outdated, and it hasn't been rebuilt with at least go 1.21 as its distfiles have been moved.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (10 preceding siblings ...)
  2023-12-26 18:05 ` dkwo
@ 2023-12-26 20:19 ` sbromberger
  2023-12-26 20:20 ` sbromberger
                   ` (57 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2023-12-26 20:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1869754443

Comment:
I managed to get incus running on void a couple days ago. here's my runit service if it helps:

```
#!/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/local/bin/incusd --group incus-admin --syslog ${OPTS:- --verbose}
```


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (11 preceding siblings ...)
  2023-12-26 20:19 ` sbromberger
@ 2023-12-26 20:20 ` sbromberger
  2023-12-27 18:32 ` [PR PATCH] [Updated] " dkwo
                   ` (56 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2023-12-26 20:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1869754443

Comment:
I managed to get incus running on void a couple days ago. here's my runit service if it helps:

run:
```
#!/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/local/bin/incusd --group incus-admin --syslog ${OPTS:- --verbose}
```

check:
```
#!/bin/sh
incus config show >/dev/null 2>&1
```

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (12 preceding siblings ...)
  2023-12-26 20:20 ` sbromberger
@ 2023-12-27 18:32 ` dkwo
  2023-12-27 18:40 ` dkwo
                   ` (55 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-27 18:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: no
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- runit service
- split subpkgs
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 20783 bytes --]

From f25efeeeab15955ede608b4cdcf3281b85eea433 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index 6463e020bb473..3415e8ba6d949 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From f8e1de660693cd3358d3467807669a80352ae5cb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From c9255f36cbd55977295263e555e628b634ec5eeb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 0958362bbedf1f0e06a3d92a9b3b3876994fe104 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 3415e8ba6d949..68b186b1e46ac 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From 7beb8b381d5e2e614bf10ab12d692f753d86d18d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 68b186b1e46ac..d6c2f10c9cfda 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 842713272cebf723a201bd77887462b860b26127 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 ++++++
 srcpkgs/incus/template               | 59 ++++++++++++++++++++++++++++
 6 files changed, 78 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..820a08e38cb5b
--- /dev/null
+++ b/srcpkgs/incus/files/incus-user/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/bin/incus-user --group incus
diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..b8fd50a684f11
--- /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/bin/incusd --group incus-admin --syslog ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..e853582e40679
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,59 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie" # can drop once done globally
+
+post_build() {
+	go install -p "${XBPS_MAKEJOBS}" -v -tags netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -skip TestConvertNetworkConfig ./...
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (13 preceding siblings ...)
  2023-12-27 18:32 ` [PR PATCH] [Updated] " dkwo
@ 2023-12-27 18:40 ` dkwo
  2023-12-28 16:46 ` sbromberger
                   ` (54 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-27 18:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1870542415

Comment:
Thanks! Updated incus to 0.4, tried to follow upstream recommendations https://linuxcontainers.org/incus/docs/main/packaging/ which also suggests

> The incusd and incus-user daemons should be kept outside of the user’s PATH. The same is true of incus-agent which needs to be available in the daemon’s PATH but not be visible to users.

how can i keep those daemons outside of path?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (14 preceding siblings ...)
  2023-12-27 18:40 ` dkwo
@ 2023-12-28 16:46 ` sbromberger
  2023-12-28 16:49 ` sbromberger
                   ` (53 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2023-12-28 16:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1871335720

Comment:
> how can i keep those daemons outside of path?

Recommendation from folks on #lxc liberachat is to put them in `/usr/sbin`.


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (15 preceding siblings ...)
  2023-12-28 16:46 ` sbromberger
@ 2023-12-28 16:49 ` sbromberger
  2023-12-28 17:29 ` ahesford
                   ` (52 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2023-12-28 16:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1871338010

Comment:
Would it be possible to make cowsql a separate PR and get that integrated sooner?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (16 preceding siblings ...)
  2023-12-28 16:49 ` sbromberger
@ 2023-12-28 17:29 ` ahesford
  2023-12-29 22:10 ` [PR PATCH] [Updated] " dkwo
                   ` (51 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ahesford @ 2023-12-28 17:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1871364999

Comment:
Void is usr-merged and doesn't distinguish between root-visible and user-visible executables. If the executables are intended only for execution by other programs, a subdirectory of `/usr/libexec` is the proper place. Otherwise, just put them in `/usr/bin`.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (17 preceding siblings ...)
  2023-12-28 17:29 ` ahesford
@ 2023-12-29 22:10 ` dkwo
  2023-12-29 22:14 ` dkwo
                   ` (50 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-29 22:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

[wip] new package: incus (replaces lxd)
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 20895 bytes --]

From 82747e7b70d04311618762707e5cfb53188c6ac2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index cdee5382e28f6..1ee3dc76be54e 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 7a092e5e437f1b46450fa44225cdf55c3cb7800d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 2536520a2fe0c5babe5fe7375ead7cb538657e70 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 4c7eb11b60f8385637723939525cd24039b6a2e1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 1ee3dc76be54e..c268402deabff 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From b6c6d2d9ea3a60c88ce774c186262b12c907b73a Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 c268402deabff..094dc54262bde 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 c1b67a363f8315210f7d35987243dad501127ceb Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 +++++
 srcpkgs/incus/template               | 65 ++++++++++++++++++++++++++++
 6 files changed, 84 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..4080569807a4d
--- /dev/null
+++ b/srcpkgs/incus/files/incus-user/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/libexec/incus-user --group incus
diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
new file mode 100644
index 0000000000000..314ae79459bb3
--- /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/incusd --group incus-admin --syslog ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
new file mode 100644
index 0000000000000..aa9efd7d51b35
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,65 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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"
+
+export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
+export GOFLAGS="-buildmode=pie"
+
+post_build() {
+	go install -p "${XBPS_MAKEJOBS}" -v -tags netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	for f in ${GOPATH}/bin/{incusd,incus-user,incus-agent}; do
+		vinstall "$f" 0700 usr/libexec && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (18 preceding siblings ...)
  2023-12-29 22:10 ` [PR PATCH] [Updated] " dkwo
@ 2023-12-29 22:14 ` dkwo
  2023-12-31 15:46 ` dkwo
                   ` (49 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-29 22:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1872367330

Comment:
thanks, i'm now using libexec.
as for a separate cowsql pr: i had to update raft, and i'm afraid of touching lxd, but i can try.
some serious testing (in particular of runit services) is also welcome.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (19 preceding siblings ...)
  2023-12-29 22:14 ` dkwo
@ 2023-12-31 15:46 ` dkwo
  2023-12-31 15:48 ` [PR PATCH] [Updated] " dkwo
                   ` (48 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-31 15:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1872979443

Comment:
is it ok to add `export PATH=/usr/libexec/incus:$PATH` to the services, so that they know where to find incus-agent?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (20 preceding siblings ...)
  2023-12-31 15:46 ` dkwo
@ 2023-12-31 15:48 ` dkwo
  2023-12-31 15:53 ` ahesford
                   ` (47 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-31 15:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus (replaces lxd)
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 21060 bytes --]

From 243b84109112090802c6423c7452d5fbabdfe961 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index c1792cffc77e4..2e83755d02c0b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 63452ebcaac93457b086dd4b564b671dff7da8fe Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ee57de4b2744b3fea3559b4d47d7f6bbe4524ec7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 01c5d2fd0493c2adc558b123f714cb2d290ac7f7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 2e83755d02c0b..1c0dd1d134fb8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From 1b149656cc0954e81a2c412e224be21cb8660523 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 1c0dd1d134fb8..5d0e2edaffd18 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 82c6e64a7fd5f916629d45a6a95fda03cba91c7b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  4 ++
 srcpkgs/incus/files/incus/run        | 13 ++++++
 srcpkgs/incus/template               | 66 ++++++++++++++++++++++++++++
 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..e2cf0679486a6
--- /dev/null
+++ b/srcpkgs/incus/files/incus-user/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+export PATH=/usr/libexec/incus:${PATH}
+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..6ffa495b1ed77
--- /dev/null
+++ b/srcpkgs/incus/files/incus/run
@@ -0,0 +1,13 @@
+#!/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
+export PATH=/usr/libexec/incus:${PATH}
+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..5593834701e3f
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,66 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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"
+
+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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user,incus-agent}; do
+		vinstall "$f" 0700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (21 preceding siblings ...)
  2023-12-31 15:48 ` [PR PATCH] [Updated] " dkwo
@ 2023-12-31 15:53 ` ahesford
  2023-12-31 16:03 ` [PR PATCH] [Updated] " dkwo
                   ` (46 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ahesford @ 2023-12-31 15:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1872980869

Comment:
> is it ok to add `export PATH=/usr/libexec/incus:$PATH` to the services, so that they know where to find incus-agent?

No. If the programs that use these utilities expect them to be in the system path, then they belong in the standard `/usr/bin`. Programs that use non-user-visible executables should expect to find these utilities in `/usr/libexec` without modifications to the search path. If the upstream suggestion is to put them in `/usr/sbin` to keep them out of the default path of ordinary users (`/usr/sbin` should always be in the default path of the super user), then the answer on Void is that we make no distinction.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (22 preceding siblings ...)
  2023-12-31 15:53 ` ahesford
@ 2023-12-31 16:03 ` dkwo
  2023-12-31 16:11 ` dkwo
                   ` (45 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-31 16:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus (replaces lxd)
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 20967 bytes --]

From 243b84109112090802c6423c7452d5fbabdfe961 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index c1792cffc77e4..2e83755d02c0b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 63452ebcaac93457b086dd4b564b671dff7da8fe Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ee57de4b2744b3fea3559b4d47d7f6bbe4524ec7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 01c5d2fd0493c2adc558b123f714cb2d290ac7f7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 2e83755d02c0b..1c0dd1d134fb8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From 1b149656cc0954e81a2c412e224be21cb8660523 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 1c0dd1d134fb8..5d0e2edaffd18 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 e51a1c3c46e8f18b78932163e5cea76741e2138e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 +++++
 srcpkgs/incus/template               | 66 ++++++++++++++++++++++++++++
 6 files changed, 85 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..db18f39bccad6
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,66 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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"
+
+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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 0700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (23 preceding siblings ...)
  2023-12-31 16:03 ` [PR PATCH] [Updated] " dkwo
@ 2023-12-31 16:11 ` dkwo
  2023-12-31 16:12 ` dkwo
                   ` (44 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-31 16:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus (replaces lxd)
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 20966 bytes --]

From 243b84109112090802c6423c7452d5fbabdfe961 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index c1792cffc77e4..2e83755d02c0b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 63452ebcaac93457b086dd4b564b671dff7da8fe Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From ee57de4b2744b3fea3559b4d47d7f6bbe4524ec7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 01c5d2fd0493c2adc558b123f714cb2d290ac7f7 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 2e83755d02c0b..1c0dd1d134fb8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From 1b149656cc0954e81a2c412e224be21cb8660523 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 1c0dd1d134fb8..5d0e2edaffd18 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 1db8cbd56d8aeac72d8ecb519efa877b328eb0e0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 +++++
 srcpkgs/incus/template               | 66 ++++++++++++++++++++++++++++
 6 files changed, 85 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..8de8693c9ebea
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,66 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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"
+
+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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus (replaces lxd)
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (24 preceding siblings ...)
  2023-12-31 16:11 ` dkwo
@ 2023-12-31 16:12 ` dkwo
  2024-01-03 11:40 ` [PR PATCH] [Updated] new package: incus dkwo
                   ` (43 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2023-12-31 16:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 557 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus (replaces lxd)
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 20966 bytes --]

From 4ef65f3d229c944b71e96497aff509e577ef60b2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index c1792cffc77e4..2e83755d02c0b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 72df131482bbf94b7b6188e64586d8ce2327a29f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 66882e8031254555d53395da0139b430283f61e6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 73d2cc571802cca02ffa8791e07a35f740a09f00 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 2e83755d02c0b..1c0dd1d134fb8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From 405c06de5ad9faa9188506bdbd74118965cf0829 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 1c0dd1d134fb8..5d0e2edaffd18 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 88cd27099d8ec461c664a313f1270a2da7657a8f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 +++++
 srcpkgs/incus/template               | 66 ++++++++++++++++++++++++++++
 6 files changed, 85 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..8de8693c9ebea
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,66 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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"
+
+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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (25 preceding siblings ...)
  2023-12-31 16:12 ` dkwo
@ 2024-01-03 11:40 ` dkwo
  2024-01-03 11:41 ` dkwo
                   ` (42 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-03 11:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 21009 bytes --]

From 37149065d298344d7c284a34620cea2c39464d50 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index a0cddb2729eb6..426b2f9422a39 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3524,7 +3524,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From 08348770336403ce317a042e7758bbd8febb11f3 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 85fcb558ace7b930f0c14ad48d60ab46944e1ce9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From 9691088d076520ffa3c4c6906d92769a94cae7c8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/6] raft: update to 0.18.3

---
 common/shlibs         |  2 +-
 srcpkgs/raft/template | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 426b2f9422a39..2f67a5548cddc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3829,7 +3829,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..eae029a106485 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.18.3
+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 <cam@nohom.org>"
 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=8709bd4fda9e871bf54b929d32265ce54f304fce94527566d2c44f723753838b
 
 pre_configure() {
 	autoreconf -i

From d1401b7b3f641d83f954166d244d3c9b02244837 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 2f67a5548cddc..98946827e3b78 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -52,6 +52,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 <npiazza@disroot.org>"
+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 6c87d0f3a8758bc609874977d508c2e07eb66109 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 +++++
 srcpkgs/incus/template               | 67 ++++++++++++++++++++++++++++
 6 files changed, 86 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..2e5c602a507c0
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,67 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+hostmakedepends="pkg-config"
+makedepends="lxc-devel acl-devel cowsql-devel raft-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 <npiazza@disroot.org>"
+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 0660 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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (26 preceding siblings ...)
  2024-01-03 11:40 ` [PR PATCH] [Updated] new package: incus dkwo
@ 2024-01-03 11:41 ` dkwo
  2024-01-03 11:43 ` dkwo
                   ` (41 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-03 11:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875239985

Comment:
`make_dirs /var/lib/incus 0660` added.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (27 preceding siblings ...)
  2024-01-03 11:41 ` dkwo
@ 2024-01-03 11:43 ` dkwo
  2024-01-03 11:43 ` dkwo
                   ` (40 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-03 11:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875242700

Comment:
`incus launch` gives
`Error: The incus daemon doesn't appear to be started (socket path: /var/lib/incus/unix.socket)`
even though
```
$ doas sv status incus
run: incus: (pid 10297) 53s; run: log: (pid 10296) 53s
```
and
```
$ doas ls -la /var/lib/incus
total 68
drwx--x--x 17 root root        4096 Jan  3 12:31 .
drwxr-xr-x 11 root root        4096 Jan  3 12:30 ..
drwx------  4 root root        4096 Jan  3 12:31 backups
drwx--x--x  2 root root        4096 Jan  3 12:31 containers
drwx------  2 root root        4096 Jan  3 12:31 containers-snapshots
drwx------  3 root root        4096 Jan  3 12:31 database
drwx--x--x  2 root root        4096 Jan  3 12:31 devices
drwx------  2 root root        4096 Jan  3 12:31 disks
drwxr-xr-x  2 root root          60 Jan  3 12:31 guestapi
drwx------  2 root root        4096 Jan  3 12:31 images
drwx--x--x  2 root root        4096 Jan  3 12:31 networks
srwx------  1 root root           0 Jan  3 12:31 seccomp.socket
drwx------  4 root root        4096 Jan  3 12:31 security
-rw-r--r--  1 root root         741 Jan  3 12:31 server.crt
-rw-------  1 root root         288 Jan  3 12:31 server.key
drwx--x--x  2 root root          40 Jan  3 12:31 shmounts
drwx--x--x  3 root root        4096 Jan  3 12:31 storage-pools
srw-rw----  1 root incus-admin    0 Jan  3 12:31 unix.socket
srw-rw----  1 root incus          0 Jan  3 12:31 unix.socket.user
drwx------  2 root root        4096 Jan  3 12:31 users
drwx--x--x  2 root root        4096 Jan  3 12:31 virtual-machines
drwx------  2 root root        4096 Jan  3 12:31 virtual-machines-snapshots
```

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (28 preceding siblings ...)
  2024-01-03 11:43 ` dkwo
@ 2024-01-03 11:43 ` dkwo
  2024-01-03 11:47 ` dkwo
                   ` (39 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-03 11:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875243790

Comment:
maybe i'm missing something in the runit service, or messing up permissions?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (29 preceding siblings ...)
  2024-01-03 11:43 ` dkwo
@ 2024-01-03 11:47 ` dkwo
  2024-01-06 13:00 ` [PR PATCH] [Updated] " dkwo
                   ` (38 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-03 11:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875248069

Comment:
hmm, the log says
`daemon.notice: Jan  3 12:31:16 incus: time="2024-01-03T12:31:16+01:00" level=info msg="Binding socket" socket=/var/lib/incus/unix.socket type="REST API Unix socket"`

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (30 preceding siblings ...)
  2024-01-03 11:47 ` dkwo
@ 2024-01-06 13:00 ` dkwo
  2024-01-06 16:24 ` dkwo
                   ` (37 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 13:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 21049 bytes --]

From 0d3c274f06f46fa9c7750f89b2b3c7c2483134b9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index bde18c12142ab..34f5e894981c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3529,7 +3529,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From fa1c975a684f4aff94da9dd7bc248412f74434e3 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From c743460e8d50949668bd9be250ec344aa7122c5f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b04dafdb4b28634785953ac7a7888b6236e30b5b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/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 34f5e894981c2..0cbda605b1b9c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3834,7 +3834,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 <cam@nohom.org>"
 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 5e8218f5f9f42dc7c9e466feeadf8d7f6d9ca147 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 0cbda605b1b9c..2e170fda9a3e4 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 <npiazza@disroot.org>"
+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 560c66ffc25d41342a2d3295c7096bcb560c6382 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  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..00276a3112eb0
--- /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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+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 <npiazza@disroot.org>"
+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 0660 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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (31 preceding siblings ...)
  2024-01-06 13:00 ` [PR PATCH] [Updated] " dkwo
@ 2024-01-06 16:24 ` dkwo
  2024-01-06 16:27 ` dkwo
                   ` (36 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 16:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: briefly
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
- update void docs

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 21084 bytes --]

From 0d3c274f06f46fa9c7750f89b2b3c7c2483134b9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:38:28 -0500
Subject: [PATCH 1/6] dqlite: remove

---
 common/shlibs                     |  1 -
 srcpkgs/dqlite-devel              |  1 -
 srcpkgs/dqlite/patches/musl.patch | 31 ------------------------------
 srcpkgs/dqlite/template           | 32 -------------------------------
 srcpkgs/removed-packages/template |  2 ++
 5 files changed, 2 insertions(+), 65 deletions(-)
 delete mode 120000 srcpkgs/dqlite-devel
 delete mode 100644 srcpkgs/dqlite/patches/musl.patch
 delete mode 100644 srcpkgs/dqlite/template

diff --git a/common/shlibs b/common/shlibs
index bde18c12142ab..34f5e894981c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3529,7 +3529,6 @@ libcsfml-network.so.2.5 CSFML-2.5_1
 libtokyocabinet.so.9 tokyocabinet-1.4.48_1
 libdav1d.so.7 libdav1d-1.3.0_1
 librav1e.so.0 rav1e-0.6.3_1
-libdqlite.so.0 dqlite-0.2.1_1
 libwoff2common.so.1.0.2 libwoff2common1.0.2-1.0.2_1
 libwoff2enc.so.1.0.2 libwoff2enc1.0.2-1.0.2_1
 libwoff2dec.so.1.0.2 libwoff2dec1.0.2-1.0.2_1
diff --git a/srcpkgs/dqlite-devel b/srcpkgs/dqlite-devel
deleted file mode 120000
index cc516e6887f74..0000000000000
--- a/srcpkgs/dqlite-devel
+++ /dev/null
@@ -1 +0,0 @@
-dqlite
\ No newline at end of file
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
deleted file mode 100644
index f4539b9623d98..0000000000000
--- a/srcpkgs/dqlite/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'dqlite'
-pkgname=dqlite
-version=1.13.0
-revision=2
-build_style=gnu-configure
-hostmakedepends="pkg-config automake libtool"
-makedepends="sqlite-devel raft-devel"
-short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-
-pre_configure() {
-	autoreconf -i
-}
-
-post_install() {
-	vlicense LICENSE
-}
-
-dqlite-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"
-	}
-}
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index fd9d350d4ad4f..896fe4dc0042d 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -94,6 +94,8 @@ replaces="
  dleyna-server<=0.6.0_2
  dnote-cli<=0.6.2_1
  docker2aci<=0.17.2_4
+ dqlite<=1.13.0_2
+ dqlite-devel<=1.13.0_2
  dreampie<=1.2.1_3
  dtkcore-devel<=2.1.1_2
  dtkcore<=2.1.1_2

From fa1c975a684f4aff94da9dd7bc248412f74434e3 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:18 -0500
Subject: [PATCH 2/6] lxd: remove

---
 srcpkgs/lxd/files/README.voidlinux | 11 ---------
 srcpkgs/lxd/files/lxd/check        |  2 --
 srcpkgs/lxd/files/lxd/run          | 12 ---------
 srcpkgs/lxd/template               | 39 ------------------------------
 srcpkgs/lxd/update                 |  1 -
 srcpkgs/removed-packages/template  |  1 +
 6 files changed, 1 insertion(+), 65 deletions(-)
 delete mode 100644 srcpkgs/lxd/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd/files/lxd/check
 delete mode 100644 srcpkgs/lxd/files/lxd/run
 delete mode 100644 srcpkgs/lxd/template
 delete mode 100644 srcpkgs/lxd/update

diff --git a/srcpkgs/lxd/files/README.voidlinux b/srcpkgs/lxd/files/README.voidlinux
deleted file mode 100644
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd/files/lxd/check b/srcpkgs/lxd/files/lxd/check
deleted file mode 100755
index 4b2112a3a76a7..0000000000000
--- a/srcpkgs/lxd/files/lxd/check
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-lxc config show >/dev/null 2>&1
diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
deleted file mode 100644
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
deleted file mode 100644
index 46954e9de9475..0000000000000
--- a/srcpkgs/lxd/template
+++ /dev/null
@@ -1,39 +0,0 @@
-# Template file for 'lxd'
-pkgname=lxd
-version=5.9
-revision=3
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd/update b/srcpkgs/lxd/update
deleted file mode 100644
index 0c7e0abc90032..0000000000000
--- a/srcpkgs/lxd/update
+++ /dev/null
@@ -1 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index 896fe4dc0042d..c05d08d1614cf 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -410,6 +410,7 @@ replaces="
  luxmark<=3.1_9
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
+ lxd<=5.9_3
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From c743460e8d50949668bd9be250ec344aa7122c5f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:39:52 -0500
Subject: [PATCH 3/6] lxd-lts: remove

---
 srcpkgs/lxd-lts/files/README.voidlinux | 11 -------
 srcpkgs/lxd-lts/files/lxd/run          | 12 --------
 srcpkgs/lxd-lts/template               | 41 --------------------------
 srcpkgs/lxd-lts/update                 |  2 --
 srcpkgs/removed-packages/template      |  3 +-
 5 files changed, 2 insertions(+), 67 deletions(-)
 delete mode 100755 srcpkgs/lxd-lts/files/README.voidlinux
 delete mode 100755 srcpkgs/lxd-lts/files/lxd/run
 delete mode 100644 srcpkgs/lxd-lts/template
 delete mode 100644 srcpkgs/lxd-lts/update

diff --git a/srcpkgs/lxd-lts/files/README.voidlinux b/srcpkgs/lxd-lts/files/README.voidlinux
deleted file mode 100755
index 5958c9008817a..0000000000000
--- a/srcpkgs/lxd-lts/files/README.voidlinux
+++ /dev/null
@@ -1,11 +0,0 @@
-Start lxd service:
-
-	$ sudo ln -s /etc/sv/lxd /var/service/
-
-Run LXD initialization:
-
-	$ sudo lxd init
-
-To use lxd client your user must be added to the 'lxd' group:
-
-	$ sudo usermod -aG lxd <username>
diff --git a/srcpkgs/lxd-lts/files/lxd/run b/srcpkgs/lxd-lts/files/lxd/run
deleted file mode 100755
index 4a9ea61ba9a67..0000000000000
--- a/srcpkgs/lxd-lts/files/lxd/run
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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 lxd --group lxd ${OPTS:- --verbose}
diff --git a/srcpkgs/lxd-lts/template b/srcpkgs/lxd-lts/template
deleted file mode 100644
index 5aacd6712c7d2..0000000000000
--- a/srcpkgs/lxd-lts/template
+++ /dev/null
@@ -1,41 +0,0 @@
-# Template file for 'lxd-lts'
-pkgname=lxd-lts
-version=5.0.1
-revision=2
-build_style=go
-go_import_path=github.com/lxc/lxd
-go_build_tags=libsqlite3
-go_package="${go_import_path}/lxd
- ${go_import_path}/lxc
- ${go_import_path}/lxc-to-lxd
- ${go_import_path}/fuidshift
- ${go_import_path}/lxd-benchmark
- ${go_import_path}/lxd-user"
-hostmakedepends="pkg-config git"
-makedepends="lxc-devel acl-devel dqlite-devel eudev-libudev-devel"
-depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables attr-progs"
-short_desc="Next generation system container manager (long term support channel)"
-maintainer="Cameron Nemo <cam@nohom.org>"
-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
-conflicts="lxd"
-provides="lxd-${version}_${revision}"
-system_groups="lxd"
-
-# whitelist dqlite LDFLAGS
-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"
-}
-
-post_install() {
-	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vsv lxd
-	vdoc "${FILESDIR}/README.voidlinux"
-}
diff --git a/srcpkgs/lxd-lts/update b/srcpkgs/lxd-lts/update
deleted file mode 100644
index 114a630c6a87e..0000000000000
--- a/srcpkgs/lxd-lts/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://linuxcontainers.org/lxd/downloads/"
-pattern='lxd-\K[\d]+\.\d+\.\d+(?=\.tar\.)'
diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template
index c05d08d1614cf..e8c821457c770 100644
--- a/srcpkgs/removed-packages/template
+++ b/srcpkgs/removed-packages/template
@@ -1,6 +1,6 @@
 # Template file for 'removed-packages'
 pkgname=removed-packages
-version=0.1.20231114
+version=0.1.20231205
 revision=1
 build_style=meta
 short_desc="Uninstalls packages removed from repository"
@@ -411,6 +411,7 @@ replaces="
  luxrays-devel<=3.1_18
  luxrays<=3.1_18
  lxd<=5.9_3
+ lxd-lts<=5.0.1_2
  mac<=3.99u4b5s7_3
  mailpile<=0.5.2_4
  masterpassword-cli<=2.6_5

From b04dafdb4b28634785953ac7a7888b6236e30b5b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:04 -0500
Subject: [PATCH 4/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 34f5e894981c2..0cbda605b1b9c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3834,7 +3834,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 <cam@nohom.org>"
 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 5e8218f5f9f42dc7c9e466feeadf8d7f6d9ca147 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 0cbda605b1b9c..2e170fda9a3e4 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 <npiazza@disroot.org>"
+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 109e75cad2f7fc26a5e36e1f196436b72ad788e5 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  2 +
 srcpkgs/incus/files/incus-user/run   |  3 ++
 srcpkgs/incus/files/incus/run        | 12 +++++
 srcpkgs/incus/template               | 70 ++++++++++++++++++++++++++++
 6 files changed, 89 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..3dc5c0a259579
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,70 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+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 <npiazza@disroot.org>"
+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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (32 preceding siblings ...)
  2024-01-06 16:24 ` dkwo
@ 2024-01-06 16:27 ` dkwo
  2024-01-06 16:28 ` dkwo
                   ` (35 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 16:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1879745532

Comment:
it's now working fine.
i edited my initial post.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (33 preceding siblings ...)
  2024-01-06 16:27 ` dkwo
@ 2024-01-06 16:28 ` dkwo
  2024-01-06 16:28 ` dkwo
                   ` (34 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 16:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875242700

Comment:
`incus launch` gives
`Error: The incus daemon doesn't appear to be started (socket path: /var/lib/incus/unix.socket)`
even though
```
$ doas sv status incus
run: incus: (pid 10297) 53s; run: log: (pid 10296) 53s
```
and
```
$ doas ls -la /var/lib/incus
total 68
drwx--x--x 17 root root        4096 Jan  3 12:31 .
drwxr-xr-x 11 root root        4096 Jan  3 12:30 ..
drwx------  4 root root        4096 Jan  3 12:31 backups
drwx--x--x  2 root root        4096 Jan  3 12:31 containers
drwx------  2 root root        4096 Jan  3 12:31 containers-snapshots
drwx------  3 root root        4096 Jan  3 12:31 database
drwx--x--x  2 root root        4096 Jan  3 12:31 devices
drwx------  2 root root        4096 Jan  3 12:31 disks
drwxr-xr-x  2 root root          60 Jan  3 12:31 guestapi
drwx------  2 root root        4096 Jan  3 12:31 images
drwx--x--x  2 root root        4096 Jan  3 12:31 networks
srwx------  1 root root           0 Jan  3 12:31 seccomp.socket
drwx------  4 root root        4096 Jan  3 12:31 security
-rw-r--r--  1 root root         741 Jan  3 12:31 server.crt
-rw-------  1 root root         288 Jan  3 12:31 server.key
drwx--x--x  2 root root          40 Jan  3 12:31 shmounts
drwx--x--x  3 root root        4096 Jan  3 12:31 storage-pools
srw-rw----  1 root incus-admin    0 Jan  3 12:31 unix.socket
srw-rw----  1 root incus          0 Jan  3 12:31 unix.socket.user
drwx------  2 root root        4096 Jan  3 12:31 users
drwx--x--x  2 root root        4096 Jan  3 12:31 virtual-machines
drwx------  2 root root        4096 Jan  3 12:31 virtual-machines-snapshots
```

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (34 preceding siblings ...)
  2024-01-06 16:28 ` dkwo
@ 2024-01-06 16:28 ` dkwo
  2024-01-06 16:28 ` dkwo
                   ` (33 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 16:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875243790

Comment:
maybe i'm missing something in the runit service, or messing up permissions?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (35 preceding siblings ...)
  2024-01-06 16:28 ` dkwo
@ 2024-01-06 16:28 ` dkwo
  2024-01-06 16:30 ` dkwo
                   ` (32 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 16:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875248069

Comment:
hmm, the log says
`daemon.notice: Jan  3 12:31:16 incus: time="2024-01-03T12:31:16+01:00" level=info msg="Binding socket" socket=/var/lib/incus/unix.socket type="REST API Unix socket"`

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (36 preceding siblings ...)
  2024-01-06 16:28 ` dkwo
@ 2024-01-06 16:30 ` dkwo
  2024-01-06 18:20 ` dkwo
                   ` (31 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 16:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1879746024

Comment:
i think it should be possbile to make it conflict with lxd, and keep both for a while (at least arch linux does that).
i have to confirm which version of raft is enough to build both incus,cowsql and our (ancient) version of lxd.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (37 preceding siblings ...)
  2024-01-06 16:30 ` dkwo
@ 2024-01-06 18:20 ` dkwo
  2024-01-06 18:47 ` dkwo
                   ` (30 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 18:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1879746024

Comment:
i think it should be possible to make it conflict (edit: coexist) with lxd, and keep both for a while.
i have to confirm which version of raft is enough to build both incus,cowsql and lxd.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (38 preceding siblings ...)
  2024-01-06 18:20 ` dkwo
@ 2024-01-06 18:47 ` dkwo
  2024-01-06 18:52 ` dkwo
                   ` (29 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 18:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1875239985

Comment:
`make_dirs /var/lib/incus 0660` added.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (39 preceding siblings ...)
  2024-01-06 18:47 ` dkwo
@ 2024-01-06 18:52 ` dkwo
  2024-01-06 18:52 ` dkwo
                   ` (28 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 18:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1879782170

Comment:
Now keeping both incus and lxd as requested.
cc @CameronNemo I had to update lxd and lxd-lts (in particular, change mod from vendor to readonly) in order to rebuild them.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (40 preceding siblings ...)
  2024-01-06 18:52 ` dkwo
@ 2024-01-06 18:52 ` dkwo
  2024-01-06 18:52 ` [PR PATCH] [Updated] " dkwo
                   ` (27 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 18:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1879746024

Comment:
i think it should be possible to make it conflict (edit: coexist) with lxd, and keep both for a while.
i have to confirm which version of raft is enough to build both incus,cowsql and lxd.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (41 preceding siblings ...)
  2024-01-06 18:52 ` dkwo
@ 2024-01-06 18:52 ` dkwo
  2024-01-06 21:16 ` dkwo
                   ` (26 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 18:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 15213 bytes --]

From 7514540a1f8e868a235dc00632bf5a3236456507 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 66f81547b0f7059d9f141f7a5da193d42c4c9fb4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:23 -0500
Subject: [PATCH 2/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 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 <npiazza@disroot.org>"
+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 da78b25b5677363e4a58acc2f4098b13eb5a6142 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 3/6] 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               | 70 ++++++++++++++++++++++++++++
 6 files changed, 89 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..3dc5c0a259579
--- /dev/null
+++ b/srcpkgs/incus/template
@@ -0,0 +1,70 @@
+# 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/fuidshift
+ ${go_import_path}/cmd/lxc-to-incus
+ ${go_import_path}/cmd/incus-benchmark
+ ${go_import_path}/cmd/incusd
+ ${go_import_path}/cmd/incus-user"
+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 <npiazza@disroot.org>"
+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 -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-migrate"
+	CGO_LDFLAGS="-static" go install -p "${XBPS_MAKEJOBS}" -v -tags agent,netgo -ldflags "${go_ldflags}" "${go_import_path}/cmd/incus-agent"
+	cd cmd/lxd-to-incus && go install -v ./
+}
+
+do_check() {
+	go test -v -tags libsqlite3 -skip TestConvertNetworkConfig ./...
+}
+
+pre_install() {
+	vmkdir usr/libexec/incus
+	for f in ${GOPATH}/bin/{incusd,incus-user}; do
+		vinstall "$f" 700 usr/libexec/incus && rm "$f"
+	done
+}
+
+post_install() {
+	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 fuidshift lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+			vmove usr/bin/${_tool}
+		done
+	}
+}

From 5886d07c8ed2fd2a5c984b047d02e13b4447e9a0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:46 +0100
Subject: [PATCH 4/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 ab6a0395494e7..0000000000000
--- a/srcpkgs/dqlite/patches/musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit dcc017a506a5d616d1ff511cfc590a7255f28de1
-Author: Cameron Nemo <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 3944058f8e634440d644253d48e7f7392ab7dc1c Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:46 +0100
Subject: [PATCH 5/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 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 <cam@nohom.org>"
 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 3d1087015af0c41c70b98e0ab635fd472793b201 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:47 +0100
Subject: [PATCH 6/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 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 <cam@nohom.org>"
 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() {

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (42 preceding siblings ...)
  2024-01-06 18:52 ` [PR PATCH] [Updated] " dkwo
@ 2024-01-06 21:16 ` dkwo
  2024-01-07 13:56 ` dkwo
                   ` (25 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-06 21:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 15224 bytes --]

From 7514540a1f8e868a235dc00632bf5a3236456507 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 66f81547b0f7059d9f141f7a5da193d42c4c9fb4 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:23 -0500
Subject: [PATCH 2/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 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 <npiazza@disroot.org>"
+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 5cb5571bd22797497984ec6171a4a300517636ce Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 3/6] 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 <npiazza@disroot.org>"
+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 e7e4a48b131a3a85194024fae27419fab50a7224 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:46 +0100
Subject: [PATCH 4/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 ab6a0395494e7..0000000000000
--- a/srcpkgs/dqlite/patches/musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit dcc017a506a5d616d1ff511cfc590a7255f28de1
-Author: Cameron Nemo <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 f785f5d405fab3944e925c27e45c40ef61e43862 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:46 +0100
Subject: [PATCH 5/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 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 <cam@nohom.org>"
 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 bc2f0998b352bbee26cf5125c7aabab8b5af367e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:47 +0100
Subject: [PATCH 6/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 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 <cam@nohom.org>"
 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() {

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (43 preceding siblings ...)
  2024-01-06 21:16 ` dkwo
@ 2024-01-07 13:56 ` dkwo
  2024-01-07 13:57 ` dkwo
                   ` (24 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-07 13:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 16360 bytes --]

From 137a8613fb427dcf6fe532485dd4643f506ecdf2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 <npiazza@disroot.org>"
+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 <nicolopiazzalunga@gmail.com>
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 <npiazza@disroot.org>"
+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 <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 ./
 }
 

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (44 preceding siblings ...)
  2024-01-07 13:56 ` dkwo
@ 2024-01-07 13:57 ` dkwo
  2024-01-07 16:27 ` dkwo
                   ` (23 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-07 13:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 16369 bytes --]

From 137a8613fb427dcf6fe532485dd4643f506ecdf2 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 <npiazza@disroot.org>"
+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 <nicolopiazzalunga@gmail.com>
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 <npiazza@disroot.org>"
+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 <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 <cam@nohom.org>"
 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 5f7cd3922a64cfa8f2fa36cb1b0f4adefc8adc40 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 7 Jan 2024 14:36:09 +0100
Subject: [PATCH 7/7] incus: don't build pie

---
 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 ./
 }
 

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (45 preceding siblings ...)
  2024-01-07 13:57 ` dkwo
@ 2024-01-07 16:27 ` dkwo
  2024-01-12 20:40 ` [PR REVIEW] " classabbyamp
                   ` (22 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-07 16:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 15246 bytes --]

From 564687f9ab68b4911e53c5813ea7d38e1901d18b Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 23484d3cc4cda60bc26fd2f8e703024e97f9a64e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 ab6a0395494e7..0000000000000
--- a/srcpkgs/dqlite/patches/musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit dcc017a506a5d616d1ff511cfc590a7255f28de1
-Author: Cameron Nemo <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 d01e8214ffb79c7f86e6e148ce5eb241169073a6 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 3c6515d9be09e43cb8b93cc02acf6782e22e0018 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 bdcda95d08e76c122ac9d726f7c1600290a5227f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 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 <npiazza@disroot.org>"
+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 2467e8dcd96ec8da8524c982eeaa11d6558da886 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 |  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..001224f6303db
--- /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 <npiazza@disroot.org>"
+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
+}
+
+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
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (46 preceding siblings ...)
  2024-01-07 16:27 ` dkwo
@ 2024-01-12 20:40 ` classabbyamp
  2024-01-12 20:40 ` leahneukirchen
                   ` (21 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2024-01-12 20:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1450905233

Comment:
why not rename it to fluidshift-incus or something?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (47 preceding siblings ...)
  2024-01-12 20:40 ` [PR REVIEW] " classabbyamp
@ 2024-01-12 20:40 ` leahneukirchen
  2024-01-12 20:41 ` classabbyamp
                   ` (20 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: leahneukirchen @ 2024-01-12 20:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1450904797

Comment:
Can we use _incus-admin and _incus here?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (48 preceding siblings ...)
  2024-01-12 20:40 ` leahneukirchen
@ 2024-01-12 20:41 ` classabbyamp
  2024-01-12 20:41 ` classabbyamp
                   ` (19 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2024-01-12 20:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1450905824

Comment:
why isn't this following the [established convention](https://github.com/void-linux/void-packages/blob/master/Manual.md#creating-system-accountsgroups-at-runtime) for system groups?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (49 preceding siblings ...)
  2024-01-12 20:41 ` classabbyamp
@ 2024-01-12 20:41 ` classabbyamp
  2024-01-12 20:42 ` classabbyamp
                   ` (18 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2024-01-12 20:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1450905997

Comment:
quote this

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (50 preceding siblings ...)
  2024-01-12 20:41 ` classabbyamp
@ 2024-01-12 20:42 ` classabbyamp
  2024-01-12 21:03 ` CameronNemo
                   ` (17 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2024-01-12 20:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1450906490

Comment:
should this be exec'd?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (51 preceding siblings ...)
  2024-01-12 20:42 ` classabbyamp
@ 2024-01-12 21:03 ` CameronNemo
  2024-01-13 19:57 ` [PR PATCH] [Updated] " dkwo
                   ` (16 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: CameronNemo @ 2024-01-12 21:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

New review comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1450922295

Comment:
Remove the cgroup changes. The user can fix the cgroups if necessary, but usually they should be using unified (i.e. cgroup2 only), and this would just be wrong in that case.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (52 preceding siblings ...)
  2024-01-12 21:03 ` CameronNemo
@ 2024-01-13 19:57 ` dkwo
  2024-01-13 19:58 ` [PR REVIEW] " dkwo
                   ` (15 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 18863 bytes --]

From 27e77eca930d798945b7b8c49c38cfe766e75c53 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 d3e2fafb0e0f4..fd5216da96feb 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 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 <cam@nohom.org>"
 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 1963da3c239600b67e94c80a9fd72d67b08c5dde Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:46 +0100
Subject: [PATCH 2/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 <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 8fe4d78e0ad9d023625ad728e0678451ece6e8f0 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:46 +0100
Subject: [PATCH 3/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 <cam@nohom.org>"
 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 cb1bb2a61f78fd9dc3ee31488e36babdd9abc896 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 6 Jan 2024 17:57:47 +0100
Subject: [PATCH 4/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 <cam@nohom.org>"
 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 b798651871e481d05be00a88b15e357540b8a951 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sun, 3 Dec 2023 14:41:23 -0500
Subject: [PATCH 5/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 fd5216da96feb..25024f8a01687 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 <npiazza@disroot.org>"
+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 03e2ba493306d31b24495756ed108ee54cb4bb10 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 2 Dec 2023 21:43:28 -0500
Subject: [PATCH 6/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..001224f6303db
--- /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 <npiazza@disroot.org>"
+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
+}
+
+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 f0c4313f084b726a3b5b1fd9a4d68112e2da1e08 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Sat, 13 Jan 2024 17:08:26 +0100
Subject: [PATCH 7/7] incus: fix _groups, build fuidshift, no cgroups hack

---
 srcpkgs/incus/files/incus-user/check |  3 ++-
 srcpkgs/incus/files/incus-user/run   |  2 +-
 srcpkgs/incus/files/incus/run        | 10 +---------
 srcpkgs/incus/template               | 15 ++++++++-------
 4 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/incus/files/incus-user/check b/srcpkgs/incus/files/incus-user/check
index bfa18333ccbc9..d4d7293364e8d 100644
--- a/srcpkgs/incus/files/incus-user/check
+++ b/srcpkgs/incus/files/incus-user/check
@@ -1,2 +1,3 @@
 #!/bin/sh
-incus config show >/dev/null 2>&1
+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
index 7450feaa1a32d..dacdf36bc1cd8 100644
--- a/srcpkgs/incus/files/incus-user/run
+++ b/srcpkgs/incus/files/incus-user/run
@@ -1,3 +1,3 @@
 #!/bin/sh
 exec 2>&1
-exec /usr/libexec/incus/incus-user --group incus
+exec /usr/libexec/incus/incus-user --group _incus
diff --git a/srcpkgs/incus/files/incus/run b/srcpkgs/incus/files/incus/run
index c92c6265941f9..d189b4395b90f 100644
--- a/srcpkgs/incus/files/incus/run
+++ b/srcpkgs/incus/files/incus/run
@@ -1,12 +1,4 @@
 #!/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}
+exec /usr/libexec/incus/incusd --group _incus-admin --syslog ${OPTS:- --verbose}
diff --git a/srcpkgs/incus/template b/srcpkgs/incus/template
index 001224f6303db..7b0911f1cd1d8 100644
--- a/srcpkgs/incus/template
+++ b/srcpkgs/incus/template
@@ -4,14 +4,13 @@ version=0.4.0
 revision=1
 build_style=go
 go_import_path=github.com/lxc/incus
-go_build_tags=libsqlite3
+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/incus-user
  ${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
+ ${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"
@@ -22,7 +21,7 @@ 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"
+system_groups="_incus-admin _incus"
 make_dirs="
  /var/lib/incus 0755 root root
  /var/log/incus 0755 root root"
@@ -46,6 +45,8 @@ post_install() {
 		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() {
@@ -61,7 +62,7 @@ incus-client_package() {
 incus-tools_package() {
 	short_desc+=" - tools"
 	pkg_install() {
-		for _tool in lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
+		for _tool in fuidshift-incus lxc-to-incus lxd-to-incus incus-benchmark incus-migrate; do
 			vmove usr/bin/${_tool}
 		done
 	}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (53 preceding siblings ...)
  2024-01-13 19:57 ` [PR PATCH] [Updated] " dkwo
@ 2024-01-13 19:58 ` dkwo
  2024-01-13 19:58 ` dkwo
                   ` (14 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1451595980

Comment:
done

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (54 preceding siblings ...)
  2024-01-13 19:58 ` [PR REVIEW] " dkwo
@ 2024-01-13 19:58 ` dkwo
  2024-01-13 19:58 ` dkwo
                   ` (13 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1451596030

Comment:
done

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (55 preceding siblings ...)
  2024-01-13 19:58 ` dkwo
@ 2024-01-13 19:58 ` dkwo
  2024-01-13 19:58 ` dkwo
                   ` (12 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1451596040

Comment:
done

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (56 preceding siblings ...)
  2024-01-13 19:58 ` dkwo
@ 2024-01-13 19:58 ` dkwo
  2024-01-13 19:59 ` dkwo
                   ` (11 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1451596058

Comment:
done

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (57 preceding siblings ...)
  2024-01-13 19:58 ` dkwo
@ 2024-01-13 19:59 ` dkwo
  2024-01-13 19:59 ` dkwo
                   ` (10 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1451596083

Comment:
sure, done.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR REVIEW] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (58 preceding siblings ...)
  2024-01-13 19:59 ` dkwo
@ 2024-01-13 19:59 ` dkwo
  2024-01-13 20:30 ` classabbyamp
                   ` (9 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-13 19:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#discussion_r1451596113

Comment:
done, thanks

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (59 preceding siblings ...)
  2024-01-13 19:59 ` dkwo
@ 2024-01-13 20:30 ` classabbyamp
  2024-01-14 10:34 ` [PR PATCH] [Updated] " dkwo
                   ` (8 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: classabbyamp @ 2024-01-13 20:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1890761281

Comment:
squash the two incus commits please

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Updated] new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (60 preceding siblings ...)
  2024-01-13 20:30 ` classabbyamp
@ 2024-01-14 10:34 ` dkwo
  2024-01-16 19:35 ` dkwo
                   ` (7 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-14 10:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages incus
https://github.com/void-linux/void-packages/pull/47573

new package: incus
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

A patch file from https://github.com/void-linux/void-packages/pull/47573.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-incus-47573.patch --]
[-- Type: text/x-diff, Size: 15048 bytes --]

From 2b422fb9aa6d236e20d98127a59388faf13a1ac9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
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 d3e2fafb0e0f4..fd5216da96feb 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 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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 ab6a0395494e7..0000000000000
--- a/srcpkgs/dqlite/patches/musl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit dcc017a506a5d616d1ff511cfc590a7255f28de1
-Author: Cameron Nemo <cam@nohom.org>
-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 <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
-        1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
-          |  ^~~~~~~
-    cc1: all warnings being treated as errors
-    make: *** [Makefile:1314: src/vfs.lo] Error 1
-    
-    Signed-off-by: Cameron Nemo <cam@nohom.org>
-
-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 <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <sys/mman.h>
- #include <sys/stat.h>
- #include <sys/time.h>
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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 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 <cam@nohom.org>"
 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 <nicolopiazzalunga@gmail.com>
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 fd5216da96feb..25024f8a01687 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 <npiazza@disroot.org>"
+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 <nicolopiazzalunga@gmail.com>
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 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..d4d7293364e8d
--- /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 0000000000000..dacdf36bc1cd8
--- /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..d189b4395b90f
--- /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 0000000000000..7b0911f1cd1d8
--- /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 <npiazza@disroot.org>"
+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
+	}
+}

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (61 preceding siblings ...)
  2024-01-14 10:34 ` [PR PATCH] [Updated] " dkwo
@ 2024-01-16 19:35 ` dkwo
  2024-01-23 18:21 ` sbromberger
                   ` (6 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-16 19:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1894389869

Comment:
squashed.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (62 preceding siblings ...)
  2024-01-16 19:35 ` dkwo
@ 2024-01-23 18:21 ` sbromberger
  2024-01-23 18:56 ` [PR PATCH] [Merged]: " ahesford
                   ` (5 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2024-01-23 18:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1906654788

Comment:
Now that this has been approved, what's the process for getting it merged? (Eagerly awaiting not having to have a custom install of incus!)

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PR PATCH] [Merged]: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (63 preceding siblings ...)
  2024-01-23 18:21 ` sbromberger
@ 2024-01-23 18:56 ` ahesford
  2024-01-24  4:36 ` sbromberger
                   ` (4 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: ahesford @ 2024-01-23 18:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

There's a merged pull request on the void-packages repository

new package: incus
https://github.com/void-linux/void-packages/pull/47573

Description:
- I tested the changes in this PR: yes
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): yes

todo:
-  void docs: mention incus groups and something like `echo "root:1000000:1000000000" | doas tee -a /etc/subuid /etc/subgid`

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (64 preceding siblings ...)
  2024-01-23 18:56 ` [PR PATCH] [Merged]: " ahesford
@ 2024-01-24  4:36 ` sbromberger
  2024-01-24  4:37 ` sbromberger
                   ` (3 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2024-01-24  4:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1907362496

Comment:
Erm. Why is `lxc` a dependency here? Incus doesn't require it.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (65 preceding siblings ...)
  2024-01-24  4:36 ` sbromberger
@ 2024-01-24  4:37 ` sbromberger
  2024-01-24 15:14 ` dkwo
                   ` (2 subsequent siblings)
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2024-01-24  4:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1907362496

Comment:
Erm. Why is `lxc` a dependency here? Incus doesn't require it (nor does it strictly require `wget` and `dnsmasq`...).

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (66 preceding siblings ...)
  2024-01-24  4:37 ` sbromberger
@ 2024-01-24 15:14 ` dkwo
  2024-01-24 16:05 ` sbromberger
  2024-01-24 16:16 ` sbromberger
  69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2024-01-24 15:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1908336014

Comment:
where do you see wget?
as for lxc, it's surely needed at makedepends, isn't it? are you suggesting to remove lxc and dnsmasq from depends?
can you open pr?

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (67 preceding siblings ...)
  2024-01-24 15:14 ` dkwo
@ 2024-01-24 16:05 ` sbromberger
  2024-01-24 16:16 ` sbromberger
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2024-01-24 16:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1908438926

Comment:
I think wget may be a transitive dependency (possibly from lxc). I installed incus from scratch on a test void system with only cowsql and raft as dependencies.

I can try my hand at a PR but I'm unfamiliar with the config files for packaging so I might mess it up. Thanks.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: new package: incus
  2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
                   ` (68 preceding siblings ...)
  2024-01-24 16:05 ` sbromberger
@ 2024-01-24 16:16 ` sbromberger
  69 siblings, 0 replies; 71+ messages in thread
From: sbromberger @ 2024-01-24 16:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

New comment by sbromberger on void-packages repository

https://github.com/void-linux/void-packages/pull/47573#issuecomment-1908438926

Comment:
I think wget may be a transitive dependency (possibly from lxc). I installed incus from scratch on a test void system with only cowsql and raft as dependencies (aside from the ones specified in https://linuxcontainers.org/incus/docs/main/installing/#installing). Specifically, one needs lxc-devel in makedepends but we don't need lxc.

I can try my hand at a PR but I'm unfamiliar with the config files for packaging so I might mess it up. Thanks.

^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2024-01-24 16:16 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 16:30 [PR PATCH] [wip] new package: incus (replaces lxd) dkwo
2023-12-04 16:43 ` [PR PATCH] [Updated] " dkwo
2023-12-04 18:09 ` dkwo
2023-12-04 21:52 ` dkwo
2023-12-04 22:16 ` dkwo
2023-12-04 23:02 ` dkwo
2023-12-04 23:31 ` dkwo
2023-12-05 19:30 ` dkwo
2023-12-05 22:18 ` dkwo
2023-12-06 15:26 ` dkwo
2023-12-24 18:29 ` ahesford
2023-12-26 18:05 ` dkwo
2023-12-26 20:19 ` sbromberger
2023-12-26 20:20 ` sbromberger
2023-12-27 18:32 ` [PR PATCH] [Updated] " dkwo
2023-12-27 18:40 ` dkwo
2023-12-28 16:46 ` sbromberger
2023-12-28 16:49 ` sbromberger
2023-12-28 17:29 ` ahesford
2023-12-29 22:10 ` [PR PATCH] [Updated] " dkwo
2023-12-29 22:14 ` dkwo
2023-12-31 15:46 ` dkwo
2023-12-31 15:48 ` [PR PATCH] [Updated] " dkwo
2023-12-31 15:53 ` ahesford
2023-12-31 16:03 ` [PR PATCH] [Updated] " dkwo
2023-12-31 16:11 ` dkwo
2023-12-31 16:12 ` dkwo
2024-01-03 11:40 ` [PR PATCH] [Updated] new package: incus dkwo
2024-01-03 11:41 ` dkwo
2024-01-03 11:43 ` dkwo
2024-01-03 11:43 ` dkwo
2024-01-03 11:47 ` dkwo
2024-01-06 13:00 ` [PR PATCH] [Updated] " dkwo
2024-01-06 16:24 ` dkwo
2024-01-06 16:27 ` dkwo
2024-01-06 16:28 ` dkwo
2024-01-06 16:28 ` dkwo
2024-01-06 16:28 ` dkwo
2024-01-06 16:30 ` dkwo
2024-01-06 18:20 ` dkwo
2024-01-06 18:47 ` dkwo
2024-01-06 18:52 ` dkwo
2024-01-06 18:52 ` dkwo
2024-01-06 18:52 ` [PR PATCH] [Updated] " dkwo
2024-01-06 21:16 ` dkwo
2024-01-07 13:56 ` dkwo
2024-01-07 13:57 ` dkwo
2024-01-07 16:27 ` dkwo
2024-01-12 20:40 ` [PR REVIEW] " classabbyamp
2024-01-12 20:40 ` leahneukirchen
2024-01-12 20:41 ` classabbyamp
2024-01-12 20:41 ` classabbyamp
2024-01-12 20:42 ` classabbyamp
2024-01-12 21:03 ` CameronNemo
2024-01-13 19:57 ` [PR PATCH] [Updated] " dkwo
2024-01-13 19:58 ` [PR REVIEW] " dkwo
2024-01-13 19:58 ` dkwo
2024-01-13 19:58 ` dkwo
2024-01-13 19:58 ` dkwo
2024-01-13 19:59 ` dkwo
2024-01-13 19:59 ` dkwo
2024-01-13 20:30 ` classabbyamp
2024-01-14 10:34 ` [PR PATCH] [Updated] " dkwo
2024-01-16 19:35 ` dkwo
2024-01-23 18:21 ` sbromberger
2024-01-23 18:56 ` [PR PATCH] [Merged]: " ahesford
2024-01-24  4:36 ` sbromberger
2024-01-24  4:37 ` sbromberger
2024-01-24 15:14 ` dkwo
2024-01-24 16:05 ` sbromberger
2024-01-24 16:16 ` sbromberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).