samba: 4.22.7 -> 4.23.5
Patch 'build-find-pre-built-heimdal-build-tools-in-case-of-.patch' no longer applied. I found that LibreELEC maintainers had posted on https://bugzilla.samba.org/show_bug.cgi?id=14164, and that they had an updated patch, so let's just fetch that. Why do we need `--with-systemd`? Samba 4.23 has a build script regression that no longer auto-detects systemd libraries. I intend to raise this with Samba's bugzilla, but in short: * Samba 4.23 upgraded its bundled waf from 2.0.26 (used in 4.22.x) to 2.1.6. * waf 2.1.6 switched the CLI option parser from `optparse` to `argparse`, in which case the default boolean was previously `None`, but is now `False`. * In `lib/util/wscript`, the systemd options are registered like `opt.add_option('--with-systemd', action='store_true', dest='enable_systemd')`. * In `lib/util/wscript_configure`, the libsystemd checks are guarded by `options.enable_sytemd != False`, and thus is no longer true when unspecified.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From 450a6183586243d907843c7d89973452b59d8b10 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Fitzhenry <tom@tom-fitzhenry.me.uk>
|
||||
Date: Fri, 17 Apr 2026 22:35:08 +0000
|
||||
Subject: [PATCH] fix systemd detection after argparse migration
|
||||
|
||||
---
|
||||
lib/util/wscript | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/util/wscript b/lib/util/wscript
|
||||
index 425f659a2ed..b8baabfbea9 100644
|
||||
--- a/lib/util/wscript
|
||||
+++ b/lib/util/wscript
|
||||
@@ -13,7 +13,7 @@ def options(opt):
|
||||
|
||||
opt.add_option('--with-systemd',
|
||||
help=("Enable systemd integration"),
|
||||
- action='store_true', dest='enable_systemd')
|
||||
+ action='store_true', dest='enable_systemd', default=None)
|
||||
|
||||
opt.add_option('--without-systemd',
|
||||
help=("Disable systemd integration"),
|
||||
@@ -21,7 +21,7 @@ def options(opt):
|
||||
|
||||
opt.add_option('--with-lttng',
|
||||
help=("Enable lttng integration"),
|
||||
- action='store_true', dest='enable_lttng')
|
||||
+ action='store_true', dest='enable_lttng', default=None)
|
||||
|
||||
opt.add_option('--without-lttng',
|
||||
help=("Disable lttng integration"),
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@@ -81,11 +81,11 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "samba";
|
||||
version = "4.22.7";
|
||||
version = "4.23.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.samba.org/pub/samba/stable/samba-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-EhlYEdRUL2YVNukFW0TVjFMCBBK+r6riBeInv3L2pJc=";
|
||||
hash = "sha256-WTpD3dDVeQIjffp2iI97Ast/x3RxETacsx4SbbSDa58=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
@@ -98,7 +98,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./4.x-no-persistent-install.patch
|
||||
./4.x-no-persistent-install-dynconfig.patch
|
||||
./4.x-fix-makeflags-parsing.patch
|
||||
./build-find-pre-built-heimdal-build-tools-in-case-of-.patch
|
||||
./4.x-fix-systemd-detection.patch
|
||||
(fetchpatch {
|
||||
# workaround for https://bugzilla.samba.org/show_bug.cgi?id=14164
|
||||
name = "build-find-pre-built-heimdal-build-tools-in-case-of-.patch";
|
||||
url = "https://raw.githubusercontent.com/LibreELEC/LibreELEC.tv/fe5538114371b98c7350e6fffbfc0d1ac063719c/packages/network/samba/patches/samba-200-4.11-fix-ASN1-bso14164.patch";
|
||||
hash = "sha256-0/c9TH5FZ4S1OoM04gwDBJoIN+10unjLSv7Hlwt9FEQ=";
|
||||
})
|
||||
(fetchpatch {
|
||||
# workaround for https://github.com/NixOS/nixpkgs/issues/303436
|
||||
name = "samba-reproducible-builds.patch";
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
From 475ec75a34002aafabc92659f693cf705c96aff4 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Cao <nickcao@nichi.co>
|
||||
Date: Thu, 21 Nov 2024 15:30:00 -0500
|
||||
Subject: [PATCH] build: find pre-built heimdal build tools in case of embedded
|
||||
heimdal
|
||||
|
||||
This patch fixes the case of finding asn1_compile and compile_et for
|
||||
building embedded heimdal, by setting
|
||||
--bundled-libraries='!asn1_compile,!compile_et' as configure flags.
|
||||
|
||||
The Heimdal build tools compile_et and asn1_compile are needed *only*
|
||||
if we use the embedded heimdal (otherwise we don't build heimdal and
|
||||
use headers that have been generated by those tools elsewhere).
|
||||
|
||||
For cross-compilation with embedded heimdal, it is vital to use host build
|
||||
tools, and so asn1_compile and compile_et must be supplied and not
|
||||
built. One way of doing this would be to set the COMPILE_ET and
|
||||
ASN1_COMPILE env vars to the location of supplied binaries. Another way,
|
||||
which is more commonly used, is to exclude asn1_compile and compile_et
|
||||
from bundled packages via the switch
|
||||
-bundled-libraries='!asn1_compile,!compile_et'. When this is done,
|
||||
the build script searches the path for those tools and sets the
|
||||
ASN1_COMPILE and COMPILE_ET vars accordingly. (this is admittedly
|
||||
kind of a round-about way of doing things but this has become the
|
||||
de-facto standard amongst embedded distro builders).
|
||||
|
||||
In commit 8061983d4882f3ba3f12da71443b035d7b672eec, this process of
|
||||
finding the binaris has been moved to be carried out only in the
|
||||
system heimdal case. As explained above, we only need these tools,
|
||||
and hence the check, in bundled mode.
|
||||
|
||||
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14164
|
||||
|
||||
Signed-off-by: Uri Simchoni <uri@samba.org>
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Bachp: rebased for version 4.15.0]
|
||||
[Mats: rebased for version 4.18.5]
|
||||
[hexa: rebased for version 4.22.3]
|
||||
---
|
||||
wscript_configure_embedded_heimdal | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/wscript_configure_embedded_heimdal b/wscript_configure_embedded_heimdal
|
||||
index c1488e5506e..ede28ba7fc3 100644
|
||||
--- a/wscript_configure_embedded_heimdal
|
||||
+++ b/wscript_configure_embedded_heimdal
|
||||
@@ -15,3 +15,14 @@ conf.RECURSE('third_party/heimdal_build')
|
||||
conf.define('HAVE_CLIENT_GSS_C_CHANNEL_BOUND_FLAG', 1)
|
||||
|
||||
conf.define('HAVE_KRB5_INIT_CREDS_STEP', 1)
|
||||
+
|
||||
+def check_system_heimdal_binary(name):
|
||||
+ if conf.LIB_MAY_BE_BUNDLED(name):
|
||||
+ return False
|
||||
+ if not conf.find_program(name, var=name.upper()):
|
||||
+ return False
|
||||
+ conf.define('USING_SYSTEM_%s' % name.upper(), 1)
|
||||
+ return True
|
||||
+
|
||||
+check_system_heimdal_binary("compile_et")
|
||||
+check_system_heimdal_binary("asn1_compile")
|
||||
--
|
||||
2.50.1
|
||||
Reference in New Issue
Block a user