samba upgrade 4.14.14 -> 4.17.4

The 4.14.x is EOL:
https://wiki.samba.org/index.php/Samba_Release_Planning
Upgrade to latest 4.17.x.

Release Notes:
https://www.samba.org/samba/history/samba-4.17.0.html
https://www.samba.org/samba/history/samba-4.17.4.html

* Refresh patches
* Update PACKAGECONFIG
* Split a new package ctdb
* Add a patch to skip checking PYTHONHASHSEED
* Drop the following patches as these issues have been fixed upstream:
  0005-samba-build-dnsserver_common-code.patch
  netdb_defines.patch
  samba-fix-musl-lib-without-innetgr.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Yi Zhao
2023-01-01 15:27:39 +08:00
committed by Khem Raj
parent 82b8d99ab7
commit 5494dc9ff3
32 changed files with 177 additions and 208 deletions
@@ -44,3 +44,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -44,3 +44,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -44,3 +44,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -44,3 +44,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -45,3 +45,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -44,3 +44,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -44,3 +44,4 @@ Checking value of GNUTLS_MAC_AES_CMAC_128: OK
Checking whether fcntl supports flags to send direct I/O availability signals: NO Checking whether fcntl supports flags to send direct I/O availability signals: NO
Checking whether fcntl supports setting/geting hints: NO Checking whether fcntl supports setting/geting hints: NO
Checking for readlink breakage: NO Checking for readlink breakage: NO
Checking for gnutls fips mode support: NO
@@ -1,4 +1,4 @@
From 3bc1ebc3d2758af4067b3aace7ddd0ea0cb0b57b Mon Sep 17 00:00:00 2001 From f6fa33bfc2e1272198db6ea08910b4162b364b18 Mon Sep 17 00:00:00 2001
From: Bian Naimeng <biannm@cn.fujitsu.com> From: Bian Naimeng <biannm@cn.fujitsu.com>
Date: Mon, 18 Apr 2016 17:00:53 -0400 Date: Mon, 18 Apr 2016 17:00:53 -0400
Subject: [PATCH] Don't check xsltproc manpages Subject: [PATCH] Don't check xsltproc manpages
@@ -16,10 +16,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
3 files changed, 3 insertions(+), 3 deletions(-) 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/ldb/wscript b/lib/ldb/wscript diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index bf6129b..c515deb 100644 index 60bb7cf..b7b0152 100644
--- a/lib/ldb/wscript --- a/lib/ldb/wscript
+++ b/lib/ldb/wscript +++ b/lib/ldb/wscript
@@ -143,7 +143,7 @@ def configure(conf): @@ -144,7 +144,7 @@ def configure(conf):
conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2])) conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
if conf.env.standalone_ldb: if conf.env.standalone_ldb:
@@ -29,7 +29,7 @@ index bf6129b..c515deb 100644
# we need this for the ldap backend # we need this for the ldap backend
if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
diff --git a/lib/talloc/wscript b/lib/talloc/wscript diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index a767477..f754819 100644 index 3089663..76cd65e 100644
--- a/lib/talloc/wscript --- a/lib/talloc/wscript
+++ b/lib/talloc/wscript +++ b/lib/talloc/wscript
@@ -48,7 +48,7 @@ def configure(conf): @@ -48,7 +48,7 @@ def configure(conf):
@@ -42,7 +42,7 @@ index a767477..f754819 100644
conf.CHECK_HEADERS('sys/auxv.h') conf.CHECK_HEADERS('sys/auxv.h')
conf.CHECK_FUNCS('getauxval') conf.CHECK_FUNCS('getauxval')
diff --git a/lib/tdb/wscript b/lib/tdb/wscript diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index e56ddd0..467dd65 100644 index 71ada31..accd474 100644
--- a/lib/tdb/wscript --- a/lib/tdb/wscript
+++ b/lib/tdb/wscript +++ b/lib/tdb/wscript
@@ -95,7 +95,7 @@ def configure(conf): @@ -95,7 +95,7 @@ def configure(conf):
@@ -55,5 +55,5 @@ index e56ddd0..467dd65 100644
conf.SAMBA_CHECK_PYTHON() conf.SAMBA_CHECK_PYTHON()
conf.SAMBA_CHECK_PYTHON_HEADERS() conf.SAMBA_CHECK_PYTHON_HEADERS()
-- --
2.17.1 2.25.1
@@ -1,4 +1,4 @@
From 9ebea97a52e4f70e831dd6402b865c77753ce1cc Mon Sep 17 00:00:00 2001 From f7b8e2e149b06a8033e31f4242c392573fa9ab52 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com> From: Changqing Li <changqing.li@windriver.com>
Date: Tue, 25 Jun 2019 14:25:08 +0800 Date: Tue, 25 Jun 2019 14:25:08 +0800
Subject: [PATCH] do not import target module while cross compile Subject: [PATCH] do not import target module while cross compile
@@ -15,7 +15,7 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
1 file changed, 19 insertions(+), 8 deletions(-) 1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 5f080dd..cdc115e 100644 index 7d2d855..01dcb56 100644
--- a/buildtools/wafsamba/samba_bundled.py --- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py
@@ -4,6 +4,7 @@ import sys @@ -4,6 +4,7 @@ import sys
@@ -24,9 +24,9 @@ index 5f080dd..cdc115e 100644
from wafsamba import samba_utils from wafsamba import samba_utils
+import importlib.util, os +import importlib.util, os
def PRIVATE_NAME(bld, name, private_extension, private_library): def PRIVATE_NAME(bld, name):
'''possibly rename a library to include a bundled extension''' '''possibly rename a library to include a bundled extension'''
@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): @@ -241,17 +242,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
# versions # versions
minversion = minimum_library_version(conf, libname, minversion) minversion = minimum_library_version(conf, libname, minversion)
@@ -63,5 +63,5 @@ index 5f080dd..cdc115e 100644
Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
sys.exit(1) sys.exit(1)
-- --
2.17.1 2.25.1
@@ -1,4 +1,4 @@
From 6455448eb060d03a534539f1a424e2d3e44319e1 Mon Sep 17 00:00:00 2001 From 556bb3cf17ccdf0b0ee0d82801c4b20cf0990ae4 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com> From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 20 Jun 2019 14:11:16 +0800 Date: Thu, 20 Jun 2019 14:11:16 +0800
Subject: [PATCH] Add config option without-valgrind Subject: [PATCH] Add config option without-valgrind
@@ -15,10 +15,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
2 files changed, 7 insertions(+), 2 deletions(-) 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript diff --git a/lib/replace/wscript b/lib/replace/wscript
index 2c856b6..bc726f7 100644 index 2f17999..9ef9bd9 100644
--- a/lib/replace/wscript --- a/lib/replace/wscript
+++ b/lib/replace/wscript +++ b/lib/replace/wscript
@@ -121,8 +121,9 @@ def configure(conf): @@ -114,8 +114,9 @@ def configure(conf):
conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
@@ -31,10 +31,10 @@ index 2c856b6..bc726f7 100644
conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
diff --git a/wscript b/wscript diff --git a/wscript b/wscript
index 83d9421..969b07a 100644 index 3af4207..54d7e9e 100644
--- a/wscript --- a/wscript
+++ b/wscript +++ b/wscript
@@ -123,6 +123,10 @@ def options(opt): @@ -116,6 +116,10 @@ def options(opt):
help=("Disable RELRO builds"), help=("Disable RELRO builds"),
action="store_false", dest='enable_relro') action="store_false", dest='enable_relro')
@@ -46,5 +46,5 @@ index 83d9421..969b07a 100644
opt.load('python') # options for disabling pyc or pyo compilation opt.load('python') # options for disabling pyc or pyo compilation
-- --
2.17.1 2.25.1
@@ -1,4 +1,4 @@
From 5abf3c2efa1cd4e16878b6b26068ff153973ebd3 Mon Sep 17 00:00:00 2001 From 515f2455b4b69f5fcd2c61a532663280785db737 Mon Sep 17 00:00:00 2001
From: Peter Kjellerstedt <pkj@axis.com> From: Peter Kjellerstedt <pkj@axis.com>
Date: Tue, 28 Apr 2020 02:05:33 +0200 Date: Tue, 28 Apr 2020 02:05:33 +0200
Subject: [PATCH] Add options to configure the use of libbsd Subject: [PATCH] Add options to configure the use of libbsd
@@ -15,10 +15,10 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
3 files changed, 29 insertions(+), 15 deletions(-) 3 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 1aadb95..e7b47c0 100644 index 8729b08..1c55428 100644
--- a/buildtools/wafsamba/wscript --- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript
@@ -88,6 +88,13 @@ def options(opt): @@ -145,6 +145,13 @@ Currently the only tested value is 'smbtorture,smbd/smbd' for Samba'''),
help=("Disable use of gettext"), help=("Disable use of gettext"),
action="store_true", dest='disable_gettext', default=False) action="store_true", dest='disable_gettext', default=False)
@@ -33,10 +33,10 @@ index 1aadb95..e7b47c0 100644
gr.add_option('-C', gr.add_option('-C',
diff --git a/lib/replace/wscript b/lib/replace/wscript diff --git a/lib/replace/wscript b/lib/replace/wscript
index bc726f7..44ad0d6 100644 index 9ef9bd9..d47de4f 100644
--- a/lib/replace/wscript --- a/lib/replace/wscript
+++ b/lib/replace/wscript +++ b/lib/replace/wscript
@@ -419,20 +419,21 @@ def configure(conf): @@ -439,20 +439,21 @@ def configure(conf):
strlcpy_in_bsd = False strlcpy_in_bsd = False
@@ -73,7 +73,7 @@ index bc726f7..44ad0d6 100644
conf.CHECK_CODE(''' conf.CHECK_CODE('''
struct ucred cred; struct ucred cred;
diff --git a/lib/texpect/wscript b/lib/texpect/wscript diff --git a/lib/texpect/wscript b/lib/texpect/wscript
index 82f6b25..33eea64 100644 index 44f92a8..79e8d09 100644
--- a/lib/texpect/wscript --- a/lib/texpect/wscript
+++ b/lib/texpect/wscript +++ b/lib/texpect/wscript
@@ -1,7 +1,13 @@ @@ -1,7 +1,13 @@
@@ -92,5 +92,5 @@ index 82f6b25..33eea64 100644
def build(bld): def build(bld):
bld.SAMBA_BINARY('texpect', bld.SAMBA_BINARY('texpect',
-- --
2.17.1 2.25.1
@@ -1,4 +1,4 @@
From a0547cacaddcb2fbef1fb9991c5ad522226e6817 Mon Sep 17 00:00:00 2001 From a8b4a40b535a2c69eb408f649e7169bcc1975fc1 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com> From: Yi Zhao <yi.zhao@windriver.com>
Date: Wed, 24 Nov 2021 13:33:35 +0800 Date: Wed, 24 Nov 2021 13:33:35 +0800
Subject: [PATCH] Fix pyext_PATTERN for cross compilation Subject: [PATCH] Fix pyext_PATTERN for cross compilation
@@ -46,18 +46,18 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py
index b1c8dd0..24faa31 100644 index a23bd01..af202e0 100644
--- a/third_party/waf/waflib/Tools/python.py --- a/third_party/waf/waflib/Tools/python.py
+++ b/third_party/waf/waflib/Tools/python.py +++ b/third_party/waf/waflib/Tools/python.py
@@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'): @@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
x = 'MACOSX_DEPLOYMENT_TARGET' x = 'MACOSX_DEPLOYMENT_TARGET'
if dct[x]: if dct[x]:
env[x] = conf.environ[x] = dct[x] env[x] = conf.environ[x] = str(dct[x])
- env.pyext_PATTERN = '%s' + dct['SO'] # not a mistake - env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
+ env.pyext_PATTERN = '%s.so' + env.pyext_PATTERN = '%s.so'
# Try to get pythonX.Y-config # Try to get pythonX.Y-config
-- --
2.17.1 2.25.1
@@ -1,30 +0,0 @@
From 10d7abc8f1aa99ae45209aeb704978d206f329c0 Mon Sep 17 00:00:00 2001
From: Joe Slater <joe.slater@windriver.com>
Date: Tue, 1 Jun 2021 11:09:19 +0800
Subject: [PATCH] samba: build dnsserver_common code
Just 'install' does not seem to do it.
Upstream-Status: Pending
Signed-off-by: Joe Slater <joe.slater@windriver.com>
---
source4/dns_server/wscript_build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build
index e97c85d..a49fbb9 100644
--- a/source4/dns_server/wscript_build
+++ b/source4/dns_server/wscript_build
@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
source='dnsserver_common.c',
deps='samba-util samba-errors ldbsamba clidns',
private_library=True,
- install=bld.AD_DC_BUILD_IS_ENABLED()
+ enabled=bld.AD_DC_BUILD_IS_ENABLED()
)
bld.SAMBA_MODULE('service_dns',
--
2.17.1
@@ -1,4 +1,4 @@
From 059b517f9ef6cbdc696e0983ce255b1728042827 Mon Sep 17 00:00:00 2001 From 950b5977ea7e72343067d0070cc35fb0dc5163d4 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com> From: Yi Zhao <yi.zhao@windriver.com>
Date: Thu, 25 Aug 2022 16:46:04 +0800 Date: Thu, 25 Aug 2022 16:46:04 +0800
Subject: [PATCH] smbtorture: skip test case tfork_cmd_send Subject: [PATCH] smbtorture: skip test case tfork_cmd_send
@@ -1,4 +1,4 @@
From 28ec4c9323e67cd114a0465015c9f3c2e64e6829 Mon Sep 17 00:00:00 2001 From 95946ce8b6317f68c51338d19d237ce6da61d1c3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 27 Aug 2022 13:05:26 -0700 Date: Sat, 27 Aug 2022 13:05:26 -0700
Subject: [PATCH] waf: Fix errors with Werror=implicit-function-declaration Subject: [PATCH] waf: Fix errors with Werror=implicit-function-declaration
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py diff --git a/buildtools/wafsamba/samba_waf18.py b/buildtools/wafsamba/samba_waf18.py
index 7a0a08e..c0d2c3e 100644 index e2a078b..e145c77 100644
--- a/buildtools/wafsamba/samba_waf18.py --- a/buildtools/wafsamba/samba_waf18.py
+++ b/buildtools/wafsamba/samba_waf18.py +++ b/buildtools/wafsamba/samba_waf18.py
@@ -209,7 +209,7 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None): @@ -209,7 +209,7 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None):
@@ -28,5 +28,5 @@ index 7a0a08e..c0d2c3e 100644
if version_script: if version_script:
script = bld.srcnode.make_node('ldscript') script = bld.srcnode.make_node('ldscript')
-- --
2.37.2 2.25.1
@@ -1,4 +1,4 @@
From f8e1d71e702dfc6965ecb3109738b5d188af4267 Mon Sep 17 00:00:00 2001 From f783bb9c87ce11e824dfefca473d0dcf6edad238 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@fujitsu.com> From: Lei Maohui <leimaohui@fujitsu.com>
Date: Sun, 30 Oct 2022 11:59:31 +0900 Date: Sun, 30 Oct 2022 11:59:31 +0900
Subject: [PATCH] Deleted settiong of python to fix the install conflict error Subject: [PATCH] Deleted settiong of python to fix the install conflict error
@@ -35,15 +35,15 @@ Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
7 files changed, 7 deletions(-) 7 files changed, 7 deletions(-)
diff --git a/source4/scripting/bin/samba-gpupdate b/source4/scripting/bin/samba-gpupdate diff --git a/source4/scripting/bin/samba-gpupdate b/source4/scripting/bin/samba-gpupdate
index 85300e1..02f40cd 100755 index 4b3f057..08fec2d 100755
--- a/source4/scripting/bin/samba-gpupdate --- a/source4/scripting/bin/samba-gpupdate
+++ b/source4/scripting/bin/samba-gpupdate +++ b/source4/scripting/bin/samba-gpupdate
@@ -25,7 +25,6 @@ applied, have changed, or is in the right container''' @@ -25,7 +25,6 @@ applied, have changed, or is in the right container'''
import os import os
import sys import sys
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
import optparse import optparse
from samba import getopt as options from samba import getopt as options
diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool
@@ -52,46 +52,46 @@ index f8a70a6..3c818de 100755
+++ b/source4/scripting/bin/samba-tool +++ b/source4/scripting/bin/samba-tool
@@ -22,7 +22,6 @@ @@ -22,7 +22,6 @@
import sys import sys
# Find right direction when running from source tree # Find right direction when running from source tree
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
# make sure the script dies immediately when hitting control-C, # make sure the script dies immediately when hitting control-C,
# rather than raising KeyboardInterrupt. As we do all database # rather than raising KeyboardInterrupt. As we do all database
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 518bb89..277f0ee 100755 index 1ce53f5..2cdfbf8 100755
--- a/source4/scripting/bin/samba_dnsupdate --- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate
@@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1' @@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1'
os.environ["TZ"] = "GMT" os.environ["TZ"] = "GMT"
# Find right directory when running from source tree # Find right directory when running from source tree
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
import samba import samba
import optparse import optparse
diff --git a/source4/scripting/bin/samba_downgrade_db b/source4/scripting/bin/samba_downgrade_db diff --git a/source4/scripting/bin/samba_downgrade_db b/source4/scripting/bin/samba_downgrade_db
index 87a989b..93a7f8c 100755 index b9a0909..80f581e 100755
--- a/source4/scripting/bin/samba_downgrade_db --- a/source4/scripting/bin/samba_downgrade_db
+++ b/source4/scripting/bin/samba_downgrade_db +++ b/source4/scripting/bin/samba_downgrade_db
@@ -24,7 +24,6 @@ import optparse @@ -23,7 +23,6 @@ import optparse
import sys import sys
# Find right directory when running from source tree # Find right directory when running from source tree
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
import samba import samba
diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc
index 122a5ed..79165f3 100755 index 67d801e..2fc0d6a 100755
--- a/source4/scripting/bin/samba_kcc --- a/source4/scripting/bin/samba_kcc
+++ b/source4/scripting/bin/samba_kcc +++ b/source4/scripting/bin/samba_kcc
@@ -37,7 +37,6 @@ os.environ['PYTHONUNBUFFERED'] = '1' @@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1'
os.environ["TZ"] = "GMT" os.environ["TZ"] = "GMT"
# Find right directory when running from source tree # Find right directory when running from source tree
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
import optparse import optparse
import time import time
diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate
@@ -100,23 +100,24 @@ index 84ff771..b6fe041 100755
+++ b/source4/scripting/bin/samba_spnupdate +++ b/source4/scripting/bin/samba_spnupdate
@@ -32,7 +32,6 @@ os.environ['PYTHONUNBUFFERED'] = '1' @@ -32,7 +32,6 @@ os.environ['PYTHONUNBUFFERED'] = '1'
os.environ["TZ"] = "GMT" os.environ["TZ"] = "GMT"
# Find right directory when running from source tree # Find right directory when running from source tree
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
import samba, ldb import samba, ldb
import optparse import optparse
diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns
index 308dbb0..d00244f 100755 index afc5807..727a3cc 100755
--- a/source4/scripting/bin/samba_upgradedns --- a/source4/scripting/bin/samba_upgradedns
+++ b/source4/scripting/bin/samba_upgradedns +++ b/source4/scripting/bin/samba_upgradedns
@@ -27,7 +27,6 @@ import grp @@ -27,7 +27,6 @@ import grp
from base64 import b64encode from base64 import b64encode
import shlex import shlex
-sys.path.insert(0, "bin/python") -sys.path.insert(0, "bin/python")
import ldb import ldb
import samba import samba
-- --
2.25.1 2.25.1
@@ -0,0 +1,30 @@
From 342a233eb0abb00a4d6a0c824a1337ff71d93c32 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Wed, 28 Dec 2022 16:31:05 +0800
Subject: [PATCH] wscript: skip checking PYTHONHASHSEED
Skip checking PYTHONHASHSEED as it is set to 0 in oe-core by default.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
buildtools/wafsamba/wscript | 4 ----
1 file changed, 4 deletions(-)
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 1c55428..01b242d 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -8,10 +8,6 @@ import wafsamba
from samba_utils import symlink
from optparse import SUPPRESS_HELP
-phs = os.environ.get("PYTHONHASHSEED", None)
-if phs != "1":
- raise Errors.WafError('''PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!''')
-
# this forces configure to be re-run if any of the configure
# sections of the build scripts change. We have to check
# for this in sys.argv as options have not yet been parsed when
--
2.25.1
@@ -1,4 +1,4 @@
From 5bd7b5d04435bd593349825973ce32290f5f604d Mon Sep 17 00:00:00 2001 From 14f8ee7cd1318567b00e52217d57f0a528fd2cf7 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com> From: Changqing Li <changqing.li@windriver.com>
Date: Wed, 25 Jul 2018 09:55:25 +0800 Date: Wed, 25 Jul 2018 09:55:25 +0800
Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error
@@ -22,10 +22,10 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
1 file changed, 3 insertions(+), 4 deletions(-) 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
index 4fd82a9..5443a08 100644 index e6861c8..238201d 100644
--- a/third_party/cmocka/cmocka.h --- a/third_party/cmocka/cmocka.h
+++ b/third_party/cmocka/cmocka.h +++ b/third_party/cmocka/cmocka.h
@@ -110,7 +110,7 @@ typedef uintmax_t LargestIntegralType; @@ -111,7 +111,7 @@ typedef uintmax_t LargestIntegralType;
((LargestIntegralType)(value)) ((LargestIntegralType)(value))
/* Smallest integral type capable of holding a pointer. */ /* Smallest integral type capable of holding a pointer. */
@@ -34,7 +34,7 @@ index 4fd82a9..5443a08 100644
# if defined(_WIN32) # if defined(_WIN32)
/* WIN32 is an ILP32 platform */ /* WIN32 is an ILP32 platform */
typedef unsigned int uintptr_t; typedef unsigned int uintptr_t;
@@ -134,9 +134,8 @@ typedef uintmax_t LargestIntegralType; @@ -135,9 +135,8 @@ typedef uintmax_t LargestIntegralType;
# endif /* __WORDSIZE */ # endif /* __WORDSIZE */
# endif /* _WIN32 */ # endif /* _WIN32 */
@@ -47,5 +47,5 @@ index 4fd82a9..5443a08 100644
/* Perform an unsigned cast to uintptr_t. */ /* Perform an unsigned cast to uintptr_t. */
#define cast_to_pointer_integral_type(value) \ #define cast_to_pointer_integral_type(value) \
-- --
2.7.4 2.25.1
@@ -1,19 +0,0 @@
Index: samba-4.6.2/nsswitch/wins.c
===================================================================
--- samba-4.6.2.orig/nsswitch/wins.c
+++ samba-4.6.2/nsswitch/wins.c
@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex =
#define INADDRSZ 4
#endif
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL (-1)
+#endif
+
+#ifndef NETDB_SUCCESS
+#define NETDB_SUCCESS 0
+#endif
+
NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
struct hostent *he,
char *buffer,
@@ -1,4 +1,4 @@
From 02e0b14d8fa025a5db410d60a7c0dfebd536aaeb Mon Sep 17 00:00:00 2001 From 08003ea30d86a8b983be89f6a161d3baacdaa038 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 6 Nov 2016 23:40:54 -0800 Date: Sun, 6 Nov 2016 23:40:54 -0800
Subject: [PATCH] Musl does not have _r versions of getent() and getpwent() Subject: [PATCH] Musl does not have _r versions of getent() and getpwent()
@@ -8,13 +8,12 @@ Taken from gentoo
http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.3.9-remove-getpwent_r.patch http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.3.9-remove-getpwent_r.patch
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- ---
source4/torture/local/nss_tests.c | 13 ++++++++----- source4/torture/local/nss_tests.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-) 1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c
index 2cd6122..04f13c6 100644 index 2943122..bc185ca 100644
--- a/source4/torture/local/nss_tests.c --- a/source4/torture/local/nss_tests.c
+++ b/source4/torture/local/nss_tests.c +++ b/source4/torture/local/nss_tests.c
@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx, @@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx,
@@ -33,7 +32,7 @@ index 2cd6122..04f13c6 100644
static bool test_enum_r_passwd(struct torture_context *tctx, static bool test_enum_r_passwd(struct torture_context *tctx,
struct passwd **pwd_array_p, struct passwd **pwd_array_p,
size_t *num_pwd_p) size_t *num_pwd_p)
@@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx, @@ -383,6 +383,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx,
return true; return true;
} }
@@ -41,7 +40,7 @@ index 2cd6122..04f13c6 100644
static bool torture_assert_passwd_equal(struct torture_context *tctx, static bool torture_assert_passwd_equal(struct torture_context *tctx,
const struct passwd *p1, const struct passwd *p1,
@@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture_context *tctx) @@ -434,7 +435,7 @@ static bool test_passwd_r(struct torture_context *tctx)
struct passwd *pwd, pwd1, pwd2; struct passwd *pwd, pwd1, pwd2;
size_t num_pwd; size_t num_pwd;
@@ -50,7 +49,7 @@ index 2cd6122..04f13c6 100644
"failed to enumerate passwd"); "failed to enumerate passwd");
for (i=0; i < num_pwd; i++) { for (i=0; i < num_pwd; i++) {
@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx) @@ -462,7 +463,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx)
struct passwd *pwd, pwd1, pwd2, pwd3, pwd4; struct passwd *pwd, pwd1, pwd2, pwd3, pwd4;
size_t num_pwd; size_t num_pwd;
@@ -59,7 +58,7 @@ index 2cd6122..04f13c6 100644
"failed to enumerate passwd"); "failed to enumerate passwd");
for (i=0; i < num_pwd; i++) { for (i=0; i < num_pwd; i++) {
@@ -531,6 +532,7 @@ static bool test_enum_group(struct torture_context *tctx, @@ -533,6 +534,7 @@ static bool test_enum_group(struct torture_context *tctx,
return true; return true;
} }
@@ -67,7 +66,7 @@ index 2cd6122..04f13c6 100644
static bool test_enum_r_group(struct torture_context *tctx, static bool test_enum_r_group(struct torture_context *tctx,
struct group **grp_array_p, struct group **grp_array_p,
size_t *num_grp_p) size_t *num_grp_p)
@@ -579,6 +581,7 @@ static bool test_enum_r_group(struct torture_context *tctx, @@ -583,6 +585,7 @@ static bool test_enum_r_group(struct torture_context *tctx,
return true; return true;
} }
@@ -75,7 +74,7 @@ index 2cd6122..04f13c6 100644
static bool torture_assert_group_equal(struct torture_context *tctx, static bool torture_assert_group_equal(struct torture_context *tctx,
const struct group *g1, const struct group *g1,
@@ -635,7 +638,7 @@ static bool test_group_r(struct torture_context *tctx) @@ -639,7 +642,7 @@ static bool test_group_r(struct torture_context *tctx)
struct group *grp, grp1, grp2; struct group *grp, grp1, grp2;
size_t num_grp; size_t num_grp;
@@ -84,7 +83,7 @@ index 2cd6122..04f13c6 100644
"failed to enumerate group"); "failed to enumerate group");
for (i=0; i < num_grp; i++) { for (i=0; i < num_grp; i++) {
@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct torture_context *tctx) @@ -667,7 +670,7 @@ static bool test_group_r_cross(struct torture_context *tctx)
struct group *grp, grp1, grp2, grp3, grp4; struct group *grp, grp1, grp2, grp3, grp4;
size_t num_grp; size_t num_grp;
@@ -93,3 +92,6 @@ index 2cd6122..04f13c6 100644
"failed to enumerate group"); "failed to enumerate group");
for (i=0; i < num_grp; i++) { for (i=0; i < num_grp; i++) {
--
2.25.1
@@ -1,42 +0,0 @@
From fcb8ecd530b2d151e373974741601483326f7528 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 27 Jun 2019 11:09:47 +0800
Subject: [PATCH] samba: fix musl lib without innetgr
Upstream-Status: Pending
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
lib/util/access.c | 2 +-
source3/auth/user_util.c | 2 +-
2 file changed, 2 insertion(+), 2 deletion(-)
diff --git a/lib/util/access.c b/lib/util/access.c
index 7da0573..b94949e 100644
--- a/lib/util/access.c
+++ b/lib/util/access.c
@@ -112,7 +112,7 @@ static bool string_match(const char *tok,const char *s)
return true;
}
} else if (tok[0] == '@') { /* netgroup: look it up */
-#ifdef HAVE_NETGROUP
+#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
DATA_BLOB tmp;
char *mydomain = NULL;
char *hostname = NULL;
diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c
index a76b5d4..30f523d 100644
--- a/source3/auth/user_util.c
+++ b/source3/auth/user_util.c
@@ -148,7 +148,7 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char
bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname)
{
-#ifdef HAVE_NETGROUP
+#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
static char *my_yp_domain = NULL;
char *lowercase_user = NULL;
--
2.7.4
@@ -1,4 +1,4 @@
From 54a5279cb33abd23ef7c094d51f16078ece2da0c Mon Sep 17 00:00:00 2001 From 6822c61ade5617c9f109e32ad4cdc115fa9e12c8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 6 Nov 2016 23:40:54 -0800 Date: Sun, 6 Nov 2016 23:40:54 -0800
Subject: [PATCH] Lifted from gentoo and ported to 4.4.5 Subject: [PATCH] Lifted from gentoo and ported to 4.4.5
@@ -6,16 +6,15 @@ Subject: [PATCH] Lifted from gentoo and ported to 4.4.5
http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- ---
source3/wscript | 13 ++++++++++++- source3/wscript | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-) 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/source3/wscript b/source3/wscript diff --git a/source3/wscript b/source3/wscript
index 5436db2..864f614 100644 index 22be17a..ee9ce52 100644
--- a/source3/wscript --- a/source3/wscript
+++ b/source3/wscript +++ b/source3/wscript
@@ -879,7 +879,7 @@ msg.msg_accrightslen = sizeof(fd); @@ -862,7 +862,7 @@ msg.msg_accrightslen = sizeof(fd);
if conf.env.with_iconv: if conf.env.with_iconv:
conf.DEFINE('HAVE_ICONV', 1) conf.DEFINE('HAVE_ICONV', 1)
@@ -24,7 +23,7 @@ index 5436db2..864f614 100644
use_pam=True use_pam=True
conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
@@ -956,6 +956,17 @@ int i; i = PAM_RADIO_TYPE; @@ -939,6 +939,17 @@ int i; i = PAM_RADIO_TYPE;
"or headers not found. Use --without-pam to disable " "or headers not found. Use --without-pam to disable "
"PAM support."); "PAM support.");
@@ -42,3 +41,6 @@ index 5436db2..864f614 100644
seteuid = False seteuid = False
# #
--
2.25.1
@@ -19,29 +19,31 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
file://0002-do-not-import-target-module-while-cross-compile.patch \ file://0002-do-not-import-target-module-while-cross-compile.patch \
file://0003-Add-config-option-without-valgrind.patch \ file://0003-Add-config-option-without-valgrind.patch \
file://0004-Add-options-to-configure-the-use-of-libbsd.patch \ file://0004-Add-options-to-configure-the-use-of-libbsd.patch \
file://0005-samba-build-dnsserver_common-code.patch \ file://0005-Fix-pyext_PATTERN-for-cross-compilation.patch \
file://0001-Fix-pyext_PATTERN-for-cross-compilation.patch \ file://0006-smbtorture-skip-test-case-tfork_cmd_send.patch \
file://0001-smbtorture-skip-test-case-tfork_cmd_send.patch \ file://0007-waf-Fix-errors-with-Werror-implicit-function-declara.patch \
file://0001-waf-Fix-errors-with-Werror-implicit-function-declara.patch \ file://0008-Deleted-settiong-of-python-to-fix-the-install-confli.patch \
file://0001-Deleted-settiong-of-python-to-fix-the-install-confli.patch \ file://0009-wscript-skip-checking-PYTHONHASHSEED.patch \
" "
SRC_URI:append:libc-musl = " \ SRC_URI:append:libc-musl = " \
file://netdb_defines.patch \
file://samba-pam.patch \ file://samba-pam.patch \
file://samba-4.3.9-remove-getpwent_r.patch \ file://samba-4.3.9-remove-getpwent_r.patch \
file://cmocka-uintptr_t.patch \ file://cmocka-uintptr_t.patch \
file://samba-fix-musl-lib-without-innetgr.patch \
" "
SRC_URI[sha256sum] = "abd5e9e6aa45e55114b188ba189ebdfc8fd3d7718d43f749e477ce7f791e5519" SRC_URI[sha256sum] = "c0512079db4cac707ccea4c18aebbd6b2eb3acf6e90735e7f645a326be1f4537"
UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.14(\.\d+)+).tar.gz" UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.17(\.\d+)+).tar.gz"
inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version pkgconfig inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version pkgconfig
# CVE-2011-2411 is valnerble only on HP NonStop Servers. # CVE-2011-2411 is valnerble only on HP NonStop Servers.
CVE_CHECK_IGNORE += "CVE-2011-2411" CVE_CHECK_IGNORE += "CVE-2011-2411"
# Patch for CVE-2018-1050 is applied in version 4.5.15, 4.6.13, 4.7.5.
CVE_CHECK_IGNORE += "CVE-2018-1050"
# Patch for CVE-2018-1057 is applied in version 4.3.13, 4.4.16.
CVE_CHECK_IGNORE += "CVE-2018-1057"
# remove default added RDEPENDS on perl # remove default added RDEPENDS on perl
RDEPENDS:${PN}:remove = "perl" RDEPENDS:${PN}:remove = "perl"
@@ -60,10 +62,11 @@ COMPATIBLE_HOST:riscv32 = "null"
INITSCRIPT_NAME = "samba" INITSCRIPT_NAME = "samba"
INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ." INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind" SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind ctdb"
SYSTEMD_SERVICE:${PN}-base = "nmb.service smb.service" SYSTEMD_SERVICE:${PN}-base = "nmb.service smb.service"
SYSTEMD_SERVICE:${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}" SYSTEMD_SERVICE:${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}"
SYSTEMD_SERVICE:winbind = "winbind.service" SYSTEMD_SERVICE:winbind = "winbind.service"
SYSTEMD_SERVICE:ctdb = "ctdb.service"
# There are prerequisite settings to enable ad-dc, so disable the service by default. # There are prerequisite settings to enable ad-dc, so disable the service by default.
# Reference: # Reference:
@@ -74,14 +77,12 @@ SYSTEMD_AUTO_ENABLE:${PN}-ad-dc = "disable"
#to cross Popen #to cross Popen
export WAF_NO_PREFORK="yes" export WAF_NO_PREFORK="yes"
# Use krb5. Build active domain controller. # Use krb5. Build active domain controller.
# #
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \
acl cups ad-dc ldap mitkrb5 \ acl cups ad-dc ldap mitkrb5 \
" "
RDEPENDS:${PN}-ctdb-tests += "bash util-linux-getopt"
PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl" PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin" PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
@@ -91,12 +92,12 @@ PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi" PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi" PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind," PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind,"
PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" PACKAGECONFIG[lttng] = "--with-lttng,--without-lttng,lttng-ust"
PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" PACKAGECONFIG[archive] = "--with-libarchive,--without-libarchive,libarchive"
PACKAGECONFIG[libunwind] = ", , libunwind" PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
PACKAGECONFIG[gpgme] = ",--without-gpgme,," PACKAGECONFIG[gpgme] = "--with-gpgme,--without-gpgme,gpgme"
PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb"
PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd" PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd"
PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,python3-markdown python3-dnspython," PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,python3-markdown python3-dnspython,"
PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5," PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5,"
@@ -131,15 +132,14 @@ EXTRA_OECONF += "--enable-fhs \
LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
do_configure:append () { do_configure:append() {
cd ${S}/pidl/ cd ${S}/pidl/
perl Makefile.PL PREFIX=${prefix} perl Makefile.PL PREFIX=${prefix}
sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \ sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \
-e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile -e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile
} }
do_compile:append () { do_compile:append() {
oe_runmake -C ${S}/pidl oe_runmake -C ${S}/pidl
} }
@@ -199,7 +199,7 @@ do_install:append() {
chmod 0750 ${D}${sysconfdir}/sudoers.d || true chmod 0750 ${D}${sysconfdir}/sudoers.d || true
rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate samba_downgrade_db; do for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate samba_downgrade_db; do
if [ -f "${D}${sbindir}/$f" ]; then if [ -f "${D}${sbindir}/$f" ]; then
sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f
@@ -217,8 +217,8 @@ do_install:append() {
PACKAGES =+ "${PN}-python3 ${PN}-pidl \ PACKAGES =+ "${PN}-python3 ${PN}-pidl \
${PN}-dsdb-modules ${PN}-testsuite registry-tools \ ${PN}-dsdb-modules ${PN}-testsuite registry-tools \
winbind \ winbind ctdb ctdb-tests \
${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ ${PN}-common ${PN}-base ${PN}-ad-dc \
smbclient ${PN}-client ${PN}-server ${PN}-test" smbclient ${PN}-client ${PN}-server ${PN}-test"
python samba_populate_packages() { python samba_populate_packages() {
@@ -257,15 +257,30 @@ FILES:${PN}-ad-dc = "${sbindir}/samba \
${systemd_system_unitdir}/samba.service \ ${systemd_system_unitdir}/samba.service \
${libdir}/krb5/plugins/kdb/samba.so \ ${libdir}/krb5/plugins/kdb/samba.so \
" "
RDEPENDS:${PN}-ad-dc = "krb5-kdc" RDEPENDS:${PN}-ad-dc = "krb5-kdc"
FILES:${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \ FILES:ctdb = "${bindir}/ctdb \
${bindir}/ctdb_run_cluster_tests \ ${bindir}/ctdb_diagnostics \
${sysconfdir}/ctdb/nodes \ ${bindir}/ltdbtool \
${datadir}/ctdb-tests \ ${bindir}/onnode \
${datadir}/ctdb/tests \ ${bindir}/ping_pong \
${localstatedir}/lib/ctdb \ ${sbindir}/ctdbd \
" ${datadir}/ctdb \
${libexecdir}/ctdb \
${localstatedir}/lib/ctdb \
${sysconfdir}/ctdb \
${sysconfdir}/sudoers.d/ctdb \
${systemd_system_unitdir}/ctdb.service \
"
FILES:ctdb-tests = "${bindir}/ctdb_run_tests \
${bindir}/ctdb_run_cluster_tests \
${datadir}/ctdb-tests \
${datadir}/ctdb/tests \
"
RDEPENDS:ctdb-tests += "bash util-linux-getopt ctdb"
FILES:${BPN}-common = "${sysconfdir}/default \ FILES:${BPN}-common = "${sysconfdir}/default \
${sysconfdir}/samba \ ${sysconfdir}/samba \
@@ -278,7 +293,6 @@ FILES:${PN} += "${libdir}/vfs/*.so \
${libdir}/charset/*.so \ ${libdir}/charset/*.so \
${libdir}/*.dat \ ${libdir}/*.dat \
${libdir}/auth/*.so \ ${libdir}/auth/*.so \
${datadir}/ctdb/events/* \
" "
FILES:${PN}-dsdb-modules = "${libdir}/samba/ldb" FILES:${PN}-dsdb-modules = "${libdir}/samba/ldb"
@@ -317,10 +331,10 @@ FILES:smbclient = "${bindir}/cifsdd \
${bindir}/smbtree \ ${bindir}/smbtree \
${libdir}/samba/smbspool_krb5_wrapper" ${libdir}/samba/smbspool_krb5_wrapper"
RDEPENDS:${PN}-pidl:append = " perl libparse-yapp-perl"
FILES:${PN}-pidl = "${bindir}/pidl \ FILES:${PN}-pidl = "${bindir}/pidl \
${libdir}/perl5 \ ${libdir}/perl5 \
" "
RDEPENDS:${PN}-pidl:append = " perl libparse-yapp-perl"
RDEPENDS:${PN}-client = "\ RDEPENDS:${PN}-client = "\
smbclient \ smbclient \
@@ -340,13 +354,8 @@ RDEPENDS:${PN}-server = "\
ALLOW_EMPTY:${PN}-server = "1" ALLOW_EMPTY:${PN}-server = "1"
RDEPENDS:${PN}-test = "\ RDEPENDS:${PN}-test = "\
${PN}-ctdb-tests \ ctdb-tests \
${PN}-testsuite \ ${PN}-testsuite \
" "
ALLOW_EMPTY:${PN}-test = "1" ALLOW_EMPTY:${PN}-test = "1"
# Patch for CVE-2018-1050 is applied in version 4.5.15, 4.6.13, 4.7.5.
# Patch for CVE-2018-1057 is applied in version 4.3.13, 4.4.16.
CVE_CHECK_IGNORE += "CVE-2018-1050"
CVE_CHECK_IGNORE += "CVE-2018-1057"