[Pkg-samba-maint] [Git][samba-team/samba][master] 8 commits: stop overriding dh_install just to set up env. var used in...

Michael Tokarev (@mjt) gitlab at salsa.debian.org
Wed Apr 6 22:12:36 BST 2022



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


Commits:
b2200518 by Michael Tokarev at 2022-04-06T21:24:24+03:00
stop overriding dh_install just to set up env. var used in python3-ldb-dev.install, move in there directly

- - - - -
e1cd1599 by Michael Tokarev at 2022-04-06T23:39:17+03:00
d/rules: simplify ctdb install rules a bit

- - - - -
37e05935 by Michael Tokarev at 2022-04-06T23:58:14+03:00
d/rules: implement build/build-arch/build-indep rules directly, we need nothing from dh in there

- - - - -
1a47bd94 by Michael Tokarev at 2022-04-07T00:11:15+03:00
d/rules: split out samba-common to into arch-indep and install files directly in there

- - - - -
1d0d10ae by Michael Tokarev at 2022-04-07T00:11:17+03:00
d/rules: change fixperm addon to run as -execute_after_dh_fixperms-arch

- - - - -
2d9972f5 by Michael Tokarev at 2022-04-07T00:11:17+03:00
d/control: move almost all Build-Depends to Build-Depends-Arch, reformat them to use tab ident

- - - - -
5d09b67d by Michael Tokarev at 2022-04-07T00:11:17+03:00
d/control: group Build-Depends[-Indep]

- - - - -
3f4c0fbe by Michael Tokarev at 2022-04-07T00:11:17+03:00
update changelog

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/python3-ldb-dev.install
- debian/rules
- − debian/samba-common.install
- − debian/source/lintian-overrides


Changes:

=====================================
debian/changelog
=====================================
@@ -1,6 +1,5 @@
 samba (2:4.16.0+dfsg-2) UNRELEASED; urgency=medium
 
-  * more various updates to d/rules
   * use strict versioned dependency between samba-dsdb-modules and libldb2,
     since they're tied to each other and are now built from the same source
   * fix forgotten shlib symbols generation for python3-ldb
@@ -16,6 +15,11 @@ samba (2:4.16.0+dfsg-2) UNRELEASED; urgency=medium
     is useless without samba itself (which is not built on this environment)
   * create selftest rules and add !nocheck build-dependencies
     (but do not enable selftests for now as they're failing)
+  * split build system into -arch and -indep parts. We build only one arch-all
+    package (samba-common) which contains only static files from debian/,
+    there's no need to build whole samba to build this package.
+    Move almost all Build-Depends to Build-Depends-Arch (and reindent them).
+  * various updates to d/rules
 
  -- Michael Tokarev <mjt at tls.msk.ru>  Wed, 06 Apr 2022 14:48:20 +0300
 


=====================================
debian/control
=====================================
@@ -9,68 +9,71 @@ Uploaders: Steve Langasek <vorlon at debian.org>,
            Michael Tokarev <mjt at tls.msk.ru>
 Homepage: https://www.samba.org
 Standards-Version: 4.5.1
-Build-Depends: bison,
-               debhelper-compat (= 13),
-               dh-exec,
-               dh-python,
-               docbook-xml,
-               docbook-xsl,
-               flex,
+Build-Depends:
+	debhelper-compat (= 13),
+	dh-exec,
+Build-Depends-Arch:
+	dh-sequence-python3,
+# tools:
+	bison,
+	docbook-xml,
+	docbook-xsl,
+	flex,
+	perl,
+	po-debconf,
+	xsltproc,
 # 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~),
+	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~),
+# system libraries:
+	pkg-config,
+	libacl1-dev,
+	libarchive-dev,
+	libavahi-client-dev,
+	libavahi-common-dev,
+	libblkid-dev,
+	libbsd-dev,
+	libcap-dev [linux-any],
+	libcephfs-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el ppc64 s390x x32],
+	libcmocka-dev (>= 1.1.3),
+	libcups2-dev,
+	libdbus-1-dev,
+	libglusterfs-dev [linux-any],
+	libgnutls28-dev,
+	libgpgme11-dev,
+	libicu-dev,
+	libjansson-dev,
+	libjson-perl,
+	libldap2-dev,
+	liblmdb-dev,
+	libncurses5-dev,
+	libpam0g-dev,
+	libparse-yapp-perl,
+	libpcap-dev [hurd-i386 kfreebsd-any],
+	libpopt-dev,
+	librados-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el ppc64 s390x x32],
+	libreadline-dev,
+	libsystemd-dev [linux-any],
+	libtasn1-6-dev (>= 3.8),
+	libtasn1-bin,
+	liburing-dev [linux-any],
+	xfslibs-dev [linux-any],
+	zlib1g-dev (>= 1:1.2.3),
+# python:
+	python3,
+	python3-dev,
+	python3-dnspython,
+	python3-etcd,
+	python3-markdown,
+	python3-testtools,
 # dependencies needed for selftest:
-               openssl <!nocheck>,
-               python3-cryptography <!nocheck>,
-               python3-iso8601 <!nocheck>,
-               python3-pyasn1 <!nocheck>,
-# ..end
-               libacl1-dev,
-               libarchive-dev,
-               libavahi-client-dev,
-               libavahi-common-dev,
-               libblkid-dev,
-               libbsd-dev,
-               libcap-dev [linux-any],
-               libcephfs-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el ppc64 s390x x32],
-               libcmocka-dev (>= 1.1.3),
-               libcups2-dev,
-               libdbus-1-dev,
-               libglusterfs-dev [linux-any],
-               libgnutls28-dev,
-               libgpgme11-dev,
-               libicu-dev,
-               libjansson-dev,
-               libjson-perl,
-               libldap2-dev,
-               liblmdb-dev,
-               libncurses5-dev,
-               libpam0g-dev,
-               libparse-yapp-perl,
-               libpcap-dev [hurd-i386 kfreebsd-any],
-               libpopt-dev,
-               librados-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el ppc64 s390x x32],
-               libreadline-dev,
-               libsystemd-dev [linux-any],
-               libtasn1-6-dev (>= 3.8),
-               libtasn1-bin,
-               liburing-dev [linux-any],
-               perl,
-               pkg-config,
-               po-debconf,
-               python3-dev,
-               python3-dnspython,
-               python3-etcd,
-               python3-markdown,
-               python3-testtools,
-               python3,
-               xfslibs-dev [linux-any],
-               xsltproc,
-               zlib1g-dev (>= 1:1.2.3)
-Build-Depends-Arch: dh-sequence-python3
+	openssl <!nocheck>,
+	python3-cryptography <!nocheck>,
+	python3-iso8601 <!nocheck>,
+	python3-pyasn1 <!nocheck>,
 Build-Conflicts: libtracker-miner-2.0-dev,
                  libtracker-sparql-2.0-dev
 Rules-Requires-Root: binary-targets


=====================================
debian/python3-ldb-dev.install
=====================================
@@ -1,4 +1,8 @@
-#! /usr/bin/dh-exec
-usr/include/samba-4.0/pyldb.h ${DEB_PY3_INCDIR}
+#! /bin/sh
+PY3_INCDIR=$(${PYTHON:-python3}-config --includes |
+             sed 's,^-I\([^ ]*\).*,\1,')
+echo "\
+usr/include/samba-4.0/pyldb.h $PY3_INCDIR
 usr/lib/*/libpyldb-util.cpython-*.so
 usr/lib/*/pkgconfig/pyldb-util.cpython-*.pc
+"


=====================================
debian/rules
=====================================
@@ -113,18 +113,19 @@ endif
 # build_pakages will honour arch/indep and the above disabled list
 build_packages := $(shell dh_listpackages)
 
-binary binary-arch binary-indep build build-arch build-indep \
+binary binary-arch binary-indep \
 clean install install-arch install-indep: %:
 	dh $*
 
-override_dh_auto_configure configure: bin/configured.stamp
+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:
+build-arch: bin/built.stamp
+bin/built.stamp: bin/configured.stamp
 # samba build system is designed so that default build (what is produced
 # by waf build) supposed to be run directly from the build directory,
 # with all the paths pointing there.  At the install stage, quite some
@@ -139,6 +140,9 @@ override_dh_auto_build:
 # better/faster than building whole thing for _not_ running from the build dir.
 	${WAF} --targets=compile_et,asn1_compile
 	${WAF} install --destdir="${CURDIR}/debian/tmp"
+	touch $@
+build-indep:
+build: build-arch build-indep
 
 ##############  Tests ##############
 # We should use separate build for tests since it requires configuration
@@ -176,7 +180,7 @@ selftest-quick: testbuild/configured.stamp
 
 override_dh_auto_test: # $(if $(findstring nocheck, ${DEB_BUILD_OPTIONS}),, selftest-quick)
 
-override_dh_auto_install:
+override_dh_auto_install-arch:
 # the same "waf install" as in the build target
 	${WAF} install --destdir="${CURDIR}/debian/tmp"
 	# get list of files in build log
@@ -192,12 +196,7 @@ override_dh_auto_install:
 	# Debian goodies to set global option in smb.conf and add a share
 	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 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/
@@ -235,9 +234,18 @@ ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
 	install -p debian/ctdb.README.kfreebsd debian/tmp/ctdb/README.kfreebsd
 endif
 
-override_dh_install:
-	DEB_PY3_INCDIR=$$(${PYTHON}-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
-		dh_install
+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
+# directly into the right place without d/samba-common.install indirection
+	# Debian goodies
+	install -Dp -m0644 debian/smb.conf* -t debian/samba-common/usr/share/samba/
+	install -Dp -m755 debian/panic-action -t debian/samba-common/usr/share/samba/
+	install -Dp -m0644 debian/gdbcommands -t debian/samba-common/etc/samba/
+	install -Dp -m0755 debian/samba-common.dhcp debian/samba-common/etc/dhcp/dhclient-enter-hooks.d/samba
+	# don't actually need installpam here, it just installs one file
+	# we wrongly have pam file in samba-common instead of samba, should move it one day
+	dh_installpam -psamba-common --name=samba
 
 # include a command only if the given package is being built
 ifpkg = $(if $(filter ${1},${build_packages}),${2})
@@ -250,9 +258,7 @@ ifneq (,$(filter samba, ${build_packages}))
 endif
 	$(call ifpkg, winbind, dh_installinit -pwinbind)
 ifneq (,$(filter ctdb, ${build_packages}))
-	# Install /etc/init.d/ctdb
-	mkdir -p debian/ctdb/etc/init.d
-	install -m755 ctdb/config/ctdb.init debian/ctdb/etc/init.d/ctdb
+	install -Dp -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
@@ -262,17 +268,13 @@ override_dh_installsystemd:
 	$(call ifpkg, winbind, dh_installsystemd -pwinbind)
 	$(call ifpkg, ctdb, dh_installsystemd -pctdb --no-start --no-stop-on-upgrade)
 
-override_dh_installpam:
-	dh_installpam -psamba-common --name=samba
-
 #override_dh_perl-arch:
 #	dh_perl -a
 #	# Fix Perl shbangs
 #	sed -i '1s@^#!/usr/bin/env perl@#!/usr/bin/perl@' \
 #	  debian/smbclient/usr/bin/findsmb
 
-override_dh_fixperms:
-	dh_fixperms
+execute_after_dh_fixperms-arch:
 	$(call ifpkg, samba, chmod 1777 debian/samba/var/spool/samba/)
 	$(call ifpkg, smbclient, chmod 0700 debian/smbclient/usr/libexec/samba/smbspool_krb5_wrapper)
 


=====================================
debian/samba-common.install deleted
=====================================
@@ -1,5 +0,0 @@
-etc/dhcp/
-etc/samba/
-etc/samba/gdbcommands
-usr/share/samba/panic-action
-usr/share/samba/smb.conf*


=====================================
debian/source/lintian-overrides deleted
=====================================
@@ -1,2 +0,0 @@
-# this variable is set in d/rules
-samba source: dh-exec-subst-unknown-variable DEB_PY3_INCDIR [debian/python3-ldb-dev.install:2]



View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/f7852bc9528a82f6870c2c5f6fcadd332c33019b...3f4c0fbe77d967e99bcd9c2e3228ea585e10efc8

-- 
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/f7852bc9528a82f6870c2c5f6fcadd332c33019b...3f4c0fbe77d967e99bcd9c2e3228ea585e10efc8
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/20220406/7c652ebe/attachment-0001.htm>


More information about the Pkg-samba-maint mailing list