[Pkg-samba-maint] [Git][samba-team/samba][mjt-4.16] 5 commits: samba.postinst: mkdir /run/samba before invoking samba binaries (#953530)
Michael Tokarev (@mjt)
gitlab at salsa.debian.org
Wed Mar 30 21:45:49 BST 2022
Michael Tokarev pushed to branch mjt-4.16 at Debian Samba Team / samba
Commits:
f0bbb805 by Michael Tokarev at 2022-03-30T19:48:04+03:00
samba.postinst: mkdir /run/samba before invoking samba binaries (#953530)
- - - - -
5025255a by Michael Tokarev at 2022-03-30T23:42:45+03:00
d/rules: do not run waf build step, perform waf install step instead
Stop building samba runnable directly from the build directory
as `waf build' builds, we don't need it.
See comments in the d/rules.
- - - - -
0afe5b2a by Michael Tokarev at 2022-03-30T23:45:16+03:00
d/rules: do not run waf clean in the clean target, whole build dir is removed
- - - - -
b315c823 by Michael Tokarev at 2022-03-30T23:45:28+03:00
d/rules: do not remove non-existing files from ctdb/doc/examples
- - - - -
a68dc9a4 by Michael Tokarev at 2022-03-30T23:45:28+03:00
d/changelog: spelling
- - - - -
4 changed files:
- debian/changelog
- debian/rules
- debian/samba-common-bin.postinst
- debian/samba.postinst
Changes:
=====================================
debian/changelog
=====================================
@@ -26,8 +26,8 @@ samba (2:4.16.0+dfsg-1) UNRELEASED; urgency=medium
* build libldb from samba sources, not from separate source
(this moves ldb plugins from /usr/lib/$triple/ldb/plugin/ldb/ to
/usr/lib/$triple/samba/ldb/ - the same where dsdb modules are).
- * optimizations for d/make_shlibs; also allow to specify explicit version
- for some packages
+ * optimizations for d/make_shlibs; also allow one to specify explicit
+ version for some packages
* as per clarifications for waf --{bundled,builtin}-libraries, remove
now-wrong usage there. This also fixes build failures with current
samba sources
@@ -36,6 +36,12 @@ samba (2:4.16.0+dfsg-1) UNRELEASED; urgency=medium
Including caching of LDB version information in d/ldb-version.mk file.
This does not affect the buildd processing much (and does not affect
runtime at all), but helps with build procedure debugging.
+ * change build procedure: instead of `waf build', run `waf install'.
+ `waf build' builds samba to be run from the build dir, and `waf install'
+ rebuilds/relinks everything again for production. Build the production
+ variant only, no build-dir one.
+ * samba.postinst, samba-common-bin.postinst: explicitly mkdir /run/samba
+ before invoking samba binaries (Closes: #953530)
-- Michael Tokarev <mjt at tls.msk.ru> Thu, 24 Mar 2022 13:54:07 +0300
=====================================
debian/rules
=====================================
@@ -139,7 +139,20 @@ override_dh_auto_configure:
$(WAF_NO_PARALLEL) configure $(conf_args)
override_dh_auto_build:
- DESTDIR="$(DESTDIR)" $(WAF)
+# 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
+# recompilation/relinking is done again, to adopt to the actual install
+# paths. There's no need (for now) to build samba to be run from the build
+# directory, so we use `waf install' here instead of `waf build'.
+# However, as of 4.16, `waf install' without the build step fails, since
+# it tries to run two executables which are not built.
+# Build these two executables first, and build the install stage.
+# 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
override_dh_auto_test:
# Running make test requires configuration with --enable-selftest, which
@@ -315,11 +328,7 @@ override_dh_gencontrol:
dh_gencontrol --remaining-packages -- -Vldb:Depends="${LDB_DEPENDS}"
override_dh_auto_clean:
- -$(WAF) clean
find . -name "*.pyc" | xargs rm -f
rm -rf buildtools/bin/.waf-*
rm -rf bin
rm -f .lock-wscript
- rm -f ctdb/README.eventscripts
- rm -f ctdb/README.notification
- rm -rf ctdb/doc/examples/nfs-kernel-server/
=====================================
debian/samba-common-bin.postinst
=====================================
@@ -2,10 +2,8 @@
set -e
-# systemd-tmpfiles should be called before testparm
-# See https://bugs.debian.org/975422
-
-#DEBHELPER#
+# 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`
@@ -19,3 +17,5 @@ if [ "$1" = "configure" ] ; then
echo "Done"
fi
fi
+
+#DEBHELPER#
=====================================
debian/samba.postinst
=====================================
@@ -66,6 +66,9 @@ then
install -d -m 1770 -g sambashare /var/lib/samba/usershares
fi
+# ensure a (tmpfs-based) /run/samba exists before running testparm
+[ -d /run/samba ] || mkdir -p /run/samba
+
# 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
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/670d65daaad9a99a9e84e99752cc075f304489a9...a68dc9a4698f542bae2ae5462dadb42fb9800265
--
View it on GitLab: https://salsa.debian.org/samba-team/samba/-/compare/670d65daaad9a99a9e84e99752cc075f304489a9...a68dc9a4698f542bae2ae5462dadb42fb9800265
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/20220330/c41f8bbb/attachment-0001.htm>
More information about the Pkg-samba-maint
mailing list