From: andry-dev <andry-dev@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] Samba: add clustering functionality.
Date: Sun, 20 Dec 2020 15:25:44 +0100 [thread overview]
Message-ID: <20201220142544.m6NOQfIi_vLGIMOzi7GNpigcoKc3INzMCy4jhwlLHT0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27300@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]
There is an updated pull request by andry-dev against master on the void-packages repository
https://github.com/andry-dev/void-packages samba-gluster
https://github.com/void-linux/void-packages/pull/27300
Samba: add clustering functionality.
I waited for Samba 4.X to get merged to create this PR. I didn't want to interfere with the original one because it was pretty important.
This PR enables the cluster module (`ctdb`) and the GlusterFS VFS:
- The GlusterFS VFS (`/usr/lib/samba/glusterfs_vfs.so`) is needed to improve I/O performance with GlusterFS volumes. This is enabled automatically if `waf` can find the Gluster libraries, so to make it work it's only needed to add `glusterfs-devel` in the `makedepends` for `samba` and that's it.
- The `ctdb` module is needed to keep track of TDB across various nodes in a cluster, so that a share can be exposed as a single IP and resume operations in case of node failures. This is generally used in conjunction with Gluster, Ceph or other distributed filesystems.
Enabling both modules doesn't break existing users since these features are opt-in: for the Gluster VFS you specifically need to enable it in a share definition (see [vfs_glusterfs(8)](https://www.samba.org/samba/docs/current/man-html/vfs_glusterfs.8.html)); for `ctdb` you need to enable and configure the daemon `ctdbd`.
EDIT: So it seems that `glusterfs` doesn't work on `-musl`, can I enable it only for `glibc` builds?
A patch file from https://github.com/void-linux/void-packages/pull/27300.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-samba-gluster-27300.patch --]
[-- Type: text/x-diff, Size: 5138 bytes --]
From 365cd7b94f26545b99c746427f688aea032aef7a Mon Sep 17 00:00:00 2001
From: andry-dev <andry-dev@users.noreply.github.com>
Date: Sun, 20 Dec 2020 14:20:36 +0100
Subject: [PATCH] Samba: add clustering functionality.
---
common/shlibs | 5 +++
srcpkgs/ctdb | 1 +
srcpkgs/samba/files/ctdbd/log/run | 2 +
srcpkgs/samba/files/ctdbd/run | 2 +
| 14 +++++++
srcpkgs/samba/template | 46 ++++++++++++++++++++-
6 files changed, 69 insertions(+), 1 deletion(-)
create mode 120000 srcpkgs/ctdb
create mode 100644 srcpkgs/samba/files/ctdbd/log/run
create mode 100644 srcpkgs/samba/files/ctdbd/run
diff --git a/common/shlibs b/common/shlibs
index e1e2291d5f7..bfc023a859b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4018,6 +4018,10 @@ libsmbd-base-samba4.so samba-4.13.2_1
libsmbd-conn-samba4.so samba-4.13.2_1
libsmbpasswdparser-samba4.so samba-4.13.2_1
libxattr-tdb-samba4.so samba-4.13.2_1
+libtorture-samba4.so samba-4.13.2_1
+libsmbldaphelper-samba4.so samba-4.13.2_1
+libidmap-samba4.so samba-4.13.2_1
+libnss-info-samba4.so samba-4.13.2_1
libcli-ldap-samba4.so samba-libs-4.13.2_1
libcliauth-samba4.so samba-libs-4.13.2_1
libcluster-samba4.so samba-libs-4.13.2_1
@@ -4049,3 +4053,4 @@ libtdb-wrap-samba4.so samba-libs-4.13.2_1
libutil-cmdline-samba4.so samba-libs-4.13.2_1
libwbclient.so.0 samba-libs-4.13.2_1
libwinbind-client-samba4.so samba-libs-4.13.2_1
+libctdb-event-client-samba4.so ctdb-4.13.2_1
diff --git a/srcpkgs/ctdb b/srcpkgs/ctdb
new file mode 120000
index 00000000000..cba1f39180b
--- /dev/null
+++ b/srcpkgs/ctdb
@@ -0,0 +1 @@
+samba
\ No newline at end of file
diff --git a/srcpkgs/samba/files/ctdbd/log/run b/srcpkgs/samba/files/ctdbd/log/run
new file mode 100644
index 00000000000..7b12895c740
--- /dev/null
+++ b/srcpkgs/samba/files/ctdbd/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -p daemon.notice -t ctdbd
diff --git a/srcpkgs/samba/files/ctdbd/run b/srcpkgs/samba/files/ctdbd/run
new file mode 100644
index 00000000000..f93d43eb862
--- /dev/null
+++ b/srcpkgs/samba/files/ctdbd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec ctdbd -i
--git a/srcpkgs/samba/patches/missing-headers.patch b/srcpkgs/samba/patches/missing-headers.patch
index 44a5418e0bd..a91db73b758 100644
--- a/srcpkgs/samba/patches/missing-headers.patch
+++ b/srcpkgs/samba/patches/missing-headers.patch
@@ -36,3 +36,17 @@ index 2cd6122..0c84ec2 100644
#include "torture/torture.h"
#include "torture/local/proto.h"
+
+diff --git ctdb/tests/src/protocol_util_test.c ctdb/tests/src/protocol_util_test.c
+index edd2a34..48ce96e 100644
+--- ctdb/tests/src/protocol_util_test.c
++++ ctdb/tests/src/protocol_util_test.c
+@@ -20,6 +20,7 @@
+ #include "replace.h"
+ #include "system/network.h"
+
++#include <unistd.h>
+ #include <assert.h>
+
+ #include "protocol/protocol_basic.c"
+
diff --git a/srcpkgs/samba/template b/srcpkgs/samba/template
index b0612faddc6..69dcbd46de8 100644
--- a/srcpkgs/samba/template
+++ b/srcpkgs/samba/template
@@ -1,7 +1,7 @@
# Template file for 'samba'
pkgname=samba
version=4.13.2
-revision=1
+revision=2
build_style=waf3
build_helper="qemu"
configure_script="buildtools/bin/waf"
@@ -14,6 +14,7 @@ configure_args="--enable-fhs --sbindir=/usr/bin --localstatedir=/var
--with-modulesdir=/usr/lib/samba --disable-rpath --disable-rpath-install
--without-systemd --without-gettext --bundled-libraries=NONE
--with-system-mitkrb5 --without-ad-dc
+ --with-cluster-support
--with-shared-modules=${_idmap_modules},${_pdb_modules},${_auth_modules}"
hostmakedepends="pkg-config perl-Parse-Yapp rpcsvc-proto docbook2x
libtasn1-tools tdb-python3 tevent-python3 talloc-python3"
@@ -33,6 +34,10 @@ make_dirs="/etc/samba/private 0750 root root"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
+else
+ # glusterfs is not supported with musl
+ # The VFS can only be built with glibc
+ makedepends+=" glusterfs-devel"
fi
# By default, samba wants to install a bunch of private "*-samba4.so" shared
@@ -125,6 +130,45 @@ smbclient_package() {
}
}
+ctdb_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - Clustered TDB support"
+ pkg_install() {
+ _tools="ctdb ctdbd ctdbd_wrapper ctdb_diagnostics ctdb_local_daemons ctdb_run_tests ctdb_run_cluster_tests"
+
+ for _t in ${_tools}; do
+ vmove usr/bin/${_t}
+ done
+
+ _man1="ctdb ctdb_diagnostics ctdbd ctdbd_wrapper"
+
+ for _f in ${_man1}; do
+ vmove usr/share/man/man1/${_f}.1
+ done
+
+ _man5="ctdb.conf ctdb-script.options ctdb.sysconfig"
+
+ for _f in ${_man5}; do
+ vmove usr/share/man/man5/${_f}.5
+ done
+
+ _man7="ctdb ctdb-statistics ctdb-tunables"
+
+ for _f in ${_man7}; do
+ vmove usr/share/man/man7/${_f}.7
+ done
+
+ vmove usr/lib/libctdb-event-client-samba4.so
+
+ vmove usr/libexec/ctdb
+ vmove usr/share/ctdb
+ vmove etc/ctdb
+ vmove etc/sudoers.d/ctdb
+
+ vsv ctdbd
+ }
+}
+
samba-libs_package() {
short_desc+=" - core libraries"
provides="libsmbclient-${version}_${revision}"
next prev parent reply other threads:[~2020-12-20 14:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 13:41 [PR PATCH] " andry-dev
2020-12-20 14:25 ` andry-dev [this message]
2020-12-20 14:46 ` ericonr
2020-12-20 14:57 ` [PR PATCH] [Updated] " andry-dev
2020-12-20 15:02 ` [PR REVIEW] " andry-dev
2020-12-20 15:16 ` ericonr
2020-12-20 15:19 ` andry-dev
2020-12-20 16:48 ` ahesford
2020-12-20 16:48 ` ahesford
2020-12-20 16:48 ` ahesford
2020-12-20 16:48 ` ahesford
2020-12-20 16:48 ` ahesford
2020-12-20 18:05 ` ahesford
2020-12-20 19:41 ` andry-dev
2020-12-20 20:55 ` ahesford
2020-12-20 21:38 ` [PR REVIEW] " andry-dev
2020-12-20 22:21 ` andry-dev
2020-12-20 22:22 ` [PR PATCH] [Updated] " andry-dev
2020-12-20 22:42 ` andry-dev
2020-12-20 22:58 ` andry-dev
2020-12-20 23:47 ` [PR REVIEW] " ahesford
2020-12-21 1:54 ` ahesford
2020-12-21 7:17 ` andry-dev
2020-12-21 13:06 ` [PR PATCH] [Closed]: " ahesford
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=20201220142544.m6NOQfIi_vLGIMOzi7GNpigcoKc3INzMCy4jhwlLHT0@z \
--to=andry-dev@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).