Skip to contentSkip to conversation

package/libtalloc: new package

PATCH Superseded David GOUARIN 3 participants 15 messages Oct 13, 2020 – Oct 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/libtalloc: new package

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

---
 DEVELOPERS                            |  1 +
 package/Config.in                     |  1 +
 package/libtalloc/Config.in           |  9 +++++
 package/libtalloc/libtalloc-cache.txt | 42 ++++++++++++++++++++
 package/libtalloc/libtalloc.hash      |  3 ++
 package/libtalloc/libtalloc.mk        | 55 +++++++++++++++++++++++++++
 6 files changed, 111 insertions(+)
 create mode 100644 package/libtalloc/Config.in
 create mode 100644 package/libtalloc/libtalloc-cache.txt
 create mode 100644 package/libtalloc/libtalloc.hash
 create mode 100644 package/libtalloc/libtalloc.mk
DEVELOPERS +1 -0
index 79a9eaa563..c856d7ad45 100644
@@ -712,6 +712,7 @@ F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
 F:	package/librelp/
+F:	package/libtalloc/
 
 N:	David Lechner <[email protected]>
 F:	board/lego/ev3/
package/Config.in +1 -0
index 09a332e3b9..a4d6fe02ae 100644
@@ -1894,6 +1894,7 @@ menu "Other"
 	source "package/libsigc/Config.in"
 	source "package/libsigsegv/Config.in"
 	source "package/libspatialindex/Config.in"
+	source "package/libtalloc/Config.in"
 	source "package/libtasn1/Config.in"
 	source "package/libtommath/Config.in"
 	source "package/libtpl/Config.in"
package/libtalloc/Config.in new file +9 -0
new file mode 100644
index 0000000000..45733a2144
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBTALLOC
+	bool "libtalloc"
+	depends on BR2_TOOLCHAIN_USES_GLIBC && !BR2_COMPILER_PARANOID_UNSAFE_PATH ||?!BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  talloc is a hierarchical, reference counted memory pool system with
+	  destructors. It is the core memory allocator used in Samba.
+
+	  https://talloc.samba.org/talloc/doc/html/index.html
+
package/libtalloc/libtalloc-cache.txt new file +42 -0

42 lines not on this page · raw message

package/libtalloc/libtalloc.hash new file +3 -0
new file mode 100644
index 0000000000..20211210d2
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77  talloc-2.3.1.tar.gz
+
package/libtalloc/libtalloc.mk new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 package/freeradius-server: new package

FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.

---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 .../0001-host-jlibtool.patch                  | 17 +++++++++
 ...thread-support-while-cross-compiling.patch | 15 ++++++++
 package/freeradius-server/Config.in           | 20 ++++++++++
 .../freeradius-server-config.cache            |  4 ++
 .../freeradius-server/freeradius-server.hash  |  3 ++
 .../freeradius-server/freeradius-server.mk    | 37 +++++++++++++++++++
 8 files changed, 98 insertions(+)
 create mode 100644 package/freeradius-server/0001-host-jlibtool.patch
 create mode 100644 package/freeradius-server/0002-thread-support-while-cross-compiling.patch
 create mode 100644 package/freeradius-server/Config.in
 create mode 100644 package/freeradius-server/freeradius-server-config.cache
 create mode 100644 package/freeradius-server/freeradius-server.hash
 create mode 100644 package/freeradius-server/freeradius-server.mk
DEVELOPERS +1 -0
index c856d7ad45..ae688a85c4 100644
@@ -711,6 +711,7 @@ N:	David du Colombier <[email protected]>
 F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
+F:	package/freeradius-server/
 F:	package/librelp/
 F:	package/libtalloc/
 
package/Config.in +1 -0
index a4d6fe02ae..8e3ce4fe20 100644
@@ -2079,6 +2079,7 @@ menu "Networking applications"
 	source "package/flannel/Config.in"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
+	source "package/freeradius-server/Config.in"
 	source "package/freeswitch/Config.in"
 	source "package/freeswitch-mod-bcg729/Config.in"
 	source "package/frr/Config.in"
package/freeradius-server/0001-host-jlibtool.patch new file +17 -0
new file mode 100644
index 0000000000..18cebcb4e5
@@ -0,0 +1,17 @@
+jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/scripts/libtool.mk 2018-10-08 09:22:59.032031858 -0600
++++ b/scripts/libtool.mk 2018-10-08 15:04:18.406661484 -0600
+@@ -43,8 +43,8 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+    # binary!
+	${JLIBTOOL}: ${top_makedir}/jlibtool.c
+	$(Q)mkdir -p $(dir $@)
+-	$(Q)echo CC jlibtool.c
+-	$(Q)${CC} $< -o $@
++	$(Q)echo HOSTCC jlibtool.c
++	$(Q)${HOSTCC} $< -o $@
+
+    clean: jlibtool_clean
+
package/freeradius-server/0002-thread-support-while-cross-compiling.patch new file +15 -0
new file mode 100644
index 0000000000..464bcf9aa6
@@ -0,0 +1,15 @@
+configure: enable __thread attribute compiler support by default when cross compiling to avoid a bug in some freeradius macros
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/configure
++++ b/configure
+@@ -11309,7 +11309,7 @@ fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5
+ $as_echo_n "checking for __thread support in compiler... " >&6; }
+   if test "$cross_compiling" = yes; then :
+-  have_tls=no
++  have_tls=yes
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
package/freeradius-server/Config.in new file +20 -0
new file mode 100644
index 0000000000..3c2d9af5da
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_FREERADIUS_SERVER
+	bool "freeradius-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_COMPILER_PARANOID_UNSAFE_PATH
+	select BR2_PACKAGE_LIBTALLOC
+	select BR2_PACKAGE_PCRE
+	help
+	  FreeRADIUS is an open source server which implements
+	  a protocol for remote user Authorization, Authentication
+	  and Accounting.
+
+	  http://wiki.freeradius.org/
+
+comment "freeradius-server needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "freeradius-server needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC ||?BR2_COMPILER_PARANOID_UNSAFE_PATH
+
package/freeradius-server/freeradius-server-config.cache new file +4 -0
new file mode 100644
index 0000000000..b0e582afc9
@@ -0,0 +1,4 @@
+ax_cv_cc_bounded_attribute=no
+ax_cv_cc_builtin_bswap64=yes
+ax_cv_cc_builtin_choose_expr=yes
+ax_cv_cc_builtin_types_compatible_p=yes
package/freeradius-server/freeradius-server.hash new file +3 -0
new file mode 100644
index 0000000000..ba338d8b7f
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae  freeradius-server-3.0.21.tar.gz
+sha256  8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6  COPYRIGHT
package/freeradius-server/freeradius-server.mk new file +37 -0
new file mode 100644
index 0000000000..d04f453c60
@@ -0,0 +1,37 @@
+################################################################################
+#
+# freeradius-server
+#
+################################################################################
+
+FREERADIUS_SERVER_VERSION = 3.0.21
+FREERADIUS_SERVER_SITE = ftp://ftp.freeradius.org/pub/freeradius
+FREERADIUS_SERVER_LICENSE = GPL-2.0
+FREERADIUS_SERVER_LICENSE_FILES = COPYRIGHT
+FREERADIUS_SERVER_INSTALL_HOST = NO
+
+FREERADIUS_SERVER_DEPENDENCIES = libtalloc pcre
+
+ifeq ($(BR2_PACKAGE_HAS_OPENSSL),y)
+FREERADIUS_SERVER_DEPENDENCIES += openssl
+FREERADIUS_SERVER_CONF_OPTS += --with-openssl
+else
+FREERADIUS_CONF_OPTS += --without-openssl
+endif
+
+define FREERADIUS_SERVER_CACHE_FOR_CROSS_COMPILE
+	$(INSTALL) -m 0644 package/freeradius-server/freeradius-server-config.cache $(@D)/freeradius-server-config.cache
+endef
+FREERADIUS_SERVER_PRE_CONFIGURE_HOOKS += FREERADIUS_SERVER_CACHE_FOR_CROSS_COMPILE
+
+# --cache-file= : some compiler checks are not supported while cross compiling.
+#   instead of removing those checks, we use a config.cache file
+FREERADIUS_SERVER_CONF_OPTS += \
+	--cache-file=freeradius-server-config.cache
+
+FREERADIUS_SERVER_MAKE_ENV = R=$(TARGET_DIR) TARGET_DIR=""
+ 
+# make install does not support parallel build
+FREERADIUS_SERVER_MAKE = $(MAKE1)
+
+$(eval $(autotools-package))
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 3/3 package/freeradius-server: new package

FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.

Changes v1 -> v2:
fix invalid characters in Config.in

---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 .../0001-host-jlibtool.patch                  | 17 +++++++++
 ...thread-support-while-cross-compiling.patch | 15 ++++++++
 package/freeradius-server/Config.in           | 20 ++++++++++
 .../freeradius-server-config.cache            |  4 ++
 .../freeradius-server/freeradius-server.hash  |  3 ++
 .../freeradius-server/freeradius-server.mk    | 37 +++++++++++++++++++
 8 files changed, 98 insertions(+)
 create mode 100644 package/freeradius-server/0001-host-jlibtool.patch
 create mode 100644 package/freeradius-server/0002-thread-support-while-cross-compiling.patch
 create mode 100644 package/freeradius-server/Config.in
 create mode 100644 package/freeradius-server/freeradius-server-config.cache
 create mode 100644 package/freeradius-server/freeradius-server.hash
 create mode 100644 package/freeradius-server/freeradius-server.mk
DEVELOPERS +1 -0
index c856d7ad45..ae688a85c4 100644
@@ -711,6 +711,7 @@ N:	David du Colombier <[email protected]>
 F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
+F:	package/freeradius-server/
 F:	package/librelp/
 F:	package/libtalloc/
 
package/Config.in +1 -0
index a4d6fe02ae..8e3ce4fe20 100644
@@ -2079,6 +2079,7 @@ menu "Networking applications"
 	source "package/flannel/Config.in"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
+	source "package/freeradius-server/Config.in"
 	source "package/freeswitch/Config.in"
 	source "package/freeswitch-mod-bcg729/Config.in"
 	source "package/frr/Config.in"
package/freeradius-server/0001-host-jlibtool.patch new file +17 -0
new file mode 100644
index 0000000000..18cebcb4e5
@@ -0,0 +1,17 @@
+jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/scripts/libtool.mk 2018-10-08 09:22:59.032031858 -0600
++++ b/scripts/libtool.mk 2018-10-08 15:04:18.406661484 -0600
+@@ -43,8 +43,8 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+    # binary!
+	${JLIBTOOL}: ${top_makedir}/jlibtool.c
+	$(Q)mkdir -p $(dir $@)
+-	$(Q)echo CC jlibtool.c
+-	$(Q)${CC} $< -o $@
++	$(Q)echo HOSTCC jlibtool.c
++	$(Q)${HOSTCC} $< -o $@
+
+    clean: jlibtool_clean
+
package/freeradius-server/0002-thread-support-while-cross-compiling.patch new file +15 -0
new file mode 100644
index 0000000000..464bcf9aa6
@@ -0,0 +1,15 @@
+configure: enable __thread attribute compiler support by default when cross compiling to avoid a bug in some freeradius macros
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/configure
++++ b/configure
+@@ -11309,7 +11309,7 @@ fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support in compiler" >&5
+ $as_echo_n "checking for __thread support in compiler... " >&6; }
+   if test "$cross_compiling" = yes; then :
+-  have_tls=no
++  have_tls=yes
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
package/freeradius-server/Config.in new file +20 -0
new file mode 100644
index 0000000000..0aa0722970
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_FREERADIUS_SERVER
+	bool "freeradius-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_COMPILER_PARANOID_UNSAFE_PATH
+	select BR2_PACKAGE_LIBTALLOC
+	select BR2_PACKAGE_PCRE
+	help
+	  FreeRADIUS is an open source server which implements
+	  a protocol for remote user Authorization, Authentication
+	  and Accounting.
+
+	  http://wiki.freeradius.org/
+
+comment "freeradius-server needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "freeradius-server needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_COMPILER_PARANOID_UNSAFE_PATH
+
package/freeradius-server/freeradius-server-config.cache new file +4 -0
new file mode 100644
index 0000000000..b0e582afc9
@@ -0,0 +1,4 @@
+ax_cv_cc_bounded_attribute=no
+ax_cv_cc_builtin_bswap64=yes
+ax_cv_cc_builtin_choose_expr=yes
+ax_cv_cc_builtin_types_compatible_p=yes
package/freeradius-server/freeradius-server.hash new file +3 -0
new file mode 100644
index 0000000000..ba338d8b7f
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae  freeradius-server-3.0.21.tar.gz
+sha256  8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6  COPYRIGHT
package/freeradius-server/freeradius-server.mk new file +37 -0
new file mode 100644
index 0000000000..d04f453c60
@@ -0,0 +1,37 @@
+################################################################################
+#
+# freeradius-server
+#
+################################################################################
+
+FREERADIUS_SERVER_VERSION = 3.0.21
+FREERADIUS_SERVER_SITE = ftp://ftp.freeradius.org/pub/freeradius
+FREERADIUS_SERVER_LICENSE = GPL-2.0
+FREERADIUS_SERVER_LICENSE_FILES = COPYRIGHT
+FREERADIUS_SERVER_INSTALL_HOST = NO
+
+FREERADIUS_SERVER_DEPENDENCIES = libtalloc pcre
+
+ifeq ($(BR2_PACKAGE_HAS_OPENSSL),y)
+FREERADIUS_SERVER_DEPENDENCIES += openssl
+FREERADIUS_SERVER_CONF_OPTS += --with-openssl
+else
+FREERADIUS_CONF_OPTS += --without-openssl
+endif
+
+define FREERADIUS_SERVER_CACHE_FOR_CROSS_COMPILE
+	$(INSTALL) -m 0644 package/freeradius-server/freeradius-server-config.cache $(@D)/freeradius-server-config.cache
+endef
+FREERADIUS_SERVER_PRE_CONFIGURE_HOOKS += FREERADIUS_SERVER_CACHE_FOR_CROSS_COMPILE
+
+# --cache-file= : some compiler checks are not supported while cross compiling.
+#   instead of removing those checks, we use a config.cache file
+FREERADIUS_SERVER_CONF_OPTS += \
+	--cache-file=freeradius-server-config.cache
+
+FREERADIUS_SERVER_MAKE_ENV = R=$(TARGET_DIR) TARGET_DIR=""
+ 
+# make install does not support parallel build
+FREERADIUS_SERVER_MAKE = $(MAKE1)
+
+$(eval $(autotools-package))
Signature · 1 line
2.17.1
#3 lore raw

PATCH v3 1/1 package/freeradius-server: new package

FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.

Changes v1 -> v2:
fix invalid characters in Config.in

Changes v2 -> v3:
As suggested by Matt, merge with pending upstream patch. Included most of it, including patches based on Yocto work :
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
Didn't kept all the --without directive, as they do not seem useful, nor the custom INSTALL_TARGET_CMDS.

---
 DEVELOPERS                                    |   1 +
 package/Config.in                             |   1 +
 .../0001-host-jlibtool.patch                  |  17 +++
 package/freeradius-server/Config.in           |  19 +++
 .../freeradius-server-config.cache            |   4 +
 .../freeradius-server/freeradius-server.hash  |   8 ++
 .../freeradius-server/freeradius-server.mk    | 126 ++++++++++++++++++
 7 files changed, 176 insertions(+)
 create mode 100644 package/freeradius-server/0001-host-jlibtool.patch
 create mode 100644 package/freeradius-server/Config.in
 create mode 100644 package/freeradius-server/freeradius-server-config.cache
 create mode 100644 package/freeradius-server/freeradius-server.hash
 create mode 100644 package/freeradius-server/freeradius-server.mk
DEVELOPERS +1 -0
index c856d7ad45..ae688a85c4 100644
@@ -711,6 +711,7 @@ N:	David du Colombier <[email protected]>
 F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
+F:	package/freeradius-server/
 F:	package/librelp/
 F:	package/libtalloc/
 
package/Config.in +1 -0
index a4d6fe02ae..8e3ce4fe20 100644
@@ -2079,6 +2079,7 @@ menu "Networking applications"
 	source "package/flannel/Config.in"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
+	source "package/freeradius-server/Config.in"
 	source "package/freeswitch/Config.in"
 	source "package/freeswitch-mod-bcg729/Config.in"
 	source "package/frr/Config.in"
package/freeradius-server/0001-host-jlibtool.patch new file +17 -0
new file mode 100644
index 0000000000..18cebcb4e5
@@ -0,0 +1,17 @@
+jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/scripts/libtool.mk 2018-10-08 09:22:59.032031858 -0600
++++ b/scripts/libtool.mk 2018-10-08 15:04:18.406661484 -0600
+@@ -43,8 +43,8 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+    # binary!
+	${JLIBTOOL}: ${top_makedir}/jlibtool.c
+	$(Q)mkdir -p $(dir $@)
+-	$(Q)echo CC jlibtool.c
+-	$(Q)${CC} $< -o $@
++	$(Q)echo HOSTCC jlibtool.c
++	$(Q)${HOSTCC} $< -o $@
+
+    clean: jlibtool_clean
+
package/freeradius-server/Config.in new file +19 -0
new file mode 100644
index 0000000000..456e05a5a9
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_FREERADIUS_SERVER
+	bool "freeradius-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_COMPILER_PARANOID_UNSAFE_PATH
+	select BR2_PACKAGE_LIBTALLOC
+	help
+	  FreeRADIUS is an open source server which implements
+	  a protocol for remote user Authorization, Authentication
+	  and Accounting.
+
+	  http://wiki.freeradius.org/
+
+comment "freeradius-server needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "freeradius-server needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_COMPILER_PARANOID_UNSAFE_PATH
+
package/freeradius-server/freeradius-server-config.cache new file +4 -0
new file mode 100644
index 0000000000..d554b9a9aa
@@ -0,0 +1,4 @@
+ax_cv_cc_bounded_attribute=no
+ax_cv_cc_builtin_bswap64=no
+ax_cv_cc_builtin_choose_expr=no
+ax_cv_cc_builtin_types_compatible_p=no
package/freeradius-server/freeradius-server.hash new file +8 -0
new file mode 100644
index 0000000000..a1678b6809
@@ -0,0 +1,8 @@
+# Locally computed
+sha256  2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae  freeradius-server-3.0.21.tar.gz
+sha256  8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6  COPYRIGHT
+sha256  bf25b952f9f92d0fd0e9da3b61fd60e2bbbe4d5971650238151c8d7420780931  freeradius-avoid-searching-host-dirs.patch
+sha256  11441c8016fac480b16d160098c25caec6f5031ebc1310b6e523f90b6e27deb5  freeradius-configure.ac-add-option-for-libcap.patch
+sha256  fe429bf21a1b2f2b6648281ec30599ce1cee6b65aa5089e2cea0dfa89f63f64d  freeradius-configure.ac-allow-cross-compilation.patch
+sha256  9c19e94062b5dd8150b374a9698230db7fce1132c3c1d801f0370c578107159f  freeradius-fix-error-for-expansion-of-macro.patch
+
package/freeradius-server/freeradius-server.mk new file +126 -0

126 lines not on this page · raw message

Signature · 1 line
2.17.1
#4 lore raw

PATCH v3 1/1 package/freeradius-server: new package

Hello David,

Quoted 3 lines · On Wed, 14 Oct 2020 19:02:54 +0200 David GOUARIN <[email protected]> wrote:

FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.

Thanks for this contribution. First of all, it would be good to not send a v3 of freeradius-server alone: always send the entire series. Otherwise, we can't keep track of the fact that this patch requires libtalloc.

Quoted 9 lines

Changes v1 -> v2:
fix invalid characters in Config.in

Changes v2 -> v3:
As suggested by Matt, merge with pending upstream patch. Included most of it, including patches based on Yocto work :
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
Didn't kept all the --without directive, as they do not seem useful, nor the custom INSTALL_TARGET_CMDS.

Changes should go...

Quoted 4 lines

---

... here.

package/freeradius-server/0001-host-jlibtool.patch line 3

Quoted 9 lines
package/freeradius-server/0001-host-jlibtool.patch new file +3 -0
new file mode 100644
index 0000000000..18cebcb4e5
@@ -0,0 +1,17 @@
+jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool
+
+Signed-off-by: David Gouarin <[email protected]>

This the upstream project is hosted in Git, we want patches to be formatted using "git format-patch -N".

package/freeradius-server/Config.in line 5

Quoted 11 lines
package/freeradius-server/Config.in new file +5 -0
new file mode 100644
index 0000000000..456e05a5a9
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_FREERADIUS_SERVER
+	bool "freeradius-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_COMPILER_PARANOID_UNSAFE_PATH

Why? We cannot merge packages that don't work with BR2_COMPILER_PARANOID_UNSAFE_PATH.

package/freeradius-server/freeradius-server-config.cache line 4

Quoted 10 lines
package/freeradius-server/freeradius-server-config.cache new file +4 -0
new file mode 100644
index 0000000000..d554b9a9aa
@@ -0,0 +1,4 @@
+ax_cv_cc_bounded_attribute=no
+ax_cv_cc_builtin_bswap64=no
+ax_cv_cc_builtin_choose_expr=no
+ax_cv_cc_builtin_types_compatible_p=no

You should not use a cache file, but instead pass those variables in FREERADIUS_SERVER_CONF_ENV.

Quoted 6 lines
package/freeradius-server/freeradius-server.hash new file +0 -0
new file mode 100644
index 0000000000..a1678b6809

package/freeradius-server/freeradius-server.hash line 8

Quoted 8 lines
package/freeradius-server/freeradius-server.hash new file +8 -0
@@ -0,0 +1,8 @@
+# Locally computed
+sha256  2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae  freeradius-server-3.0.21.tar.gz
+sha256  8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6  COPYRIGHT
+sha256  bf25b952f9f92d0fd0e9da3b61fd60e2bbbe4d5971650238151c8d7420780931  freeradius-avoid-searching-host-dirs.patch
+sha256  11441c8016fac480b16d160098c25caec6f5031ebc1310b6e523f90b6e27deb5  freeradius-configure.ac-add-option-for-libcap.patch
+sha256  fe429bf21a1b2f2b6648281ec30599ce1cee6b65aa5089e2cea0dfa89f63f64d  freeradius-configure.ac-allow-cross-compilation.patch
+sha256  9c19e94062b5dd8150b374a9698230db7fce1132c3c1d801f0370c578107159f  freeradius-fix-error-for-expansion-of-macro.patch
+

Empty new line at end of file.

package/freeradius-server/freeradius-server.hash

Quoted 10 lines
package/freeradius-server/freeradius-server.hash new file +10 -0
+FREERADIUS_SERVER_VERSION = 3.0.21
+FREERADIUS_SERVER_SITE = ftp://ftp.freeradius.org/pub/freeradius
+FREERADIUS_SERVER_LICENSE = GPL-2.0
+FREERADIUS_SERVER_LICENSE_FILES = COPYRIGHT
+
+FREERADIUS_SERVER_PATCH = \
+	http://cgit.openembedded.org/meta-openembedded/plain/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch \
+	http://cgit.openembedded.org/meta-openembedded/plain/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch \
+	http://cgit.openembedded.org/meta-openembedded/plain/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch \
+	http://cgit.openembedded.org/meta-openembedded/plain/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch

I am not sure it's a good idea to download those patches: there is nothing in these URLs that indicate that they will be stable. So I would prefer if those patches were imported in package/freeradius-server/. When you do so, please make sure to add your own Signed-off-by in each of the patch, below the existing Signed-off-by.

package/freeradius-server/freeradius-server.hash

Quoted 7 lines
package/freeradius-server/freeradius-server.hash new file +7 -0
+
+FREERADIUS_SERVER_DEPENDENCIES = libtalloc
+
+# --cache-file= : some compiler checks are not supported while cross compiling.
+#   instead of removing those checks, we use a config.cache file
+FREERADIUS_SERVER_CONF_OPTS += \
+	--cache-file=freeradius-server-config.cache

As said above: use <pkg>_CONF_ENV.

package/freeradius-server/freeradius-server.hash

Quoted 2 lines
package/freeradius-server/freeradius-server.hash new file +2 -0
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
+FREERADIUS_SERVER_CONF_OPTS += --with-rlm_python --with-rlm-python-bin=$(HOST_DIR)/bin/python --with-rlm-python-include-dir=$(STAGING_INCDIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR) --with-rlm_perl

STAGING_INCDIR doesn't exist in Buildroot.

And PYTHON_PYQT5_PYTHON_DIR is completely unrelated, it shouldn't be used here. Also, pointing an "include dir" option to a library folder seems dubious.

Finally, having --with-rlm_perl in an option enabling Python support looks weird.

Note: if you're not using all those optional features, don't support
them: keep an unconditional --without-<foo>, that's perfectly acceptable.

package/freeradius-server/freeradius-server.hash

Quoted 6 lines
package/freeradius-server/freeradius-server.hash new file +6 -0
+define FREERADIUS_SERVER_CACHE_FOR_CROSS_COMPILE
+	$(INSTALL) -m 0644 package/freeradius-server/freeradius-server-config.cache $(@D)/freeradius-server-config.cache
+endef
+FREERADIUS_SERVER_PRE_CONFIGURE_HOOKS += FREERADIUS_SERVER_CACHE_FOR_CROSS_COMPILE
+
+FREERADIUS_SERVER_MAKE_ENV = R=$(TARGET_DIR) TARGET_DIR=""

What is this doing?

Thanks,

Thomas

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

PATCH v4 1/1 package/libtalloc: new package

In reply to David GOUARIN

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

Change v1 -> v2:
- merge with work from jared.bents at rockwellcollins.com, as sujested by Matthew Weber

    http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com

Change v2 -> v4: (no v3, resubmitting the whole patch series)
- fix build with BR2_PARANOID_UNSAFE_PATH (Thomas review)
- add hashes of license files (Thomas)
- license is GPL-3.0+ for both talloc and pytalloc (Thomas)
- remove useless --prefix and --libdir (Thomas)

---
 DEVELOPERS                            |  1 +
 package/Config.in                     |  1 +
 package/libtalloc/Config.in           |  9 +++++
 package/libtalloc/libtalloc-cache.txt | 42 ++++++++++++++++++++++++
 package/libtalloc/libtalloc.hash      |  4 +++
 package/libtalloc/libtalloc.mk        | 47 +++++++++++++++++++++++++++
 6 files changed, 104 insertions(+)
 create mode 100644 package/libtalloc/Config.in
 create mode 100644 package/libtalloc/libtalloc-cache.txt
 create mode 100644 package/libtalloc/libtalloc.hash
 create mode 100644 package/libtalloc/libtalloc.mk
DEVELOPERS +1 -0
index 79a9eaa563..c856d7ad45 100644
@@ -712,6 +712,7 @@ F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
 F:	package/librelp/
+F:	package/libtalloc/
 
 N:	David Lechner <[email protected]>
 F:	board/lego/ev3/
package/Config.in +1 -0
index 09a332e3b9..a4d6fe02ae 100644
@@ -1894,6 +1894,7 @@ menu "Other"
 	source "package/libsigc/Config.in"
 	source "package/libsigsegv/Config.in"
 	source "package/libspatialindex/Config.in"
+	source "package/libtalloc/Config.in"
 	source "package/libtasn1/Config.in"
 	source "package/libtommath/Config.in"
 	source "package/libtpl/Config.in"
package/libtalloc/Config.in new file +9 -0
new file mode 100644
index 0000000000..df972f2288
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBTALLOC
+	bool "libtalloc"
+	depends on BR2_USE_MMU
+	help
+	  talloc is a hierarchical, reference counted memory pool system with
+	  destructors. It is the core memory allocator used in Samba.
+
+	  https://talloc.samba.org/talloc/doc/html/index.html
+
package/libtalloc/libtalloc-cache.txt new file +42 -0

42 lines not on this page · raw message

package/libtalloc/libtalloc.hash new file +4 -0
new file mode 100644
index 0000000000..9d48a965d0
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77  talloc-2.3.1.tar.gz
+sha256  15c2767545d1e43dc35832736253bde5be956f8ffec0474a6d0f70349b646ed3  talloc.h
+sha256  8742f2dad3aaf885c7b4b699c20bfa0e9edeab380689f91a88aa90af03e6947b  pytalloc.h
package/libtalloc/libtalloc.mk new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
2.17.1
#6 lore raw

PATCH v4 1/1 package/freeradius-server: new package

FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.

Changes v1 -> v2:
fix invalid characters in Config.in

Changes v2 -> v3:
As suggested by Matt, merge with pending upstream patch. Included most of it, including patches based on Yocto work :
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
Didn't kept all the --without directive, as they do not seem useful, nor the custom INSTALL_TARGET_CMDS.

Changes v3 -> v4:
Taken in account Thomas review
- fix build with BR2_COMPILER_PARANOID_UNSAFE_PATH
- import patches inside package directory instead of downloading them
- remove config.cache file, pass the answers on the command line instead
- add comments for weird TARGET_DIR and R directives
- remove broken python optional feature. Managed to get it to build
with python 2.7, not 3.0 and it still fails basic testing

---
 DEVELOPERS                                    |   1 +
 package/Config.in                             |   1 +
 .../0001-host-jlibtool.patch                  |  17 ++
 package/freeradius-server/Config.in           |  18 ++
 ...freeradius-avoid-searching-host-dirs.patch | 198 ++++++++++++++++++
 ...s-configure.ac-add-option-for-libcap.patch |  71 +++++++
 ...configure.ac-allow-cross-compilation.patch |  38 ++++
 ...ius-fix-error-for-expansion-of-macro.patch |  62 ++++++
 .../freeradius-server/freeradius-server.hash  |   3 +
 .../freeradius-server/freeradius-server.mk    | 112 ++++++++++
 10 files changed, 521 insertions(+)
 create mode 100644 package/freeradius-server/0001-host-jlibtool.patch
 create mode 100644 package/freeradius-server/Config.in
 create mode 100644 package/freeradius-server/freeradius-avoid-searching-host-dirs.patch
 create mode 100644 package/freeradius-server/freeradius-configure.ac-add-option-for-libcap.patch
 create mode 100644 package/freeradius-server/freeradius-configure.ac-allow-cross-compilation.patch
 create mode 100644 package/freeradius-server/freeradius-fix-error-for-expansion-of-macro.patch
 create mode 100644 package/freeradius-server/freeradius-server.hash
 create mode 100644 package/freeradius-server/freeradius-server.mk
DEVELOPERS +1 -0
index c856d7ad45..ae688a85c4 100644
@@ -711,6 +711,7 @@ N:	David du Colombier <[email protected]>
 F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
+F:	package/freeradius-server/
 F:	package/librelp/
 F:	package/libtalloc/
 
package/Config.in +1 -0
index a4d6fe02ae..8e3ce4fe20 100644
@@ -2079,6 +2079,7 @@ menu "Networking applications"
 	source "package/flannel/Config.in"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
+	source "package/freeradius-server/Config.in"
 	source "package/freeswitch/Config.in"
 	source "package/freeswitch-mod-bcg729/Config.in"
 	source "package/frr/Config.in"
package/freeradius-server/0001-host-jlibtool.patch new file +17 -0
new file mode 100644
index 0000000000..18cebcb4e5
@@ -0,0 +1,17 @@
+jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/scripts/libtool.mk 2018-10-08 09:22:59.032031858 -0600
++++ b/scripts/libtool.mk 2018-10-08 15:04:18.406661484 -0600
+@@ -43,8 +43,8 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+    # binary!
+	${JLIBTOOL}: ${top_makedir}/jlibtool.c
+	$(Q)mkdir -p $(dir $@)
+-	$(Q)echo CC jlibtool.c
+-	$(Q)${CC} $< -o $@
++	$(Q)echo HOSTCC jlibtool.c
++	$(Q)${HOSTCC} $< -o $@
+
+    clean: jlibtool_clean
+
package/freeradius-server/Config.in new file +18 -0
new file mode 100644
index 0000000000..fad8bfeb80
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_FREERADIUS_SERVER
+	bool "freeradius-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_LIBTALLOC
+	help
+	  FreeRADIUS is an open source server which implements
+	  a protocol for remote user Authorization, Authentication
+	  and Accounting.
+
+	  http://wiki.freeradius.org/
+
+comment "freeradius-server needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "freeradius-server needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
package/freeradius-server/freeradius-avoid-searching-host-dirs.patch new file +198 -0

198 lines not on this page · raw message

package/freeradius-server/freeradius-configure.ac-add-option-for-libcap.patch new file +71 -0

71 lines not on this page · raw message

package/freeradius-server/freeradius-configure.ac-allow-cross-compilation.patch new file +38 -0
new file mode 100644
index 0000000000..936ad015e4
@@ -0,0 +1,38 @@
+From 0780b7053fb0d33d721aa70ab2ecd75299e5ba31 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Tue, 24 Jul 2018 15:03:39 +0800
+Subject: [PATCH] configure.ac: allow cross-compilation
+
+The checking OpenSSL library and header version consistency will
+always fail in cross compiling, skip the check and give a warning
+instead for cross compiling.
+
+Upstream-Status: Inappropriate[embedded specific]
+
+Signed-off-by: Jackie Huang <[email protected]>
+Signed-off-by: Yi Zhao <[email protected]>
+
+update to new version 3.0.17 to fix patch warning
+Signed-off-by: Changqing Li <[email protected]>
+Signed-off-by: David Gouarin <[email protected]>
+---
+ src/modules/rlm_krb5/configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac
+index efc9f29..98a97e4 100644
+--- a/src/modules/rlm_krb5/configure.ac
++++ b/src/modules/rlm_krb5/configure.ac
+@@ -137,7 +137,8 @@ if test x$with_[]modname != xno; then
+ 		FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
+ 		if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then
+ 			AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
+-				[krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])])
++				[krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
++				[AC_MSG_WARN(cross compiling: not checking)])
+ 		fi
+ 	else
+ 		krb5threadsafe=""
+-- 
+2.7.4
+
package/freeradius-server/freeradius-fix-error-for-expansion-of-macro.patch new file +62 -0

62 lines not on this page · raw message

package/freeradius-server/freeradius-server.hash new file +3 -0
new file mode 100644
index 0000000000..ba338d8b7f
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae  freeradius-server-3.0.21.tar.gz
+sha256  8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6  COPYRIGHT
package/freeradius-server/freeradius-server.mk new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
2.17.1
#7 lore raw

PATCH v4 1/1 package/libtalloc: new package

In reply to David GOUARIN

Hello David,

Thanks for this new iteration!

Quoted 7 lines · On Thu, 15 Oct 2020 22:06:08 +0200 David GOUARIN <[email protected]> wrote:

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

Change v1 -> v2:
- merge with work from jared.bents at rockwellcollins.com, as sujested by Matthew Weber

Quoted 7 lines
    http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com

Change v2 -> v4: (no v3, resubmitting the whole patch series)
- fix build with BR2_PARANOID_UNSAFE_PATH (Thomas review)
- add hashes of license files (Thomas)
- license is GPL-3.0+ for both talloc and pytalloc (Thomas)
- remove useless --prefix and --libdir (Thomas)

Your changelog should be below the --- sign...

Quoted 2 lines

---

... here.

package/libtalloc/libtalloc.mk line 17

Quoted 11 lines
package/libtalloc/libtalloc.mk new file +11 -0
+LIBTALLOC_VERSION = 2.3.1
+LIBTALLOC_SOURCE = talloc-$(LIBTALLOC_VERSION).tar.gz
+LIBTALLOC_SITE = https://www.samba.org/ftp/talloc
+LIBTALLOC_LICENSE = GPL-3.0+
+LIBTALLOC_LICENSE_FILES = talloc.h pytalloc.h
+LIBTALLOC_INSTALL_STAGING = YES
+
+LIBTALLOC_CONF_OPTS += --cross-compile \
+		--cross-answers=$(@D)/cache.txt \
+		--hostcc=gcc \
+		--with-libiconv=$(HOST_DIR)/usr # waf will search by default in /usr/local with causes an error at configure step when BR2_COMPILER_PARANOID_UNSAFE_PATH is set

This is almost certainly not correct: HOST_DIR/usr contains libraries compiled for the host... but you're building libtalloc for the target.

So unless libiconv is only used by libtalloc to build host binaries, this looks wrong. If it's using the target libiconv, you should use --with-libiconv=$(STAGING_DIR)/usr. However, keep in mind that libiconv is not provided by all C libraries: with the uClibc C library built without locale support, you would have to enable the BR2_PACKAGE_LIBICONV option, and depend on libiconv. See for example the package/acsccid package.

Other than this issue, the rest looks good.

However, please send libtalloc and freeradius-server as a series: the latter depends on the former.

Thanks!

Thomas

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

PATCH v4 1/1 package/libtalloc: new package

Thank you Thomas,
I agree, HOST_DIR is completely wrong here, I totally missed that, and I admit I still have difficulties formatting my patches, mainly because I have to work in an isolated network :)
I have however sent a new revision for both freeradius and libtalloc as a series using git send-email as described in the documentation, I don't understand what is wrong ?

Le jeu. 15 oct. 2020 ? 22:16, Thomas Petazzoni <[email protected]> a ?crit :

Quoted 63 lines

Hello David,

Thanks for this new iteration!

Quoted 1 line · On Thu, 15 Oct 2020 22:06:08 +0200 David GOUARIN <[email protected]> wrote:

talloc is a hierarchical, reference counted memory pool system with

destructors.

Quoted 6 lines

It is the core memory allocator used in Samba.

Change v1 -> v2:
- merge with work from jared.bents at rockwellcollins.com, as sujested

by Matthew Weber

Quoted 1 line

http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com

Quoted 6 lines

Change v2 -> v4: (no v3, resubmitting the whole patch series)
- fix build with BR2_PARANOID_UNSAFE_PATH (Thomas review)
- add hashes of license files (Thomas)
- license is GPL-3.0+ for both talloc and pytalloc (Thomas)
- remove useless --prefix and --libdir (Thomas)

Your changelog should be below the --- sign...

Quoted 2 lines

---

... here.

package/libtalloc/libtalloc.mk

Quoted 11 lines
package/libtalloc/libtalloc.mk new file +11 -0
+LIBTALLOC_VERSION = 2.3.1
+LIBTALLOC_SOURCE = talloc-$(LIBTALLOC_VERSION).tar.gz
+LIBTALLOC_SITE = https://www.samba.org/ftp/talloc
+LIBTALLOC_LICENSE = GPL-3.0+
+LIBTALLOC_LICENSE_FILES = talloc.h pytalloc.h
+LIBTALLOC_INSTALL_STAGING = YES
+
+LIBTALLOC_CONF_OPTS += --cross-compile \
+             --cross-answers=$(@D)/cache.txt \
+             --hostcc=gcc \
+             --with-libiconv=$(HOST_DIR)/usr # waf will search by

default in /usr/local with causes an error at configure step when BR2_COMPILER_PARANOID_UNSAFE_PATH is set

This is almost certainly not correct: HOST_DIR/usr contains libraries compiled for the host... but you're building libtalloc for the target.

So unless libiconv is only used by libtalloc to build host binaries, this looks wrong. If it's using the target libiconv, you should use --with-libiconv=$(STAGING_DIR)/usr. However, keep in mind that libiconv is not provided by all C libraries: with the uClibc C library built without locale support, you would have to enable the BR2_PACKAGE_LIBICONV option, and depend on libiconv. See for example the package/acsccid package.

Other than this issue, the rest looks good.

However, please send libtalloc and freeradius-server as a series: the latter depends on the former.

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20201016/1897d4a0/attachment.html>

#9 lore raw

PATCH v4 1/1 package/libtalloc: new package

Hello David,

Quoted 3 lines · On Fri, 16 Oct 2020 08:25:26 +0200 david gouarin <[email protected]> wrote:

I agree, HOST_DIR is completely wrong here, I totally missed that, and I admit I still have difficulties formatting my patches, mainly because I have to work in an isolated network :)

Ah, indeed, that may be not the most efficient way of working :/

Quoted 3 lines

I have however sent a new revision for both freeradius and libtalloc as a series using git send-email as described in the documentation, I don't understand what is wrong ?

They are not numbered: you probably used "git format-patch -N", but you shouldn't use the -N option in this case.

For patches sent to Buildroot, we want them numbered, so they clearly appear as a series and we understand that they depend on each other.

For patches to Buildroot packages (i.e patches in package/foo/*.patch), we want them *NOT* numbered, as otherwise the 2/3 or 5/6 numbering very quickly gets out of date when adding/removing patches, and this numbering is already sufficiently explicit by the name of the patches (0001-something.patch, 0002-something-else.patch).

Perhaps this is what caused the confusion ?

Best regards,

Thomas

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

PATCH v5 1/2 package/libtalloc: new package

In reply to Thomas Petazzoni

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

---
Change v1 -> v2:
- merge with work from jared.bents at rockwellcollins.com, as sujested by Matthew Weber

    http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com

Change v2 -> v4: (no v3, resubmitting the whole patch series)
- fix build with BR2_PARANOID_UNSAFE_PATH (Thomas review)
- add hashes of license files (Thomas)
- license is GPL-3.0+ for both talloc and pytalloc (Thomas)
- remove useless --prefix and --libdir (Thomas)

Change v4 -> v5:
- search for iconv in STAGING_DIR instead of HOST_DIR

 DEVELOPERS                            |  1 +
 package/Config.in                     |  1 +
 package/libtalloc/Config.in           |  9 +++++
 package/libtalloc/libtalloc-cache.txt | 42 +++++++++++++++++++++
 package/libtalloc/libtalloc.hash      |  4 ++
 package/libtalloc/libtalloc.mk        | 53 +++++++++++++++++++++++++++
 6 files changed, 110 insertions(+)
 create mode 100644 package/libtalloc/Config.in
 create mode 100644 package/libtalloc/libtalloc-cache.txt
 create mode 100644 package/libtalloc/libtalloc.hash
 create mode 100644 package/libtalloc/libtalloc.mk
DEVELOPERS +1 -0
index 79a9eaa563..c856d7ad45 100644
@@ -712,6 +712,7 @@ F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
 F:	package/librelp/
+F:	package/libtalloc/
 
 N:	David Lechner <[email protected]>
 F:	board/lego/ev3/
package/Config.in +1 -0
index 09a332e3b9..a4d6fe02ae 100644
@@ -1894,6 +1894,7 @@ menu "Other"
 	source "package/libsigc/Config.in"
 	source "package/libsigsegv/Config.in"
 	source "package/libspatialindex/Config.in"
+	source "package/libtalloc/Config.in"
 	source "package/libtasn1/Config.in"
 	source "package/libtommath/Config.in"
 	source "package/libtpl/Config.in"
package/libtalloc/Config.in new file +9 -0
new file mode 100644
index 0000000000..df972f2288
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBTALLOC
+	bool "libtalloc"
+	depends on BR2_USE_MMU
+	help
+	  talloc is a hierarchical, reference counted memory pool system with
+	  destructors. It is the core memory allocator used in Samba.
+
+	  https://talloc.samba.org/talloc/doc/html/index.html
+
package/libtalloc/libtalloc-cache.txt new file +42 -0

42 lines not on this page · raw message

package/libtalloc/libtalloc.hash new file +4 -0
new file mode 100644
index 0000000000..9d48a965d0
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77  talloc-2.3.1.tar.gz
+sha256  15c2767545d1e43dc35832736253bde5be956f8ffec0474a6d0f70349b646ed3  talloc.h
+sha256  8742f2dad3aaf885c7b4b699c20bfa0e9edeab380689f91a88aa90af03e6947b  pytalloc.h
package/libtalloc/libtalloc.mk new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.17.1
#11 lore raw

PATCH v5 2/2 package/freeradius-server: new package

FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting.

---
Changes v1 -> v2:
fix invalid characters in Config.in

Changes v2 -> v3:
As suggested by Matt, merge with pending upstream patch. Included most of it, including patches based on Yocto work :
http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
Didn't kept all the --without directive, as they do not seem useful, nor the custom INSTALL_TARGET_CMDS.

Changes v3 -> v4:
Taken in account Thomas review
- fix build with BR2_COMPILER_PARANOID_UNSAFE_PATH
- import patches inside package directory instead of downloading them
- remove config.cache file, pass the answers on the command line instead
- add comments for weird TARGET_DIR and R directives
- remove broken python optional feature. Managed to get it to build
with python 2.7, not 3.0 and it still fails basic testing

Changes v4 -> v5:
- better package patches formatting

 DEVELOPERS                                    |   1 +
 package/Config.in                             |   1 +
 .../0001-host-jlibtool.patch                  |  17 ++
 ...freeradius-avoid-searching-host-dirs.patch | 200 ++++++++++++++++++
 ...s-configure.ac-add-option-for-libcap.patch |  73 +++++++
 ...configure.ac-allow-cross-compilation.patch |  40 ++++
 ...ius-fix-error-for-expansion-of-macro.patch |  64 ++++++
 package/freeradius-server/Config.in           |  18 ++
 .../freeradius-server/freeradius-server.hash  |   3 +
 .../freeradius-server/freeradius-server.mk    | 112 ++++++++++
 10 files changed, 529 insertions(+)
 create mode 100644 package/freeradius-server/0001-host-jlibtool.patch
 create mode 100644 package/freeradius-server/0002-freeradius-avoid-searching-host-dirs.patch
 create mode 100644 package/freeradius-server/0003-freeradius-configure.ac-add-option-for-libcap.patch
 create mode 100644 package/freeradius-server/0004-freeradius-configure.ac-allow-cross-compilation.patch
 create mode 100644 package/freeradius-server/0005-freeradius-fix-error-for-expansion-of-macro.patch
 create mode 100644 package/freeradius-server/Config.in
 create mode 100644 package/freeradius-server/freeradius-server.hash
 create mode 100644 package/freeradius-server/freeradius-server.mk
DEVELOPERS +1 -0
index c856d7ad45..ae688a85c4 100644
@@ -711,6 +711,7 @@ N:	David du Colombier <[email protected]>
 F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
+F:	package/freeradius-server/
 F:	package/librelp/
 F:	package/libtalloc/
 
package/Config.in +1 -0
index a4d6fe02ae..8e3ce4fe20 100644
@@ -2079,6 +2079,7 @@ menu "Networking applications"
 	source "package/flannel/Config.in"
 	source "package/fmc/Config.in"
 	source "package/fping/Config.in"
+	source "package/freeradius-server/Config.in"
 	source "package/freeswitch/Config.in"
 	source "package/freeswitch-mod-bcg729/Config.in"
 	source "package/frr/Config.in"
package/freeradius-server/0001-host-jlibtool.patch new file +17 -0
new file mode 100644
index 0000000000..5c0696ea1b
@@ -0,0 +1,17 @@
+jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool
+
+Signed-off-by: David Gouarin <[email protected]>
+
+--- a/scripts/libtool.mk 2018-10-08 09:22:59.032031858 -0600
++++ b/scripts/libtool.mk 2018-10-08 15:04:18.406661484 -0600
+@@ -43,8 +43,8 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
+    # binary!
+	${JLIBTOOL}: ${top_makedir}/jlibtool.c
+	$(Q)mkdir -p $(dir $@)
+-	$(Q)echo CC jlibtool.c
+-	$(Q)${CC} $< -o $@
++	$(Q)echo HOSTCC jlibtool.c
++	$(Q)${HOSTCC} $< -o $@
+
+    clean: jlibtool_clean
+
package/freeradius-server/0002-freeradius-avoid-searching-host-dirs.patch new file +200 -0

200 lines not on this page · raw message

package/freeradius-server/0003-freeradius-configure.ac-add-option-for-libcap.patch new file +73 -0

73 lines not on this page · raw message

package/freeradius-server/0004-freeradius-configure.ac-allow-cross-compilation.patch new file +40 -0
new file mode 100644
index 0000000000..16baf5af1a
@@ -0,0 +1,40 @@
+From 0780b7053fb0d33d721aa70ab2ecd75299e5ba31 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Tue, 24 Jul 2018 15:03:39 +0800
+Subject: [PATCH] configure.ac: allow cross-compilation
+
+The checking OpenSSL library and header version consistency will
+always fail in cross compiling, skip the check and give a warning
+instead for cross compiling.
+
+Upstream-Status: Inappropriate[embedded specific]
+
+Signed-off-by: Jackie Huang <[email protected]>
+Signed-off-by: Yi Zhao <[email protected]>
+
+update to new version 3.0.17 to fix patch warning
+Signed-off-by: Changqing Li <[email protected]>
+
+Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
+Signed-off-by: David Gouarin <[email protected]>
+---
+ src/modules/rlm_krb5/configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac
+index efc9f29..98a97e4 100644
+--- a/src/modules/rlm_krb5/configure.ac
++++ b/src/modules/rlm_krb5/configure.ac
+@@ -137,7 +137,8 @@ if test x$with_[]modname != xno; then
+ 		FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
+ 		if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then
+ 			AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
+-				[krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])])
++				[krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
++				[AC_MSG_WARN(cross compiling: not checking)])
+ 		fi
+ 	else
+ 		krb5threadsafe=""
+-- 
+2.7.4
+
package/freeradius-server/0005-freeradius-fix-error-for-expansion-of-macro.patch new file +64 -0

64 lines not on this page · raw message

package/freeradius-server/Config.in new file +18 -0
new file mode 100644
index 0000000000..fad8bfeb80
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_FREERADIUS_SERVER
+	bool "freeradius-server"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	select BR2_PACKAGE_LIBTALLOC
+	help
+	  FreeRADIUS is an open source server which implements
+	  a protocol for remote user Authorization, Authentication
+	  and Accounting.
+
+	  http://wiki.freeradius.org/
+
+comment "freeradius-server needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "freeradius-server needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
package/freeradius-server/freeradius-server.hash new file +3 -0
new file mode 100644
index 0000000000..ba338d8b7f
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae  freeradius-server-3.0.21.tar.gz
+sha256  8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6  COPYRIGHT
package/freeradius-server/freeradius-server.mk new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
2.17.1
#12 lore raw

PATCH 1/2 package/libtalloc: new package

In reply to David GOUARIN

David,

Quoted 4 lines · David GOUARIN

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

Thanks for sending this David, for reference there is a pending libtalloc patch that might be worth comparing to yours.

http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com/

Best Regards,
Matt

#13 lore raw

PATCH v2 2/3 package/libtalloc: new package

In reply to David GOUARIN

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

Change v1 -> v2:
- merge with work from jared.bents at rockwellcollins.com, as sujested by Matthew Weber

    http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com
---
 DEVELOPERS                            |  1 +
 package/Config.in                     |  1 +
 package/libtalloc/Config.in           | 10 ++++++
 package/libtalloc/libtalloc-cache.txt | 42 +++++++++++++++++++++++
 package/libtalloc/libtalloc.hash      |  3 ++
 package/libtalloc/libtalloc.mk        | 48 +++++++++++++++++++++++++++
 6 files changed, 105 insertions(+)
 create mode 100644 package/libtalloc/Config.in
 create mode 100644 package/libtalloc/libtalloc-cache.txt
 create mode 100644 package/libtalloc/libtalloc.hash
 create mode 100644 package/libtalloc/libtalloc.mk
DEVELOPERS +1 -0
index 79a9eaa563..c856d7ad45 100644
@@ -712,6 +712,7 @@ F:	package/x264/
 
 N:	David GOUARIN <[email protected]>
 F:	package/librelp/
+F:	package/libtalloc/
 
 N:	David Lechner <[email protected]>
 F:	board/lego/ev3/
package/Config.in +1 -0
index 09a332e3b9..a4d6fe02ae 100644
@@ -1894,6 +1894,7 @@ menu "Other"
 	source "package/libsigc/Config.in"
 	source "package/libsigsegv/Config.in"
 	source "package/libspatialindex/Config.in"
+	source "package/libtalloc/Config.in"
 	source "package/libtasn1/Config.in"
 	source "package/libtommath/Config.in"
 	source "package/libtpl/Config.in"
package/libtalloc/Config.in new file +10 -0
new file mode 100644
index 0000000000..3e6a97bb6e
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBTALLOC
+	bool "libtalloc"
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_USES_GLIBC && !BR2_COMPILER_PARANOID_UNSAFE_PATH || !BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  talloc is a hierarchical, reference counted memory pool system with
+	  destructors. It is the core memory allocator used in Samba.
+
+	  https://talloc.samba.org/talloc/doc/html/index.html
+
package/libtalloc/libtalloc-cache.txt new file +42 -0

42 lines not on this page · raw message

package/libtalloc/libtalloc.hash new file +3 -0
new file mode 100644
index 0000000000..20211210d2
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77  talloc-2.3.1.tar.gz
+
package/libtalloc/libtalloc.mk new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.17.1
#14 lore raw

PATCH v2 2/3 package/libtalloc: new package

Quoted 6 lines · On Tue, 13 Oct 2020 21:50:44 +0200 David GOUARIN <[email protected]> wrote:

talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba.

Change v1 -> v2:
- merge with work from jared.bents at rockwellcollins.com, as sujested by Matthew Weber

    http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents at rockwellcollins.com

Changes should go below the --- sign...

Quoted 3 lines

---

... here.

package/libtalloc/Config.in line 4

Quoted 10 lines
package/libtalloc/Config.in new file +4 -0
new file mode 100644
index 0000000000..3e6a97bb6e
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBTALLOC
+	bool "libtalloc"
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_USES_GLIBC && !BR2_COMPILER_PARANOID_UNSAFE_PATH || !BR2_TOOLCHAIN_USES_GLIBC

What is the problem with BR2_COMPILER_PARANOID_UNSAFE_PATH ? It shouldn't matter. If it does, you have a different problem.

package/libtalloc/libtalloc.hash line 3

Quoted 9 lines
package/libtalloc/libtalloc.hash new file +3 -0
new file mode 100644
index 0000000000..20211210d2
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77  talloc-2.3.1.tar.gz
+

We want the hashes of the license files here.

Quoted 6 lines
package/libtalloc/libtalloc.mk new file +0 -0
new file mode 100644
index 0000000000..7a42da8145

package/libtalloc/libtalloc.mk line 10

Quoted 10 lines
package/libtalloc/libtalloc.mk new file +10 -0
@@ -0,0 +1,48 @@
+################################################################################
+#
+# libtalloc
+#
+################################################################################
+
+LIBTALLOC_VERSION = 2.3.1
+LIBTALLOC_SOURCE = talloc-$(LIBTALLOC_VERSION).tar.gz
+LIBTALLOC_SITE = https://www.samba.org/ftp/talloc
+LIBTALLOC_LICENSE = LGPL-3.0, GPL-3.0+

Are there some specific parts under LGPL-3.0 and others under GPL-3.0+ ? If so, it would be good to indicate it, like this for example:

	LGPL-3.0 (library), GPL-3.0+ (tests)

Of course, adjust depending on what is under what license.

package/libtalloc/libtalloc.mk line 15

Quoted 5 lines
package/libtalloc/libtalloc.mk new file +5 -0
+LIBTALLOC_LICENSE_FILES = talloc.h pytalloc.h
+LIBTALLOC_INSTALL_STAGING = YES
+
+LIBTALLOC_CONF_OPTS += --prefix=/usr \
+		--libdir=/usr/lib \

prefix and libdir are already passed by the waf-package infrastructure, so passing them again here is not necessary.

Otherwise, it looks good to me.

Thanks!

Thomas

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