samba: 4.20.8 -> 4.22.3 (#433796)

authored by Martin Weinelt and committed by GitHub ae0ba2b2 9ccc011d

+24 -66
+7 -13
pkgs/servers/samba/4.x-no-persistent-install.patch
··· 1 - --- a/ctdb/wscript 2019-01-15 02:07:00.000000000 -0800 2 - +++ b/ctdb/wscript 2019-01-20 20:21:08.800187459 -0800 3 - @@ -814,7 +814,7 @@ 4 for t in etc_subdirs: 5 files = SUBDIR_MODE('%s/%s' % (configdir, t), trim_path=configdir) 6 for fmode in files: ··· 9 destname=fmode[0], chmod=fmode[1]) 10 11 # If this is a direct install and there are no event scripts 12 - @@ -852,24 +852,20 @@ 13 ] 14 15 for t in etc_scripts: ··· 17 + bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/%s' % t, 18 destname=t, chmod=MODE_755) 19 20 - bld.SAMBA_GENERATOR('ctdb-sudoers', 21 - source='config/ctdb.sudoers', 22 - target='ctdb.sudoers', 23 - rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) 24 - - bld.INSTALL_FILES('${SYSCONFDIR}/sudoers.d', 'ctdb.sudoers', 25 - + bld.INSTALL_FILES('${EXEC_PREFIX}${SYSCONFDIR}/sudoers.d', 'ctdb.sudoers', 26 - destname='ctdb') 27 - 28 - bld.INSTALL_FILES('${CTDB_ETCDIR}/events/notification', 29 - + bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}/events/notification', 30 'config/notification.README', 31 destname='README') 32
··· 1 + diff --git a/ctdb/wscript b/ctdb/wscript 2 + index e9cd89436a3..893b9a4c59e 100644 3 + --- a/ctdb/wscript 4 + +++ b/ctdb/wscript 5 + @@ -862,7 +862,7 @@ def build(bld): 6 for t in etc_subdirs: 7 files = SUBDIR_MODE('%s/%s' % (configdir, t), trim_path=configdir) 8 for fmode in files: ··· 11 destname=fmode[0], chmod=fmode[1]) 12 13 # If this is a direct install and there are no event scripts 14 + @@ -901,17 +901,13 @@ def build(bld): 15 ] 16 17 for t in etc_scripts: ··· 19 + bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/%s' % t, 20 destname=t, chmod=MODE_755) 21 22 - bld.INSTALL_FILES('${CTDB_ETCDIR}/events/notification', 23 + + bld.INSTALL_FILES('${EXEC_PREFIX}$${CTDB_ETCDIR}/events/notification', 24 'config/notification.README', 25 destname='README') 26
+10 -26
pkgs/servers/samba/4.x.nix
··· 26 talloc, 27 jansson, 28 ldb, 29 libtasn1, 30 tdb, 31 tevent, 32 libxcrypt, 33 - libxcrypt-legacy, 34 cmocka, 35 rpcsvc-proto, 36 bash, ··· 49 avahi, 50 enableDomainController ? false, 51 gpgme, 52 - lmdb, 53 enableRegedit ? true, 54 ncurses, 55 enableCephFS ? false, ··· 66 }: 67 68 let 69 - # samba-tool requires libxcrypt-legacy algorithms 70 - python = python3Packages.python.override { 71 - self = python; 72 - libxcrypt = libxcrypt-legacy; 73 - }; 74 - wrapPython = python3Packages.wrapPython.override { 75 - inherit python; 76 - }; 77 - 78 inherit (lib) optional optionals; 79 80 needsAnswers = ··· 89 in 90 stdenv.mkDerivation (finalAttrs: { 91 pname = "samba"; 92 - version = "4.20.8"; 93 94 src = fetchurl { 95 url = "https://download.samba.org/pub/samba/stable/samba-${finalAttrs.version}.tar.gz"; 96 - hash = "sha256-db4OjTH0UBPpsmD+fPMEo20tgSg5GRR3JXchXsFzqAc="; 97 }; 98 99 outputs = [ ··· 104 105 patches = [ 106 ./4.x-no-persistent-install.patch 107 - ./patch-source3__libads__kerberos_keytab.c.patch 108 ./4.x-no-persistent-install-dynconfig.patch 109 ./4.x-fix-makeflags-parsing.patch 110 ./build-find-pre-built-heimdal-build-tools-in-case-of-.patch ··· 123 124 nativeBuildInputs = [ 125 python3Packages.python 126 wafHook 127 pkg-config 128 bison ··· 148 149 buildInputs = [ 150 bash 151 - wrapPython 152 - python 153 readline 154 popt 155 dbus ··· 158 zlib 159 gnutls 160 libtasn1 161 tdb 162 libxcrypt 163 ] ··· 182 ++ optional enableMDNS avahi 183 ++ optionals enableDomainController [ 184 gpgme 185 - lmdb 186 python3Packages.dnspython 187 ] 188 ++ optional enableRegedit ncurses ··· 230 "--disable-rpath" 231 # otherwise third_party/waf/waflib/Tools/python.py would 232 # get the wrong pythondir from build platform python 233 - "--pythondir=${placeholder "out"}/${python.sitePackages}" 234 (lib.enableFeature enablePrinting "cups") 235 ] 236 ++ optional (!enableDomainController) "--without-ad-dc" ··· 245 ++ optional enableProfiling "--with-profiling-data" 246 ++ optional (!enableAcl) "--without-acl-support" 247 ++ optional (!enablePam) "--without-pam" 248 - ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) ([ 249 "--bundled-libraries=!asn1_compile,!compile_et" 250 "--cross-compile" 251 ( ··· 254 else 255 "--cross-answers=answers" 256 ) 257 - ]) 258 ++ optionals stdenv.buildPlatform.is32bit [ 259 # By default `waf configure` spawns as many as available CPUs. On 260 # 32-bit systems with many CPUs (like `i686` chroot on `x86_64` ··· 321 # Samba does its own shebang patching, but uses build Python 322 find $out/bin -type f -executable | while read file; do 323 isScript "$file" || continue 324 - sed -i 's^${lib.getBin buildPackages.python3Packages.python}^${lib.getBin python}^' "$file" 325 done 326 ''; 327 ··· 349 broken = enableGlusterFS; 350 maintainers = with maintainers; [ aneeshusa ]; 351 pkgConfigModules = [ 352 - "dcerpc_samr" 353 - "dcerpc" 354 "ndr_krb5pac" 355 "ndr_nbt" 356 "ndr_standard" 357 "ndr" 358 "netapi" 359 - "samba-credentials" 360 - "samba-hostconfig" 361 "samba-util" 362 - "samdb" 363 "smbclient" 364 "wbclient" 365 ];
··· 26 talloc, 27 jansson, 28 ldb, 29 + lmdb, 30 libtasn1, 31 tdb, 32 tevent, 33 libxcrypt, 34 cmocka, 35 rpcsvc-proto, 36 bash, ··· 49 avahi, 50 enableDomainController ? false, 51 gpgme, 52 enableRegedit ? true, 53 ncurses, 54 enableCephFS ? false, ··· 65 }: 66 67 let 68 inherit (lib) optional optionals; 69 70 needsAnswers = ··· 79 in 80 stdenv.mkDerivation (finalAttrs: { 81 pname = "samba"; 82 + version = "4.22.3"; 83 84 src = fetchurl { 85 url = "https://download.samba.org/pub/samba/stable/samba-${finalAttrs.version}.tar.gz"; 86 + hash = "sha256-j9cJJimjWW2TXNdWfZNJeflCcpGOw6/9DMgHk07PIro="; 87 }; 88 89 outputs = [ ··· 94 95 patches = [ 96 ./4.x-no-persistent-install.patch 97 ./4.x-no-persistent-install-dynconfig.patch 98 ./4.x-fix-makeflags-parsing.patch 99 ./build-find-pre-built-heimdal-build-tools-in-case-of-.patch ··· 112 113 nativeBuildInputs = [ 114 python3Packages.python 115 + python3Packages.wrapPython 116 wafHook 117 pkg-config 118 bison ··· 138 139 buildInputs = [ 140 bash 141 + python3Packages.python 142 readline 143 popt 144 dbus ··· 147 zlib 148 gnutls 149 libtasn1 150 + lmdb 151 tdb 152 libxcrypt 153 ] ··· 172 ++ optional enableMDNS avahi 173 ++ optionals enableDomainController [ 174 gpgme 175 python3Packages.dnspython 176 ] 177 ++ optional enableRegedit ncurses ··· 219 "--disable-rpath" 220 # otherwise third_party/waf/waflib/Tools/python.py would 221 # get the wrong pythondir from build platform python 222 + "--pythondir=${placeholder "out"}/${python3Packages.python.sitePackages}" 223 (lib.enableFeature enablePrinting "cups") 224 ] 225 ++ optional (!enableDomainController) "--without-ad-dc" ··· 234 ++ optional enableProfiling "--with-profiling-data" 235 ++ optional (!enableAcl) "--without-acl-support" 236 ++ optional (!enablePam) "--without-pam" 237 + ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 238 "--bundled-libraries=!asn1_compile,!compile_et" 239 "--cross-compile" 240 ( ··· 243 else 244 "--cross-answers=answers" 245 ) 246 + ] 247 ++ optionals stdenv.buildPlatform.is32bit [ 248 # By default `waf configure` spawns as many as available CPUs. On 249 # 32-bit systems with many CPUs (like `i686` chroot on `x86_64` ··· 310 # Samba does its own shebang patching, but uses build Python 311 find $out/bin -type f -executable | while read file; do 312 isScript "$file" || continue 313 + sed -i 's^${lib.getBin buildPackages.python3Packages.python}^${lib.getBin python3Packages.python}^' "$file" 314 done 315 ''; 316 ··· 338 broken = enableGlusterFS; 339 maintainers = with maintainers; [ aneeshusa ]; 340 pkgConfigModules = [ 341 "ndr_krb5pac" 342 "ndr_nbt" 343 "ndr_standard" 344 "ndr" 345 "netapi" 346 "samba-util" 347 "smbclient" 348 "wbclient" 349 ];
+7 -7
pkgs/servers/samba/build-find-pre-built-heimdal-build-tools-in-case-of-.patch
··· 1 - From 48f7e6d66e2850088b8922024641173776222242 Mon Sep 17 00:00:00 2001 2 From: Nick Cao <nickcao@nichi.co> 3 Date: Thu, 21 Nov 2024 15:30:00 -0500 4 Subject: [PATCH] build: find pre-built heimdal build tools in case of embedded ··· 35 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 36 [Bachp: rebased for version 4.15.0] 37 [Mats: rebased for version 4.18.5] 38 --- 39 wscript_configure_embedded_heimdal | 11 +++++++++++ 40 1 file changed, 11 insertions(+) 41 42 diff --git a/wscript_configure_embedded_heimdal b/wscript_configure_embedded_heimdal 43 - index 45f47721de..6c5a4bcf01 100644 44 --- a/wscript_configure_embedded_heimdal 45 +++ b/wscript_configure_embedded_heimdal 46 - @@ -13,3 +13,14 @@ conf.RECURSE('third_party/heimdal_build') 47 - # when this will be available also in 48 - # system libraries... 49 conf.define('HAVE_CLIENT_GSS_C_CHANNEL_BOUND_FLAG', 1) 50 + 51 +def check_system_heimdal_binary(name): 52 + if conf.LIB_MAY_BE_BUNDLED(name): ··· 59 +check_system_heimdal_binary("compile_et") 60 +check_system_heimdal_binary("asn1_compile") 61 -- 62 - 2.47.0 63 -
··· 1 + From 475ec75a34002aafabc92659f693cf705c96aff4 Mon Sep 17 00:00:00 2001 2 From: Nick Cao <nickcao@nichi.co> 3 Date: Thu, 21 Nov 2024 15:30:00 -0500 4 Subject: [PATCH] build: find pre-built heimdal build tools in case of embedded ··· 35 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 36 [Bachp: rebased for version 4.15.0] 37 [Mats: rebased for version 4.18.5] 38 + [hexa: rebased for version 4.22.3] 39 --- 40 wscript_configure_embedded_heimdal | 11 +++++++++++ 41 1 file changed, 11 insertions(+) 42 43 diff --git a/wscript_configure_embedded_heimdal b/wscript_configure_embedded_heimdal 44 + index c1488e5506e..ede28ba7fc3 100644 45 --- a/wscript_configure_embedded_heimdal 46 +++ b/wscript_configure_embedded_heimdal 47 + @@ -15,3 +15,14 @@ conf.RECURSE('third_party/heimdal_build') 48 conf.define('HAVE_CLIENT_GSS_C_CHANNEL_BOUND_FLAG', 1) 49 + 50 + conf.define('HAVE_KRB5_INIT_CREDS_STEP', 1) 51 + 52 +def check_system_heimdal_binary(name): 53 + if conf.LIB_MAY_BE_BUNDLED(name): ··· 60 +check_system_heimdal_binary("compile_et") 61 +check_system_heimdal_binary("asn1_compile") 62 -- 63 + 2.50.1
-20
pkgs/servers/samba/patch-source3__libads__kerberos_keytab.c.patch
··· 1 - --- old/source3/libads/kerberos_keytab.c 2017-12-23 14:23:53.247467000 +0100 2 - +++ new/source3/libads/kerberos_keytab.c 2017-12-23 18:57:07.135340000 +0100 3 - @@ -32,8 +32,6 @@ 4 - 5 - #ifdef HAVE_KRB5 6 - 7 - -#ifdef HAVE_ADS 8 - - 9 - /* This MAX_NAME_LEN is a constant defined in krb5.h */ 10 - #ifndef MAX_KEYTAB_NAME_LEN 11 - #define MAX_KEYTAB_NAME_LEN 1100 12 - @@ -85,6 +83,8 @@ 13 - return ret; 14 - } 15 - 16 - +#ifdef HAVE_ADS 17 - + 18 - /********************************************************************** 19 - Adds a single service principal, i.e. 'host' to the system keytab 20 - ***********************************************************************/
···