[Pkg-samba-maint] [Git][samba-team/samba][master] 13 commits: d/rules: fix missing ldb:Depends for mitkrb5 case (and fix ifneq)

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Mon Nov 14 11:06:02 GMT 2022



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


Commits:
04f8f4aa by Michael Tokarev at 2022-11-13T17:16:38+03:00
d/rules: fix missing ldb:Depends for mitkrb5 case (and fix ifneq)

- - - - -
f65d34a9 by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: always define rados:Depends & vfsmods:Depends substvars

- - - - -
608658b3 by Michael Tokarev at 2022-11-13T17:25:15+03:00
unwrap-getresgid-typo.patch (https://bugzilla.samba.org/show_bug.cgi?id=15227)

(for the testsuite only)

- - - - -
4f37b118 by Michael Tokarev at 2022-11-13T17:25:15+03:00
nsswitch-pam-data-time_t.patch (https://bugzilla.samba.org/show_bug.cgi?id=15224)

- - - - -
5ba5b862 by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/control: tdb-tools and lmdb-utils packages are also needed for tests (commented out for now)

- - - - -
71fe244a by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: update knownfail tests

- - - - -
5925f01a by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: use single ${config-args} variable and move it a bit

- - - - -
3b0292d9 by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: make ${build-pkgs} non-recursively-expanding (minor)

- - - - -
a8d780a4 by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: little optimisations

- - - - -
0472e4bd by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: stop exporting buildflags, export compiler options when needed

We used to have DPKG_EXPORT_BUILDFLAGS=1, which means all buildflag
variables are exported to all commands make(1) run.  But make(1)
evaluates each exported variable before running any external command,
so it had to run dpkg-buildflags once for *every* exported buildflag -
when not run under dpkg-buildpackage (which exports them all before
running ./debian/rules). This leads to a noticeable and annoying delay
each time running ./debian/rules manually to debug stuff.  But samba
build system uses CFLAGS et al just once when configuring stuff, so
there is no reason to export all these variables for any command run
from d/rules *except* the configure step (two of them).  Specify
CPPFLAGS, CFLAGS and LDFLAGS="${LDFLAGS} directly in there.
This speeds up plain d/rules invocations dramatically.

- - - - -
42f666e5 by Michael Tokarev at 2022-11-13T17:25:15+03:00
d/rules: some more little optimisations for variables and expansion

- - - - -
75deb9d8 by Michael Tokarev at 2022-11-13T17:25:16+03:00
update changelog

- - - - -
d9e0a10a by Michael Tokarev at 2022-11-14T10:46:33+03:00
do not check for smb.conf (errors) in samba-common-bin.postinst

The checks there has been introduced as a solution for #816301,
the problem was that samba restart failed during upgrade if
obsolete parameters were set in smb.conf.  The check served
no purpose though, since the result is still the same: the
upgrade fails and no other (non-samba) packages are upgraded.
The only good outcome was a message printed about what's
wrong, instead of it being hidden in the logs when the failure
is during restart.

Now, there's also #616075, which says samba upgrade failure
should not prevent other packages from upgrading.

The right thing to do - in my opinion - is to let samba to check
the configuration, do not fail if samba restart failed (this
way other packages can still be upgraded), but display more
verbose error messages about the failures/errors if any.
With systemd it is easier to find, at least.

Remove the smb.conf check from samba-common-bin.postinst,
but add mkdir /run/samba to other .postinst scripts where
[samba-tool] testparam is being used to remove its useless
warning about missing /run/samba.

- - - - -


9 changed files:

- debian/changelog
- debian/control
- + debian/patches/nsswitch-pam-data-time_t.patch
- debian/patches/series
- + debian/patches/unwrap-getresgid-typo.patch
- debian/rules
- − debian/samba-common-bin.postinst
- debian/samba.postinst
- debian/winbind.postinst


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,27 @@
+samba (2:4.17.2+dfsg-10) UNRELEASED; urgency=medium
+
+  * d/rules: stop stripping +dfsg suffix from ldb version
+  * d/control: declare dependency on password (for groupadd in postinst)
+    for winbind and samba (Closes: #1023759)
+  * implement pkg.samba.mitkrb5 build profile to build with system mit-krb5
+    (with "mitkrb5" version suffix in some packages for now)
+  * d/control: mark libufing-dev build dep with <!pkg.samba.nouring>
+    (to simplify out-of-archive builds for older systems)
+  * d/rules: parametrise list of packages to omit (eg on ubuntu-i386)
+    with ${omit-pkgs}
+  * d/rules: use variables in a more consistent way, use single ${config-args}
+  * d/control: tdb-tools and lmdb-utils packages are also needed for tests
+    (everything is commented out for now anyway)
+  * d/rules: update knownfail tests
+  * d/rules: stop exporting buildflags, export compiler options when needed
+  * d/rules: always define rados:Depends & vfsmods:Depends substvars
+  * unwrap-getresgid-typo.patch - fix crash during p11-kit execution
+    (https://bugzilla.samba.org/show_bug.cgi?id=15227) (for the testsuite only)
+  * nsswitch-pam-data-time_t.patch - fix time_t not fit in a pointer (eg x32)
+    (https://bugzilla.samba.org/show_bug.cgi?id=15224)
+
+ -- Michael Tokarev <mjt at tls.msk.ru>  Thu, 10 Nov 2022 19:03:58 +0300
+
 samba (2:4.17.2+dfsg-9) unstable; urgency=medium
 
   * hurd-compat.patch: some minor compatibility tweaks for hurd


=====================================
debian/control
=====================================
@@ -71,10 +71,12 @@ Build-Depends-Arch:
 	python3-markdown,
 	python3-testtools,
 # dependencies needed for selftest:
+#	lmdb-utils <!nocheck>,
 #	openssl <!nocheck>,
 #	python3-cryptography <!nocheck>,
 #	python3-iso8601 <!nocheck>,
 #	python3-pyasn1 <!nocheck>,
+#	tdb-tools <!nocheck>,
 Rules-Requires-Root: binary-targets
 Vcs-Browser: https://salsa.debian.org/samba-team/samba
 Vcs-Git: https://salsa.debian.org/samba-team/samba.git


=====================================
debian/patches/nsswitch-pam-data-time_t.patch
=====================================
@@ -0,0 +1,86 @@
+From 3e99fc766db69169c07c3d21b02a89de66a0cbd6 Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra at samba.org>
+Date: Tue, 8 Nov 2022 16:16:07 -0800
+Subject: [PATCH] nsswitch: Fix pam_set_data()/pam_get_data() to use pointers
+ to a time_t, not try and embedd it directly.
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=15224
+
+Signed-off-by: Jeremy Allison <jra at samba.org>
+---
+ nsswitch/pam_winbind.c | 24 +++++++++++++++++-------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
+index e7ae605b341..02a8aa8df98 100644
+--- a/nsswitch/pam_winbind.c
++++ b/nsswitch/pam_winbind.c
+@@ -3226,7 +3226,15 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ 	 */
+ 
+ 	if (flags & PAM_PRELIM_CHECK) {
+-		time_t pwdlastset_prelim = 0;
++		time_t *pwdlastset_prelim = NULL;
++
++		pwdlastset_prelim = talloc_array(NULL, time_t, 1);
++		if (pwdlastset_prelim == NULL) {
++			_pam_log(ctx, LOG_CRIT,
++				 "password - out of memory");
++			ret = PAM_BUF_ERR;
++			goto out;
++		}
+ 
+ 		/* instruct user what is happening */
+ 
+@@ -3258,7 +3266,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ 		ret = winbind_auth_request(ctx, user, pass_old,
+ 					   NULL, NULL, 0,
+ 					   &error, NULL,
+-					   &pwdlastset_prelim, NULL);
++					   pwdlastset_prelim, NULL);
+ 
+ 		if (ret != PAM_ACCT_EXPIRED &&
+ 		    ret != PAM_AUTHTOK_EXPIRED &&
+@@ -3269,7 +3277,8 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ 		}
+ 
+ 		pam_set_data(pamh, PAM_WINBIND_PWD_LAST_SET,
+-			     (void *)pwdlastset_prelim, NULL);
++			     pwdlastset_prelim,
++			     _pam_winbind_cleanup_func);
+ 
+ 		ret = pam_set_item(pamh, PAM_OLDAUTHTOK,
+ 				   (const void *) pass_old);
+@@ -3280,7 +3289,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ 		}
+ 	} else if (flags & PAM_UPDATE_AUTHTOK) {
+ 
+-		time_t pwdlastset_update = 0;
++		time_t *pwdlastset_update = NULL;
+ 
+ 		/*
+ 		 * obtain the proposed password
+@@ -3343,8 +3352,9 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ 		 * By reaching here we have approved the passwords and must now
+ 		 * rebuild the password database file.
+ 		 */
+-		pam_get_data(pamh, PAM_WINBIND_PWD_LAST_SET,
+-			     (const void **) &pwdlastset_update);
++		pam_get_data(pamh,
++			     PAM_WINBIND_PWD_LAST_SET,
++			     (const void **)&pwdlastset_update);
+ 
+ 		/*
+ 		 * if cached creds were enabled, make sure to set the
+@@ -3356,7 +3366,7 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
+ 		}
+ 
+ 		ret = winbind_chauthtok_request(ctx, user, pass_old,
+-						pass_new, pwdlastset_update);
++						pass_new, *pwdlastset_update);
+ 		if (ret != PAM_SUCCESS) {
+ 			pass_old = pass_new = NULL;
+ 			goto out;
+-- 
+2.34.1
+


=====================================
debian/patches/series
=====================================
@@ -18,3 +18,5 @@ move-msg.sock-from-var-lib-samba-to-run-samba.patch
 testparm-do-not-fail-if-pid-dir-does-not-exist.patch
 add-missing-libs-deps.diff
 spelling.patch
+unwrap-getresgid-typo.patch
+nsswitch-pam-data-time_t.patch


=====================================
debian/patches/unwrap-getresgid-typo.patch
=====================================
@@ -0,0 +1,20 @@
+Subject: uwrap: Fix getresgid wrapping typo
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=15227
+
+This was making e.g. p11-kit crash on getresgid() call.
+
+Signed-off-by: Samuel Thibault <samuel.thibault at ens-lyon.org>
+
+diff --git a/third_party/uid_wrapper/uid_wrapper.c b/third_party/uid_wrapper/uid_wrapper.c
+index f04642a..2e2c9e6 100644
+--- a/third_party/uid_wrapper/uid_wrapper.c
++++ b/third_party/uid_wrapper/uid_wrapper.c
+@@ -623,7 +623,7 @@ static int libc_setresgid(gid_t rgid, gid_t egid, gid_t sgid)
+ #ifdef HAVE_GETRESGID
+ static int libc_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid)
+ {
+-	uwrap_bind_symbol_libc(setresgid);
++	uwrap_bind_symbol_libc(getresgid);
+ 
+ 	return uwrap.libc.symbols._libc_getresgid.f(rgid, egid, sgid);
+ }


=====================================
debian/rules
=====================================
@@ -2,7 +2,6 @@
 SHELL = /bin/sh -e
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-DPKG_EXPORT_BUILDFLAGS = 1
 # Fast version of dpkg/architecture.mk defining all vars in one go
 ifeq (${DEB_HOST_MULTIARCH},)
    $(foreach d, $(shell dpkg-architecture | sed 's/=/?=/'), $(eval export $d))
@@ -10,10 +9,9 @@ endif
 include /usr/share/dpkg/buildflags.mk
 include /usr/share/dpkg/pkg-info.mk
 include /usr/share/dpkg/vendor.mk
-V = $(if $(filter terse, ${DEB_BUILD_OPTIONS}),,1)
-WAF = PYTHONHASHSEED=1 ./buildtools/bin/waf \
-	$(if $(filter parallel=%,${DEB_BUILD_OPTIONS}),\
-	  $(patsubst parallel=%,-j%,$(filter parallel=%,${DEB_BUILD_OPTIONS})))
+V := $(if $(filter terse, ${DEB_BUILD_OPTIONS}),,1)
+WAF := PYTHONHASHSEED=1 ./buildtools/bin/waf \
+	$(patsubst parallel=%,-j%,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
 
 DESTDIR = ${CURDIR}/debian/tmp
 
@@ -31,7 +29,43 @@ omit-pkgs =
 with-glusterfs =
 with-ceph =
 with-snapper =
-extra-args =
+
+config-args = \
+	--prefix=/usr \
+	--enable-fhs \
+	--sysconfdir=/etc \
+	--localstatedir=/var \
+	--libexecdir=/usr/libexec \
+	--libdir=/usr/lib/${DEB_HOST_MULTIARCH} \
+	--datadir=/usr/share \
+	--with-modulesdir=/usr/lib/${DEB_HOST_MULTIARCH}/samba \
+	--with-pammodulesdir=/lib/${DEB_HOST_MULTIARCH}/security \
+	--with-privatedir=/var/lib/samba/private \
+	--with-smbpasswd-file=/etc/samba/smbpasswd \
+	--with-piddir=/run/samba \
+	--with-lockdir=/run/samba \
+	--with-sockets-dir=/run/samba \
+	--with-statedir=/var/lib/samba \
+	--with-cachedir=/var/cache/samba \
+	--with-pam \
+	--with-syslog \
+	--with-utmp \
+	--with-winbind \
+	--with-automount \
+	--with-ldap \
+	--with-ads \
+	--with-gpgme \
+	--enable-avahi \
+	--enable-spotlight \
+	--with-profiling-data \
+	--disable-rpath --disable-rpath-install \
+	--with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2,vfs_dfs_samba4,auth_samba4,vfs_nfs4acl_xattr \
+	--bundled-libraries=NONE,pytevent,ldb \
+	\
+	--with-cluster-support \
+	--enable-etcd-reclock \
+	--with-socketpath=/run/ctdb/ctdbd.socket \
+	--with-logdir=/var/log/ctdb \
 
 ifeq (${DEB_HOST_ARCH_OS}, linux) # extra linux-specific features
 with-glusterfs = yes
@@ -43,7 +77,7 @@ ifeq (,$(filter amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x, ${DE
 with-ceph =
 endif
 
-extra-args += \
+config-args += \
 	--with-quota \
 	\
 	--with-systemd \
@@ -59,15 +93,19 @@ with-ceph =
 with-glusterfs =
 endif
 
+config-args += $(if ${with-ceph},\
+	  --enable-cephfs --enable-ceph-reclock,\
+	  --disable-cephfs)
+
 with_mitkrb5 = $(filter pkg.samba.mitkrb5, ${DEB_BUILD_PROFILES})
 ifneq (,${with_mitkrb5})
-extra-args += \
+config-args += \
 	--with-system-mitkrb5 \
 	--with-experimental-mit-ad-dc \
 	--with-system-mitkdc=/usr/sbin/krb5kdc
 # samba packages will have its own version suffix
-mitkrb5-samba-ver := ${DEB_VERSION}mitkrb5
-mitkrb5-dep-pkgs := samba-libs samba-dev
+mitkrb5-samba-ver = ${DEB_VERSION}mitkrb5
+mitkrb5-dep-pkgs = samba-libs samba-dev
 mitkrb5-dep-pkgs += samba samba-common-bin python3-samba
 mitkrb5-dep-pkgs += samba-dsdb-modules samba-vfs-modules
 mitkrb5-dep-pkgs += libsmbclient smbclient
@@ -76,53 +114,14 @@ mitkrb5-dep-pkgs += winbind
 mitkrb5-dep-pkgs += samba-testsuite
 mitkrb5-dep-pkgs += ctdb
 else
-mitkrb5-dep-pkgs :=
+mitkrb5-dep-pkgs =
 endif
 
+ifneq (,${omit-pkgs})
 export DH_OPTIONS += $(addprefix -N, ${omit-pkgs})
+endif
 # ${build-pkgs} will honour arch/indep and the above list in ${DH_OPTIONS}
-build-pkgs = $(shell dh_listpackages)
-
-conf_args = \
-	--prefix=/usr \
-	--enable-fhs \
-	--sysconfdir=/etc \
-	--localstatedir=/var \
-	--libexecdir=/usr/libexec \
-	--libdir=/usr/lib/${DEB_HOST_MULTIARCH} \
-	--datadir=/usr/share \
-	--with-modulesdir=/usr/lib/${DEB_HOST_MULTIARCH}/samba \
-	--with-pammodulesdir=/lib/${DEB_HOST_MULTIARCH}/security \
-	--with-privatedir=/var/lib/samba/private \
-	--with-smbpasswd-file=/etc/samba/smbpasswd \
-	--with-piddir=/run/samba \
-	--with-lockdir=/run/samba \
-	--with-sockets-dir=/run/samba \
-	--with-statedir=/var/lib/samba \
-	--with-cachedir=/var/cache/samba \
-	--with-pam \
-	--with-syslog \
-	--with-utmp \
-	--with-winbind \
-	--with-automount \
-	--with-ldap \
-	--with-ads \
-	--with-gpgme \
-	--enable-avahi \
-	--enable-spotlight \
-	--with-profiling-data \
-	--disable-rpath --disable-rpath-install \
-	--with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2,vfs_dfs_samba4,auth_samba4,vfs_nfs4acl_xattr \
-	--bundled-libraries=NONE,pytevent,ldb \
-	\
-	--with-cluster-support \
-	--enable-etcd-reclock \
-	--with-socketpath=/run/ctdb/ctdbd.socket \
-	--with-logdir=/var/log/ctdb \
-	$(if ${with-ceph},\
-	  --enable-cephfs --enable-ceph-reclock,\
-	  --disable-cephfs) \
-	${extra-args} \
+build-pkgs := $(shell dh_listpackages)
 
 binary binary-arch binary-indep \
 install install-arch install-indep: %:
@@ -137,7 +136,8 @@ bin/configured.stamp:
 	  sed -r -e 's/^(SAMBA_VERSION_VENDOR_SUFFIX).*/\1=${DEB_VENDOR}/' \
 		VERSION.orig > VERSION; \
 	fi
-	${WAF} -j1 configure -C ${conf_args} || \
+	CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+	    ${WAF} -j1 -C configure ${config-args} || \
 	  { $(if ${V},echo "==== contents of config.log:"; cat bin/config.log;) false; }
 # #1021371: we only need the single "version" symbol LDB_2.4.4 in the library
 	touch ${EXTRA_ABI_VERSION_FILES}
@@ -185,16 +185,19 @@ testbuild/configured.stamp: testbuild/copied.stamp
 # (libsocket-wrapper &Co), but let's just build the bundled ones. There's no
 # good reason to use externally-packaged wrappers, they're small to build and
 # we don't use them for production build, and extra versioned build-dep hurts.
-	cd testbuild && ${WAF} -j1 configure --enable-selftest -C \
-		$$(echo '${conf_args}' | \
+	cd testbuild && \
+	CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+	    ${WAF} -j1 -C configure --enable-selftest \
+		$$(echo '${config-args}' | \
 		   sed 's|--bundled-libraries=NONE|&,nss_wrapper,pam_wrapper,resolv_wrapper,socket_wrapper,uid_wrapper|')
-# FIXME: some tests fail for now, handle them later
-# REASON: Exception: Exception: ../../source4/torture/smb2/session.c:5006: (&io1)->out.file_attr was 128 (0x80), expected 32 (0x20): out.file_attr incorrect
-	echo '^samba3.smb2.session enc.(reauth.|bind.|bind_negative.*|bind_invalid_auth|encryption-aes-.*)\(nt4_dc\)' >>testbuild/selftest/knownfail.d/mjt
-#REASON: Exception: Exception: ../../source4/torture/util_smb.c:856: Expression `torture_open_connection(&cli1, torture_ctx, 0)' failed: Failed to open connection
-# these fail anyway
-	echo '^samba4.ntvfs.cifs.ntlm.base.unlink.unlink\(rpc_proxy\)' >>testbuild/selftest/knownfail.d/mjt
-	echo '^samba4.ntvfs.cifs.krb5.base.unlink\(rpc_proxy\)' >>testbuild/selftest/knownfail.d/mjt
+# FIXME: some tests fail for now, handle them later (last check: 4.17.2, heimdal build)
+	rm -f testbuild/selftest/knownfail.d/debian
+	echo '^samba3.smb2.session enc.(reauth.|bind.|bind_negative.*|bind_invalid_auth|encryption-aes-.*)\(nt4_dc\)' \
+		>>testbuild/selftest/knownfail.d/debian
+	echo '^amba4.rpc.echo against rpc proxy with domain creds\(rpc_proxy\)' \
+		>>testbuild/selftest/knownfail.d/debian
+	echo '^samba3.rpc.schannel_anon_setpw anonymous password set \(schannel enforced server-side\).schannel_anon_setpw\(nt4_dc_schannel\)' \
+		>>testbuild/selftest/knownfail.d/debian
 	touch $@
 selftest-quick: testbuild/configured.stamp
 	@echo "############## selftest run ##############"
@@ -328,12 +331,14 @@ override_dh_shlibdeps:
 	dh_shlibdeps -l/usr/lib/${DEB_HOST_MULTIARCH}/samba \
 	    -Xceph.so -Xglusterfs.so -Xsnapper.so -Xctdb_mutex_ceph_rados_helper
 ifneq (,$(filter ctdb, ${build-pkgs}))
+	echo "rados:Depends=" >> debian/ctdb.substvars
 ifneq (${with-ceph},)
 	dpkg-shlibdeps -Tdebian/ctdb.substvars -prados \
 	    debian/ctdb/usr/libexec/ctdb/ctdb_mutex_ceph_rados_helper
 endif
 endif
 ifneq (,$(filter samba-vfs-modules,${build-pkgs}))
+	echo "vfsmods:Depends=" >> debian/samba-vfs-modules.substvars
 ifneq (${with-snapper}${with-ceph}${with-glusterfs},)
 	dpkg-shlibdeps -Tdebian/samba-vfs-modules.substvars -pvfsmods \
 	    $(if ${with-snapper}, debian/samba-vfs-modules/usr/lib/*/samba/vfs/snapper.so) \
@@ -351,9 +356,9 @@ endif
 	$(call depcheck, libsmbclient, samba|winbind|smbclient|ctdb)
 
 override_dh_gencontrol:
-	dh_gencontrol $(addprefix -p,${LDB_PACKAGES}) -- -v${LDB_DEB_VERSION}
-ifneq (,$(filter ${build-pkgs}, ${mitkrb5-dep-pkgs})))
-	dh_gencontrol $(addprefix -p, $(filter ${build-pkgs}, ${mitkrb5-dep-pkgs})) -- -v${mitkrb5-samba-ver}
+	dh_gencontrol $(addprefix -p, ${LDB_PACKAGES}) -- -v${LDB_DEB_VERSION}
+ifneq (,$(filter ${build-pkgs}, ${mitkrb5-dep-pkgs}))
+	dh_gencontrol $(addprefix -p, $(filter ${build-pkgs}, ${mitkrb5-dep-pkgs})) -- -v${mitkrb5-samba-ver} -Vldb:Depends="${LDB_DEPENDS}"
 endif
 	dh_gencontrol --remaining-packages -- -Vldb:Depends="${LDB_DEPENDS}"
 


=====================================
debian/samba-common-bin.postinst deleted
=====================================
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# ensure a (tmpfs-based) /run/samba exists before running testparm
-[ -d /run/samba ] || mkdir -p /run/samba
-
-if [ "$1" = "configure" ] ; then
-    SERVER_ROLE=`samba-tool testparm --parameter-name="server role"  2>/dev/null | tail -1`
-    if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
-        echo "Checking smb.conf with samba-tool"
-        samba-tool testparm -d1 --suppress-prompt > /dev/null
-        echo "Done"
-    else
-        echo "Checking smb.conf with testparm"
-        testparm -d1 --suppress-prompt > /dev/null
-        echo "Done"
-    fi
-fi
-
-#DEBHELPER#


=====================================
debian/samba.postinst
=====================================
@@ -65,6 +65,8 @@ then
     fi
 fi
 
+mkdir -p /run/samba # shut up [samba-tool] testparm warning
+
 # mimic source4/smbd/server.c and mask service before it fails
 # NB: server role = active directory domain controller is what we need to properly support
 # NB: server services = smb is not compiled in


=====================================
debian/winbind.postinst
=====================================
@@ -42,6 +42,8 @@ mkdir -pv "$winbindd_privileged_socket_directory"
 chgrp -c winbindd_priv "$winbindd_privileged_socket_directory"
 chmod -c 0750 "$winbindd_privileged_socket_directory"
 
+mkdir -p /run/samba # shut up [samba-tool] testparm warning
+
 SERVER_ROLE=`samba-tool testparm --parameter-name="server role"  2>/dev/null | tail -1`
 if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
     mask_services "Samba is being run as an AD Domain Controller" winbind.service



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/b089d4b2622da6a407cdf4641c81a85cd74402b1...d9e0a10ac9cea47e70f00d01aa6ce6c8e50a9bbe

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/b089d4b2622da6a407cdf4641c81a85cd74402b1...d9e0a10ac9cea47e70f00d01aa6ce6c8e50a9bbe
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/20221114/25113c23/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list