Skip to contentSkip to conversation

package/samba4: bump version to 4.11.2

PATCH New Bernd Kuhls 2 participants 2 messages Nov 6, 2019 – Nov 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/samba4: bump version to 4.11.2

Added patches from upstream bug tracker to fix cross-compile problems, removed patches applied upstream and rebase remaining patches.

The dependency to gnutls is now mandatory:
https://blog.cryptomilk.org/2019/10/02/samba-and-gnutls/

---
 ...01-libreplace-disable-libbsd-support.patch |   8 +-
 ...-on-64bit-platforms-by-including-std.patch | 111 ---
 .../samba4/0002-waf-upgrade-to-2.0.18.patch   | 736 ++++++++++++++++++
 ...io.c-include-stdint.h-before-cmoka.h.patch |  38 -
 ...t_args-instead-of-exec_args-to-suppo.patch |  62 ++
 package/samba4/0004-cross_compile-fix.patch   |  94 ---
 ...re-forking-if-cross-compilation-is-e.patch |  40 +
 package/samba4/0005-fix_unistd_incl.patch     |  27 -
 ...s-environment-to-cross-execute-tests.patch |  36 +
 ...autobuild-harden-samba-xc-test-suite.patch |  59 ++
 ...uilt-heimdal-build-tools-in-case-of-.patch |  86 ++
 .../samba4/0008-Fix-unistd.h-include.patch    |  38 +
 ...ript_build-do-not-add-host-include-.patch} |   9 +-
 package/samba4/Config.in                      |   2 +-
 package/samba4/samba4.hash                    |   4 +-
 package/samba4/samba4.mk                      |  11 +-
 16 files changed, 1070 insertions(+), 291 deletions(-)
 delete mode 100644 package/samba4/0002-Fix-uClibc-build-on-64bit-platforms-by-including-std.patch
 create mode 100644 package/samba4/0002-waf-upgrade-to-2.0.18.patch
 delete mode 100644 package/samba4/0003-test_regfio.c-include-stdint.h-before-cmoka.h.patch
 create mode 100644 package/samba4/0003-wafsamba-use-test_args-instead-of-exec_args-to-suppo.patch
 delete mode 100644 package/samba4/0004-cross_compile-fix.patch
 create mode 100644 package/samba4/0004-wafsamba-avoid-pre-forking-if-cross-compilation-is-e.patch
 delete mode 100644 package/samba4/0005-fix_unistd_incl.patch
 create mode 100644 package/samba4/0005-wafsamba-pass-environment-to-cross-execute-tests.patch
 create mode 100644 package/samba4/0006-autobuild-harden-samba-xc-test-suite.patch
 create mode 100644 package/samba4/0007-build-find-pre-built-heimdal-build-tools-in-case-of-.patch
 create mode 100644 package/samba4/0008-Fix-unistd.h-include.patch
 rename package/samba4/{0006-heimdal_build-wscript_build-do-not-add-host-include-.patch => 0009-heimdal_build-wscript_build-do-not-add-host-include-.patch} (84%)
package/samba4/0001-libreplace-disable-libbsd-support.patch +4 -4
index ae46c447fd..a303fa6669 100644
@@ -1,4 +1,4 @@
-From fc0304ba92ec7ae9a2f75fbc31d97fee39d19665 Mon Sep 17 00:00:00 2001
+From 4df82c9e03b68dc1621fe4c9ac6a29ae3e64e07e Mon Sep 17 00:00:00 2001
 From: Gustavo Zacarias <[email protected]>
 Date: Wed, 7 Sep 2016 23:03:43 -0300
 Subject: [PATCH] libreplace: disable libbsd support
@@ -16,10 +16,10 @@ Signed-off-by: Bernd Kuhls <[email protected]>
  1 file changed, 15 deletions(-)
 
 diff --git a/lib/replace/wscript b/lib/replace/wscript
-index 6c7de5953f0..ac230d719f7 100644
+index 240d730cbee..c6d8df43c74 100644
 --- a/lib/replace/wscript
 +++ b/lib/replace/wscript
-@@ -304,21 +304,6 @@ def configure(conf):
+@@ -381,21 +381,6 @@ def configure(conf):
  
      strlcpy_in_bsd = False
  
@@ -42,5 +42,5 @@ index 6c7de5953f0..ac230d719f7 100644
                  struct ucred cred;
                  socklen_t cred_len;
 -- 
-2.18.0
+2.20.1
 
package/samba4/0002-Fix-uClibc-build-on-64bit-platforms-by-including-std.patch deleted +0 -111

111 lines not on this page · raw message

package/samba4/0002-waf-upgrade-to-2.0.18.patch new file +736 -0

736 lines not on this page · raw message

package/samba4/0003-test_regfio.c-include-stdint.h-before-cmoka.h.patch deleted +0 -38
deleted file mode 100644
index 2415d57d70..0000000000
@@ -1,38 +0,0 @@
-From bed8720dce64181c188c23a28506a88cd2e1ee4f Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Sat, 11 May 2019 00:07:50 +0200
-Subject: [PATCH] test_regfio.c: include stdint.h before cmoka.h
-
-This fix the following build failure on mips64el:
-/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27: error: conflicting types for 'uintptr_t'
- typedef unsigned long int uintptr_t;
-                           ^
-In file included from ../source3/registry/tests/test_regfio.c:23:0:
-../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here
-       typedef unsigned int uintptr_t;
-
-Fixes:
- - http://autobuild.buildroot.org/results/bae0508e84c905dc23ad7cf1153cd1e9d8e4d734
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-[Upstream status:
-https://gitlab.com/samba-team/samba/merge_requests/442]
----
- source3/registry/tests/test_regfio.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/source3/registry/tests/test_regfio.c b/source3/registry/tests/test_regfio.c
-index 86a217661f3..f945e653708 100644
---- a/source3/registry/tests/test_regfio.c
-+++ b/source3/registry/tests/test_regfio.c
-@@ -20,6 +20,7 @@
- #include <stdarg.h>
- #include <stddef.h>
- #include <setjmp.h>
-+#include <stdint.h>
- #include <cmocka.h>
- 
- #include <errno.h>
--- 
-2.20.1
-
package/samba4/0003-wafsamba-use-test_args-instead-of-exec_args-to-suppo.patch new file +62 -0

62 lines not on this page · raw message

package/samba4/0004-cross_compile-fix.patch deleted +0 -94

94 lines not on this page · raw message

package/samba4/0004-wafsamba-avoid-pre-forking-if-cross-compilation-is-e.patch new file +40 -0
new file mode 100644
index 0000000000..5005e01508
@@ -0,0 +1,40 @@
+From 9c3cf5f67053124c6bbdf9c4705fa1d2d416f873 Mon Sep 17 00:00:00 2001
+From: Uri Simchoni <[email protected]>
+Date: Mon, 7 Oct 2019 00:37:31 +0300
+Subject: [PATCH] wafsamba: avoid pre-forking if cross-compilation is enabled
+
+Waf supports pre-forking to run configuration tests, but this
+doesn't play well with Samba's cross-compilation support, because
+Samba monkey-patches the actual fork+exec, which doesn't happen
+in a pre-forked process pool.
+
+This patch emulates the impact of WAF_NO_PREFORK env var when
+cross-compilation is enabled.
+
+The blueprint for the solution has been suggested by Thomas Nagy
+in https://bugzilla.samba.org/show_bug.cgi?id=13846#c7 (item #2)
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846
+
+Signed-off-by: Uri Simchoni <[email protected]>
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ buildtools/wafsamba/samba_cross.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
+index 60ddf967237..6fca470f2b7 100644
+--- a/buildtools/wafsamba/samba_cross.py
++++ b/buildtools/wafsamba/samba_cross.py
+@@ -147,6 +147,8 @@ def SAMBA_CROSS_ARGS(conf, msg=None):
+     if real_Popen is None:
+         real_Popen  = Utils.subprocess.Popen
+         Utils.subprocess.Popen = cross_Popen
++        Utils.run_process = Utils.run_regular_process
++        Utils.get_process = Utils.alloc_process_pool = Utils.nada
+ 
+     ret = []
+ 
+-- 
+2.20.1
+
package/samba4/0005-fix_unistd_incl.patch deleted +0 -27
deleted file mode 100644
index 80467fadf6..0000000000
@@ -1,27 +0,0 @@
-Fix unistd.h include
-
-Fixes build error
-
-source4/heimdal/lib/asn1/asn1_err.c:47:23: error: 'link' redeclared as different kind of symbol
- static struct et_list link = { 0, 0 };
-
-Downloaded from
-https://github.com/openwrt/packages/blob/master/net/samba4/patches/006-samba-4-10-musl_rm_unistd_incl.patch
-
-Upstream bug report: https://bugzilla.samba.org/show_bug.cgi?id=13856
-
-Signed-off-by: Bernd Kuhls <[email protected]>
-
---- a/lib/replace/replace.h
-+++ b/lib/replace/replace.h
-@@ -162,10 +162,6 @@
- #include <bsd/unistd.h>
- #endif
- 
--#ifdef HAVE_UNISTD_H
--#include <unistd.h>
--#endif
--
- #ifdef HAVE_STRING_H
- #include <string.h>
- #endif
package/samba4/0005-wafsamba-pass-environment-to-cross-execute-tests.patch new file +36 -0
new file mode 100644
index 0000000000..7b37b0458f
@@ -0,0 +1,36 @@
+From 8a173f08d32960091d0ee9cab1b1e1e6df17c85a Mon Sep 17 00:00:00 2001
+From: Uri Simchoni <[email protected]>
+Date: Mon, 7 Oct 2019 00:37:41 +0300
+Subject: [PATCH] wafsamba: pass environment to cross-execute tests
+
+This can come in handy for cross-execute scripts in general, and
+is particularly required by the samba-xc test for cross-answers /
+cross-execute, because Samba sets LD_LIBRARY_PATH during rpath
+checks, and the test program needs that in order to successfully
+run.
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846
+
+Signed-off-by: Uri Simchoni <[email protected]>
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ buildtools/wafsamba/samba_cross.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
+index 6fca470f2b7..0868a855a0d 100644
+--- a/buildtools/wafsamba/samba_cross.py
++++ b/buildtools/wafsamba/samba_cross.py
+@@ -120,7 +120,8 @@ class cross_Popen(Utils.subprocess.Popen):
+             if use_answers:
+                 p = real_Popen(newargs,
+                                stdout=Utils.subprocess.PIPE,
+-                               stderr=Utils.subprocess.PIPE)
++                               stderr=Utils.subprocess.PIPE,
++                               env=kw.get('env', {}))
+                 ce_out, ce_err = p.communicate()
+                 ans = (p.returncode, samba_utils.get_string(ce_out))
+                 add_answer(ca_file, msg, ans)
+-- 
+2.20.1
+
package/samba4/0006-autobuild-harden-samba-xc-test-suite.patch new file +59 -0

59 lines not on this page · raw message

package/samba4/0007-build-find-pre-built-heimdal-build-tools-in-case-of-.patch new file +86 -0

86 lines not on this page · raw message

package/samba4/0008-Fix-unistd.h-include.patch new file +38 -0
new file mode 100644
index 0000000000..f01b899a18
@@ -0,0 +1,38 @@
+From 85c33f89df8607ace0707e1360ff0f79f3e8f5f3 Mon Sep 17 00:00:00 2001
+From: Andy Walsh <[email protected]>
+Date: Wed, 6 Nov 2019 19:28:30 +0100
+Subject: [PATCH] Fix unistd.h include
+
+Fixes build error
+
+source4/heimdal/lib/asn1/asn1_err.c:47:23: error: 'link' redeclared as different kind of symbol
+ static struct et_list link = { 0, 0 };
+
+Downloaded from
+https://github.com/Andy2244/openwrt-extra/blob/samba-4.10/samba4/patches/006-samba-4-10-musl_rm_unistd_incl.patch
+
+Upstream bug report: https://bugzilla.samba.org/show_bug.cgi?id=13856
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ lib/replace/replace.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/lib/replace/replace.h b/lib/replace/replace.h
+index 1658465866e..e6768c4ae51 100644
+--- a/lib/replace/replace.h
++++ b/lib/replace/replace.h
+@@ -168,10 +168,6 @@
+ #include <bsd/unistd.h>
+ #endif
+ 
+-#ifdef HAVE_UNISTD_H
+-#include <unistd.h>
+-#endif
+-
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
+-- 
+2.20.1
+
package/samba4/0009-heimdal_build-wscript_build-do-not-add-host-include-.patch renamed from package/samba4/0006-heimdal_build-wscript_build-do-not-add-host-include-.patch +4 -5
similarity index 84%
rename from package/samba4/0006-heimdal_build-wscript_build-do-not-add-host-include-.patch
rename to package/samba4/0009-heimdal_build-wscript_build-do-not-add-host-include-.patch
index 08d8382ab0..ff1f05ec4d 100644
@@ -1,8 +1,7 @@
-From 189440643157fbc872a1670b3e30b6c459dbd930 Mon Sep 17 00:00:00 2001
+From 25a8d80820ee6713988d72cca69707b03d06e707 Mon Sep 17 00:00:00 2001
 From: Bernd Kuhls <[email protected]>
 Date: Sun, 21 Jul 2019 15:12:03 +0200
-Subject: [PATCH] heimdal_build/wscript_build: do not add host include
- patch
+Subject: [PATCH] heimdal_build/wscript_build: do not add host include patch
 
 Fixes cross-compile.
 
@@ -14,10 +13,10 @@ Signed-off-by: Bernd Kuhls <[email protected]>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
-index 45938b88315..e896c3e9454 100644
+index 163b622fca9..27adbc06dc6 100644
 --- a/source4/heimdal_build/wscript_build
 +++ b/source4/heimdal_build/wscript_build
-@@ -131,7 +131,7 @@ def HEIMDAL_ASN1(name, source,
+@@ -140,7 +140,7 @@ def HEIMDAL_ASN1(name, source,
              samba_cflags   = CURRENT_CFLAGS(bld, name, ''),
              depends_on     = '',
              samba_deps     = to_list('roken replace'),
package/samba4/Config.in +1 -1
index e89289b153..a6997c13eb 100644
@@ -15,6 +15,7 @@ config BR2_PACKAGE_SAMBA4
 	depends on !BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_CMOCKA
 	select BR2_PACKAGE_E2FSPROGS
+	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
@@ -30,7 +31,6 @@ if BR2_PACKAGE_SAMBA4
 
 config BR2_PACKAGE_SAMBA4_AD_DC
 	bool "AD DC"
-	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_JANSSON
 	help
 	  Enable Active Directory Domain Controller functionality.
package/samba4/samba4.hash +2 -2
index 02220772f6..d4b177a45f 100644
@@ -1,4 +1,4 @@
 # Locally calculated after checking pgp signature
-# https://download.samba.org/pub/samba/stable/samba-4.10.10.tar.asc
-sha256 700c734b51610e2feaa0d6744f9bec0c0d8917bca8cc78d5b63a4591f32866a5  samba-4.10.10.tar.gz
+# https://download.samba.org/pub/samba/stable/samba-4.11.2.tar.asc
+sha256 d27bf1b7cf5f25fb5587896fccb73747a705f7cf7ee352b5cbab82841db09f1f  samba-4.11.2.tar.gz
 sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
package/samba4/samba4.mk +2 -9
index c7910d87c8..201328fe4b 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SAMBA4_VERSION = 4.10.10
+SAMBA4_VERSION = 4.11.2
 SAMBA4_SITE = https://download.samba.org/pub/samba/stable
 SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
 SAMBA4_INSTALL_STAGING = YES
@@ -12,7 +12,7 @@ SAMBA4_LICENSE = GPL-3.0+
 SAMBA4_LICENSE_FILES = COPYING
 SAMBA4_DEPENDENCIES = \
 	host-e2fsprogs host-heimdal host-nfs-utils \
-	cmocka e2fsprogs popt zlib \
+	cmocka e2fsprogs gnutls popt zlib \
 	$(if $(BR2_PACKAGE_LIBAIO),libaio) \
 	$(if $(BR2_PACKAGE_LIBCAP),libcap) \
 	$(if $(BR2_PACKAGE_READLINE),readline) \
@@ -76,13 +76,6 @@ else
 SAMBA4_CONF_OPTS += --without-fam
 endif
 
-ifeq ($(BR2_PACKAGE_GNUTLS),y)
-SAMBA4_CONF_OPTS += --enable-gnutls
-SAMBA4_DEPENDENCIES += gnutls
-else
-SAMBA4_CONF_OPTS += --disable-gnutls
-endif
-
 ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
 SAMBA4_CONF_OPTS += --with-libarchive
 SAMBA4_DEPENDENCIES += libarchive
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/samba4: bump version to 4.11.2

Quoted 29 lines · On Wed, 6 Nov 2019 19:42:37 +0100 Bernd Kuhls <[email protected]> wrote:

Added patches from upstream bug tracker to fix cross-compile problems, removed patches applied upstream and rebase remaining patches.

The dependency to gnutls is now mandatory:
https://blog.cryptomilk.org/2019/10/02/samba-and-gnutls/

---
 ...01-libreplace-disable-libbsd-support.patch |   8 +-
 ...-on-64bit-platforms-by-including-std.patch | 111 ---
 .../samba4/0002-waf-upgrade-to-2.0.18.patch   | 736 ++++++++++++++++++
 ...io.c-include-stdint.h-before-cmoka.h.patch |  38 -
 ...t_args-instead-of-exec_args-to-suppo.patch |  62 ++
 package/samba4/0004-cross_compile-fix.patch   |  94 ---
 ...re-forking-if-cross-compilation-is-e.patch |  40 +
 package/samba4/0005-fix_unistd_incl.patch     |  27 -
 ...s-environment-to-cross-execute-tests.patch |  36 +
 ...autobuild-harden-samba-xc-test-suite.patch |  59 ++
 ...uilt-heimdal-build-tools-in-case-of-.patch |  86 ++
 .../samba4/0008-Fix-unistd.h-include.patch    |  38 +
 ...ript_build-do-not-add-host-include-.patch} |   9 +-
 package/samba4/Config.in                      |   2 +-
 package/samba4/samba4.hash                    |   4 +-
 package/samba4/samba4.mk                      |  11 +-
 16 files changed, 1070 insertions(+), 291 deletions(-)
 delete mode 100644 package/samba4/0002-Fix-uClibc-build-on-64bit-platforms-by-including-std.patch
 create mode 100644 package/samba4/0002-waf-upgrade-to-2.0.18.patch
 delete mode 100644 package/samba4/0003-test_regfio.c-include-stdint.h-before-cmoka.h.patch
 create mode 100644 package/samba4/0003-wafsamba-use-test_args-instead-of-exec_args-to-suppo.patch
Quoted 8 lines
 delete mode 100644 package/samba4/0004-cross_compile-fix.patch
 create mode 100644 package/samba4/0004-wafsamba-avoid-pre-forking-if-cross-compilation-is-e.patch
 delete mode 100644 package/samba4/0005-fix_unistd_incl.patch
 create mode 100644 package/samba4/0005-wafsamba-pass-environment-to-cross-execute-tests.patch
 create mode 100644 package/samba4/0006-autobuild-harden-samba-xc-test-suite.patch
 create mode 100644 package/samba4/0007-build-find-pre-built-heimdal-build-tools-in-case-of-.patch
 create mode 100644 package/samba4/0008-Fix-unistd.h-include.patch
 rename package/samba4/{0006-heimdal_build-wscript_build-do-not-add-host-include-.patch => 0009-heimdal_build-wscript_build-do-not-add-host-include-.patch} (84%)

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com