From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Lxd sqlite replication no conflict
Date: Thu, 16 Jan 2020 11:07:24 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18327@inbox.vuxu.org> (raw)
[-- 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
}
next reply other threads:[~2020-01-16 10:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 10:07 voidlinux-github [this message]
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
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18327@inbox.vuxu.org \
--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).