[Pkg-samba-maint] [Git][samba-team/samba][master] 17 commits: d/changelog: mention closing of 998423 by 4.16

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Mon Apr 4 21:53:47 BST 2022



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


Commits:
43b433eb by Michael Tokarev at 2022-04-04T14:09:12+03:00
d/changelog: mention closing of 998423 by 4.16

- - - - -
b3f32547 by Michael Tokarev at 2022-04-04T14:38:04+03:00
d/rules: it is just the ldb library for --bundled-libraries, not a whole bunch

- - - - -
24601a9f by Michael Tokarev at 2022-04-04T14:43:47+03:00
d/rules: we do not need fancy python variables anymore

- - - - -
4dbaf50d by Michael Tokarev at 2022-04-04T19:12:57+03:00
d/rules: drop other python variables too, we just need PYTHON=python3

the build system only uses ${PYTHON} to run various config/build/test
pieces, it does not embed it anywhere, it seems (for python scripts it
uses #!/usr/bin/env python3). So we do not need to find and export the
full path to it, just `python3' is enough.

- - - - -
25e17f5c by Michael Tokarev at 2022-04-04T19:15:03+03:00
d/rules: use ${PYTHON} for python3-config too

- - - - -
2da26960 by Michael Tokarev at 2022-04-04T19:19:03+03:00
d/control: group all libs we embed and move them to the top of the Build-Depends libs list

- - - - -
bf6a3551 by Michael Tokarev at 2022-04-04T19:32:20+03:00
update changelog

- - - - -
054e0ab1 by Michael Tokarev at 2022-04-04T22:37:18+03:00
d/rules: reformat a bit

- - - - -
bb698e07 by Michael Tokarev at 2022-04-04T22:37:18+03:00
d/rules: waf build does not need DESTDIR

- - - - -
d26fe4d6 by Michael Tokarev at 2022-04-04T22:37:18+03:00
use --destdir option instead of the environment variable for waf install

- - - - -
2e47665b by Michael Tokarev at 2022-04-04T23:08:33+03:00
d/rules: get rid of ${DESTDIR} entirely

This variable holds full path to the debian/tmp directory.
This is only needed when installing (waf install), but I'm
not sure even for this one. Also dh_shlibdeps wants absolute
path. Other than that, debian/tmp is just as good and it is
a well-established pathname, understood exactly as a temporary
installation area.

Replace ${DESTDIR} with debian/tmp.
This avoids long paths in build logs, making them more readable.

- - - - -
e548e02a by Michael Tokarev at 2022-04-04T23:09:36+03:00
d/rules: no need to chmod panic-action - it is installed this way

- - - - -
81c2ccde by Michael Tokarev at 2022-04-04T23:09:36+03:00
d/rules: stop working around #726726

in --ldflags, so samba local library overrides were not used.

This bug is long fixed.  Now, we might have the same issue with
other libraries/packages we use, but it will have to be worked
arond in other (maybe similar) way.

- - - - -
4ecc4c3a by Michael Tokarev at 2022-04-04T23:09:36+03:00
d/rules: remove jelmer@ name: the file is 99% rewritten now

- - - - -
e597069d by Michael Tokarev at 2022-04-04T23:09:36+03:00
d/rules: silence (re)generation of debian/ldb-version.mk

- - - - -
144e7501 by Michael Tokarev at 2022-04-04T23:09:36+03:00
d/rules: fix the DEB_HOST_ARCH &Co defines again, for good: escape the $s properly for $(eval)

- - - - -
0aa04522 by Michael Tokarev at 2022-04-04T23:32:38+03:00
d/rules: do not run configure every build, and allow ./d/rules configure

`dh build' unconditionally calls dh_auto_configure as one of the steps.
When debugging build procedure, this becomes annoying, as every build
reconfigures things and hence rebuilds everything.

Use a stamp-file, bin/configured.stamp, and touch it after successful
configure run. And made override_dh_auto_configure target to just depend
on that stamp-file, with no commands to run.

While at it, also allow `./d/rules configure' as an easy manual shortcut.

- - - - -


4 changed files:

- − debian/bin/cups-config
- debian/changelog
- debian/control
- debian/rules


Changes:

=====================================
debian/bin/cups-config deleted
=====================================
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# wrapper around cups-config, to work around #726726
-
-DEB_HOST_MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`
-/usr/bin/cups-config "$@" | sed "s;-L/usr/lib/${DEB_HOST_MULTIARCH}; ;g"


=====================================
debian/changelog
=====================================
@@ -7,6 +7,7 @@ samba (2:4.16.0+dfsg-1) UNRELEASED; urgency=medium
      the outside target of a symlink exists
     Closes: #1005642 (windows client data corruption due to cache poisoning)
     Closes: #988197 (legacy printing support, 47d79d7e7e406f7dd2)
+    Closes: #998423 (coredump connecting from macos to shares with var substs)
   * Notable changes in 4.16 series compared to 4.13:
     - modular VFS (see The_New_VFS.txt)
     - publishing printers in AD is more complete
@@ -65,6 +66,20 @@ samba (2:4.16.0+dfsg-1) UNRELEASED; urgency=medium
   * d/control: remove breaks/replaces/depends on ancient versions of some
     packages (ancient dpkg version in Pre-Depends, ancient samba-libs)
   * d/rules: rework wrong shlibdeps handling
+  * move helper programs from /usr/lib/$multiarch/ to /usr/libexec/
+    where they belongs. This should not affect users.
+  * smbclient: re-do the fix for an old bug, #221618. The original "fix"
+    did not fix anything (it is too late already to #define _FILE_OFFSET_BITS
+    when all types has already been defined).  From now on, raise an error
+    if off_t is less than 64bits (it should >=64 when #include'ing
+    <libsmbclient.h> with proper LFS defines).  In theory this can break
+    some sources which either included libsmbclient.h without a reason or
+    which didn't use any of the functions which deals with off_t (smbc_lseek
+    etc), - which did not explicitly enable LFS on a 32bit system.
+    Please email us if you faced such situation.
+  * drop 07_private_lib patch: we do not need to force rpath for
+    private libraries into every samba binary, upstream build system
+    does a good job here.
 
  -- Michael Tokarev <mjt at tls.msk.ru>  Thu, 24 Mar 2022 13:54:07 +0300
 


=====================================
debian/control
=====================================
@@ -16,6 +16,13 @@ Build-Depends: bison,
                docbook-xml,
                docbook-xsl,
                flex,
+# libraries which we embed but use system versions of:
+               libtalloc-dev (>= 2.3.3-3~),
+               python3-talloc-dev (>= 2.3.3~),
+               libtevent-dev (>= 0.11.0~),
+               libtdb-dev (>= 1.4.6-2~),
+               python3-tdb (>= 1.4.6~),
+# ..end embedded libraries
                libacl1-dev,
                libarchive-dev,
                libavahi-client-dev,
@@ -43,11 +50,8 @@ Build-Depends: bison,
                librados-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el ppc64 s390x x32],
                libreadline-dev,
                libsystemd-dev [linux-any],
-               libtalloc-dev (>= 2.3.3-3~),
                libtasn1-6-dev (>= 3.8),
                libtasn1-bin,
-               libtdb-dev (>= 1.4.6-2~),
-               libtevent-dev (>= 0.11.0~),
                liburing-dev [linux-any],
                perl,
                pkg-config,
@@ -56,8 +60,6 @@ Build-Depends: bison,
                python3-dnspython,
                python3-etcd,
                python3-markdown,
-               python3-talloc-dev (>= 2.3.3~),
-               python3-tdb (>= 1.4.6~),
                python3-testtools,
                python3,
                xfslibs-dev [linux-any],


=====================================
debian/rules
=====================================
@@ -1,7 +1,4 @@
 #!/usr/bin/make -f
-# By Jelmer Vernooij <jelmer at samba.org>
-#
-DESTDIR = $(CURDIR)/debian/tmp
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
@@ -10,13 +7,10 @@ include /usr/share/dpkg/pkg-info.mk
 include /usr/share/dpkg/vendor.mk
 # faster version of dpkg/architecture.mk defining only vars we actually need
 $(foreach var,DEB_HOST_ARCH DEB_HOST_ARCH_OS DEB_HOST_MULTIARCH,\
-	$(eval export ${var} ?= $(shell dpkg-architecture -q${var})))
+	$(eval export ${var} ?= $$(shell dpkg-architecture -q${var})))
+
+export PYTHON = python3
 
-export PYSHORT=python3
-export PYTHON=$(shell which $(PYSHORT))
-export PYTHON_CONFIG=$(PYTHON)-config
-PYTHON_SUFFIX = $(call dpkg_late_eval,PYTHON_SUFFIX,\
-	${PYTHON_CONFIG} --extension-suffix | sed 's/\.so$$//')
 dh_packagelist := $(shell dh_listpackages)
 
 LDB_EPOCH := 2:
@@ -24,7 +18,8 @@ debian/ldb-version.mk: lib/ldb/wscript
 # define two variables based on local version of ldb
 # samba ships ldb modules, which are specific to the ldb version,
 # so we need a strict dependency on the upstream ldb version
-	set -e; \
+	@echo "(Re)checkig version of LDB library.."
+	@set -e; \
 	v=$$(grep ^VERSION $< | cut -d\' -f2); \
 	[ -n "$$v" ] || { echo "E: unable to get LDB version from $<" >&2; exit 1; }; \
 	v="\$${LDB_EPOCH}$$v"; n="$${v%.*}.$$(($${v##*.}+1))"; exec 3>$@.tmp; \
@@ -38,9 +33,6 @@ V = 1
 WAF_CMD := PYTHONHASHSEED=1 ${PYTHON} ./buildtools/bin/waf
 WAF := ${WAF_CMD} $(if ${V},-v)
 
-# wrapper around cups-config, to work around #726726
-export PATH:=$(CURDIR)/debian/bin:$(PATH)
-
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
     WAF += -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
@@ -74,7 +66,7 @@ conf_args = \
 		--enable-avahi \
 		--disable-rpath \
 		--disable-rpath-install \
-		--bundled-libraries=NONE,pytevent,ldb,pyldb,pyldb-util$(PYTHON_SUFFIX) \
+		--bundled-libraries=NONE,pytevent,ldb \
 		--with-cluster-support \
 		--with-socketpath=/run/ctdb/ctdbd.socket \
 		--with-logdir=/var/log/ctdb \
@@ -135,9 +127,12 @@ binary binary-arch binary-indep build build-arch build-indep \
 clean install install-arch install-indep: %:
 	dh $* --with python3 $(BUILD_PACKAGES)
 
-override_dh_auto_configure:
+override_dh_auto_configure configure: bin/configured.stamp
+.PHONY: configure
+bin/configured.stamp:
 	${WAF_CMD} -j 1 configure ${conf_args} || \
 	  { $(if ${V},echo "==== contents of config.log:"; cat bin/config.log;) false; }
+	touch $@
 
 override_dh_auto_build:
 # samba build system is designed so that default build (what is produced
@@ -152,73 +147,73 @@ override_dh_auto_build:
 # This will pefrorm unnecessary/extra install step (into d/tmp), which
 # we'll repeat during actual install stage, but this is definitely
 # better/faster than building whole thing for _not_ running from the build dir.
-	DESTDIR="$(DESTDIR)" $(WAF) --targets=compile_et,asn1_compile
-	DESTDIR="$(DESTDIR)" $(WAF) install
+	${WAF} --targets=compile_et,asn1_compile
+	${WAF} install --destdir="${CURDIR}/debian/tmp"
 
 override_dh_auto_test:
-	# Running make test requires configuration with --enable-selftest, which
-	# we don't want to do for production systems.
+	# Running make test requires configuration with --enable-selftest,
+	# which we don't want to do for production systems.
 
 override_dh_auto_install:
-	DESTDIR="$(DESTDIR)" $(WAF) install
+	${WAF} install --destdir="${CURDIR}/debian/tmp"
 	# get list of files in build log
-	find ${DESTDIR}
+	find debian/tmp
 	# Included in python-tevent
-	rm $(DESTDIR)/usr/lib/python*/*-packages/_tevent.*
-	rm $(DESTDIR)/usr/lib/python*/*-packages/tevent.py
+	rm debian/tmp/usr/lib/python*/*-packages/_tevent.*
+	rm debian/tmp/usr/lib/python*/*-packages/tevent.py
 	# Already documented in debian/copyright
-	-rm $(DESTDIR)/usr/share/samba/setup/ad-schema/licence.txt
+	-rm debian/tmp/usr/share/samba/setup/ad-schema/licence.txt
 	# pam stuff
-	install -Dp -m0644 debian/winbind.pam-config $(DESTDIR)/usr/share/pam-configs/winbind
-	mv $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libnss_* $(DESTDIR)/lib/$(DEB_HOST_MULTIARCH)/
+	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)/
 	# Debian goodies to set global option in smb.conf and add a share
-	install -p -m0755 debian/setoption.py -t $(DESTDIR)/usr/share/samba/
-	install -p -m0755 debian/addshare.py -t $(DESTDIR)/usr/share/samba/
+	install -p -m0755 debian/setoption.py -t debian/tmp/usr/share/samba/
+	install -p -m0755 debian/addshare.py -t debian/tmp/usr/share/samba/
 	# Debian goodies
-	install -p -m0644 debian/smb.conf* -t $(DESTDIR)/usr/share/samba/
-	install -p -m755 debian/panic-action -t $(DESTDIR)/usr/share/samba/
-	install -p -m755 debian/update-apparmor-samba-profile -t $(DESTDIR)/usr/share/samba/
-	install -p -m0644 debian/gdbcommands -t $(DESTDIR)/etc/samba/
-	install -Dp -m0755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp/dhclient-enter-hooks.d/samba
-	install -p -m0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd
-	install -Dp -m0644 debian/samba.ufw.profile $(DESTDIR)/etc/ufw/applications.d/samba
-	install -Dp -m0644 debian/source_samba.py -t $(DESTDIR)/usr/share/apport/package-hooks/
+	install -p -m0644 debian/smb.conf* -t debian/tmp/usr/share/samba/
+	install -p -m755 debian/panic-action -t debian/tmp/usr/share/samba/
+	install -p -m755 debian/update-apparmor-samba-profile -t debian/tmp/usr/share/samba/
+	install -p -m0644 debian/gdbcommands -t debian/tmp/etc/samba/
+	install -Dp -m0755 debian/samba-common.dhcp debian/tmp/etc/dhcp/dhclient-enter-hooks.d/samba
+	install -p -m0755 debian/mksmbpasswd.awk debian/tmp/usr/sbin/mksmbpasswd
+	install -Dp -m0644 debian/samba.ufw.profile debian/tmp/etc/ufw/applications.d/samba
+	install -Dp -m0644 debian/source_samba.py -t debian/tmp/usr/share/apport/package-hooks/
 ifeq ($(DEB_HOST_ARCH_OS), linux)
 	# Install systemd configs
-	install -Dp -m0644 ctdb/config/ctdb.service -t $(DESTDIR)/lib/systemd/system/
+	install -Dp -m0644 ctdb/config/ctdb.service -t debian/tmp/lib/systemd/system/
 	# Services fixups
-	mv $(DESTDIR)/lib/systemd/system/nmb.service $(DESTDIR)/lib/systemd/system/nmbd.service
-	mv $(DESTDIR)/lib/systemd/system/smb.service $(DESTDIR)/lib/systemd/system/smbd.service
-	mv $(DESTDIR)/lib/systemd/system/samba.service $(DESTDIR)/lib/systemd/system/samba-ad-dc.service
+	mv debian/tmp/lib/systemd/system/nmb.service debian/tmp/lib/systemd/system/nmbd.service
+	mv debian/tmp/lib/systemd/system/smb.service debian/tmp/lib/systemd/system/smbd.service
+	mv debian/tmp/lib/systemd/system/samba.service debian/tmp/lib/systemd/system/samba-ad-dc.service
 	sed -i \
 	  -e 's|/etc/sysconfig/|/etc/default/|' \
 	  -e 's|nmb\.service|nmbd.service|' \
 	  -e 's|smb\.service|smbd.service|' \
 	  -e 's|samba\.service|samba-ad-dc.service|' \
-	  $(DESTDIR)/lib/systemd/system/nmbd.service \
-	  $(DESTDIR)/lib/systemd/system/samba-ad-dc.service \
-	  $(DESTDIR)/lib/systemd/system/smbd.service \
-	  $(DESTDIR)/lib/systemd/system/winbind.service
+	  debian/tmp/lib/systemd/system/nmbd.service \
+	  debian/tmp/lib/systemd/system/samba-ad-dc.service \
+	  debian/tmp/lib/systemd/system/smbd.service \
+	  debian/tmp/lib/systemd/system/winbind.service
 endif
 	# Harmless on systems without systemd-tmpfiles, and other consumers exist
 	# such as OpenRC's opentmpfiles
-	mkdir -p $(DESTDIR)/usr/lib/tmpfiles.d
-	echo "d /run/samba 0755 root root -" > $(DESTDIR)/usr/lib/tmpfiles.d/samba.conf
-	echo "d /run/ctdb 0755 root root -" > $(DESTDIR)/usr/lib/tmpfiles.d/ctdb.conf
+	mkdir -p debian/tmp/usr/lib/tmpfiles.d
+	echo "d /run/samba 0755 root root -" > debian/tmp/usr/lib/tmpfiles.d/samba.conf
+	echo "d /run/ctdb 0755 root root -" > debian/tmp/usr/lib/tmpfiles.d/ctdb.conf
 
 	# install-and-rename docs for ctdb (also arch-specific)
-	mkdir -p ${DESTDIR}/ctdb
-	install -p ctdb/config/events/README ${DESTDIR}/ctdb/README.notification
-	install -p ctdb/config/notification.README ${DESTDIR}/ctdb/README.notification
+	mkdir -p debian/tmp/ctdb
+	install -p ctdb/config/events/README debian/tmp/ctdb/README.notification
+	install -p ctdb/config/notification.README debian/tmp/ctdb/README.notification
 ifeq ($(DEB_HOST_ARCH_OS), hurd)
-	install -p debian/ctdb.README.hurd ${DESTDIR}/ctdb/README.hurd
+	install -p debian/ctdb.README.hurd debian/tmp/ctdb/README.hurd
 endif
 ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
-	install -p debian/ctdb.README.kfreebsd ${DESTDIR}/ctdb/README.kfreebsd
+	install -p debian/ctdb.README.kfreebsd debian/tmp/ctdb/README.kfreebsd
 endif
 
 override_dh_install:
-	DEB_PY3_INCDIR=$$(python3-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
+	DEB_PY3_INCDIR=$$(${PYTHON}-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
 		dh_install
 
 override_dh_installinit:
@@ -232,8 +227,8 @@ ifneq (,$(filter winbind, ${dh_packagelist}))
 endif
 ifneq (,$(filter ctdb, ${dh_packagelist}))
 	# Install /etc/init.d/ctdb
-	mkdir -p $(CURDIR)/debian/ctdb/etc/init.d
-	install -m755 ctdb/config/ctdb.init $(CURDIR)/debian/ctdb/etc/init.d/ctdb
+	mkdir -p debian/ctdb/etc/init.d
+	install -m755 ctdb/config/ctdb.init debian/ctdb/etc/init.d/ctdb
 	# Install dh scripts
 	dh_installinit -pctdb --no-start --no-stop-on-upgrade --onlyscripts
 endif
@@ -260,9 +255,6 @@ override_dh_installpam:
 
 override_dh_fixperms:
 	dh_fixperms
-ifneq (,$(filter samba-common, ${dh_packagelist}))
-	chmod a+x debian/samba-common/usr/share/samba/panic-action
-endif
 ifneq (,$(filter samba, ${dh_packagelist}))
 	chmod 1777 debian/samba/var/spool/samba/
 endif
@@ -278,7 +270,7 @@ override_dh_makeshlibs:
 override_dh_shlibdeps:
 # for specific executables/modules, put dependencies in separate variables
 # to change Depends to Recommends for them in d/control
-	dh_shlibdeps -a -l${DESTDIR}/usr/lib/${DEB_HOST_MULTIARCH}/samba \
+	dh_shlibdeps -l${CURDIR}/debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/samba \
 	    -Xceph.so -Xglusterfs.so -Xsnapper.so -Xctdb_mutex_ceph_rados_helper
 ifneq ($(WITH_CEPH),)
 	dpkg-shlibdeps -Tdebian/ctdb.substvars -prados \



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/c2e331a022f36f309b54794bf06d13f3d3c7b8b6...0aa045222140b1d5a0c935af1c2f5b94883abd12

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/c2e331a022f36f309b54794bf06d13f3d3c7b8b6...0aa045222140b1d5a0c935af1c2f5b94883abd12
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/20220404/e5253055/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list