Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Lxd sqlite replication no conflict
@ 2020-01-16 10:07 voidlinux-github
  2020-01-19 19:18 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-16 10:07 UTC (permalink / raw)
  To: ml

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

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

https://github.com/CameronNemo/void-packages lxd-sqlite-replication-no-conflict
https://github.com/void-linux/void-packages/pull/18327

Lxd sqlite replication no conflict
Draft solution for #18310 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lxd-sqlite-replication-no-conflict-18327.patch --]
[-- Type: text/x-diff, Size: 12052 bytes --]

From 1a90feabdb0b15cd0aae6b10a0d554e8f5851985 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sat, 16 Nov 2019 12:27:14 -0800
Subject: [PATCH 1/5] sqlite-replication: update to 3.30.1.

sqlite-replication: do not conflict with sqlite
---
 srcpkgs/sqlite-replication/template | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/sqlite-replication/template b/srcpkgs/sqlite-replication/template
index cfd1c7b8c15..0aa808104a5 100644
--- a/srcpkgs/sqlite-replication/template
+++ b/srcpkgs/sqlite-replication/template
@@ -2,20 +2,19 @@
 pkgname=sqlite-replication
 version=3.30.1
 revision=1
-wrksrc="sqlite-version-${version}-replication3"
+wrksrc="sqlite-version-${version}-replication4"
 build_style=gnu-configure
-configure_args="--enable-replication --enable-threadsafe --enable-dynamic-extensions --enable-fts5"
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+configure_args="--enable-replication --enable-threadsafe --enable-dynamic-extensions --enable-fts5 --libdir=${_libdir}"
 hostmakedepends="tcl"
 makedepends="libedit-devel"
 short_desc="Replication Enabled SQL Database Engine in a C Library"
 maintainer="Cameron Nemo <camerontnorman@gmail.com>"
 license="Public Domain"
 homepage="https://github.com/CanonicalLtd/sqlite"
-distfiles="${homepage}/archive/version-${version}+replication3.tar.gz"
-checksum=8a21771c49be73d322611fd54ec547d17e6c3bdee6fd234921ef780894e89eed
-replaces="sqlite>=3.8.11.1_3"
-provides="sqlite-${version}_${revision}"
-shlib_provides="libsqlite3.so"
+distfiles="${homepage}/archive/version-${version}+replication4.tar.gz"
+checksum=e9ab0542396be10e1b2951423f13b3e4d118a18e5d4ef39dc271e7dd17d3910f
+shlib_provides="libsqlite3.so.0"
 
 CFLAGS+="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_JSON1 \
@@ -29,15 +28,21 @@ pre_configure() {
 	sed -i -e 's/ -ltinfo//g' configure
 }
 
+post_install() {
+	vmkdir usr/lib/pkgconfig
+	mv "$DESTDIR"/usr/lib{/sqlite-replication,}/pkgconfig/sqlite3.pc
+	# Alpine just deletes the binary, but someone may want it for debugging
+	mv "$DESTDIR"/usr/bin/sqlite3{,.sqlite-replication}
+}
+
 sqlite-replication-devel_package() {
 	depends="sqlite-replication>=${version}_${revision}"
-	replaces="sqlite-devel>=0"
-	provides="sqlite-devel-${version}_${revision}"
+	conflicts="sqlite-devel>=0"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/sqlite-replication/*.a"
+		vmove "usr/lib/sqlite-replication/*.so"
 	}
 }

From 5d909c0814f453e1d7f3cde86a279277aa38c77f Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:48:32 -0700
Subject: [PATCH 2/5] New package: libco-20.

---
 common/shlibs          |  3 +++
 srcpkgs/libco-devel    |  1 +
 srcpkgs/libco/template | 26 ++++++++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 120000 srcpkgs/libco-devel
 create mode 100644 srcpkgs/libco/template

diff --git a/common/shlibs b/common/shlibs
index 51692ea249d..c407d92ba67 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3705,3 +3705,6 @@ libnvpair.so.1 zfs-0.8.2_1
 libjsonnet.so.0 jsonnet-0.14.0_2
 libjsonnet++.so.0 jsonnet-0.14.0_2
 libigdgmm.so.11 intel-gmmlib-19.4.1_1
+libigdgmm.so.12 intel-gmmlib-19.3.4_1
+libco.so.0 libco-20_1
+libraft.so.0 raft-0.9.2_1
diff --git a/srcpkgs/libco-devel b/srcpkgs/libco-devel
new file mode 120000
index 00000000000..9cbee396adf
--- /dev/null
+++ b/srcpkgs/libco-devel
@@ -0,0 +1 @@
+libco
\ No newline at end of file
diff --git a/srcpkgs/libco/template b/srcpkgs/libco/template
new file mode 100644
index 00000000000..b17645c6738
--- /dev/null
+++ b/srcpkgs/libco/template
@@ -0,0 +1,26 @@
+# Template file for 'libco'
+pkgname=libco
+version=20
+revision=1
+build_style=gnu-makefile
+short_desc="Cooperative multithreading library written in C89"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+license="ISC"
+homepage="https://github.com/canonical/libco"
+distfiles="https://github.com/canonical/libco/archive/v${version}.tar.gz"
+checksum=6d6d6ada15a36224ee4aa59b8361c4b90f1ffb6c077b4932aa6e6344ee91be0e
+
+post_install() {
+	vlicense LICENSE
+}
+
+libco-devel_package() {
+	depends="${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 241b9eb22933d260a794d38f215cac98dd8105a8 Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:59:54 -0700
Subject: [PATCH 3/5] New package: raft-0.9.16.

---
 srcpkgs/raft-devel    |  1 +
 srcpkgs/raft/template | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 120000 srcpkgs/raft-devel
 create mode 100644 srcpkgs/raft/template

diff --git a/srcpkgs/raft-devel b/srcpkgs/raft-devel
new file mode 120000
index 00000000000..d96c908578a
--- /dev/null
+++ b/srcpkgs/raft-devel
@@ -0,0 +1 @@
+raft
\ No newline at end of file
diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template
new file mode 100644
index 00000000000..1118fa774ec
--- /dev/null
+++ b/srcpkgs/raft/template
@@ -0,0 +1,33 @@
+# Template file for 'raft'
+pkgname=raft
+version=0.9.16
+revision=1
+build_style=gnu-configure
+configure_args="--enable-example=no"
+hostmakedepends="pkg-config autoconf automake libtool"
+makedepends="libuv-devel"
+short_desc="C implementation of the Raft consensus protocol"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+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=b4c4ac15dd74a4c2bbe86149cb5fc1b937979a62e97439615175e3e218fac512
+
+pre_configure() {
+	autoreconf -i
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+raft-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 eef3451e8f9172d390b9010320abfa88222d5b6a Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Mon, 19 Aug 2019 20:58:39 -0700
Subject: [PATCH 4/5] dqlite: update to 1.3.0.

---
 srcpkgs/dqlite/template | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
index b11c2e93bd9..696cfda1019 100644
--- a/srcpkgs/dqlite/template
+++ b/srcpkgs/dqlite/template
@@ -1,24 +1,31 @@
 # Template file for 'dqlite'
 pkgname=dqlite
-version=0.2.6
+version=1.3.0
 revision=1
 build_style=gnu-configure
 hostmakedepends="pkg-config autoconf automake libtool"
-makedepends="libuv-devel sqlite-replication-devel"
+makedepends="sqlite-replication-devel raft-devel libco-devel"
 depends="sqlite-replication"
 short_desc="Distributed SQLite database using the Raft algorithm"
 maintainer="Cameron Nemo <camerontnorman@gmail.com>"
-license="Apache-2.0"
-homepage="https://github.com/CanonicalLtd/dqlite"
+license="custom:LGPL-3.0-only-linking-exception"
+homepage="https://github.com/canonical/dqlite"
 distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=47d31550d970a12d25101c331896cfb855128c110d912f5da3371062d9ece52b
+checksum=22e3d281c396cc409e4afced20e143c4a014b036146945e30f9ebf3bee410865
+
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+export LDFLAGS+=" -L${_libdir} -Wl,-R${_libdir}"
 
 pre_configure() {
 	autoreconf -i
 }
 
+post_install() {
+	vlicense LICENSE
+}
+
 dqlite-devel_package() {
-	depends="sqlite-replication-devel dqlite>=${version}_${revision}"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include

From 619e215889e1b5fd6201b9cc5d76f7f211d39ed6 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Thu, 12 Sep 2019 22:57:04 -0700
Subject: [PATCH 5/5] lxd: update to 3.18.

---
 srcpkgs/lxd/files/lxd/run         |  4 +++
 srcpkgs/lxd/patches/seccomp.patch | 41 -------------------------------
 srcpkgs/lxd/template              | 22 +++++------------
 3 files changed, 10 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/lxd/patches/seccomp.patch

diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
index 147eb64e74d..c03a2c0d766 100755
--- a/srcpkgs/lxd/files/lxd/run
+++ b/srcpkgs/lxd/files/lxd/run
@@ -6,4 +6,8 @@ fi
 if ! mountpoint -q "${_systemd_cgrp}"; then
 	mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp}
 fi
+# workaround lxc bug -- next release of lxc should obsolete this
+if [ -e /sys/fs/cgroup/cpuset/cgroup.clone_children ]; then
+	echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children 2>/dev/null || :
+fi
 exec lxd --group lxd 2>&1
diff --git a/srcpkgs/lxd/patches/seccomp.patch b/srcpkgs/lxd/patches/seccomp.patch
deleted file mode 100644
index e7b52a31931..00000000000
--- a/srcpkgs/lxd/patches/seccomp.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-lxc/lxd@a181ed4 [PATCH] seccomp: define __NR_mknod if missing
-lxc/lxd@c655ed5 [PATCH] seccomp: rework missing syscall number definitions
----
- lxd/seccomp.go | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/lxd/seccomp.go b/lxd/seccomp.go
-index 0afad7cacc..32397b9729 100644
---- lxd/seccomp.go
-+++ lxd/seccomp.go
-@@ -109,6 +109,14 @@
- 	return -EPERM;
- }
-
-+#ifndef __NR_mknodat
-+	#error missing kernel headers
-+#else
-+	#ifdef __NR_mknod
-+		#define LXD_MUST_CHECK_MKNOD
-+ 	#endif
-+#endif
-+
- static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg,
- 					     char *buf, size_t size,
- 					     mode_t *mode, dev_t *dev,
-@@ -124,6 +132,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-	resp->val = 0;
-
-	switch (req->data.nr) {
-+#ifdef LXD_MUST_CHECK_MKNOD
-	case __NR_mknod:
-		resp->error = device_allowed(req->data.args[2], req->data.args[1]);
-		if (resp->error) {
-@@ -143,6 +149,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-		*pid = req->pid;
-
-		break;
-+#endif
-	case __NR_mknodat:
-		if (req->data.args[0] != AT_FDCWD) {
-			errno = EINVAL;
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
index 2a9cf44d88d..466564116b8 100644
--- a/srcpkgs/lxd/template
+++ b/srcpkgs/lxd/template
@@ -1,37 +1,27 @@
 # Template file for 'lxd'
 pkgname=lxd
-version=3.14
+version=3.18
 revision=1
 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}/lxd-p2c ${go_import_path}/fuidshift"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config git"
 makedepends="lxc-devel acl-devel dqlite-devel"
 depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
 short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Apache-2.0"
 homepage="https://linuxcontainers.org/lxd"
 distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz"
-checksum=409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
+checksum=b09434e089776fb0c48d384a6e04707ba1d99d60b7b59e8ba573d8c7d7130fdd
 system_groups="lxd"
 
-do_configure() {
-	# the LXD tarball packages up the required dependencies
-	ln -s "$wrksrc/dist" "$GOPATH"
-}
-
-do_build() {
-	# don't go-get the dependencies, just install with what's there
-	cd "$GOSRCPATH"
-	go_package=${go_package:-$go_import_path}
-	go install -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
-}
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+export LDFLAGS+=" -L${_libdir} -Wl,-R${_libdir}"
 
 post_install() {
 	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vlicense COPYING LICENSE
 	vsv lxd
 }

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

* Re: [PR PATCH] [Updated] Lxd sqlite replication no conflict
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
@ 2020-01-19 19:18 ` voidlinux-github
  2020-01-19 19:21 ` voidlinux-github
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-19 19:18 UTC (permalink / raw)
  To: ml

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

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

https://github.com/CameronNemo/void-packages lxd-sqlite-replication-no-conflict
https://github.com/void-linux/void-packages/pull/18327

Lxd sqlite replication no conflict
Draft solution for #18310 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lxd-sqlite-replication-no-conflict-18327.patch --]
[-- Type: text/x-diff, Size: 12240 bytes --]

From cd9b157eb9465e710ebb882958116cc30177f149 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sat, 16 Nov 2019 12:27:14 -0800
Subject: [PATCH 1/5] sqlite-replication: do not conflict with sqlite.

---
 srcpkgs/sqlite-replication/template | 31 +++++++++++++++++------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/sqlite-replication/template b/srcpkgs/sqlite-replication/template
index cfd1c7b8c15..56515924d9f 100644
--- a/srcpkgs/sqlite-replication/template
+++ b/srcpkgs/sqlite-replication/template
@@ -1,21 +1,20 @@
 # Template file for 'sqlite-replication'
 pkgname=sqlite-replication
 version=3.30.1
-revision=1
-wrksrc="sqlite-version-${version}-replication3"
+revision=2
+wrksrc="sqlite-version-${version}-replication4"
 build_style=gnu-configure
-configure_args="--enable-replication --enable-threadsafe --enable-dynamic-extensions --enable-fts5"
+configure_args="--enable-replication --enable-threadsafe --enable-fts5
+ --enable-dynamic-extensions --libdir=/usr/lib/sqlite-replication"
 hostmakedepends="tcl"
 makedepends="libedit-devel"
 short_desc="Replication Enabled SQL Database Engine in a C Library"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Public Domain"
 homepage="https://github.com/CanonicalLtd/sqlite"
-distfiles="${homepage}/archive/version-${version}+replication3.tar.gz"
-checksum=8a21771c49be73d322611fd54ec547d17e6c3bdee6fd234921ef780894e89eed
-replaces="sqlite>=3.8.11.1_3"
-provides="sqlite-${version}_${revision}"
-shlib_provides="libsqlite3.so"
+distfiles="${homepage}/archive/version-${version}+replication4.tar.gz"
+checksum=e9ab0542396be10e1b2951423f13b3e4d118a18e5d4ef39dc271e7dd17d3910f
+shlib_provides="libsqlite3.so.0"
 
 CFLAGS+="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_JSON1 \
@@ -29,15 +28,21 @@ pre_configure() {
 	sed -i -e 's/ -ltinfo//g' configure
 }
 
+post_install() {
+	vmkdir usr/lib/pkgconfig
+	mv "$DESTDIR"/usr/lib{/sqlite-replication,}/pkgconfig/sqlite3.pc
+	# Alpine just deletes the binary, but someone may want it for debugging
+	mv "$DESTDIR"/usr/bin/sqlite3{,.sqlite-replication}
+}
+
 sqlite-replication-devel_package() {
 	depends="sqlite-replication>=${version}_${revision}"
-	replaces="sqlite-devel>=0"
-	provides="sqlite-devel-${version}_${revision}"
+	conflicts="sqlite-devel>=0"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/sqlite-replication/*.a"
+		vmove "usr/lib/sqlite-replication/*.so"
 	}
 }

From f30bdc84f5eaab420b123d063b1873f3a9de6495 Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:48:32 -0700
Subject: [PATCH 2/5] New package: libco-20.

---
 common/shlibs          |  3 +++
 srcpkgs/libco-devel    |  1 +
 srcpkgs/libco/template | 26 ++++++++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 120000 srcpkgs/libco-devel
 create mode 100644 srcpkgs/libco/template

diff --git a/common/shlibs b/common/shlibs
index d9ab1d2ae63..c1b6950c8ca 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3705,3 +3705,6 @@ libnvpair.so.1 zfs-0.8.2_1
 libjsonnet.so.0 jsonnet-0.14.0_2
 libjsonnet++.so.0 jsonnet-0.14.0_2
 libigdgmm.so.11 intel-gmmlib-19.4.1_1
+libigdgmm.so.12 intel-gmmlib-19.3.4_1
+libco.so.0 libco-20_1
+libraft.so.0 raft-0.9.2_1
diff --git a/srcpkgs/libco-devel b/srcpkgs/libco-devel
new file mode 120000
index 00000000000..9cbee396adf
--- /dev/null
+++ b/srcpkgs/libco-devel
@@ -0,0 +1 @@
+libco
\ No newline at end of file
diff --git a/srcpkgs/libco/template b/srcpkgs/libco/template
new file mode 100644
index 00000000000..b17645c6738
--- /dev/null
+++ b/srcpkgs/libco/template
@@ -0,0 +1,26 @@
+# Template file for 'libco'
+pkgname=libco
+version=20
+revision=1
+build_style=gnu-makefile
+short_desc="Cooperative multithreading library written in C89"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+license="ISC"
+homepage="https://github.com/canonical/libco"
+distfiles="https://github.com/canonical/libco/archive/v${version}.tar.gz"
+checksum=6d6d6ada15a36224ee4aa59b8361c4b90f1ffb6c077b4932aa6e6344ee91be0e
+
+post_install() {
+	vlicense LICENSE
+}
+
+libco-devel_package() {
+	depends="${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 8d6022fafa54de7fa1b3b0887742ea8891a66476 Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:59:54 -0700
Subject: [PATCH 3/5] New package: raft-0.9.16.

---
 srcpkgs/raft-devel    |  1 +
 srcpkgs/raft/template | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 120000 srcpkgs/raft-devel
 create mode 100644 srcpkgs/raft/template

diff --git a/srcpkgs/raft-devel b/srcpkgs/raft-devel
new file mode 120000
index 00000000000..d96c908578a
--- /dev/null
+++ b/srcpkgs/raft-devel
@@ -0,0 +1 @@
+raft
\ No newline at end of file
diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template
new file mode 100644
index 00000000000..1118fa774ec
--- /dev/null
+++ b/srcpkgs/raft/template
@@ -0,0 +1,33 @@
+# Template file for 'raft'
+pkgname=raft
+version=0.9.16
+revision=1
+build_style=gnu-configure
+configure_args="--enable-example=no"
+hostmakedepends="pkg-config autoconf automake libtool"
+makedepends="libuv-devel"
+short_desc="C implementation of the Raft consensus protocol"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+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=b4c4ac15dd74a4c2bbe86149cb5fc1b937979a62e97439615175e3e218fac512
+
+pre_configure() {
+	autoreconf -i
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+raft-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 9762c7a9d38a28fbabb5e5c6576f4a29774e2d13 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Mon, 19 Aug 2019 20:58:39 -0700
Subject: [PATCH 4/5] dqlite: update to 1.3.1.

---
 srcpkgs/dqlite/template | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
index b11c2e93bd9..5da8d23d176 100644
--- a/srcpkgs/dqlite/template
+++ b/srcpkgs/dqlite/template
@@ -1,24 +1,31 @@
 # Template file for 'dqlite'
 pkgname=dqlite
-version=0.2.6
+version=1.3.1
 revision=1
 build_style=gnu-configure
-hostmakedepends="pkg-config autoconf automake libtool"
-makedepends="libuv-devel sqlite-replication-devel"
+hostmakedepends="pkg-config automake libtool"
+makedepends="sqlite-replication-devel raft-devel libco-devel"
 depends="sqlite-replication"
 short_desc="Distributed SQLite database using the Raft algorithm"
 maintainer="Cameron Nemo <camerontnorman@gmail.com>"
-license="Apache-2.0"
-homepage="https://github.com/CanonicalLtd/dqlite"
+license="custom:LGPL-3.0-only-linking-exception"
+homepage="https://github.com/canonical/dqlite"
 distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=47d31550d970a12d25101c331896cfb855128c110d912f5da3371062d9ece52b
+checksum=45c47a5dfc8689640fba50cfa3a204e1e0807cab565faf74da5ac7ebb89b0dba
+
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+LDFLAGS="-L${_libdir} -Wl,-R${_libdir}"
 
 pre_configure() {
 	autoreconf -i
 }
 
+post_install() {
+	vlicense LICENSE
+}
+
 dqlite-devel_package() {
-	depends="sqlite-replication-devel dqlite>=${version}_${revision}"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include

From 22af611f67aac3d691ba965a0c3e699cf998bfd8 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Thu, 12 Sep 2019 22:57:04 -0700
Subject: [PATCH 5/5] lxd: update to 3.19.

---
 srcpkgs/lxd/files/lxd/run         |  4 +++
 srcpkgs/lxd/patches/seccomp.patch | 41 -------------------------------
 srcpkgs/lxd/template              | 24 ++++++------------
 3 files changed, 12 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/lxd/patches/seccomp.patch

diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
index 147eb64e74d..c03a2c0d766 100755
--- a/srcpkgs/lxd/files/lxd/run
+++ b/srcpkgs/lxd/files/lxd/run
@@ -6,4 +6,8 @@ fi
 if ! mountpoint -q "${_systemd_cgrp}"; then
 	mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp}
 fi
+# workaround lxc bug -- next release of lxc should obsolete this
+if [ -e /sys/fs/cgroup/cpuset/cgroup.clone_children ]; then
+	echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children 2>/dev/null || :
+fi
 exec lxd --group lxd 2>&1
diff --git a/srcpkgs/lxd/patches/seccomp.patch b/srcpkgs/lxd/patches/seccomp.patch
deleted file mode 100644
index e7b52a31931..00000000000
--- a/srcpkgs/lxd/patches/seccomp.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-lxc/lxd@a181ed4 [PATCH] seccomp: define __NR_mknod if missing
-lxc/lxd@c655ed5 [PATCH] seccomp: rework missing syscall number definitions
----
- lxd/seccomp.go | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/lxd/seccomp.go b/lxd/seccomp.go
-index 0afad7cacc..32397b9729 100644
---- lxd/seccomp.go
-+++ lxd/seccomp.go
-@@ -109,6 +109,14 @@
- 	return -EPERM;
- }
-
-+#ifndef __NR_mknodat
-+	#error missing kernel headers
-+#else
-+	#ifdef __NR_mknod
-+		#define LXD_MUST_CHECK_MKNOD
-+ 	#endif
-+#endif
-+
- static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg,
- 					     char *buf, size_t size,
- 					     mode_t *mode, dev_t *dev,
-@@ -124,6 +132,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-	resp->val = 0;
-
-	switch (req->data.nr) {
-+#ifdef LXD_MUST_CHECK_MKNOD
-	case __NR_mknod:
-		resp->error = device_allowed(req->data.args[2], req->data.args[1]);
-		if (resp->error) {
-@@ -143,6 +149,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-		*pid = req->pid;
-
-		break;
-+#endif
-	case __NR_mknodat:
-		if (req->data.args[0] != AT_FDCWD) {
-			errno = EINVAL;
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
index 2a9cf44d88d..3e1d972e508 100644
--- a/srcpkgs/lxd/template
+++ b/srcpkgs/lxd/template
@@ -1,37 +1,29 @@
 # Template file for 'lxd'
 pkgname=lxd
-version=3.14
+version=3.19
 revision=1
 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}/lxd-p2c ${go_import_path}/fuidshift"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config git"
 makedepends="lxc-devel acl-devel dqlite-devel"
 depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
 short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Apache-2.0"
 homepage="https://linuxcontainers.org/lxd"
 distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz"
-checksum=409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
+checksum=afc0b0912e5fa977007cfd97805849a3a47564eaaaa1638948081665ad7224c8
 system_groups="lxd"
 
-do_configure() {
-	# the LXD tarball packages up the required dependencies
-	ln -s "$wrksrc/dist" "$GOPATH"
-}
-
-do_build() {
-	# don't go-get the dependencies, just install with what's there
-	cd "$GOSRCPATH"
-	go_package=${go_package:-$go_import_path}
-	go install -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
-}
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+LDFLAGS="-L${_libdir} -Wl,-R${_libdir}"
+# whitelist libcap LDFLAGS (see: https://github.com/lxc/lxd/issues/6727)
+export CGO_LDFLAGS_ALLOW='-Wl,-wrap,pthread_create'
 
 post_install() {
 	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vlicense COPYING LICENSE
 	vsv lxd
 }

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

* Re: [PR PATCH] [Updated] Lxd sqlite replication no conflict
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
  2020-01-19 19:18 ` [PR PATCH] [Updated] " voidlinux-github
@ 2020-01-19 19:21 ` voidlinux-github
  2020-01-27  6:00 ` voidlinux-github
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-19 19:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/CameronNemo/void-packages lxd-sqlite-replication-no-conflict
https://github.com/void-linux/void-packages/pull/18327

Lxd sqlite replication no conflict
Draft solution for #18310 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lxd-sqlite-replication-no-conflict-18327.patch --]
[-- Type: text/x-diff, Size: 12504 bytes --]

From 348ecf36c1ac8799367b70f065c6526814722387 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sat, 16 Nov 2019 12:27:14 -0800
Subject: [PATCH 1/5] sqlite-replication: do not conflict with sqlite.

---
 srcpkgs/sqlite-replication/template | 31 +++++++++++++++++------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/sqlite-replication/template b/srcpkgs/sqlite-replication/template
index cfd1c7b8c15..56515924d9f 100644
--- a/srcpkgs/sqlite-replication/template
+++ b/srcpkgs/sqlite-replication/template
@@ -1,21 +1,20 @@
 # Template file for 'sqlite-replication'
 pkgname=sqlite-replication
 version=3.30.1
-revision=1
-wrksrc="sqlite-version-${version}-replication3"
+revision=2
+wrksrc="sqlite-version-${version}-replication4"
 build_style=gnu-configure
-configure_args="--enable-replication --enable-threadsafe --enable-dynamic-extensions --enable-fts5"
+configure_args="--enable-replication --enable-threadsafe --enable-fts5
+ --enable-dynamic-extensions --libdir=/usr/lib/sqlite-replication"
 hostmakedepends="tcl"
 makedepends="libedit-devel"
 short_desc="Replication Enabled SQL Database Engine in a C Library"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Public Domain"
 homepage="https://github.com/CanonicalLtd/sqlite"
-distfiles="${homepage}/archive/version-${version}+replication3.tar.gz"
-checksum=8a21771c49be73d322611fd54ec547d17e6c3bdee6fd234921ef780894e89eed
-replaces="sqlite>=3.8.11.1_3"
-provides="sqlite-${version}_${revision}"
-shlib_provides="libsqlite3.so"
+distfiles="${homepage}/archive/version-${version}+replication4.tar.gz"
+checksum=e9ab0542396be10e1b2951423f13b3e4d118a18e5d4ef39dc271e7dd17d3910f
+shlib_provides="libsqlite3.so.0"
 
 CFLAGS+="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_JSON1 \
@@ -29,15 +28,21 @@ pre_configure() {
 	sed -i -e 's/ -ltinfo//g' configure
 }
 
+post_install() {
+	vmkdir usr/lib/pkgconfig
+	mv "$DESTDIR"/usr/lib{/sqlite-replication,}/pkgconfig/sqlite3.pc
+	# Alpine just deletes the binary, but someone may want it for debugging
+	mv "$DESTDIR"/usr/bin/sqlite3{,.sqlite-replication}
+}
+
 sqlite-replication-devel_package() {
 	depends="sqlite-replication>=${version}_${revision}"
-	replaces="sqlite-devel>=0"
-	provides="sqlite-devel-${version}_${revision}"
+	conflicts="sqlite-devel>=0"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/sqlite-replication/*.a"
+		vmove "usr/lib/sqlite-replication/*.so"
 	}
 }

From 5fa1897e74aa54e381e6ebb27cdbf7268ce72b22 Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:48:32 -0700
Subject: [PATCH 2/5] New package: libco-20.

---
 common/shlibs          |  1 +
 srcpkgs/libco-devel    |  1 +
 srcpkgs/libco/template | 26 ++++++++++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/libco-devel
 create mode 100644 srcpkgs/libco/template

diff --git a/common/shlibs b/common/shlibs
index d9ab1d2ae63..95f1b8d1f85 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3705,3 +3705,4 @@ libnvpair.so.1 zfs-0.8.2_1
 libjsonnet.so.0 jsonnet-0.14.0_2
 libjsonnet++.so.0 jsonnet-0.14.0_2
 libigdgmm.so.11 intel-gmmlib-19.4.1_1
+libco.so.0 libco-20_1
diff --git a/srcpkgs/libco-devel b/srcpkgs/libco-devel
new file mode 120000
index 00000000000..9cbee396adf
--- /dev/null
+++ b/srcpkgs/libco-devel
@@ -0,0 +1 @@
+libco
\ No newline at end of file
diff --git a/srcpkgs/libco/template b/srcpkgs/libco/template
new file mode 100644
index 00000000000..b17645c6738
--- /dev/null
+++ b/srcpkgs/libco/template
@@ -0,0 +1,26 @@
+# Template file for 'libco'
+pkgname=libco
+version=20
+revision=1
+build_style=gnu-makefile
+short_desc="Cooperative multithreading library written in C89"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+license="ISC"
+homepage="https://github.com/canonical/libco"
+distfiles="https://github.com/canonical/libco/archive/v${version}.tar.gz"
+checksum=6d6d6ada15a36224ee4aa59b8361c4b90f1ffb6c077b4932aa6e6344ee91be0e
+
+post_install() {
+	vlicense LICENSE
+}
+
+libco-devel_package() {
+	depends="${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 6eef5c32daf4bf7276359ae86ecbb923d3f2e5bc Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:59:54 -0700
Subject: [PATCH 3/5] New package: raft-0.9.16.

---
 common/shlibs         |  1 +
 srcpkgs/raft-devel    |  1 +
 srcpkgs/raft/template | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 120000 srcpkgs/raft-devel
 create mode 100644 srcpkgs/raft/template

diff --git a/common/shlibs b/common/shlibs
index 95f1b8d1f85..d2eb210b8ca 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3706,3 +3706,4 @@ libjsonnet.so.0 jsonnet-0.14.0_2
 libjsonnet++.so.0 jsonnet-0.14.0_2
 libigdgmm.so.11 intel-gmmlib-19.4.1_1
 libco.so.0 libco-20_1
+libraft.so.0 raft-0.9.16_1
diff --git a/srcpkgs/raft-devel b/srcpkgs/raft-devel
new file mode 120000
index 00000000000..d96c908578a
--- /dev/null
+++ b/srcpkgs/raft-devel
@@ -0,0 +1 @@
+raft
\ No newline at end of file
diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template
new file mode 100644
index 00000000000..1118fa774ec
--- /dev/null
+++ b/srcpkgs/raft/template
@@ -0,0 +1,33 @@
+# Template file for 'raft'
+pkgname=raft
+version=0.9.16
+revision=1
+build_style=gnu-configure
+configure_args="--enable-example=no"
+hostmakedepends="pkg-config autoconf automake libtool"
+makedepends="libuv-devel"
+short_desc="C implementation of the Raft consensus protocol"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+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=b4c4ac15dd74a4c2bbe86149cb5fc1b937979a62e97439615175e3e218fac512
+
+pre_configure() {
+	autoreconf -i
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+raft-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 0101f9ed321ca6f30f1b8664f9cfd96492e20502 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Mon, 19 Aug 2019 20:58:39 -0700
Subject: [PATCH 4/5] dqlite: update to 1.3.1.

---
 srcpkgs/dqlite/template | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
index b11c2e93bd9..5da8d23d176 100644
--- a/srcpkgs/dqlite/template
+++ b/srcpkgs/dqlite/template
@@ -1,24 +1,31 @@
 # Template file for 'dqlite'
 pkgname=dqlite
-version=0.2.6
+version=1.3.1
 revision=1
 build_style=gnu-configure
-hostmakedepends="pkg-config autoconf automake libtool"
-makedepends="libuv-devel sqlite-replication-devel"
+hostmakedepends="pkg-config automake libtool"
+makedepends="sqlite-replication-devel raft-devel libco-devel"
 depends="sqlite-replication"
 short_desc="Distributed SQLite database using the Raft algorithm"
 maintainer="Cameron Nemo <camerontnorman@gmail.com>"
-license="Apache-2.0"
-homepage="https://github.com/CanonicalLtd/dqlite"
+license="custom:LGPL-3.0-only-linking-exception"
+homepage="https://github.com/canonical/dqlite"
 distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=47d31550d970a12d25101c331896cfb855128c110d912f5da3371062d9ece52b
+checksum=45c47a5dfc8689640fba50cfa3a204e1e0807cab565faf74da5ac7ebb89b0dba
+
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+LDFLAGS="-L${_libdir} -Wl,-R${_libdir}"
 
 pre_configure() {
 	autoreconf -i
 }
 
+post_install() {
+	vlicense LICENSE
+}
+
 dqlite-devel_package() {
-	depends="sqlite-replication-devel dqlite>=${version}_${revision}"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include

From 2f4139d7f865b0f16407089580cf86c744c9c77e Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Thu, 12 Sep 2019 22:57:04 -0700
Subject: [PATCH 5/5] lxd: update to 3.19.

---
 srcpkgs/lxd/files/lxd/run         |  4 +++
 srcpkgs/lxd/patches/seccomp.patch | 41 -------------------------------
 srcpkgs/lxd/template              | 24 ++++++------------
 3 files changed, 12 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/lxd/patches/seccomp.patch

diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
index 147eb64e74d..c03a2c0d766 100755
--- a/srcpkgs/lxd/files/lxd/run
+++ b/srcpkgs/lxd/files/lxd/run
@@ -6,4 +6,8 @@ fi
 if ! mountpoint -q "${_systemd_cgrp}"; then
 	mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp}
 fi
+# workaround lxc bug -- next release of lxc should obsolete this
+if [ -e /sys/fs/cgroup/cpuset/cgroup.clone_children ]; then
+	echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children 2>/dev/null || :
+fi
 exec lxd --group lxd 2>&1
diff --git a/srcpkgs/lxd/patches/seccomp.patch b/srcpkgs/lxd/patches/seccomp.patch
deleted file mode 100644
index e7b52a31931..00000000000
--- a/srcpkgs/lxd/patches/seccomp.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-lxc/lxd@a181ed4 [PATCH] seccomp: define __NR_mknod if missing
-lxc/lxd@c655ed5 [PATCH] seccomp: rework missing syscall number definitions
----
- lxd/seccomp.go | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/lxd/seccomp.go b/lxd/seccomp.go
-index 0afad7cacc..32397b9729 100644
---- lxd/seccomp.go
-+++ lxd/seccomp.go
-@@ -109,6 +109,14 @@
- 	return -EPERM;
- }
-
-+#ifndef __NR_mknodat
-+	#error missing kernel headers
-+#else
-+	#ifdef __NR_mknod
-+		#define LXD_MUST_CHECK_MKNOD
-+ 	#endif
-+#endif
-+
- static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg,
- 					     char *buf, size_t size,
- 					     mode_t *mode, dev_t *dev,
-@@ -124,6 +132,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-	resp->val = 0;
-
-	switch (req->data.nr) {
-+#ifdef LXD_MUST_CHECK_MKNOD
-	case __NR_mknod:
-		resp->error = device_allowed(req->data.args[2], req->data.args[1]);
-		if (resp->error) {
-@@ -143,6 +149,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-		*pid = req->pid;
-
-		break;
-+#endif
-	case __NR_mknodat:
-		if (req->data.args[0] != AT_FDCWD) {
-			errno = EINVAL;
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
index 2a9cf44d88d..3e1d972e508 100644
--- a/srcpkgs/lxd/template
+++ b/srcpkgs/lxd/template
@@ -1,37 +1,29 @@
 # Template file for 'lxd'
 pkgname=lxd
-version=3.14
+version=3.19
 revision=1
 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}/lxd-p2c ${go_import_path}/fuidshift"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config git"
 makedepends="lxc-devel acl-devel dqlite-devel"
 depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
 short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Apache-2.0"
 homepage="https://linuxcontainers.org/lxd"
 distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz"
-checksum=409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
+checksum=afc0b0912e5fa977007cfd97805849a3a47564eaaaa1638948081665ad7224c8
 system_groups="lxd"
 
-do_configure() {
-	# the LXD tarball packages up the required dependencies
-	ln -s "$wrksrc/dist" "$GOPATH"
-}
-
-do_build() {
-	# don't go-get the dependencies, just install with what's there
-	cd "$GOSRCPATH"
-	go_package=${go_package:-$go_import_path}
-	go install -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
-}
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+LDFLAGS="-L${_libdir} -Wl,-R${_libdir}"
+# whitelist libcap LDFLAGS (see: https://github.com/lxc/lxd/issues/6727)
+export CGO_LDFLAGS_ALLOW='-Wl,-wrap,pthread_create'
 
 post_install() {
 	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vlicense COPYING LICENSE
 	vsv lxd
 }

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

* Re: [PR PATCH] [Updated] Lxd sqlite replication no conflict
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
  2020-01-19 19:18 ` [PR PATCH] [Updated] " voidlinux-github
  2020-01-19 19:21 ` voidlinux-github
@ 2020-01-27  6:00 ` voidlinux-github
  2020-01-27  6:18 ` LXD: update to 3.19, make sqlite-replication not conflict with sqlite voidlinux-github
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  6:00 UTC (permalink / raw)
  To: ml

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

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

https://github.com/CameronNemo/void-packages lxd-sqlite-replication-no-conflict
https://github.com/void-linux/void-packages/pull/18327

Lxd sqlite replication no conflict
Draft solution for #18310 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lxd-sqlite-replication-no-conflict-18327.patch --]
[-- Type: text/x-diff, Size: 13335 bytes --]

From e72ff40f9b1af729416779d644b34b92c3fb9004 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sat, 16 Nov 2019 12:27:14 -0800
Subject: [PATCH 1/5] sqlite-replication: do not conflict with sqlite.

---
 srcpkgs/sqlite-replication-bin      |  1 +
 srcpkgs/sqlite-replication/template | 53 ++++++++++++++++++++++-------
 2 files changed, 41 insertions(+), 13 deletions(-)
 create mode 120000 srcpkgs/sqlite-replication-bin

diff --git a/srcpkgs/sqlite-replication-bin b/srcpkgs/sqlite-replication-bin
new file mode 120000
index 00000000000..33558ee2d69
--- /dev/null
+++ b/srcpkgs/sqlite-replication-bin
@@ -0,0 +1 @@
+sqlite-replication
\ No newline at end of file
diff --git a/srcpkgs/sqlite-replication/template b/srcpkgs/sqlite-replication/template
index cfd1c7b8c15..cd53b22c5b4 100644
--- a/srcpkgs/sqlite-replication/template
+++ b/srcpkgs/sqlite-replication/template
@@ -1,21 +1,20 @@
 # Template file for 'sqlite-replication'
 pkgname=sqlite-replication
 version=3.30.1
-revision=1
-wrksrc="sqlite-version-${version}-replication3"
+revision=2
+wrksrc="sqlite-version-${version}-replication4"
 build_style=gnu-configure
-configure_args="--enable-replication --enable-threadsafe --enable-dynamic-extensions --enable-fts5"
+configure_args="--enable-replication --enable-threadsafe --enable-fts5
+ --enable-dynamic-extensions"
 hostmakedepends="tcl"
 makedepends="libedit-devel"
 short_desc="Replication Enabled SQL Database Engine in a C Library"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Public Domain"
 homepage="https://github.com/CanonicalLtd/sqlite"
-distfiles="${homepage}/archive/version-${version}+replication3.tar.gz"
-checksum=8a21771c49be73d322611fd54ec547d17e6c3bdee6fd234921ef780894e89eed
-replaces="sqlite>=3.8.11.1_3"
-provides="sqlite-${version}_${revision}"
-shlib_provides="libsqlite3.so"
+distfiles="${homepage}/archive/version-${version}+replication4.tar.gz"
+checksum=e9ab0542396be10e1b2951423f13b3e4d118a18e5d4ef39dc271e7dd17d3910f
+shlib_provides="libsqlite3.so.0"
 
 CFLAGS+="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_JSON1 \
@@ -29,15 +28,43 @@ pre_configure() {
 	sed -i -e 's/ -ltinfo//g' configure
 }
 
+do_configure() {
+	if [ "$XBPS_TARGET_MACHINE" = "i686" ] ; then
+		./configure ${configure_args} \
+			--libdir=/usr/lib32/sqlite-replication
+	else
+		./configure ${configure_args} \
+			--libdir=/usr/lib/sqlite-replication
+	fi
+}
+
+post_install() {
+	if [ "$XBPS_TARGET_MACHINE" = "i686" ] ; then
+		_libdir="usr/lib32"
+	else
+		_libdir="usr/lib"
+	fi
+	vmkdir "${_libdir}/pkgconfig"
+	mv "${DESTDIR}/${_libdir}"{/sqlite-replication,}/pkgconfig/sqlite3.pc
+	# Alpine just deletes the binary, but someone may want it for debugging
+	mv "$DESTDIR"/usr/bin/sqlite3{,.sqlite-replication}
+}
+
 sqlite-replication-devel_package() {
 	depends="sqlite-replication>=${version}_${revision}"
-	replaces="sqlite-devel>=0"
-	provides="sqlite-devel-${version}_${revision}"
+	conflicts="sqlite-devel>=0"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/sqlite-replication/*.a"
+		vmove "usr/lib/sqlite-replication/*.so"
+	}
+}
+
+sqlite-replication-bin_package() {
+	short_desc+=" - cli tool"
+	pkg_install() {
+		vmove usr/bin
 	}
 }

From 104d9c08dd65c2388e7955a4fcc210de915ea506 Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:48:32 -0700
Subject: [PATCH 2/5] New package: libco-20.

---
 common/shlibs          |  1 +
 srcpkgs/libco-devel    |  1 +
 srcpkgs/libco/template | 26 ++++++++++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/libco-devel
 create mode 100644 srcpkgs/libco/template

diff --git a/common/shlibs b/common/shlibs
index 23d0a6a3c8e..da5e5b66f6d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3745,3 +3745,4 @@ libigdgmm.so.11 intel-gmmlib-19.4.1_1
 libgtk-layer-shell.so.0 wf-shell-0.3_1
 librdkafka.so.1 librdkafka-1.3.0_1
 librdkafka++.so.1 librdkafka-1.3.0_1
+libco.so.0 libco-20_1
diff --git a/srcpkgs/libco-devel b/srcpkgs/libco-devel
new file mode 120000
index 00000000000..9cbee396adf
--- /dev/null
+++ b/srcpkgs/libco-devel
@@ -0,0 +1 @@
+libco
\ No newline at end of file
diff --git a/srcpkgs/libco/template b/srcpkgs/libco/template
new file mode 100644
index 00000000000..b17645c6738
--- /dev/null
+++ b/srcpkgs/libco/template
@@ -0,0 +1,26 @@
+# Template file for 'libco'
+pkgname=libco
+version=20
+revision=1
+build_style=gnu-makefile
+short_desc="Cooperative multithreading library written in C89"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+license="ISC"
+homepage="https://github.com/canonical/libco"
+distfiles="https://github.com/canonical/libco/archive/v${version}.tar.gz"
+checksum=6d6d6ada15a36224ee4aa59b8361c4b90f1ffb6c077b4932aa6e6344ee91be0e
+
+post_install() {
+	vlicense LICENSE
+}
+
+libco-devel_package() {
+	depends="${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 f9a1df4e98851a63173686c6408ac3c30acc836e Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:59:54 -0700
Subject: [PATCH 3/5] New package: raft-0.9.16.

---
 common/shlibs         |  1 +
 srcpkgs/raft-devel    |  1 +
 srcpkgs/raft/template | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 120000 srcpkgs/raft-devel
 create mode 100644 srcpkgs/raft/template

diff --git a/common/shlibs b/common/shlibs
index da5e5b66f6d..600a808f005 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3746,3 +3746,4 @@ libgtk-layer-shell.so.0 wf-shell-0.3_1
 librdkafka.so.1 librdkafka-1.3.0_1
 librdkafka++.so.1 librdkafka-1.3.0_1
 libco.so.0 libco-20_1
+libraft.so.0 raft-0.9.16_1
diff --git a/srcpkgs/raft-devel b/srcpkgs/raft-devel
new file mode 120000
index 00000000000..d96c908578a
--- /dev/null
+++ b/srcpkgs/raft-devel
@@ -0,0 +1 @@
+raft
\ No newline at end of file
diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template
new file mode 100644
index 00000000000..1118fa774ec
--- /dev/null
+++ b/srcpkgs/raft/template
@@ -0,0 +1,33 @@
+# Template file for 'raft'
+pkgname=raft
+version=0.9.16
+revision=1
+build_style=gnu-configure
+configure_args="--enable-example=no"
+hostmakedepends="pkg-config autoconf automake libtool"
+makedepends="libuv-devel"
+short_desc="C implementation of the Raft consensus protocol"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+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=b4c4ac15dd74a4c2bbe86149cb5fc1b937979a62e97439615175e3e218fac512
+
+pre_configure() {
+	autoreconf -i
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+raft-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 7d63f8851a206dc366bd2cf7440d2444c6edf94f Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Mon, 19 Aug 2019 20:58:39 -0700
Subject: [PATCH 4/5] dqlite: update to 1.3.1.

---
 srcpkgs/dqlite/template | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
index b11c2e93bd9..6c2d29eac7d 100644
--- a/srcpkgs/dqlite/template
+++ b/srcpkgs/dqlite/template
@@ -1,24 +1,31 @@
 # Template file for 'dqlite'
 pkgname=dqlite
-version=0.2.6
+version=1.3.1
 revision=1
 build_style=gnu-configure
-hostmakedepends="pkg-config autoconf automake libtool"
-makedepends="libuv-devel sqlite-replication-devel"
+hostmakedepends="pkg-config automake libtool"
+makedepends="sqlite-replication-devel raft-devel libco-devel"
 depends="sqlite-replication"
 short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
-license="Apache-2.0"
-homepage="https://github.com/CanonicalLtd/dqlite"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
+license="custom:LGPL-3.0-only-linking-exception"
+homepage="https://github.com/canonical/dqlite"
 distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=47d31550d970a12d25101c331896cfb855128c110d912f5da3371062d9ece52b
+checksum=45c47a5dfc8689640fba50cfa3a204e1e0807cab565faf74da5ac7ebb89b0dba
+
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+LDFLAGS="-L${_libdir} -Wl,-R${_libdir}"
 
 pre_configure() {
 	autoreconf -i
 }
 
+post_install() {
+	vlicense LICENSE
+}
+
 dqlite-devel_package() {
-	depends="sqlite-replication-devel dqlite>=${version}_${revision}"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include

From 09142bde1aa0856dfcdd303cca0d4a104abb97ab Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Thu, 12 Sep 2019 22:57:04 -0700
Subject: [PATCH 5/5] lxd: update to 3.19.

---
 srcpkgs/lxd/files/lxd/run         |  4 +++
 srcpkgs/lxd/patches/seccomp.patch | 41 -------------------------------
 srcpkgs/lxd/template              | 24 ++++++------------
 3 files changed, 12 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/lxd/patches/seccomp.patch

diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
index 147eb64e74d..c03a2c0d766 100755
--- a/srcpkgs/lxd/files/lxd/run
+++ b/srcpkgs/lxd/files/lxd/run
@@ -6,4 +6,8 @@ fi
 if ! mountpoint -q "${_systemd_cgrp}"; then
 	mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp}
 fi
+# workaround lxc bug -- next release of lxc should obsolete this
+if [ -e /sys/fs/cgroup/cpuset/cgroup.clone_children ]; then
+	echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children 2>/dev/null || :
+fi
 exec lxd --group lxd 2>&1
diff --git a/srcpkgs/lxd/patches/seccomp.patch b/srcpkgs/lxd/patches/seccomp.patch
deleted file mode 100644
index e7b52a31931..00000000000
--- a/srcpkgs/lxd/patches/seccomp.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-lxc/lxd@a181ed4 [PATCH] seccomp: define __NR_mknod if missing
-lxc/lxd@c655ed5 [PATCH] seccomp: rework missing syscall number definitions
----
- lxd/seccomp.go | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/lxd/seccomp.go b/lxd/seccomp.go
-index 0afad7cacc..32397b9729 100644
---- lxd/seccomp.go
-+++ lxd/seccomp.go
-@@ -109,6 +109,14 @@
- 	return -EPERM;
- }
-
-+#ifndef __NR_mknodat
-+	#error missing kernel headers
-+#else
-+	#ifdef __NR_mknod
-+		#define LXD_MUST_CHECK_MKNOD
-+ 	#endif
-+#endif
-+
- static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg,
- 					     char *buf, size_t size,
- 					     mode_t *mode, dev_t *dev,
-@@ -124,6 +132,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-	resp->val = 0;
-
-	switch (req->data.nr) {
-+#ifdef LXD_MUST_CHECK_MKNOD
-	case __NR_mknod:
-		resp->error = device_allowed(req->data.args[2], req->data.args[1]);
-		if (resp->error) {
-@@ -143,6 +149,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-		*pid = req->pid;
-
-		break;
-+#endif
-	case __NR_mknodat:
-		if (req->data.args[0] != AT_FDCWD) {
-			errno = EINVAL;
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
index 2a9cf44d88d..3e1d972e508 100644
--- a/srcpkgs/lxd/template
+++ b/srcpkgs/lxd/template
@@ -1,37 +1,29 @@
 # Template file for 'lxd'
 pkgname=lxd
-version=3.14
+version=3.19
 revision=1
 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}/lxd-p2c ${go_import_path}/fuidshift"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config git"
 makedepends="lxc-devel acl-devel dqlite-devel"
 depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
 short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Apache-2.0"
 homepage="https://linuxcontainers.org/lxd"
 distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz"
-checksum=409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
+checksum=afc0b0912e5fa977007cfd97805849a3a47564eaaaa1638948081665ad7224c8
 system_groups="lxd"
 
-do_configure() {
-	# the LXD tarball packages up the required dependencies
-	ln -s "$wrksrc/dist" "$GOPATH"
-}
-
-do_build() {
-	# don't go-get the dependencies, just install with what's there
-	cd "$GOSRCPATH"
-	go_package=${go_package:-$go_import_path}
-	go install -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
-}
+_libdir="${XBPS_CROSS_BASE}/usr/lib/sqlite-replication"
+LDFLAGS="-L${_libdir} -Wl,-R${_libdir}"
+# whitelist libcap LDFLAGS (see: https://github.com/lxc/lxd/issues/6727)
+export CGO_LDFLAGS_ALLOW='-Wl,-wrap,pthread_create'
 
 post_install() {
 	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vlicense COPYING LICENSE
 	vsv lxd
 }

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (2 preceding siblings ...)
  2020-01-27  6:00 ` voidlinux-github
@ 2020-01-27  6:18 ` voidlinux-github
  2020-01-27  8:27 ` voidlinux-github
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  6:18 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578606304

Comment:
@fosslinux I updated the template in a different way to handle lib32

@Duncaen I assume you are interested in the sqlite-replication portion of this PR

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (3 preceding siblings ...)
  2020-01-27  6:18 ` LXD: update to 3.19, make sqlite-replication not conflict with sqlite voidlinux-github
@ 2020-01-27  8:27 ` voidlinux-github
  2020-01-27  8:28 ` voidlinux-github
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  8:27 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578640778

Comment:
@CameronNemo I get `lxd: symbol lookup error: /usr/lib/libdqlite.so.0: undefined symbol: sqlite3_wal_replication_unregister` trying to run this on my pi.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (4 preceding siblings ...)
  2020-01-27  8:27 ` voidlinux-github
@ 2020-01-27  8:28 ` voidlinux-github
  2020-01-27  8:35 ` voidlinux-github
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  8:28 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578640778

Comment:
@CameronNemo I get `lxd: symbol lookup error: /usr/lib/libdqlite.so.0: undefined symbol: sqlite3_wal_replication_unregister` trying to run this on my pi and desktop.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (5 preceding siblings ...)
  2020-01-27  8:28 ` voidlinux-github
@ 2020-01-27  8:35 ` voidlinux-github
  2020-01-27  8:51 ` voidlinux-github
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  8:35 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578640778

Comment:
@CameronNemo I get `lxd: symbol lookup error: /usr/lib/libdqlite.so.0: undefined symbol: sqlite3_wal_replication_unregister` trying to run this on my pi (armv7l), but cannot reproduce on x86_64.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (6 preceding siblings ...)
  2020-01-27  8:35 ` voidlinux-github
@ 2020-01-27  8:51 ` voidlinux-github
  2020-01-27  8:51 ` voidlinux-github
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  8:51 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578640778

Comment:
@CameronNemo I get `lxd: symbol lookup error: /usr/lib/libdqlite.so.0: undefined symbol: sqlite3_wal_replication_unregister` trying to run this on my pi (armv7l), but cannot reproduce on x86_64. However I also get this error on my x86_64-musl device.. I think we have a cross-compiling issue.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (7 preceding siblings ...)
  2020-01-27  8:51 ` voidlinux-github
@ 2020-01-27  8:51 ` voidlinux-github
  2020-01-27 20:47 ` voidlinux-github
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27  8:51 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578640778

Comment:
@CameronNemo I get `lxd: symbol lookup error: /usr/lib/libdqlite.so.0: undefined symbol: sqlite3_wal_replication_unregister` trying to run this on my pi (armv7l), but cannot reproduce on x86_64. However I also get this error on my x86_64-musl device.. I think we have a cross-compiling issue.

The changes look great.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (8 preceding siblings ...)
  2020-01-27  8:51 ` voidlinux-github
@ 2020-01-27 20:47 ` voidlinux-github
  2020-01-27 20:50 ` voidlinux-github
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27 20:47 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578945047

Comment:
Ah, I think I see the problem. In the masterdir it links against `/usr/armv7l-linux-gnueabihf/usr/lib/sqlite-replication`, however in the resulting system it's need to be linked to `/usr/lib/sqlite-replication`. For armv7l for example. I'm unsure how to fix this...

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (9 preceding siblings ...)
  2020-01-27 20:47 ` voidlinux-github
@ 2020-01-27 20:50 ` voidlinux-github
  2020-01-28  4:36 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-27 20:50 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-578946351

Comment:
Actually, maybe not.

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

* Re: [PR PATCH] [Updated] LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (10 preceding siblings ...)
  2020-01-27 20:50 ` voidlinux-github
@ 2020-01-28  4:36 ` voidlinux-github
  2020-01-28  4:36 ` voidlinux-github
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-28  4:36 UTC (permalink / raw)
  To: ml

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

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

https://github.com/CameronNemo/void-packages lxd-sqlite-replication-no-conflict
https://github.com/void-linux/void-packages/pull/18327

LXD: update to 3.19, make sqlite-replication not conflict with sqlite
Fixes #18310 (but no commit blurb, whoops)

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-lxd-sqlite-replication-no-conflict-18327.patch --]
[-- Type: text/x-diff, Size: 13335 bytes --]

From 526960777e51ebc923bf5a0fa973122dc6a87a31 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Sat, 16 Nov 2019 12:27:14 -0800
Subject: [PATCH 1/5] sqlite-replication: do not conflict with sqlite.

---
 srcpkgs/sqlite-replication-bin      |  1 +
 srcpkgs/sqlite-replication/template | 53 ++++++++++++++++++++++-------
 2 files changed, 41 insertions(+), 13 deletions(-)
 create mode 120000 srcpkgs/sqlite-replication-bin

diff --git a/srcpkgs/sqlite-replication-bin b/srcpkgs/sqlite-replication-bin
new file mode 120000
index 00000000000..33558ee2d69
--- /dev/null
+++ b/srcpkgs/sqlite-replication-bin
@@ -0,0 +1 @@
+sqlite-replication
\ No newline at end of file
diff --git a/srcpkgs/sqlite-replication/template b/srcpkgs/sqlite-replication/template
index cfd1c7b8c15..cd53b22c5b4 100644
--- a/srcpkgs/sqlite-replication/template
+++ b/srcpkgs/sqlite-replication/template
@@ -1,21 +1,20 @@
 # Template file for 'sqlite-replication'
 pkgname=sqlite-replication
 version=3.30.1
-revision=1
-wrksrc="sqlite-version-${version}-replication3"
+revision=2
+wrksrc="sqlite-version-${version}-replication4"
 build_style=gnu-configure
-configure_args="--enable-replication --enable-threadsafe --enable-dynamic-extensions --enable-fts5"
+configure_args="--enable-replication --enable-threadsafe --enable-fts5
+ --enable-dynamic-extensions"
 hostmakedepends="tcl"
 makedepends="libedit-devel"
 short_desc="Replication Enabled SQL Database Engine in a C Library"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Public Domain"
 homepage="https://github.com/CanonicalLtd/sqlite"
-distfiles="${homepage}/archive/version-${version}+replication3.tar.gz"
-checksum=8a21771c49be73d322611fd54ec547d17e6c3bdee6fd234921ef780894e89eed
-replaces="sqlite>=3.8.11.1_3"
-provides="sqlite-${version}_${revision}"
-shlib_provides="libsqlite3.so"
+distfiles="${homepage}/archive/version-${version}+replication4.tar.gz"
+checksum=e9ab0542396be10e1b2951423f13b3e4d118a18e5d4ef39dc271e7dd17d3910f
+shlib_provides="libsqlite3.so.0"
 
 CFLAGS+="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_JSON1 \
@@ -29,15 +28,43 @@ pre_configure() {
 	sed -i -e 's/ -ltinfo//g' configure
 }
 
+do_configure() {
+	if [ "$XBPS_TARGET_MACHINE" = "i686" ] ; then
+		./configure ${configure_args} \
+			--libdir=/usr/lib32/sqlite-replication
+	else
+		./configure ${configure_args} \
+			--libdir=/usr/lib/sqlite-replication
+	fi
+}
+
+post_install() {
+	if [ "$XBPS_TARGET_MACHINE" = "i686" ] ; then
+		_libdir="usr/lib32"
+	else
+		_libdir="usr/lib"
+	fi
+	vmkdir "${_libdir}/pkgconfig"
+	mv "${DESTDIR}/${_libdir}"{/sqlite-replication,}/pkgconfig/sqlite3.pc
+	# Alpine just deletes the binary, but someone may want it for debugging
+	mv "$DESTDIR"/usr/bin/sqlite3{,.sqlite-replication}
+}
+
 sqlite-replication-devel_package() {
 	depends="sqlite-replication>=${version}_${revision}"
-	replaces="sqlite-devel>=0"
-	provides="sqlite-devel-${version}_${revision}"
+	conflicts="sqlite-devel>=0"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
-		vmove "usr/lib/*.a"
-		vmove "usr/lib/*.so"
+		vmove "usr/lib/sqlite-replication/*.a"
+		vmove "usr/lib/sqlite-replication/*.so"
+	}
+}
+
+sqlite-replication-bin_package() {
+	short_desc+=" - cli tool"
+	pkg_install() {
+		vmove usr/bin
 	}
 }

From ef16fc0ce4c3a4f535f0065c4f4b9a686ca3e14b Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:48:32 -0700
Subject: [PATCH 2/5] New package: libco-20.

---
 common/shlibs          |  1 +
 srcpkgs/libco-devel    |  1 +
 srcpkgs/libco/template | 26 ++++++++++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/libco-devel
 create mode 100644 srcpkgs/libco/template

diff --git a/common/shlibs b/common/shlibs
index 23d0a6a3c8e..da5e5b66f6d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3745,3 +3745,4 @@ libigdgmm.so.11 intel-gmmlib-19.4.1_1
 libgtk-layer-shell.so.0 wf-shell-0.3_1
 librdkafka.so.1 librdkafka-1.3.0_1
 librdkafka++.so.1 librdkafka-1.3.0_1
+libco.so.0 libco-20_1
diff --git a/srcpkgs/libco-devel b/srcpkgs/libco-devel
new file mode 120000
index 00000000000..9cbee396adf
--- /dev/null
+++ b/srcpkgs/libco-devel
@@ -0,0 +1 @@
+libco
\ No newline at end of file
diff --git a/srcpkgs/libco/template b/srcpkgs/libco/template
new file mode 100644
index 00000000000..b17645c6738
--- /dev/null
+++ b/srcpkgs/libco/template
@@ -0,0 +1,26 @@
+# Template file for 'libco'
+pkgname=libco
+version=20
+revision=1
+build_style=gnu-makefile
+short_desc="Cooperative multithreading library written in C89"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+license="ISC"
+homepage="https://github.com/canonical/libco"
+distfiles="https://github.com/canonical/libco/archive/v${version}.tar.gz"
+checksum=6d6d6ada15a36224ee4aa59b8361c4b90f1ffb6c077b4932aa6e6344ee91be0e
+
+post_install() {
+	vlicense LICENSE
+}
+
+libco-devel_package() {
+	depends="${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 033219b02bbd50a6f38a68827c91e31443222d6d Mon Sep 17 00:00:00 2001
From: Julio Galvan <julio@epazote.net>
Date: Tue, 16 Jul 2019 16:59:54 -0700
Subject: [PATCH 3/5] New package: raft-0.9.16.

---
 common/shlibs         |  1 +
 srcpkgs/raft-devel    |  1 +
 srcpkgs/raft/template | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)
 create mode 120000 srcpkgs/raft-devel
 create mode 100644 srcpkgs/raft/template

diff --git a/common/shlibs b/common/shlibs
index da5e5b66f6d..600a808f005 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3746,3 +3746,4 @@ libgtk-layer-shell.so.0 wf-shell-0.3_1
 librdkafka.so.1 librdkafka-1.3.0_1
 librdkafka++.so.1 librdkafka-1.3.0_1
 libco.so.0 libco-20_1
+libraft.so.0 raft-0.9.16_1
diff --git a/srcpkgs/raft-devel b/srcpkgs/raft-devel
new file mode 120000
index 00000000000..d96c908578a
--- /dev/null
+++ b/srcpkgs/raft-devel
@@ -0,0 +1 @@
+raft
\ No newline at end of file
diff --git a/srcpkgs/raft/template b/srcpkgs/raft/template
new file mode 100644
index 00000000000..1118fa774ec
--- /dev/null
+++ b/srcpkgs/raft/template
@@ -0,0 +1,33 @@
+# Template file for 'raft'
+pkgname=raft
+version=0.9.16
+revision=1
+build_style=gnu-configure
+configure_args="--enable-example=no"
+hostmakedepends="pkg-config autoconf automake libtool"
+makedepends="libuv-devel"
+short_desc="C implementation of the Raft consensus protocol"
+maintainer="Julio Galvan <juliogalvan@protonmail.com>"
+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=b4c4ac15dd74a4c2bbe86149cb5fc1b937979a62e97439615175e3e218fac512
+
+pre_configure() {
+	autoreconf -i
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+raft-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 213e5f0c898281f0b9e80f3db77d95541197b568 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Mon, 19 Aug 2019 20:58:39 -0700
Subject: [PATCH 4/5] dqlite: update to 1.3.1.

---
 srcpkgs/dqlite/template | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/dqlite/template b/srcpkgs/dqlite/template
index b11c2e93bd9..fa722256c71 100644
--- a/srcpkgs/dqlite/template
+++ b/srcpkgs/dqlite/template
@@ -1,24 +1,31 @@
 # Template file for 'dqlite'
 pkgname=dqlite
-version=0.2.6
+version=1.3.1
 revision=1
 build_style=gnu-configure
-hostmakedepends="pkg-config autoconf automake libtool"
-makedepends="libuv-devel sqlite-replication-devel"
+hostmakedepends="pkg-config automake libtool"
+makedepends="sqlite-replication-devel raft-devel libco-devel"
 depends="sqlite-replication"
 short_desc="Distributed SQLite database using the Raft algorithm"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
-license="Apache-2.0"
-homepage="https://github.com/CanonicalLtd/dqlite"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
+license="custom:LGPL-3.0-only-linking-exception"
+homepage="https://github.com/canonical/dqlite"
 distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=47d31550d970a12d25101c331896cfb855128c110d912f5da3371062d9ece52b
+checksum=45c47a5dfc8689640fba50cfa3a204e1e0807cab565faf74da5ac7ebb89b0dba
+
+_libdir="/usr/lib/sqlite-replication"
+LDFLAGS="-L${XBPS_CROSS_BASE}${_libdir} -Wl,-R${_libdir}"
 
 pre_configure() {
 	autoreconf -i
 }
 
+post_install() {
+	vlicense LICENSE
+}
+
 dqlite-devel_package() {
-	depends="sqlite-replication-devel dqlite>=${version}_${revision}"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include

From 77ac8fe1f3117d3ebea0caf6ee2b2f907be3bb57 Mon Sep 17 00:00:00 2001
From: Cameron Nemo <cnemo@tutanota.com>
Date: Thu, 12 Sep 2019 22:57:04 -0700
Subject: [PATCH 5/5] lxd: update to 3.19.

---
 srcpkgs/lxd/files/lxd/run         |  4 +++
 srcpkgs/lxd/patches/seccomp.patch | 41 -------------------------------
 srcpkgs/lxd/template              | 24 ++++++------------
 3 files changed, 12 insertions(+), 57 deletions(-)
 delete mode 100644 srcpkgs/lxd/patches/seccomp.patch

diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run
index 147eb64e74d..c03a2c0d766 100755
--- a/srcpkgs/lxd/files/lxd/run
+++ b/srcpkgs/lxd/files/lxd/run
@@ -6,4 +6,8 @@ fi
 if ! mountpoint -q "${_systemd_cgrp}"; then
 	mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp}
 fi
+# workaround lxc bug -- next release of lxc should obsolete this
+if [ -e /sys/fs/cgroup/cpuset/cgroup.clone_children ]; then
+	echo 1 > /sys/fs/cgroup/cpuset/cgroup.clone_children 2>/dev/null || :
+fi
 exec lxd --group lxd 2>&1
diff --git a/srcpkgs/lxd/patches/seccomp.patch b/srcpkgs/lxd/patches/seccomp.patch
deleted file mode 100644
index e7b52a31931..00000000000
--- a/srcpkgs/lxd/patches/seccomp.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-lxc/lxd@a181ed4 [PATCH] seccomp: define __NR_mknod if missing
-lxc/lxd@c655ed5 [PATCH] seccomp: rework missing syscall number definitions
----
- lxd/seccomp.go | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/lxd/seccomp.go b/lxd/seccomp.go
-index 0afad7cacc..32397b9729 100644
---- lxd/seccomp.go
-+++ lxd/seccomp.go
-@@ -109,6 +109,14 @@
- 	return -EPERM;
- }
-
-+#ifndef __NR_mknodat
-+	#error missing kernel headers
-+#else
-+	#ifdef __NR_mknod
-+		#define LXD_MUST_CHECK_MKNOD
-+ 	#endif
-+#endif
-+
- static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_proxy_msg *msg,
- 					     char *buf, size_t size,
- 					     mode_t *mode, dev_t *dev,
-@@ -124,6 +132,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-	resp->val = 0;
-
-	switch (req->data.nr) {
-+#ifdef LXD_MUST_CHECK_MKNOD
-	case __NR_mknod:
-		resp->error = device_allowed(req->data.args[2], req->data.args[1]);
-		if (resp->error) {
-@@ -143,6 +149,7 @@ static int seccomp_notify_mknod_set_response(int fd_mem, struct seccomp_notify_p
-		*pid = req->pid;
-
-		break;
-+#endif
-	case __NR_mknodat:
-		if (req->data.args[0] != AT_FDCWD) {
-			errno = EINVAL;
diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template
index 2a9cf44d88d..626df9c3f4a 100644
--- a/srcpkgs/lxd/template
+++ b/srcpkgs/lxd/template
@@ -1,37 +1,29 @@
 # Template file for 'lxd'
 pkgname=lxd
-version=3.14
+version=3.19
 revision=1
 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}/lxd-p2c ${go_import_path}/fuidshift"
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config git"
 makedepends="lxc-devel acl-devel dqlite-devel"
 depends="lxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables"
 short_desc="Next generation system container manager"
-maintainer="Cameron Nemo <camerontnorman@gmail.com>"
+maintainer="Cameron Nemo <cnemo@tutanota.com>"
 license="Apache-2.0"
 homepage="https://linuxcontainers.org/lxd"
 distfiles="https://linuxcontainers.org/downloads/lxd/lxd-${version}.tar.gz"
-checksum=409e4758cbeb43b098d0265c4ce05aeeac5ae73f8914ceb1006e6a6d89fe1fe5
+checksum=afc0b0912e5fa977007cfd97805849a3a47564eaaaa1638948081665ad7224c8
 system_groups="lxd"
 
-do_configure() {
-	# the LXD tarball packages up the required dependencies
-	ln -s "$wrksrc/dist" "$GOPATH"
-}
-
-do_build() {
-	# don't go-get the dependencies, just install with what's there
-	cd "$GOSRCPATH"
-	go_package=${go_package:-$go_import_path}
-	go install -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
-}
+_libdir="/usr/lib/sqlite-replication"
+LDFLAGS="-L${XBPS_CROSS_BASE}${_libdir} -Wl,-R${_libdir}"
+# whitelist libcap LDFLAGS (see: https://github.com/lxc/lxd/issues/6727)
+export CGO_LDFLAGS_ALLOW='-Wl,-wrap,pthread_create'
 
 post_install() {
 	vinstall scripts/bash/lxd-client 644 /usr/share/bash-completion/completions lxd
-	vlicense COPYING LICENSE
 	vsv lxd
 }

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (11 preceding siblings ...)
  2020-01-28  4:36 ` [PR PATCH] [Updated] " voidlinux-github
@ 2020-01-28  4:36 ` voidlinux-github
  2020-01-30  7:19 ` [PR PATCH] [Merged]: " voidlinux-github
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-28  4:36 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-579076291

Comment:
I addressed that in the most recent push. Thanks for pointing it out.

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

* Re: [PR PATCH] [Merged]: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (12 preceding siblings ...)
  2020-01-28  4:36 ` voidlinux-github
@ 2020-01-30  7:19 ` voidlinux-github
  2020-01-30  7:39 ` voidlinux-github
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-30  7:19 UTC (permalink / raw)
  To: ml

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

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

LXD: update to 3.19, make sqlite-replication not conflict with sqlite
https://github.com/void-linux/void-packages/pull/18327

Description:
Fixes #18310 (but no commit blurb, whoops)

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (13 preceding siblings ...)
  2020-01-30  7:19 ` [PR PATCH] [Merged]: " voidlinux-github
@ 2020-01-30  7:39 ` voidlinux-github
  2020-02-02 17:20 ` voidlinux-github
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-01-30  7:39 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-580123285

Comment:
hoorayy~~!

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (14 preceding siblings ...)
  2020-01-30  7:39 ` voidlinux-github
@ 2020-02-02 17:20 ` voidlinux-github
  2020-02-02 19:51 ` voidlinux-github
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-02-02 17:20 UTC (permalink / raw)
  To: ml

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

New comment by ernierasta on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-581156934

Comment:
Hi, first, for great work, but I still have the problem, up-to-date void x86_64.

``` bash
lxd: symbol lookup error: /usr/lib/libdqlite.so.0: undefined symbol: sqlite3_wal_replication_unregister
```
**dqlite-1.3.1_1**
**sqlite-replication-3.30.1_2**
**lxd-3.14_1**

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (15 preceding siblings ...)
  2020-02-02 17:20 ` voidlinux-github
@ 2020-02-02 19:51 ` voidlinux-github
  2020-02-02 20:27 ` voidlinux-github
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-02-02 19:51 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-581170341

Comment:
Hi,

Your issue is that you have mismatched versions of packages, AFAICT. The lxd version you should be using is 3.19.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (16 preceding siblings ...)
  2020-02-02 19:51 ` voidlinux-github
@ 2020-02-02 20:27 ` voidlinux-github
  2020-02-03  2:46 ` voidlinux-github
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-02-02 20:27 UTC (permalink / raw)
  To: ml

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

New comment by ernierasta on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-581173661

Comment:
Thank you @fosslinux! You are right. Probably we are waiting for workers to finish building or my mirror is a bit late. I will wait longer.

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (17 preceding siblings ...)
  2020-02-02 20:27 ` voidlinux-github
@ 2020-02-03  2:46 ` voidlinux-github
  2020-02-03  2:52 ` voidlinux-github
  2020-02-03  6:59 ` voidlinux-github
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-02-03  2:46 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-581215089

Comment:
@ernierasta LXD 3.19 has been built for a while. Does it not prompt you to upgrade with a normal update? What do the following command tell you?

* `xbps-query -R lxd`
* `xbps-query lxd`
* `xbps-query -H`

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (18 preceding siblings ...)
  2020-02-03  2:46 ` voidlinux-github
@ 2020-02-03  2:52 ` voidlinux-github
  2020-02-03  6:59 ` voidlinux-github
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-02-03  2:52 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-581215901

Comment:
Actually that is my bad... looks like the build failed. https://build.voidlinux.org/builders/x86_64_builder/builds/22710/steps/shell_3/logs/stdio

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

* Re: LXD: update to 3.19, make sqlite-replication not conflict with sqlite
  2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
                   ` (19 preceding siblings ...)
  2020-02-03  2:52 ` voidlinux-github
@ 2020-02-03  6:59 ` voidlinux-github
  20 siblings, 0 replies; 22+ messages in thread
From: voidlinux-github @ 2020-02-03  6:59 UTC (permalink / raw)
  To: ml

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

New comment by CameronNemo on void-packages repository

https://github.com/void-linux/void-packages/pull/18327#issuecomment-581267114

Comment:
Fixed, it seems: https://github.com/void-linux/void-packages/pull/18750

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

end of thread, other threads:[~2020-02-03  6:59 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 10:07 [PR PATCH] Lxd sqlite replication no conflict voidlinux-github
2020-01-19 19:18 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-19 19:21 ` voidlinux-github
2020-01-27  6:00 ` voidlinux-github
2020-01-27  6:18 ` LXD: update to 3.19, make sqlite-replication not conflict with sqlite voidlinux-github
2020-01-27  8:27 ` voidlinux-github
2020-01-27  8:28 ` voidlinux-github
2020-01-27  8:35 ` voidlinux-github
2020-01-27  8:51 ` voidlinux-github
2020-01-27  8:51 ` voidlinux-github
2020-01-27 20:47 ` voidlinux-github
2020-01-27 20:50 ` voidlinux-github
2020-01-28  4:36 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-28  4:36 ` voidlinux-github
2020-01-30  7:19 ` [PR PATCH] [Merged]: " voidlinux-github
2020-01-30  7:39 ` voidlinux-github
2020-02-02 17:20 ` voidlinux-github
2020-02-02 19:51 ` voidlinux-github
2020-02-02 20:27 ` voidlinux-github
2020-02-03  2:46 ` voidlinux-github
2020-02-03  2:52 ` voidlinux-github
2020-02-03  6:59 ` voidlinux-github

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).