From patchwork Mon Apr 12 16:40:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1465396 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=WdO/b5Bf; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FJvcB0V87z9sVm for ; Tue, 13 Apr 2021 02:40:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DBF2E6060E; Mon, 12 Apr 2021 16:40:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id poGFLJh_4pQ6; Mon, 12 Apr 2021 16:40:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id F04C860632; Mon, 12 Apr 2021 16:40:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 76D051BF3B9 for ; Mon, 12 Apr 2021 16:40:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5F2F36060E for ; Mon, 12 Apr 2021 16:40:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F24UO6Ucx7BD for ; Mon, 12 Apr 2021 16:40:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ch3vs02.rockwellcollins.com (ch3vs02.rockwellcollins.com [205.175.226.29]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6328B60632 for ; Mon, 12 Apr 2021 16:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id; bh=nNxu4Q5c3IjFXMMkiRJZIbOk+ynf+CmzUy5CMcomcag=; b=WdO/b5BfwMV3iGejwQSCFPJmL5b8CUnjO6FKXPsE0ZBiX5WROWHZF7BO 9lmbw6V/OyBdggyQ3wb045Y/cMcafpG6UwLFxEGEuz87QOXL68vgHhw+T yNvnAsAOpQw84ZiOaMJPoW4QhGSg0o0d5VZcQTbHTioBLaeJMqAQRX9v2 ARcHRXNsMeg2y/jkRppAho5tKY7BVbPtGqmsDPCVmg020KHIhVSoLS6wR dXnu1Iq8qBuytT6Damj69AsWyijUavoHpVXZKByMNJoOQitPgPKBjlPMn fKJnQ4Z1lpaT4VrhFud2uPSGYSdPNl8SYGqP65v57PxYnwnrS2SpE6bbX w==; IronPort-SDR: YyAR2vSCwaxbn+oPvfRpkjU0lNp25Dqs/8ZnF4elZiuZ5LnH2YKLrrZ6IR1ZYwIW/VetwPHOu/ G3sjakMQpiMfV5P3pKVAkWRbKdE/F1TR0BgVdTWHvFMNhllaYV/m2xFel8xCeUZstpzPJqpUm9 znpUe4Z/34MG7nS+ksn/dITaPiFBfnrfNZisH26AyN7Pjsbwkfrt3K262k/dQcVRObTDbxSFrE abipbIKRuQAzYvrUl7Mqy4V5f9dfbtwarX+o1EbQf/JA+UYnzo5BFegrWBAqEHVyUmqyKFCM3E AHY= Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs02.rockwellcollins.com with ESMTP; 12 Apr 2021 11:40:14 -0500 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by ciulimr01.rockwellcollins.com (Postfix) with ESMTP id 859A860366; Mon, 12 Apr 2021 11:40:13 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 12 Apr 2021 11:40:10 -0500 Message-Id: <20210412164011.16681-1-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH v7 1/2] package/libtalloc: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber , David GOUARIN , Kalpesh Panchal MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: David GOUARIN talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba. Signed-off-by: David GOUARIN Signed-off-by: Kalpesh Panchal Signed-off-by: Matt Weber --- Changes v6 -> v7 - none v5 -> v6 - disable when building static libs (testpkg fix) - pointed to the libtalloc waf cache file (cut paste bug) - rebased on current master - Added Matt to DEVELOPERS - Checked if CPE exists for "libtalloc" (it does not) v4 -> v5: - search for iconv in STAGING_DIR instead of HOST_DIR 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) v1 -> v2: - merge with work from jared.bents@rockwellcollins.com, as sujested by Matthew Weber http://patchwork.ozlabs.org/project/buildroot/patch/20200327150225.15277-1-jared.bents@rockwellcollins.com --- DEVELOPERS | 2 + package/Config.in | 1 + package/libtalloc/Config.in | 10 +++++ package/libtalloc/libtalloc-cache.txt | 42 +++++++++++++++++++++ package/libtalloc/libtalloc.hash | 4 ++ package/libtalloc/libtalloc.mk | 54 +++++++++++++++++++++++++++ 6 files changed, 113 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 diff --git a/DEVELOPERS b/DEVELOPERS index da48e6010b..78499f2998 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -651,6 +651,7 @@ F: package/x264/ N: David GOUARIN F: package/librelp/ +F: package/libtalloc/ N: David Lechner F: board/lego/ev3/ @@ -1762,6 +1763,7 @@ F: package/libselinux/ F: package/libsemanage/ F: package/libsepol/ F: package/libssh2/ +F: package/libtalloc/ F: package/libqmi/ F: package/lighttpd/ F: package/logrotate/ diff --git a/package/Config.in b/package/Config.in index bba62deefd..2bf15948b4 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1936,6 +1936,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" diff --git a/package/libtalloc/Config.in b/package/libtalloc/Config.in new file mode 100644 index 0000000000..bb671128fb --- /dev/null +++ b/package/libtalloc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBTALLOC + bool "libtalloc" + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + 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 diff --git a/package/libtalloc/libtalloc-cache.txt b/package/libtalloc/libtalloc-cache.txt new file mode 100644 index 0000000000..a2b44857da --- /dev/null +++ b/package/libtalloc/libtalloc-cache.txt @@ -0,0 +1,42 @@ +Checking simple C program: OK +rpath library support: OK +-Wl,--version-script support: OK +Checking getconf LFS_CFLAGS: NO +Checking for large file support without additional flags: OK +Checking for -D_LARGE_FILES: OK +Checking correct behavior of strtoll: NO +Checking for working strptime: OK +Checking for C99 vsnprintf: OK +Checking for HAVE_SHARED_MMAP: OK +Checking for HAVE_MREMAP: OK +Checking for HAVE_INCOHERENT_MMAP: NO +Checking for HAVE_SECURE_MKSTEMP: OK +Checking for HAVE_IFACE_GETIFADDRS: OK +Checking for kernel change notify support: OK +Checking for Linux kernel oplocks: OK +Checking for kernel share modes: OK +Checking if can we convert from CP850 to UCS-2LE: OK +Checking if can we convert from UTF-8 to UCS-2LE: OK +Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK +Checking whether we can use Linux thread-specific credentials: OK +Checking whether setreuid is available: OK +Checking whether setresuid is available: OK +Checking whether seteuid is available: OK +Checking whether fcntl locking is available: OK +Checking whether fcntl lock supports open file description locks: OK +Checking for the maximum value of the 'time_t' type: OK +Checking whether the realpath function allows a NULL argument: OK +Checking whether POSIX capabilities are available: OK +Checking for ftruncate extend: OK +vfs_fileid checking for statfs() and struct statfs.f_fsid: OK +getcwd takes a NULL argument: OK +Checking uname sysname type: "Linux" +Checking uname release type: "5.4.0" +Checking uname version type: "#1 Tue Oct 1 00:00:00 UTC 2020" +Checking value of NSIG: "65" +Checking value of _NSIG: "65" +Checking value of SIGRTMAX: "64" +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 diff --git a/package/libtalloc/libtalloc.hash b/package/libtalloc/libtalloc.hash new file mode 100644 index 0000000000..9d48a965d0 --- /dev/null +++ b/package/libtalloc/libtalloc.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77 talloc-2.3.1.tar.gz +sha256 15c2767545d1e43dc35832736253bde5be956f8ffec0474a6d0f70349b646ed3 talloc.h +sha256 8742f2dad3aaf885c7b4b699c20bfa0e9edeab380689f91a88aa90af03e6947b pytalloc.h diff --git a/package/libtalloc/libtalloc.mk b/package/libtalloc/libtalloc.mk new file mode 100644 index 0000000000..598a8d8114 --- /dev/null +++ b/package/libtalloc/libtalloc.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# libtalloc +# +################################################################################ + +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=$(STAGING_DIR)/usr # (see below) + +# --with-libiconv= +# waf will search for libiconv by default in /usr/local. Because of a bug in some waf +# python script, /usr/local is then used in many subsequent and unrelated checks, which +# ultimately causes a failure when BR2_COMPILER_PARANOID_UNSAFE_PATH is set. +# However no need to set libiconv as a dependency of libtalloc since it's optional. + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +LIBTALLOC_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc` +LIBTALLOC_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc` +LIBTALLOC_DEPENDENCIES += libtirpc host-pkgconf +endif + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +LIBTALLOC_PYTHON = \ + PYTHON="$(HOST_DIR)/bin/python3" \ + PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" +LIBTALLOC_DEPENDENCIES += host-python3 python3 +LIBTALLOC_CONF_ENV += \ + $(LIBTALLOC_PYTHON) +# There is not a --enable-python configuration option +else +LIBTALLOC_CONF_OPTS += --disable-python +endif + +LIBTALLOC_WAF = ./buildtools/bin/waf + +# like samba4, libtalloc uses the waf build system which requires a proper answers file +# to configure package before build +define LIBTALLOC_POPULATE_WAF_CACHE + $(INSTALL) -m 0644 package/libtalloc/libtalloc-cache.txt $(@D)/cache.txt + echo 'Checking uname machine type: $(BR2_ARCH)' >> $(@D)/cache.txt +endef + +LIBTALLOC_PRE_CONFIGURE_HOOKS += LIBTALLOC_POPULATE_WAF_CACHE + +$(eval $(waf-package)) From patchwork Mon Apr 12 16:40:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1465397 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=FgQxTG/0; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FJvcR1Rlqz9t0G for ; Tue, 13 Apr 2021 02:40:38 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5BBC3401FC; Mon, 12 Apr 2021 16:40:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ABg2Cac7iOqj; Mon, 12 Apr 2021 16:40:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id C2BEF40210; Mon, 12 Apr 2021 16:40:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4238D1BF3B9 for ; Mon, 12 Apr 2021 16:40:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 31C9283CF6 for ; Mon, 12 Apr 2021 16:40:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=rockwellcollins.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d1nyXc8PApto for ; Mon, 12 Apr 2021 16:40:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from da1vs04.rockwellcollins.com (da1vs04.rockwellcollins.com [205.175.227.52]) by smtp1.osuosl.org (Postfix) with ESMTPS id 56B8883D09 for ; Mon, 12 Apr 2021 16:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=LCjQpArHW5Me0giAt0RHCT8XZI/ESC+obKFwAXc8wXs=; b=FgQxTG/0ecC4vDsFMdcVZt83hIj6jlg9ryh0fDix6I6py/QYrVwC8RX+ XkFPx05ZSH3RNtYnEs7tItDlHp/192KiQTpafmz5XG0dnIF2rHvstQrfq l2EKa/EPh1rtCcjgFx7lO4skiv99AjSO8a6YjBer8Ao7+azNzwsG5dl6O HGVaJzMs/prwKkBXhlMqx5AAkAu86L73N3zebtAIrJIagTeIBL+pnVtHL VWlSkbffhOdIzeszJDSrcOkOEINE4UFLJAMJRq6lMt8ltF7rfRFKCngPq n5FwIXIKGvoI9uGwRO8A/HEWoS6iNYUD1gbb2q2U9q1t8ufXmIN0Q3wAP A==; IronPort-SDR: o3DVDdwrhnvkjoSNt3MyaSOuRZPeyF/E7Tmq43Z/qTP95wOVhIdH2FdRbWKJm+UNA0un/B8DRU 8rpeh/zNd3IqNPE9C4PAAYRG458G+a2fxoyfqa5VBtmCflS4XcZ51HFY3EDMR8Q5QNt+mVZjfu V10KC4ZmERQP1AhHiKhm62OF7Y2qCoWqxWTjbhgNbIBrX747e4VFs7lqXj2dzptdmRjlOkHzwn qRs1xZ/jVOySoXpMwqpLDVHfkRDOYy1e2+JhmiPvH2i1zan7edWbrZRo/zdE3HP+MjqEkyiTua g9k= Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs04.rockwellcollins.com with ESMTP; 12 Apr 2021 11:40:14 -0500 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by ciulimr01.rockwellcollins.com (Postfix) with ESMTP id 33F1D60469; Mon, 12 Apr 2021 11:40:14 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 12 Apr 2021 11:40:11 -0500 Message-Id: <20210412164011.16681-2-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210412164011.16681-1-matthew.weber@rockwellcollins.com> References: <20210412164011.16681-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v7 2/2] package/freeradius-server: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber , David GOUARIN , Kalpesh Panchal MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: David GOUARIN FreeRADIUS is an open source server which implements a protocol for remote user Authorization, Authentication and Accounting. Signed-off-by: David GOUARIN Signed-off-by: Kalpesh Panchal Signed-off-by: Matt Weber --- Changes v6 -> v7 - resolve rlm_sql module compilation error (Newer GCC) (remove mysql_version.h as mysql.h is included) v5 -> v6: - cleaned up patches to all be git formatted - added depends on BR2_USE_MMU - rebased on master - added CPE info v4 -> v5: - better package patches formatting 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 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. v1 -> v2: - fix invalid characters in Config.in --- DEVELOPERS | 2 + package/Config.in | 1 + .../0001-jlibtool-cross-with-host-CC.patch | 33 +++ .../0002-avoid-searching-host-dirs.patch | 201 ++++++++++++++++++ ...3-configure.ac-add-option-for-libcap.patch | 74 +++++++ ...configure.ac-allow-cross-compilation.patch | 41 ++++ ...r-for-expansion-of-macro-in-thread.h.patch | 65 ++++++ ...dules-rlm_sql-remove-mysql_version.h.patch | 36 ++++ package/freeradius-server/Config.in | 21 ++ .../freeradius-server/freeradius-server.hash | 3 + .../freeradius-server/freeradius-server.mk | 114 ++++++++++ 11 files changed, 591 insertions(+) create mode 100644 package/freeradius-server/0001-jlibtool-cross-with-host-CC.patch create mode 100644 package/freeradius-server/0002-avoid-searching-host-dirs.patch create mode 100644 package/freeradius-server/0003-configure.ac-add-option-for-libcap.patch create mode 100644 package/freeradius-server/0004-configure.ac-allow-cross-compilation.patch create mode 100644 package/freeradius-server/0005-fix-error-for-expansion-of-macro-in-thread.h.patch create mode 100644 package/freeradius-server/0006-modules-rlm_sql-remove-mysql_version.h.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 diff --git a/DEVELOPERS b/DEVELOPERS index 78499f2998..5c36fc413e 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -650,6 +650,7 @@ N: David du Colombier <0intro@gmail.com> F: package/x264/ N: David GOUARIN +F: package/freeradius-server/ F: package/librelp/ F: package/libtalloc/ @@ -1741,6 +1742,7 @@ F: package/ethtool/ F: package/flashbench/ F: package/fmc/ F: package/fmlib/ +F: package/freeradius-server/ F: package/git/ F: package/gnutls/ F: package/hostapd/ diff --git a/package/Config.in b/package/Config.in index 2bf15948b4..f47ee9f1c5 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2122,6 +2122,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" diff --git a/package/freeradius-server/0001-jlibtool-cross-with-host-CC.patch b/package/freeradius-server/0001-jlibtool-cross-with-host-CC.patch new file mode 100644 index 0000000000..398f88e4ad --- /dev/null +++ b/package/freeradius-server/0001-jlibtool-cross-with-host-CC.patch @@ -0,0 +1,33 @@ +From 8a8506320acf3ea18940a6e3a447d7d394a3bd8e Mon Sep 17 00:00:00 2001 +From: David Gouarin +Date: Mon, 12 Apr 2021 11:05:54 -0500 +Subject: [PATCH] jlibtool cross with host CC + +jlibtool.c: while cross compiling, use host CC instead of target CC to build jlibtool + +Upstream: Not applicable + +Signed-off-by: David Gouarin +Signed-off-by: Matt Weber +--- + scripts/libtool.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/libtool.mk b/scripts/libtool.mk +index 57915e1053..c28260dd7e 100644 +--- a/scripts/libtool.mk ++++ b/scripts/libtool.mk +@@ -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 + +-- +2.17.1 + diff --git a/package/freeradius-server/0002-avoid-searching-host-dirs.patch b/package/freeradius-server/0002-avoid-searching-host-dirs.patch new file mode 100644 index 0000000000..163f10346c --- /dev/null +++ b/package/freeradius-server/0002-avoid-searching-host-dirs.patch @@ -0,0 +1,201 @@ +From 1dcbfce955edb834c9bb619b5ca44b0d58959de2 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Mon, 4 Jan 2016 01:44:04 -0500 +Subject: [PATCH] avoid searching host dirs + +Don't search the hardcoded host dirs to avoid +host contamination. + +Upstream-Status: Inappropriate [cross-compile specific] + +Signed-off-by: Jackie Huang + +Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files +Signed-off-by: David Gouarin +Signed-off-by: Matt Weber +--- + acinclude.m4 | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++--- + src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +- + src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++-- + 8 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index da48acc08a..b513ae10cf 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -178,7 +178,7 @@ if test "x$smart_lib" = "x"; then + FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}]) + FR_LOCATE_DIR(smart_lib_dir,[lib$1.a]) + +- for try in $smart_lib_dir /usr/local/lib /opt/lib; do ++ for try in $smart_lib_dir; do + AC_MSG_CHECKING([for $2 in -l$1 in $try]) + LIBS="-l$1 $old_LIBS" + CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" +@@ -218,7 +218,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'` + old_CPPFLAGS="$CPPFLAGS" + smart_include= + dnl # The default directories we search in (in addition to the compilers search path) +-smart_include_dir="/usr/local/include /opt/include" ++smart_include_dir= + + dnl # Our local versions + _smart_try_dir= +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac +index 75c851a135..a262d71d1a 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac +@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then + esac]) + + dnl Check for SQLConnect in -ldb2 +- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib" ++ smart_try_dir="$ibmdb2_lib_dir" + FR_SMART_CHECK_LIB(db2, SQLConnect) + if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then + fail="$fail libdb2" + fi + + dnl Check for sqlcli.h +- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include" ++ smart_try_dir="$ibmdb2_include_dir" + FR_SMART_CHECK_INCLUDE(sqlcli.h) + if test "x$ac_cv_header_sqlcli_h" != xyes; then + fail="$fail sqlcli.h" +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac +index 4da57b308e..752b043ffb 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac +@@ -56,14 +56,14 @@ if test x$with_[]modname != xno; then + esac]) + + dnl Check for isc_attach_database in -lfbclient +- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib" ++ smart_try_dir="$firebird_lib_dir" + FR_SMART_CHECK_LIB(fbclient, isc_attach_database) + if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then + fail="$fail libfbclient" + fi + + dnl Check for ibase.h +- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include" ++ smart_try_dir="$firebird_include_dir" + FR_SMART_CHECK_INCLUDE(ibase.h) + if test "x$ac_cv_header_ibase_h" != xyes; then + fail="$fail ibase.h" +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac +index ba6304fdcd..3393557cdb 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac +@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then + esac]) + + dnl Check for SQLConnect in -liodbc +- smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc" ++ smart_try_dir="$iodbc_lib_dir" + FR_SMART_CHECK_LIB(iodbc, SQLConnect) + if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then + fail="$fail libiodbc" + fi + + dnl Check for isql.h +- smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include" ++ smart_try_dir="$iodbc_include_dir" + FR_SMART_CHECK_INCLUDE(isql.h) + if test "x$ac_cv_header_isql_h" != xyes; then + fail="$fail isql.h" +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac +index fbe57b6c1d..ac6caacf71 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac +@@ -136,7 +136,7 @@ if test x$with_[]modname != xno; then + + dnl # Check for libmysqlclient_r + if test "x$have_a_libmysqlclient" != "xyes"; then +- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql" ++ smart_try_dir="$mysql_lib_dir" + FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init) + if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then + have_a_libmysqlclient='yes' +@@ -145,7 +145,7 @@ if test x$with_[]modname != xno; then + + dnl # Check for libmysqlclient + if test "x$have_a_libmysqlclient" != "xyes"; then +- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql" ++ smart_try_dir="$mysql_lib_dir" + FR_SMART_CHECK_LIB(mysqlclient, mysql_init) + if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then + have_a_libmysqlclient='yes' +@@ -239,7 +239,7 @@ if test x$with_[]modname != xno; then + fi + + if test "x$have_mysql_h" != "xyes"; then +- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include" ++ smart_try_dir="$mysql_include_dir" + FR_SMART_CHECK_INCLUDE(mysql/mysql.h) + if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then + AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have ]) +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac +index 2a97fd6764..2b4a4baed4 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac +@@ -64,7 +64,7 @@ if test x$with_[]modname != xno; then + dnl # Check for header files + dnl ############################################################ + +- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include" ++ smart_try_dir="$oracle_include_dir" + + if test "x$ORACLE_HOME" != "x"; then + smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include" +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac +index 4f9a890ba0..e1cf811ce8 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac +@@ -41,7 +41,7 @@ if test x$with_[]modname != xno; then + esac ] + ) + +- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql" ++ smart_try_dir="$rlm_sql_postgresql_include_dir" + FR_SMART_CHECK_INCLUDE(libpq-fe.h) + if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then + fail="$fail libpq-fe.h" +@@ -76,7 +76,7 @@ if test x$with_[]modname != xno; then + ]) + fi + +- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib" ++ smart_try_dir="$rlm_sql_postgresql_lib_dir" + FR_SMART_CHECK_LIB(pq, PQconnectdb) + if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then + fail="$fail libpq" +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac +index 35453879e3..c543ed4d51 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac +@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then + esac]) + + dnl Check for SQLConnect in -lodbc +- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib" ++ smart_try_dir="$unixodbc_lib_dir" + FR_SMART_CHECK_LIB(odbc, SQLConnect) + if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then + fail="$fail libodbc" + fi + + dnl Check for sql.h +- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include" ++ smart_try_dir="$unixodbc_include_dir" + FR_SMART_CHECK_INCLUDE(sql.h) + if test "x$ac_cv_header_sql_h" != xyes; then + fail="$fail sql.h" +-- +2.17.1 + diff --git a/package/freeradius-server/0003-configure.ac-add-option-for-libcap.patch b/package/freeradius-server/0003-configure.ac-add-option-for-libcap.patch new file mode 100644 index 0000000000..05137ec6a8 --- /dev/null +++ b/package/freeradius-server/0003-configure.ac-add-option-for-libcap.patch @@ -0,0 +1,74 @@ +From 404f18da62e3708c9b290ee4eaf8461911df5475 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Thu, 22 Aug 2019 10:50:21 +0800 +Subject: [PATCH] configure.ac: add option for libcap + +Upstream-Status: Pending + +Signed-off-by: Jackie Huang +Signed-off-by: Changqing Li + +Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files +Signed-off-by: David Gouarin +Signed-off-by: Matt Weber +--- + configure.ac | 36 +++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c72511ab39..de016b28e5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -941,6 +941,22 @@ fi + dnl Set by FR_SMART_CHECKLIB + LIBS="${old_LIBS}" + ++dnl # ++dnl # extra argument: --with-libcap ++dnl # ++WITH_LIBCAP=yes ++AC_ARG_WITH(libcap, ++[ --with-licap use licap for debugger checks. (default=yes)], ++[ case "$withval" in ++ no) ++ WITH_LIBCAP=no ++ ;; ++ *) ++ WITH_LIBCAP=yes ++ ;; ++ esac ] ++) ++ + dnl Check for cap + dnl extra argument: --with-cap-lib-dir=DIR + cap_lib_dir= +@@ -974,15 +990,17 @@ AC_ARG_WITH(cap-include-dir, + ;; + esac]) + +-smart_try_dir="$cap_lib_dir" +-FR_SMART_CHECK_LIB(cap, cap_get_proc) +-if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then +- AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=.]) +-else +- AC_DEFINE(HAVE_LIBCAP, 1, +- [Define to 1 if you have the `cap' library (-lcap).] +- ) +- HAVE_LIBCAP=1 ++if test "x$WITH_LIBCAP" = xyes; then ++ smart_try_dir="$cap_lib_dir" ++ FR_SMART_CHECK_LIB(cap, cap_get_proc) ++ if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then ++ AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=.]) ++ else ++ AC_DEFINE(HAVE_LIBCAP, 1, ++ [Define to 1 if you have the `cap' library (-lcap).] ++ ) ++ HAVE_LIBCAP=1 ++ fi + fi + + dnl # +-- +2.17.1 + diff --git a/package/freeradius-server/0004-configure.ac-allow-cross-compilation.patch b/package/freeradius-server/0004-configure.ac-allow-cross-compilation.patch new file mode 100644 index 0000000000..248a5f0e34 --- /dev/null +++ b/package/freeradius-server/0004-configure.ac-allow-cross-compilation.patch @@ -0,0 +1,41 @@ +From d6c1da041da77902a06d10bf03ef454468921801 Mon Sep 17 00:00:00 2001 +From: Changqing Li +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 +Signed-off-by: Yi Zhao + +update to new version 3.0.17 to fix patch warning +Signed-off-by: Changqing Li + +Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files +Signed-off-by: David Gouarin +Signed-off-by: Matt Weber +--- + 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 efc9f29d7f..98a97e438a 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 ]], [[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.17.1 + diff --git a/package/freeradius-server/0005-fix-error-for-expansion-of-macro-in-thread.h.patch b/package/freeradius-server/0005-fix-error-for-expansion-of-macro-in-thread.h.patch new file mode 100644 index 0000000000..cf6ad81a14 --- /dev/null +++ b/package/freeradius-server/0005-fix-error-for-expansion-of-macro-in-thread.h.patch @@ -0,0 +1,65 @@ +From dae3b7c53171dfeacce91e0da1c8bd4e4166352e Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Wed, 18 Jan 2017 14:59:39 +0800 +Subject: [PATCH] fix error for expansion of macro in thread.h + +The parameter declaration is missing in expansion of macro +which cause the build error: +| In file included from src/freeradius-devel/libradius.h:80:0, +| from src/lib/log.c:26: +| src/lib/log.c: In function '__fr_thread_local_destroy_fr_strerror_buffer': +| src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function) +| fr_thread_local_setup(char *, fr_strerror_buffer) /* macro */ +| ^ + +Add the missing declaration in macro. + +Upstream-Status: Pending + +Signed-off-by: Yi Zhao + +Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files +Signed-off-by: David Gouarin +Signed-off-by: Matt Weber +--- + src/include/threads.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/include/threads.h b/src/include/threads.h +index e36d81dac0..2bcb6aadcb 100644 +--- a/src/include/threads.h ++++ b/src/include/threads.h +@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\ + # define fr_thread_local_get(_n) _n + #elif defined(HAVE_PTHREAD_H) + # include +-# define fr_thread_local_setup(_t, _n) \ ++# define fr_thread_local_setup(_t, _n) static __thread _t _n;\ + static pthread_key_t __fr_thread_local_key_##_n;\ + static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\ + static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\ +@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##_n(UNUSED void *unused)\ + static void __fr_thread_local_key_init_##_n(void)\ + {\ + (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\ +- (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\ + }\ + static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\ + {\ + __fr_thread_local_destructor_##_n = func;\ + if (_n) return _n; \ + (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\ ++ (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\ + return _n;\ + } +-# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f) +-# define fr_thread_local_set(_n, _v) __fr_thread_local_set_##_n(_v) +-# define fr_thread_local_get(_n) __fr_thread_local_get_##_n() ++# define fr_thread_local_init(_n, _f) __fr_thread_local_init_##_n(_f) ++# define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1)) ++# define fr_thread_local_get(_n) _n + #endif + #endif +-- +2.17.1 + diff --git a/package/freeradius-server/0006-modules-rlm_sql-remove-mysql_version.h.patch b/package/freeradius-server/0006-modules-rlm_sql-remove-mysql_version.h.patch new file mode 100644 index 0000000000..03f8ef8805 --- /dev/null +++ b/package/freeradius-server/0006-modules-rlm_sql-remove-mysql_version.h.patch @@ -0,0 +1,36 @@ +From 77b8c75f9904897768f87e20fef5d7739ddcd3c7 Mon Sep 17 00:00:00 2001 +From: Jared Bents +Date: Tue, 4 Feb 2020 08:22:11 -0600 +Subject: [PATCH] modules/rlm_sql: remove mysql_version.h + +remove mysql_version.h as mysql.h is included and mysql_version.h +should not be included by per the header file warning + +Upstream: http://lists.freeradius.org/pipermail/freeradius-devel/2021-April/014218.html + +Signed-off-by: Jared Bents +Signed-off-by: Matt Weber +--- + src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c b/src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c +index a7992647cd..ea44d0cc7a 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c ++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c +@@ -34,12 +34,10 @@ RCSID("$Id$") + #include "config.h" + + #ifdef HAVE_MYSQL_MYSQL_H +-# include + # include + # include + # include + #elif defined(HAVE_MYSQL_H) +-# include + # include + # include + # include +-- +2.17.1 + diff --git a/package/freeradius-server/Config.in b/package/freeradius-server/Config.in new file mode 100644 index 0000000000..0f796e21d2 --- /dev/null +++ b/package/freeradius-server/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_FREERADIUS_SERVER + bool "freeradius-server" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_MMU + 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 + +comment "freeradius-server needs a target w/ MMU" + depends on !BR2_USE_MMU diff --git a/package/freeradius-server/freeradius-server.hash b/package/freeradius-server/freeradius-server.hash new file mode 100644 index 0000000000..ba338d8b7f --- /dev/null +++ b/package/freeradius-server/freeradius-server.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae freeradius-server-3.0.21.tar.gz +sha256 8b9cc1e5d41938be45a368f126a6d1fda03d60a3d622dc75e776be4e90c2d2c6 COPYRIGHT diff --git a/package/freeradius-server/freeradius-server.mk b/package/freeradius-server/freeradius-server.mk new file mode 100644 index 0000000000..c1d5c2fbb1 --- /dev/null +++ b/package/freeradius-server/freeradius-server.mk @@ -0,0 +1,114 @@ +################################################################################ +# +# 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_DEPENDENCIES = libtalloc +FREERADIUS_SERVER_CPE_ID_VENDOR = freeradius +FREERADIUS_SERVER_CPE_ID_PRODUCT = freeradius + +# some compiler checks are not supported while cross compiling. +# instead of removing those checks, we cache the answers +FREERADIUS_SERVER_CONF_OPTS += \ + 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 + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +FREERADIUS_SERVER_CONF_OPTS += --with-libcap +FREERADIUS_SERVER_DEPENDENCIES += libcap +else +FREERADIUS_SERVER_CONF_OPTS += --without-libcap +endif + +ifeq ($(BR2_PACKAGE_LIBKRB5),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_krb5 +FREERADIUS_SERVER_DEPENDENCIES += libkrb5 +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_krb5 +endif + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_pam +FREERADIUS_SERVER_DEPENDENCIES += linux-pam +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_pam +endif + +ifeq ($(BR2_PACKAGE_OPENLDAP),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_ldap +FREERADIUS_SERVER_DEPENDENCIES += openldap +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_ldap +endif + +ifeq ($(BR2_PACKAGE_MYSQL),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_sql_mysql +FREERADIUS_SERVER_DEPENDENCIES += mysql +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_sql_mysql +endif + +ifeq ($(BR2_PACKAGE_SQLITE),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_sql_sqlite +FREERADIUS_SERVER_DEPENDENCIES += sqlite +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_sql_sqlite +endif + +ifeq ($(BR2_PACKAGE_UNIXODBC),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_sql_unixodbc +FREERADIUS_SERVER_DEPENDENCIES += unixodbc +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_sql_unixodbc +endif + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_sql_postgresql +FREERADIUS_SERVER_DEPENDENCIES += postgresql +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_sql_postgresql +endif + +ifeq ($(BR2_PACKAGE_HAS_OPENSSL),y) +FREERADIUS_SERVER_DEPENDENCIES += openssl +FREERADIUS_SERVER_CONF_OPTS += --with-openssl +else +FREERADIUS_SERVER_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +FREERADIUS_SERVER_CONF_OPTS += --with-pcre +FREERADIUS_SERVER_DEPENDENCIES += pcre +else +FREERADIUS_SERVER_CONF_OPTS += --without-pcre +endif + +ifeq ($(BR2_PACKAGE_RUBY),y) +FREERADIUS_SERVER_CONF_OPTS += --with-rlm_ruby +FREERADIUS_SERVER_DEPENDENCIES += ruby +else +FREERADIUS_SERVER_CONF_OPTS += --without-rlm_ruby +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +FREERADIUS_SERVER_CONF_OPTS += --with-systemd +FREERADIUS_SERVER_DEPENDENCIES += systemd +else +FREERADIUS_SERVER_CONF_OPTS += --without-systemd +endif + +# TARGET_DIR is set to empty to avoid creation of symlinks in hardcoded host directories +# freeradius Makefile does not support an alternate DESTDIR, instead it uses the magic $(R) variable +FREERADIUS_SERVER_MAKE_ENV = R=$(TARGET_DIR) TARGET_DIR="" + +# use MAKE1 because make install does not support parallel build +FREERADIUS_SERVER_MAKE = $(MAKE1) + +$(eval $(autotools-package))