[Pkg-samba-maint] [Git][samba-team/samba][master] 4 commits: hurd-compat.patch: some minor compatibility tweaks for hurd

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Fri Nov 4 11:02:50 GMT 2022



Michael Tokarev pushed to branch master at Debian Samba Team / samba


Commits:
0814ad1e by Michael Tokarev at 2022-11-04T12:53:45+03:00
hurd-compat.patch: some minor compatibility tweaks for hurd

- - - - -
2d880b95 by Michael Tokarev at 2022-11-04T13:21:47+03:00
d/rules: ceph is linux-only like glusterfs; combine linux features into single block

- - - - -
7e982421 by Michael Tokarev at 2022-11-04T13:37:29+03:00
d/rules: add another conditional, with_snapper

snapper vfs module is another linux-only feature
which is enabled in source3/wscript on linux.
When doing shlibdeps run, check if we're building
with_snapper

- - - - -
d119a30e by Michael Tokarev at 2022-11-04T13:42:08+03:00
d/rules: consolidate iflinux linux-specific blocks into one

- - - - -


3 changed files:

- + debian/patches/hurd-compat.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/patches/hurd-compat.patch
=====================================
@@ -0,0 +1,43 @@
+Subject: hurd compatibility changes
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Thu, 03 Nov 2022 20:49:33 +0300
+
+Hurd does not define PIPE_BUF, so lib/tevent/testsuite.c fails to compile
+(yes, this file is used as part of *samba* testsuite, not tevent testsuite).
+Define it to a safe minimal value like 512 bytes.
+
+Hurd does not provide SA_NOCLDWAIT define, so lib/util/tests/tfork.c does
+not compile. This is only needed during testing to omit zombie process
+generation, which has only cosmetic effect.  Define it to be 0.
+
+Based on prior work and ideas by Samuel Thibault.
+
+diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
+index 8894e445203..27f873cd484 100644
+--- a/lib/tevent/testsuite.c
++++ b/lib/tevent/testsuite.c
+@@ -36,6 +36,10 @@
+ #include "system/threads.h"
+ #include <assert.h>
+ #endif
++#include <limits.h>
++#ifndef PIPE_BUF /* eg hurd does not define it */
++# define PIPE_BUF 512 /* a safe bet */
++#endif
+ 
+ static int fde_count;
+ 
+diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c
+index 70ae97583fc..0dc8e1688d3 100644
+--- a/lib/util/tests/tfork.c
++++ b/lib/util/tests/tfork.c
+@@ -33,6 +33,9 @@
+ #ifdef HAVE_PTHREAD
+ #include <pthread.h>
+ #endif
++#ifndef SA_NOCLDWAIT
++#define SA_NOCLDWAIT 0
++#endif
+ 
+ static bool test_tfork_simple(struct torture_context *tctx)
+ {


=====================================
debian/patches/series
=====================================
@@ -1,4 +1,5 @@
 libsmbclient-ensure-lfs-221618.patch
+hurd-compat.patch
 README_nosmbldap-tools.patch
 smbclient-pager.patch
 usershare.patch


=====================================
debian/rules
=====================================
@@ -27,19 +27,31 @@ LDB_PACKAGES = libldb2 libldb-dev ldb-tools python3-ldb python3-ldb-dev
 # should be removed for bookworm+. Also LDB_2.4.4 in d/libldb2.symbols
 EXTRA_ABI_VERSION_FILES = lib/ldb/ABI/ldb-2.4.4.sigs
 
+ifeq (${DEB_HOST_ARCH_OS}, linux) # extra linux-specific features
+with_glusterfs = yes
 with_ceph = yes
+with_snapper = yes
+
 # Ceph is not available on all platforms
 ifeq (,$(filter amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x, ${DEB_HOST_ARCH}))
 with_ceph =
 endif
 
-with_glusterfs = yes
-# GlusterFS is linux-only
-ifneq (${DEB_HOST_ARCH_OS}, linux)
+extra-args = \
+	--with-quota \
+	\
+	--with-systemd \
+	--systemd-install-services \
+	--with-systemddir=/lib/systemd/system \
+
+else # non-linux
 with_glusterfs =
+with_ceph =
+with_snapper =
+extra-args =
 endif
 
-# Ubuntu i386 binary compatibility only effort: Disable some i386 packages
+# Ubuntu i386 binary compatibility only effort: Disable some i386 packages and modules
 ifeq (${DEB_VENDOR}-${DEB_HOST_ARCH}, Ubuntu-i386)
 export DH_OPTIONS += $(addprefix -N,\
 	ctdb libpam-winbind samba samba-testsuite samba-vfs-modules )
@@ -89,15 +101,7 @@ conf_args = \
 	$(if ${with_ceph},\
 	  --enable-cephfs --enable-ceph-reclock,\
 	  --disable-cephfs) \
-
-ifeq (${DEB_HOST_ARCH_OS}, linux)
-conf_args += \
-	--with-quota \
-	\
-	--with-systemd \
-	--systemd-install-services \
-	--with-systemddir=/lib/systemd/system
-endif
+	${extra-args} \
 
 binary binary-arch binary-indep \
 install install-arch install-indep: %:
@@ -301,11 +305,13 @@ ifneq (${with_ceph},)
 endif
 endif
 ifneq (,$(filter samba-vfs-modules,${build_packages}))
+ifneq (${with_snapper}${with_ceph}${with_glusterfs},)
 	dpkg-shlibdeps -Tdebian/samba-vfs-modules.substvars -pvfsmods \
-	    debian/samba-vfs-modules/usr/lib/*/samba/vfs/snapper.so \
+	    $(if ${with_snapper}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/snapper.so) \
 	    $(if ${with_ceph}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/ceph.so) \
 	    $(if ${with_glusterfs}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/glusterfs.so)
 endif
+endif
 # after shlibdeps run, check that we don't have wrong depdendencies
 	$(call depcheck, samba-libs, samba|winbind|smbclient|ctdb)
 	$(call depcheck, smbclient, samba|winbind|ctdb)



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/1907d4f10a695b14c5ca4a10e40854f583162f3a...d119a30ed3019c362f570272351e2514b2277b3f

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/1907d4f10a695b14c5ca4a10e40854f583162f3a...d119a30ed3019c362f570272351e2514b2277b3f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-samba-maint/attachments/20221104/dcf0dcc0/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list