Github messages for voidlinux
 help / color / mirror / Atom feed
From: dkwo <dkwo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [wip] new package: incus (replaces lxd)
Date: Fri, 29 Dec 2023 23:10:45 +0100	[thread overview]
Message-ID: <20231229221045.FiVDU2ZJbVCMGcOzPfeT9n-UFLf73N79TVSdhIUSkLc@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47573@inbox.vuxu.org>

[-- 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
+	}
+}

  parent reply	other threads:[~2023-12-29 22:10 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 16:30 [PR PATCH] " 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 ` dkwo [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231229221045.FiVDU2ZJbVCMGcOzPfeT9n-UFLf73N79TVSdhIUSkLc@z \
    --to=dkwo@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).