Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Lxd sqlite replication no conflict
Date: Sun, 19 Jan 2020 20:21:21 +0100	[thread overview]
Message-ID: <20200119192121.zn2_9luvp25K_csAQpYJxyBJ83j4JLR9PxbSkG0PFnw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18327@inbox.vuxu.org>

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

  parent reply	other threads:[~2020-01-19 19:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 10:07 [PR PATCH] " voidlinux-github
2020-01-19 19:18 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-19 19:21 ` voidlinux-github [this message]
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

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=20200119192121.zn2_9luvp25K_csAQpYJxyBJ83j4JLR9PxbSkG0PFnw@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --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).