Skip to contentSkip to conversation

perl-parse-yapp: new package

PATCH New Bernd Kuhls 3 participants 5 messages Mar 27, 2021 – Apr 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 perl-parse-yapp: new package

Host version is needed for samba 4.14.x.

---
 package/Config.in                            |  1 +
 package/perl-parse-yapp/Config.in            |  6 ++++++
 package/perl-parse-yapp/perl-parse-yapp.hash |  3 +++
 package/perl-parse-yapp/perl-parse-yapp.mk   | 17 +++++++++++++++++
 4 files changed, 27 insertions(+)
 create mode 100644 package/perl-parse-yapp/Config.in
 create mode 100644 package/perl-parse-yapp/perl-parse-yapp.hash
 create mode 100644 package/perl-parse-yapp/perl-parse-yapp.mk
package/Config.in +1 -0
index 2be9c4c634..9d950b7181 100644
@@ -821,6 +821,7 @@ menu "Perl libraries/modules"
 	source "package/perl-number-bytes-human/Config.in"
 	source "package/perl-package-stash/Config.in"
 	source "package/perl-params-util/Config.in"
+	source "package/perl-parse-yapp/Config.in"
 	source "package/perl-path-tiny/Config.in"
 	source "package/perl-plack/Config.in"
 	source "package/perl-posix-strftime-compiler/Config.in"
package/perl-parse-yapp/Config.in new file +6 -0
new file mode 100644
index 0000000000..5cde3d9211
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PERL_PARSE_YAPP
+	bool "perl-parse-yapp"
+	help
+	  A perl frontend to the Parse::Yapp module
+
+	  https://metacpan.org/release/Parse-Yapp
package/perl-parse-yapp/perl-parse-yapp.hash new file +3 -0
new file mode 100644
index 0000000000..d5880a2a71
@@ -0,0 +1,3 @@
+# locally computed
+sha256  3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5  Parse-Yapp-1.21.tar.gz
+sha256  a5d97e3ee50ba12b7897841a117790f723795e4a61e5ad1668dc064956c84e96  lib/Parse/Yapp.pm
package/perl-parse-yapp/perl-parse-yapp.mk new file +17 -0
new file mode 100644
index 0000000000..94f51243fd
@@ -0,0 +1,17 @@
+################################################################################
+#
+# perl-parse-yapp
+#
+################################################################################
+
+PERL_PARSE_YAPP_VERSION = 1.21
+PERL_PARSE_YAPP_SOURCE = Parse-Yapp-$(PERL_PARSE_YAPP_VERSION).tar.gz
+PERL_PARSE_YAPP_SITE = $(BR2_CPAN_MIRROR)/authors/id/W/WB/WBRASWELL
+PERL_PARSE_YAPP_DEPENDENCIES = host-perl-module-build
+PERL_PARSE_YAPP_LICENSE = Artistic or GPL-1.0+
+PERL_PARSE_YAPP_LICENSE_FILES = lib/Parse/Yapp.pm
+PERL_PARSE_YAPP_DISTNAME = Parse-Yapp
+HOST_PERL_PARSE_YAPP_DEPENDENCIES = host-perl-module-build
+
+$(eval $(perl-package))
+$(eval $(host-perl-package))
Signature · 1 line
2.29.2
#1 lore raw

PATCH 2/2 package/samba4: bump version to 4.14.2

Added patch to fix build error.
Removed patch which was applied upstream.

Added two options to samba4-cache.txt to fix cross build.

host-perl is now mandatory, also host-perl-parse-yapp is needed.

Added option to fix build without dbus, this change needed a rework of the shared-modules configure option, due to this upstream commit:
https://gitlab.com/samba-team/devel/samba/-/commit/b6805d5e0bcf1716f87e84bcbb2fd8f93c38a8a3

---
 .../samba4/0005-dcesrv_core-fix-build.patch   |  49 +++++++++
 ...-function-conflicts-with-glibc-nss-h.patch | 104 ------------------
 package/samba4/samba4-cache.txt               |   2 +
 package/samba4/samba4.hash                    |   4 +-
 package/samba4/samba4.mk                      |  13 ++-
 5 files changed, 63 insertions(+), 109 deletions(-)
 create mode 100644 package/samba4/0005-dcesrv_core-fix-build.patch
 delete mode 100644 package/samba4/0005-nsswitch-nsstest-c-Avoid-nss-function-conflicts-with-glibc-nss-h.patch
package/samba4/0005-dcesrv_core-fix-build.patch new file +49 -0
new file mode 100644
index 0000000000..775a4a12d8
@@ -0,0 +1,49 @@
+From b8b5c4d7ebe6edac76313bea5817296dba198a6d Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sat, 27 Mar 2021 17:17:34 +0100
+Subject: [PATCH] dcesrv_core: fix build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Move include of system/network.h above dcesrv_init_context to avoid
+build error:
+
+In file included from ../../lib/replace/system/network.h:35,
+                 from ../../librpc/rpc/dcesrv_core.c:2658:
+usr/include/unistd.h: At top level:
+usr/include/unistd.h:675:16: error: conflicting types for ?geteuid?
+  675 | extern __uid_t geteuid (void) __THROW;
+
+Patch sent upstream:
+https://gitlab.com/samba-team/samba/-/merge_requests/1871
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ librpc/rpc/dcesrv_core.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c
+index 06f6c4b2382..a282b496169 100644
+--- a/librpc/rpc/dcesrv_core.c
++++ b/librpc/rpc/dcesrv_core.c
+@@ -2320,6 +2320,8 @@ static NTSTATUS dcesrv_process_ncacn_packet(struct dcesrv_connection *dce_conn,
+ 	return status;
+ }
+ 
++#include "system/network.h"
++
+ _PUBLIC_ NTSTATUS dcesrv_init_context(TALLOC_CTX *mem_ctx,
+ 				      struct loadparm_context *lp_ctx,
+ 				      struct dcesrv_context_callbacks *cb,
+@@ -2655,7 +2657,6 @@ _PUBLIC_ void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
+  * This is mostly due to socket_wrapper defining #define bind swrap_bind
+  * which conflict with the bind used before.
+  */
+-#include "system/network.h"
+ 
+ struct dcesrv_sock_reply_state {
+ 	struct dcesrv_connection *dce_conn;
+-- 
+2.29.2
+
package/samba4/0005-nsswitch-nsstest-c-Avoid-nss-function-conflicts-with-glibc-nss-h.patch deleted +0 -104

104 lines not on this page · raw message

package/samba4/samba4-cache.txt +2 -0
index e3a3720fc8..bd7c3654b4 100644
@@ -40,3 +40,5 @@ Checking value of SIGRTMIN: "34"
 Checking errno of iconv for illegal multibyte sequence: "0"
 checking for clnt_create(): OK
 Checking for a 64-bit host to support lmdb: NO
+Checking value of GNUTLS_CIPHER_AES_128_CFB8: 29
+Checking value of GNUTLS_MAC_AES_CMAC_128: 203
package/samba4/samba4.hash +2 -2
index 44fbc495c5..4d808c5fe3 100644
@@ -1,4 +1,4 @@
 # Locally calculated after checking pgp signature
-# https://download.samba.org/pub/samba/stable/samba-4.11.17.tar.asc
-sha256  15167da19922c7be210ecf8149b73abcb7c2be051de05b756f7f24e7ec9e5b04  samba-4.11.17.tar.gz
+# https://download.samba.org/pub/samba/stable/samba-4.14.2.tar.asc
+sha256  95651da478743f7cb407aec81287536c096e3e18bb4981dbe47ca70bf6181f96  samba-4.14.2.tar.gz
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
package/samba4/samba4.mk +10 -3
index 61d8190127..ef4ffce47c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SAMBA4_VERSION = 4.11.17
+SAMBA4_VERSION = 4.14.2
 SAMBA4_SITE = https://download.samba.org/pub/samba/stable
 SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
 SAMBA4_INSTALL_STAGING = YES
@@ -13,7 +13,8 @@ SAMBA4_LICENSE_FILES = COPYING
 SAMBA4_CPE_ID_VENDOR = samba
 SAMBA4_CPE_ID_PRODUCT = samba
 SAMBA4_DEPENDENCIES = \
-	host-e2fsprogs host-heimdal host-nfs-utils host-python3 \
+	host-e2fsprogs host-heimdal host-nfs-utils \
+	host-perl host-perl-parse-yapp host-python3 \
 	cmocka e2fsprogs gnutls popt zlib \
 	$(if $(BR2_PACKAGE_LIBAIO),libaio) \
 	$(if $(BR2_PACKAGE_LIBCAP),libcap) \
@@ -58,6 +59,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_DBUS),y)
 SAMBA4_DEPENDENCIES += dbus
+SAMBA4_SHARED_MODULES += vfs_snapper
+else
+SAMBA4_SHARED_MODULES += !vfs_snapper
 endif
 
 ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
@@ -104,6 +108,7 @@ define SAMBA4_CONFIGURE_CMDS
 		$(SAMBA4_PYTHON) \
 		python_LDFLAGS="" \
 		python_LIBDIR="" \
+		PERL="$(HOST_DIR)/bin/perl" \
 		$(TARGET_CONFIGURE_OPTS) \
 		$(SAMBA4_CONF_ENV) \
 		./buildtools/bin/waf configure \
@@ -125,6 +130,7 @@ define SAMBA4_CONFIGURE_CMDS
 			--disable-glusterfs \
 			--with-cluster-support \
 			--bundled-libraries='!asn1_compile,!compile_et' \
+			 --with-shared-modules=$(SAMBA4_SHARED_MODULES) \
 			$(SAMBA4_CONF_OPTS) \
 	)
 endef
@@ -148,8 +154,9 @@ SAMBA4_CONF_OPTS += --without-ad-dc --without-json
 endif
 
 ifeq ($(BR2_PACKAGE_SAMBA4_ADS),y)
-SAMBA4_CONF_OPTS += --with-ads --with-ldap --with-shared-modules=idmap_ad
+SAMBA4_CONF_OPTS += --with-ads --with-ldap
 SAMBA4_DEPENDENCIES += openldap
+SAMBA4_SHARED_MODULES += idmap_ad
 else
 SAMBA4_CONF_OPTS += --without-ads --without-ldap
 endif
Signature · 1 line
2.29.2
#2 lore raw

PATCH 2/2 package/samba4: bump version to 4.14.2

On 2021-03-27 18:13 +0100, Bernd Kuhls spake thusly:

Quoted 4 lines

Added patch to fix build error.
Removed patch which was applied upstream.

Added two options to samba4-cache.txt to fix cross build.

Please explain why you used those specific values for thos e two options, see below...

Quoted 8 lines

host-perl is now mandatory, also host-perl-parse-yapp is needed.

Added option to fix build without dbus, this change needed a rework of the shared-modules configure option, due to this upstream commit:
https://gitlab.com/samba-team/devel/samba/-/commit/b6805d5e0bcf1716f87e84bcbb2fd8f93c38a8a3

---

[--SNIP--]

package/samba4/samba4-cache.txt Checking value of SIGRTMIN: "34" · line 44

Quoted 10 lines
package/samba4/samba4-cache.txt +2 -0
index e3a3720fc8..bd7c3654b4 100644
@@ -40,3 +40,5 @@ Checking value of SIGRTMIN: "34"
 Checking errno of iconv for illegal multibyte sequence: "0"
 checking for clnt_create(): OK
 Checking for a 64-bit host to support lmdb: NO
+Checking value of GNUTLS_CIPHER_AES_128_CFB8: 29
+Checking value of GNUTLS_MAC_AES_CMAC_128: 203

So, those two options are abotu cryptography stuff, and so this is pretty much tricky... We really need those values to be explained, at least in the commit log, and if possible, with a comment in the cache file.

package/samba4/samba4.mk

Quoted 4 lines
package/samba4/samba4.mk +0 -0
index 61d8190127..ef4ffce47c 100644

[--SNIP--]

package/samba4/samba4.mk define SAMBA4_CONFIGURE_CMDS · line 133

Quoted 5 lines
package/samba4/samba4.mk +1 -0
@@ -125,6 +130,7 @@ define SAMBA4_CONFIGURE_CMDS
 			--disable-glusterfs \
 			--with-cluster-support \
 			--bundled-libraries='!asn1_compile,!compile_et' \
+			 --with-shared-modules=$(SAMBA4_SHARED_MODULES) \

Extraneous space just before the option.

Also see below for another issue with this line...

package/samba4/samba4.mk SAMBA4_CONF_OPTS += --without-ad-dc --without-json · line 161

Quoted 13 lines
package/samba4/samba4.mk +2 -1
 			$(SAMBA4_CONF_OPTS) \
 	)
 endef
@@ -148,8 +154,9 @@ SAMBA4_CONF_OPTS += --without-ad-dc --without-json
 endif
 
 ifeq ($(BR2_PACKAGE_SAMBA4_ADS),y)
-SAMBA4_CONF_OPTS += --with-ads --with-ldap --with-shared-modules=idmap_ad
+SAMBA4_CONF_OPTS += --with-ads --with-ldap
 SAMBA4_DEPENDENCIES += openldap
+SAMBA4_SHARED_MODULES += idmap_ad
 else
 SAMBA4_CONF_OPTS += --without-ads --without-ldap

Usually, we want to be symetric, so we should have:

    SAMBA4_SHARED_MODULES += !idmap_ad

Finally, the way SAMBA4_SHARED_MODULES is used, --with-shared-modules will get a space-separated list of items, but it is not quoted when expanded, above (quoted here again:

    --with-shared-modules=$(SAMBA4_SHARED_MODULES)

So if both vfs_snapper and idmap_ad are enabled, I doubt that will behave as expected... Furthermore, --with-shared-modules is expected to be comma-separated:

https://gitlab.com/samba-team/devel/samba/-/blob/master/source3/wscript#L32

Comma-separated list of names of modules to build shared. [...]

So you probably want something like:

    --with-shared-modules=$(subst $(space),$(comma),$(strip $(SAMBA4_SHARED_MODULES)))

Regards,
Yann E. MORIN.

Quoted 8 lines
package/samba4/samba4.mk +0 -0
 endif
Signature · 6 lines
2.29.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/2 perl-parse-yapp: new package

In reply to Bernd Kuhls

Bernd, All,

On 2021-03-27 18:13 +0100, Bernd Kuhls spake thusly:

Quoted 3 lines

Host version is needed for samba 4.14.x.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 73 lines
---
 package/Config.in                            |  1 +
 package/perl-parse-yapp/Config.in            |  6 ++++++
 package/perl-parse-yapp/perl-parse-yapp.hash |  3 +++
 package/perl-parse-yapp/perl-parse-yapp.mk   | 17 +++++++++++++++++
 4 files changed, 27 insertions(+)
 create mode 100644 package/perl-parse-yapp/Config.in
 create mode 100644 package/perl-parse-yapp/perl-parse-yapp.hash
 create mode 100644 package/perl-parse-yapp/perl-parse-yapp.mk
package/Config.in +1 -0
index 2be9c4c634..9d950b7181 100644
@@ -821,6 +821,7 @@ menu "Perl libraries/modules"
 	source "package/perl-number-bytes-human/Config.in"
 	source "package/perl-package-stash/Config.in"
 	source "package/perl-params-util/Config.in"
+	source "package/perl-parse-yapp/Config.in"
 	source "package/perl-path-tiny/Config.in"
 	source "package/perl-plack/Config.in"
 	source "package/perl-posix-strftime-compiler/Config.in"
package/perl-parse-yapp/Config.in new file +6 -0
new file mode 100644
index 0000000000..5cde3d9211
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PERL_PARSE_YAPP
+	bool "perl-parse-yapp"
+	help
+	  A perl frontend to the Parse::Yapp module
+
+	  https://metacpan.org/release/Parse-Yapp
package/perl-parse-yapp/perl-parse-yapp.hash new file +3 -0
new file mode 100644
index 0000000000..d5880a2a71
@@ -0,0 +1,3 @@
+# locally computed
+sha256  3810e998308fba2e0f4f26043035032b027ce51ce5c8a52a8b8e340ca65f13e5  Parse-Yapp-1.21.tar.gz
+sha256  a5d97e3ee50ba12b7897841a117790f723795e4a61e5ad1668dc064956c84e96  lib/Parse/Yapp.pm
package/perl-parse-yapp/perl-parse-yapp.mk new file +17 -0
new file mode 100644
index 0000000000..94f51243fd
@@ -0,0 +1,17 @@
+################################################################################
+#
+# perl-parse-yapp
+#
+################################################################################
+
+PERL_PARSE_YAPP_VERSION = 1.21
+PERL_PARSE_YAPP_SOURCE = Parse-Yapp-$(PERL_PARSE_YAPP_VERSION).tar.gz
+PERL_PARSE_YAPP_SITE = $(BR2_CPAN_MIRROR)/authors/id/W/WB/WBRASWELL
+PERL_PARSE_YAPP_DEPENDENCIES = host-perl-module-build
+PERL_PARSE_YAPP_LICENSE = Artistic or GPL-1.0+
+PERL_PARSE_YAPP_LICENSE_FILES = lib/Parse/Yapp.pm
+PERL_PARSE_YAPP_DISTNAME = Parse-Yapp
+HOST_PERL_PARSE_YAPP_DEPENDENCIES = host-perl-module-build
+
+$(eval $(perl-package))
+$(eval $(host-perl-package))
Signature · 6 lines
2.29.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'