[Pkg-samba-maint] [Git][samba-team/samba][master] 12 commits: fix typo in fruit patch

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Fri Dec 2 11:41:40 GMT 2022



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


Commits:
1d37c641 by Michael Tokarev at 2022-12-02T10:34:22+03:00
fix typo in fruit patch

- - - - -
d5e13a3b by Michael Tokarev at 2022-12-02T10:34:22+03:00
create samba-ad-provision package with contents of /usr/share/samba/setup

- - - - -
ed8adfa9 by Michael Tokarev at 2022-12-02T10:55:47+03:00
samba-ad-provision.lintian-overrides: license files

- - - - -
de6ef497 by Michael Tokarev at 2022-12-02T11:59:23+03:00
d/control: samba breaks older samba-ad-provision to ensure the latter is fresh enough

- - - - -
45f39d43 by Michael Tokarev at 2022-12-02T11:59:32+03:00
print meaningful error message if samba-ad-provision is not installed

- - - - -
788634a5 by Michael Tokarev at 2022-12-02T14:12:02+03:00
print meaningful error message if python3-markdown is not installed

- - - - -
fe488e50 by Michael Tokarev at 2022-12-02T14:12:02+03:00
a few more spelling fixes

- - - - -
c3026ded by Michael Tokarev at 2022-12-02T14:12:02+03:00
d/patches/spelling.patch: add DEP-3 description

- - - - -
4848658f by Michael Tokarev at 2022-12-02T14:12:02+03:00
mark d/patches/heimdal-rfc3454 with Forwaded: not-needed

- - - - -
2423a6f9 by Michael Tokarev at 2022-12-02T14:12:02+03:00
ctdb: move rundir from /var/run to /run

- - - - -
1fa738c1 by Michael Tokarev at 2022-12-02T14:15:34+03:00
d/libnss-winbind.{postinst,postrm}: add #DEBHELPER# tokens

- - - - -
f7d093f3 by Michael Tokarev at 2022-12-02T14:17:49+03:00
d/samba.lintian-overrides: remove mentions of /var/spool/samba (moved to /var/tmp/)

- - - - -


15 changed files:

- debian/control
- debian/libnss-winbind.postinst
- debian/libnss-winbind.postrm
- debian/not-installed
- + debian/patches/ctdb-use-run-instead-of-var-run.patch
- debian/patches/fruit-disable-useless-size_t-overflow-check.patch
- debian/patches/heimdal-rfc3454.txt
- + debian/patches/meaningful-error-if-no-python3-markdown.patch
- + debian/patches/meaningful-error-if-no-samba-ad-provision.patch
- debian/patches/series
- debian/patches/spelling.patch
- debian/rules
- + debian/samba-ad-provision.lintian-overrides
- debian/samba.install
- debian/samba.lintian-overrides


Changes:

=====================================
debian/control
=====================================
@@ -102,7 +102,8 @@ Recommends: attr,
             logrotate,
             python3-markdown,
             samba-dsdb-modules,
-            samba-vfs-modules
+            samba-vfs-modules,
+            samba-ad-provision,
 Suggests: bind9 (>= 1:9.5.1),
           bind9utils,
           ctdb,
@@ -111,6 +112,7 @@ Suggests: bind9 (>= 1:9.5.1),
           ufw,
           winbind
 Enhances: bind9, ntp
+Breaks: samba-ad-provision (<< ${source:Upstream-Version})
 Description: SMB/CIFS file, print, and login server for Unix
  Samba is an implementation of the SMB/CIFS protocol for Unix systems,
  providing support for cross-platform file and printer sharing with
@@ -187,6 +189,19 @@ Description: Samba common files used by both the server and the client
  (provided in the samba package) and the client (provided in the samba-clients
  package).
 
+Package: samba-ad-provision
+Architecture: all
+Multi-Arch: foreign
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}
+Description: Samba files needed for AD domain provision
+ Samba is an implementation of the SMB/CIFS protocol for Unix systems,
+ providing support for cross-platform file and printer sharing with
+ Microsoft Windows, OS X, and other Unix systems.
+ .
+ This package contains files to setup an Active Directory Domain
+ Controller (AD DC).
+
 Package: smbclient
 Architecture: any
 Depends: samba-common (= ${source:Version}),


=====================================
debian/libnss-winbind.postinst
=====================================
@@ -18,3 +18,5 @@ if [ "$1" = configure ] && [ -z "$2" ]; then
           /etc/nsswitch.conf
     fi
 fi
+
+#DEBHELPER#


=====================================
debian/libnss-winbind.postrm
=====================================
@@ -25,3 +25,5 @@ remove_nss_entry() {
 if [ "$1" = remove ]; then
     remove_nss_entry /etc/nsswitch.conf libnss-winbind winbind
 fi
+
+#DEBHELPER#


=====================================
debian/not-installed
=====================================
@@ -1,3 +1,4 @@
 etc/sysconfig/samba
 usr/share/man/man7/traffic_replay.7
 usr/share/man/man7/traffic_learner.7
+usr/share/samba/setup


=====================================
debian/patches/ctdb-use-run-instead-of-var-run.patch
=====================================
@@ -0,0 +1,26 @@
+From a4f5852f55439bcc1aaaa6762d230a28599298d2 Mon Sep 17 00:00:00 2001
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Fri, 2 Dec 2022 11:45:01 +0300
+Subject: ctdb: use /run/ctdb instead of /var/run/ctdb
+
+Whole upstream path assignment needs a review.
+---
+ ctdb/wscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ctdb/wscript b/ctdb/wscript
+index c082c3b7a7d..523984487a3 100644
+--- a/ctdb/wscript
++++ b/ctdb/wscript
+@@ -288,7 +288,7 @@ def configure(conf):
+     conf.env.CTDB_DATADIR = os.path.join(conf.env.EXEC_PREFIX, 'share/ctdb')
+     conf.env.CTDB_ETCDIR = os.path.join(conf.env.SYSCONFDIR, 'ctdb')
+     conf.env.CTDB_VARDIR = os.path.join(conf.env.LOCALSTATEDIR, 'lib/ctdb')
+-    conf.env.CTDB_RUNDIR = os.path.join(conf.env.LOCALSTATEDIR, 'run/ctdb')
++    conf.env.CTDB_RUNDIR = '/run/ctdb'
+     conf.env.CTDB_HELPER_BINDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb')
+ 
+     if Options.options.ctdb_logdir:
+-- 
+2.30.2
+


=====================================
debian/patches/fruit-disable-useless-size_t-overflow-check.patch
=====================================
@@ -1,7 +1,7 @@
 From e4bf63c976b0e3253f980360b2fe6244092b777c Mon Sep 17 00:00:00 2001
 From: Michael Tokarev <mjt at tls.msk.ru>
 Date: Thu, 17 Nov 2022 23:51:03 +0300
-Subject: [PATCH] fruit: disable useless size_t oveflow check
+Subject: [PATCH] fruit: disable useless size_t overflow check
 Bug-Debian: http://bugs.debian.org/974868
 
 As has been said several times in


=====================================
debian/patches/heimdal-rfc3454.txt
=====================================
@@ -1,5 +1,6 @@
 From: Brian May <bam at debian.org>
 Subject: Patch in symbol table from rfc3454, for Heimdal scripts
+Forwarded: not-needed
 
 Status: cherry-picked from heimdal package
 ---


=====================================
debian/patches/meaningful-error-if-no-python3-markdown.patch
=====================================
@@ -0,0 +1,27 @@
+From 545162e59916b3bd712d2e8e52063278cf2bb7ca Mon Sep 17 00:00:00 2001
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Fri, 2 Dec 2022 11:08:27 +0300
+Subject: print meaningful error message if python3-markdown is not installed
+
+---
+ python/samba/netcmd/domain.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
+index 2a548ed1ad4..cfbd602dce8 100644
+--- a/python/samba/netcmd/domain.py
++++ b/python/samba/netcmd/domain.py
+@@ -4133,8 +4133,8 @@ class cmd_domain_schema_upgrade(Command):
+         try:
+             from samba.ms_schema_markdown import read_ms_markdown
+         except ImportError as e:
+-            self.outf.write("Exception in importing markdown: %s" % e)
+-            raise CommandError('Failed to import module markdown')
++            self.outf.write("Exception in importing markdown: %s\n" % e)
++            raise CommandError('Failed to import module markdown, please install python3-markdown package')
+         from samba.schema import Schema
+ 
+         updates_allowed_overridden = False
+-- 
+2.30.2
+


=====================================
debian/patches/meaningful-error-if-no-samba-ad-provision.patch
=====================================
@@ -0,0 +1,28 @@
+From 9610c15759fd6b27615615160f2c5019a32a7154 Mon Sep 17 00:00:00 2001
+From: Michael Tokarev <mjt at tls.msk.ru>
+Date: Fri, 2 Dec 2022 10:54:31 +0300
+Subject: print meaningful error message if samba-ad-provision is not installed
+
+---
+ python/samba/provision/common.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/python/samba/provision/common.py b/python/samba/provision/common.py
+index 2f95492d33a..0561624baf8 100644
+--- a/python/samba/provision/common.py
++++ b/python/samba/provision/common.py
+@@ -39,7 +39,10 @@ FILL_DRS = "DRS"
+ 
+ def setup_path(file):
+     """Return an absolute path to the provision tempate file specified by file"""
+-    return os.path.join(setup_dir(), file)
++    path = os.path.join(setup_dir(), file)
++    if not os.path.exists(path):
++        raise Exception("File [%s] not found. Please install samba-ad-provision package" % path)
++    return path
+ 
+ 
+ def setup_add_ldif(ldb, ldif_path, subst_vars=None, controls=["relax:0"]):
+-- 
+2.30.2
+


=====================================
debian/patches/series
=====================================
@@ -22,3 +22,6 @@ unwrap-getresgid-typo.patch
 nsswitch-pam-data-time_t.patch
 fruit-disable-useless-size_t-overflow-check.patch
 CVE-2022-42898-lib-krb5-fix-_krb5_get_int64-on-32bit.patch
+meaningful-error-if-no-samba-ad-provision.patch
+meaningful-error-if-no-python3-markdown.patch
+ctdb-use-run-instead-of-var-run.patch


=====================================
debian/patches/spelling.patch
=====================================
@@ -1,3 +1,8 @@
+From: Michael Tokarev <mjt at tls.msk.ru>
+Subject: Various spelling fixes
+
+Various spelling fixes in the code which sneaks into binaries.
+
 diff --git a/bootstrap/config.py b/bootstrap/config.py
 index a00b253ae77..84330a2106a 100644
 --- a/bootstrap/config.py
@@ -179,3 +184,29 @@ index 4caf308a612..6950898a7d1 100644
  	      zero causes the Mac client to stop using and trusting the file id
  	      returned from the server.</para>
  	      <para>The default is <emphasis>yes</emphasis>.</para>
+diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
+index bf3a66b0aaf..9d2cb6af9c9 100644
+--- a/ctdb/server/ctdb_recoverd.c
++++ b/ctdb/server/ctdb_recoverd.c
+@@ -395,7 +395,7 @@ static void ctdb_set_culprit_count(struct ctdb_recoverd *rec,
+ 				   struct ctdb_banning_state,
+ 				   len);
+ 		if (t == NULL) {
+-			DBG_WARNING("Memory allocation errror");
++			DBG_WARNING("Memory allocation error");
+ 			return;
+ 		}
+ 		rec->banning_state = t;
+diff --git a/lib/smbconf/pysmbconf.c b/lib/smbconf/pysmbconf.c
+index 1b3c101005a..465876684ca 100644
+--- a/lib/smbconf/pysmbconf.c
++++ b/lib/smbconf/pysmbconf.c
+@@ -747,7 +747,7 @@ PyDoc_STRVAR(py_smbconf_doc,
+ "types. Future, write based functions need a writable backend (registry).\n"
+ "\n"
+ "Note that the registry backend will be provided by a different\n"
+-"library module from the source3 tree (implemenation TBD).\n");
++"library module from the source3 tree (implementation TBD).\n");
+ 
+ static struct PyModuleDef moduledef = {
+ 	PyModuleDef_HEAD_INIT,


=====================================
debian/rules
=====================================
@@ -215,8 +215,6 @@ override_dh_auto_install-arch:
 	# Included in python-tevent
 	rm debian/tmp/usr/lib/python*/*-packages/_tevent.*
 	rm debian/tmp/usr/lib/python*/*-packages/tevent.py
-	# Already documented in debian/copyright
-	-rm debian/tmp/usr/share/samba/setup/ad-schema/licence.txt
 	# pam stuff
 	install -Dp -m0644 debian/winbind.pam-config debian/tmp/usr/share/pam-configs/winbind
 	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnss_* debian/tmp/lib/$(DEB_HOST_MULTIARCH)/
@@ -263,6 +261,8 @@ endif
 	dh_link -plibldb2 /usr/lib/${DEB_HOST_MULTIARCH}/ldb/modules/ldb \
 	                  /usr/lib/${DEB_HOST_MULTIARCH}/samba/ldb/compat
 
+provision-dest := debian/samba-ad-provision/usr/share/samba/setup
+
 override_dh_auto_install-indep:
 # only arch-all package is samba-common containing a few debian-specific files
 # Most of files needs are renamed during install so lets put them
@@ -278,6 +278,13 @@ endif
 	# we wrongly have pam file in samba-common instead of samba
 	install -Dp -m0644 debian/samba.pam debian/samba-common/etc/pam.d/samba
 
+# install provision files (samba-ad-provision, source4/setup/)
+	mkdir -p -m0755 ${provision-dest}
+	cp -r --preserve=timestamps source4/setup/. ${provision-dest}
+	rm -rf ${provision-dest}/tests
+	rm -f	${provision-dest}/wscript* \
+		${provision-dest}/adprep/samba-4.7-missing-for-schema45.ldif
+
 override_dh_installpam:
 
 # include a command only if the given package is being built


=====================================
debian/samba-ad-provision.lintian-overrides
=====================================
@@ -0,0 +1,4 @@
+# documentation and specifications for the schemas, keep them in the same place
+samba-ad-provision: package-contains-documentation-outside-usr-share-doc *usr/share/samba/setup/*
+samba-ad-provision: extra-license-file */setup/ad-schema/licence.txt*
+samba-ad-provision: extra-license-file */setup/adprep/WindowsServerDocs/LICENSE*


=====================================
debian/samba.install
=====================================
@@ -45,5 +45,4 @@ usr/share/man/man8/samba.8
 usr/share/man/man8/smbd.8
 usr/share/samba/admx/
 usr/share/samba/mdssvc/elasticsearch_mappings.json
-usr/share/samba/setup
 usr/share/samba/update-apparmor-samba-profile


=====================================
debian/samba.lintian-overrides
=====================================
@@ -1,5 +1 @@
-# Standard path for [printers] section is world-writeable with sticky bit set
-samba: non-standard-dir-perm var/spool/samba/ 1777 != 0755
 samba: hardening-no-fortify-functions */samba/libmscat-samba4.so.*
-# documentation and specifications for the schemas, keep them in the same place
-samba: package-contains-documentation-outside-usr-share-doc *usr/share/samba/setup/*



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/136ad5975670da8250015a2effe71aa32f4940e9...f7d093f30c6ec99bf3b886680f202ac36a48d331

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/136ad5975670da8250015a2effe71aa32f4940e9...f7d093f30c6ec99bf3b886680f202ac36a48d331
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/20221202/b0c6d8db/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list