Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
From 3be3b9a1345942d1578ec73efa9b2e3c41bd67c5 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Fri, 21 Jan 2022 13:22:24 +0800
Subject: [PATCH] Add autogen.sh
The autogen.sh has been removed since 3.0.22[1]. But we still need it in
do_configure. Add it back.
[1] https://github.com/FreeRADIUS/freeradius-server/commit/2e9b6227efd19e2b0926541aa26874908e7b7314
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
autogen.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100755 autogen.sh
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000000..959182b39e
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+parentdir=`dirname $0`
+
+cd $parentdir
+parentdir=`pwd`
+m4include="-I$parentdir -I$parentdir/m4 -Im4"
+
+autoreconf -Wcross --verbose --install --force
+
+mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
+mysubdirs=`echo $mysubdirs`
+
+for F in $mysubdirs
+do
+ echo "Configuring in $F..."
+ (cd $F && grep "^AC_CONFIG_HEADER" configure.ac > /dev/null || exit 0; autoheader $m4include)
+ (cd $F && autoconf $m4include)
+done
--
2.25.1

View File

@@ -0,0 +1,32 @@
From 2a74c10836c0d2d19248ca40d113936f4a56b039 Mon Sep 17 00:00:00 2001
From: "Roy.Li" <rongqing.li@windriver.com>
Date: Sun, 8 Jan 2023 22:47:11 +0800
Subject: [PATCH] Enable and change user and group of freeradius server to
radiusd
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
raddb/radiusd.conf.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
index 154b50d610..4594d6d2d2 100644
--- a/raddb/radiusd.conf.in
+++ b/raddb/radiusd.conf.in
@@ -557,8 +557,8 @@ security {
# member. This can allow for some finer-grained access
# controls.
#
-# user = radius
-# group = radius
+ user = radiusd
+ group = radiusd
# Core dumps are a bad thing. This should only be set to
# 'yes' if you're debugging a problem with the server.
--
2.25.1

View File

@@ -0,0 +1,39 @@
From ba1390a80662ff2ab7bfda978cde7df9a871f6ae Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
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 <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Update to new version 3.0.17 to fix patch warning
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Rebased for 3.2.3
Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
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 9ee6379ea4..1dad481da8 100644
--- a/src/modules/rlm_krb5/configure.ac
+++ b/src/modules/rlm_krb5/configure.ac
@@ -143,7 +143,8 @@ if test "$krb5threadsafe" != "no"; 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=""

View File

@@ -0,0 +1,71 @@
From 5ba3d140842268cbbdd983266efecb1fba5bdd59 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 22 Aug 2019 10:45:46 +0800
Subject: [PATCH] Fix libtool detection
Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it
can work with our libtoolize and libtool.
Simplify the detection of ltdl. It will find the ltdl from the sysroot; the
switch --with-system-libltdl is no longer needed. The code is copied from
pulseaudio configure.ac, together with the comment paragraph.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
configure.ac | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/configure.ac b/configure.ac
index ad8bc8cdda..ef8fced680 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,6 +321,42 @@ dnl # See if we have Git.
dnl #
AC_CHECK_PROG(GIT, git, yes, no)
+#### libtool stuff ####
+
+dnl set this shit so it doesn't force CFLAGS...
+LTCFLAGS=" "
+
+LT_PREREQ(2.2)
+LT_INIT([dlopen disable-static])
+
+dnl Unfortunately, even up to libtool 2.2.6a there is no way to know
+dnl exactly which version of libltdl is present in the system, so we
+dnl just assume that it's a working version as long as we have the
+dnl library and the header files.
+dnl
+dnl As an extra safety device, check for lt_dladvise_init() which is
+dnl only implemented in libtool 2.x, and refine as we go if we have
+dnl refined requirements.
+dnl
+dnl Check the header files first since the system may have a
+dnl libltdl.so for runtime, but no headers, and we want to bail out as
+dnl soon as possible.
+dnl
+dnl We don't need any special variable for this though, since the user
+dnl can give the proper place to find libltdl through the standard
+dnl variables like LDFLAGS and CPPFLAGS.
+
+AC_CHECK_HEADER([ltdl.h],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_init], [LIBLTDL=-lltdl], [LIBLTDL=])],
+ [LIBLTDL=])
+
+AS_IF([test "x$LIBLTDL" = "x"],
+ [AC_MSG_ERROR([Unable to find libltdl version 2. Makes sure you have libtool 2.2 or later installed.])])
+AC_SUBST([LIBLTDL])
+LTDL_SUBDIRS=
+INCLTDL=-DWITH_SYSTEM_LTDL
+AC_SUBST(LTDL_SUBDIRS)
+
dnl Put this in later, when all distributed modules use autoconf.
dnl AC_ARG_WITH(disablemodulefoo,
dnl [ --without-rlm_foo Disables module compilation. Module list:]
--
2.25.1

View File

@@ -0,0 +1,70 @@
From 9548dc5e1a6c835cd4f387ba384d8f3f14c3fc8b Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
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 <jackie.huang@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
configure.ac | 36 +++++++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index ef8fced680..263098f7fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1161,6 +1161,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=
@@ -1194,15 +1210,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=<path>.])
-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=<path>.])
+ else
+ AC_DEFINE(HAVE_LIBCAP, 1,
+ [Define to 1 if you have the `cap' library (-lcap).]
+ )
+ HAVE_LIBCAP=1
+ fi
fi
dnl #
--
2.25.1

View File

@@ -0,0 +1,223 @@
From 8fe25b30b6fbb3170705f4468eb4c92eef3a968f Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
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 [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Rebased for 3.2.3
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
m4/fr_smart_check_include.m4 | 2 +-
m4/fr_smart_check_lib.m4 | 22 ----------------------
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 ++--
9 files changed, 15 insertions(+), 37 deletions(-)
diff --git a/m4/fr_smart_check_include.m4 b/m4/fr_smart_check_include.m4
index e7d4443f9c..2b69704f98 100644
--- a/m4/fr_smart_check_include.m4
+++ b/m4/fr_smart_check_include.m4
@@ -9,7 +9,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 0d94ee9bf6..6108e62054 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
@@ -58,14 +58,14 @@ AC_ARG_WITH(ibmdb2-dir,
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
FR_MODULE_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
FR_MODULE_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 5aa7b4b6ee..2eda5b6cc5 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
@@ -58,14 +58,14 @@ AC_ARG_WITH(firebird-dir,
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
FR_MODULE_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
FR_MODULE_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 d96216aca8..88cbc469f7 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac
@@ -58,14 +58,14 @@ AC_ARG_WITH(iodbc-dir,
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
FR_MODULE_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
FR_MODULE_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 d36aecbda6..201a623d4e 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
@@ -138,7 +138,7 @@ fi
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'
@@ -147,7 +147,7 @@ fi
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'
@@ -242,7 +242,7 @@ if test "x$have_mysql_h" != "xyes"; 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 <mysql/mysql.h>])
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 f31b7d2c5a..67bbf66df5 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
@@ -66,7 +66,7 @@ dnl ############################################################
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 46587e4099..b41c51bda7 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
@@ -43,7 +43,7 @@ AC_ARG_WITH(rlm-sql-postgresql-include-dir,
;;
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
FR_MODULE_FAIL([libpq-fe.h])
@@ -95,7 +95,7 @@ else
])
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
FR_MODULE_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 3bdfae6032..ce68c312c6 100644
--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
+++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
@@ -58,14 +58,14 @@ AC_ARG_WITH(unixodbc-dir,
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
FR_MODULE_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
FR_MODULE_FAIL([sql.h])
diff --git a/m4/fr_smart_check_lib.m4 b/m4/fr_smart_check_lib.m4
index 16ac5b3c5e..0f5e9fc6d6 100644
--- a/m4/fr_smart_check_lib.m4
+++ b/m4/fr_smart_check_lib.m4
@@ -64,28 +64,6 @@ if test "x$smart_lib" = "x"; then
LIBS="$old_LIBS"
fi
-dnl #
-dnl # Try to guess possible locations.
-dnl #
-if test "x$smart_lib" = "x"; then
- for try in /usr/local/lib /opt/lib; do
- AC_MSG_CHECKING([for $2 in -l$1 in $try])
- LIBS="-l$1 $old_LIBS"
- CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS"
- AC_TRY_LINK([extern char $2();],
- [$2()],
- [
- smart_lib="-l$1"
- smart_ldflags="-L$try -Wl,-rpath,$try"
- AC_MSG_RESULT(yes)
- break
- ],
- [AC_MSG_RESULT(no)])
- done
- LIBS="$old_LIBS"
- CPPFLAGS="$old_CPPFLAGS"
-fi
-
dnl #
dnl # Found it, set the appropriate variable.
dnl #

View File

@@ -0,0 +1,30 @@
From e4ff7a2a9834e2589bc7bdda4b74f5bc962b15e6 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Wed, 27 Jan 2016 05:07:19 -0500
Subject: [PATCH] rlm_python: add PY_INC_DIR in search dir
configure option --with-rlm-python-include-dir is used to set
PY_INC_DIR which is never used and it fails to find Python.h,
so add it into search dir to fix it.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
src/modules/rlm_python/configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac
index c79c327064..5f4d274990 100644
--- a/src/modules/rlm_python/configure.ac
+++ b/src/modules/rlm_python/configure.ac
@@ -103,7 +103,7 @@ FR_MODULE_TEST_PASS_DO([
old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $PY_CFLAGS"
- smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION"
+ smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION $PY_INC_DIR"
FR_SMART_CHECK_INCLUDE(Python.h)
CFLAGS=$old_CFLAGS

View File

@@ -0,0 +1,160 @@
From d0fa5b259c2dc942d0a43a9cf1bfc32f40c184f9 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
Date: Thu, 7 Jan 2016 22:37:30 -0800
Subject: [PATCH] libtool: do not use jlibtool
jlibtool is hardcoded to be used but we need to use
our libtool, so fix the makfiles to make it compatible
with our libtool.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
Make.inc.in | 4 ++--
scripts/boiler.mk | 2 ++
scripts/install.mk | 14 +++++++-------
scripts/libtool.mk | 22 ++++++++++++++++------
4 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/Make.inc.in b/Make.inc.in
index 05f82776ff..e78f3fe9dc 100644
--- a/Make.inc.in
+++ b/Make.inc.in
@@ -57,7 +57,7 @@ CPPFLAGS = @CPPFLAGS@
LIBPREFIX = @LIBPREFIX@
EXEEXT = @EXEEXT@
-LIBTOOL = JLIBTOOL
+LIBTOOL = @LIBTOOL@
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -168,7 +168,7 @@ ANALYZE.c := @clang_path@
#
ifeq "$(USE_SHARED_LIBS)" "yes"
TESTBINDIR = ./$(BUILD_DIR)/bin/local
- TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
+ TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(LIBTOOL) --quiet --mode=execute $(TESTBINDIR)
else
TESTBINDIR = ./$(BUILD_DIR)/bin
TESTBIN = ./$(BUILD_DIR)/bin
diff --git a/scripts/boiler.mk b/scripts/boiler.mk
index 2ce0c18f34..567cc0f22f 100644
--- a/scripts/boiler.mk
+++ b/scripts/boiler.mk
@@ -272,6 +272,7 @@ define COMPILE_C_CMDS
$(Q)$(ECHO) CC $<
$(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
$(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<)
+ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
endef
else
#
@@ -287,6 +288,7 @@ define COMPILE_C_CMDS
$(Q)cppcheck --enable=style -q ${CHECKFLAGS} $(filter -isystem%,${SRC_CFLAGS}) \
$(filter -I%,${SRC_CFLAGS}) $(filter -D%,${SRC_CFLAGS}) ${INCDIRS} \
$(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} --suppress=variableScope --suppress=invalidscanf $<
+ ${Q}mv $(dir $@)/.libs/$(notdir $*.d) ${BUILD_DIR}/objs/$*.d
endef
endif
diff --git a/scripts/install.mk b/scripts/install.mk
index 916411563b..e38c1ed697 100644
--- a/scripts/install.mk
+++ b/scripts/install.mk
@@ -46,7 +46,7 @@ define ADD_INSTALL_RULE.exe
install: $${${1}_INSTALLDIR}/$(notdir ${1})
# Install executable ${1}
- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
@$(ECHO) INSTALL ${1}
$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/bin/${1} $${${1}_INSTALLDIR}/
$(Q)$${${1}_POSTINSTALL}
@@ -65,7 +65,7 @@ define ADD_INSTALL_RULE.a
install: $${${1}_INSTALLDIR}/$(notdir ${1})
# Install static library ${1}
- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} ${1} | $${${1}_INSTALLDIR}
+ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} ${1} | $${${1}_INSTALLDIR}
@$(ECHO) INSTALL ${1}
$(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
$(Q)$${${1}_POSTINSTALL}
@@ -87,9 +87,9 @@ define ADD_INSTALL_RULE.la
install: $${${1}_INSTALLDIR}/$(notdir ${1})
# Install libtool library ${1}
- $${${1}_INSTALLDIR}/$(notdir ${1}): ${JLIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
+ $${${1}_INSTALLDIR}/$(notdir ${1}): ${LIBTOOL} $${${1}_BUILD}/${1} | $${${1}_INSTALLDIR}
@$(ECHO) INSTALL ${1}
- $(Q)$${PROGRAM_INSTALL} -c -m 755 $${LOCAL_FLAGS_MIN} $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
+ $(Q)$${PROGRAM_INSTALL} -c -m 755 $${BUILD_DIR}/lib/${1} $${${1}_INSTALLDIR}/
$(Q)$${${1}_POSTINSTALL}
endef
@@ -107,7 +107,7 @@ define ADD_INSTALL_RULE.man
install: ${2}/$(notdir ${1})
# Install manual page ${1}
- ${2}/$(notdir ${1}): ${JLIBTOOL} ${1} | ${2}
+ ${2}/$(notdir ${1}): ${LIBTOOL} ${1} | ${2}
@$(ECHO) INSTALL $(notdir ${1})
$(Q)$${PROGRAM_INSTALL} -c -m 644 ${1} ${2}/
@@ -122,9 +122,9 @@ endef
define ADD_INSTALL_RULE.dir
# Install directory
.PHONY: ${1}
- ${1}: ${JLIBTOOL}
+ ${1}: ${LIBTOOL}
@$(ECHO) INSTALL -d -m 755 ${1}
- $(Q)$${PROGRAM_INSTALL} -d -m 755 ${1}
+ $(Q)$${INSTALL} -d -m 755 ${1}
endef
diff --git a/scripts/libtool.mk b/scripts/libtool.mk
index 381127ec2d..e83d7e6ad7 100644
--- a/scripts/libtool.mk
+++ b/scripts/libtool.mk
@@ -60,7 +60,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL"
# Tell GNU Make to use this value, rather than anything specified
# on the command line.
override LIBTOOL := ${JLIBTOOL}
-endif # else we're not using jlibtool
+else # else we're not using jlibtool
+ all install: ${LIBTOOL}
+endif
# When using libtool, it produces a '.libs' directory. Ensure that it
# is removed on "make clean", too.
@@ -74,11 +76,19 @@ clean: .libs_clean
# Re-define compilers and linkers
#
OBJ_EXT = lo
-COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
-COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
-LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
-LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
-PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
+ifeq "${LIBTOOL}" "JLIBTOOL"
+ COMPILE.c = ${LIBTOOL} --silent --mode=compile ${CC}
+ COMPILE.cxx = ${LIBTOOL} --mode=compile ${CXX}
+ LINK.c = ${LIBTOOL} --silent --mode=link ${CC}
+ LINK.cxx = ${LIBTOOL} --mode=link ${CXX}
+ PROGRAM_INSTALL = ${LIBTOOL} --silent --mode=install ${INSTALL}
+else
+ COMPILE.c = ${LIBTOOL} --mode=compile --tag=CC ${CC}
+ COMPILE.cxx = ${LIBTOOL} --mode=compile --tag=CC ${CXX}
+ LINK.c = ${LIBTOOL} --mode=link --tag=CC ${CC} -module -export-dynamic
+ LINK.cxx = ${LIBTOOL} --mode=link --tag=CC ${CXX} -module -export-dynamic
+ PROGRAM_INSTALL = ${LIBTOOL} --mode=install ${INSTALL}
+endif
# LIBTOOL_ENDINGS - Given a library ending in ".a" or ".so", replace that
--
2.25.1

View File

@@ -0,0 +1,58 @@
From 3e701d6274924adaed568e22af2362aa5af1f055 Mon Sep 17 00:00:00 2001
From: Peter Seebach <peter.seebach@windriver.com>
Date: Sun, 8 Jan 2023 23:01:28 +0800
Subject: [PATCH] Fix quoting for BUILD_WITH
The escaped quotes are to make the -D values produce strings which
can be used to display these values. However, if the values are more
than one word, with spaces, they also need shell quoting to make them
into single words.
Upstream-Status: Pending
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
src/main/libfreeradius-server.mk | 2 +-
src/main/unittest.mk | 2 +-
src/modules/rlm_eap/radeapclient.mk | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk
index 4495f72481..07c28f1968 100644
--- a/src/main/libfreeradius-server.mk
+++ b/src/main/libfreeradius-server.mk
@@ -18,5 +18,5 @@ SOURCES := conffile.c \
TGT_LDLIBS := $(OPENSSL_LIBS)
ifneq ($(MAKECMDGOALS),scan)
-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
+SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
endif
diff --git a/src/main/unittest.mk b/src/main/unittest.mk
index edd4f133a7..b5b44d5e11 100644
--- a/src/main/unittest.mk
+++ b/src/main/unittest.mk
@@ -21,5 +21,5 @@ TGT_PREREQS += libfreeradius-eap.a
endif
ifneq ($(MAKECMDGOALS),scan)
-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
+SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
endif
diff --git a/src/modules/rlm_eap/radeapclient.mk b/src/modules/rlm_eap/radeapclient.mk
index 6068f54813..7d3c55625b 100644
--- a/src/modules/rlm_eap/radeapclient.mk
+++ b/src/modules/rlm_eap/radeapclient.mk
@@ -23,7 +23,7 @@ SRC_CFLAGS += -DWITH_EAPCLIENT
SRC_INCDIRS := ${top_srcdir}/src/modules/rlm_eap/libeap
ifneq ($(MAKECMDGOALS),scan)
-SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
+SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\""
endif
endif
--
2.25.1

View File

@@ -0,0 +1,61 @@
From 30ce5ccd62446349d432ff65d3fe8d46872423c8 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
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 <yi.zhao@windriver.com>
---
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 <pthread.h>
-# 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.25.1

View File

@@ -0,0 +1,28 @@
From f0e764826e3a85488047f7f4e94ebf91460d2c12 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 16 Jun 2017 20:10:49 -0700
Subject: [PATCH] rlm_mschap: Use includedir instead of hardcoding /usr/include
OE QA flags it correctly as a voilation of cross compilation
namespace
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/modules/rlm_mschap/configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/rlm_mschap/configure.ac b/src/modules/rlm_mschap/configure.ac
index 953336f475..77a18af55d 100644
--- a/src/modules/rlm_mschap/configure.ac
+++ b/src/modules/rlm_mschap/configure.ac
@@ -77,7 +77,7 @@ else
FR_MODULE_FEATURE([opendirectory], [without opendirectory support])
fi
-smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
+smart_try_dir="$winbind_include_dir =/usr/include/samba-4.0"
FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
#include <stdbool.h>])
if test "x$ac_cv_header_wbclient_h" != "xyes"; then

View File

@@ -0,0 +1,55 @@
From 0f9f18fc330fe88080be13e43f300fbf7ba4a85a Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Mon, 13 Jul 2020 07:01:45 +0000
Subject: [PATCH] raddb/certs/Makefile: fix the existed certificate error
Fixes:
# ./bootstrap
[snip]
openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key 'whatever' -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
Using configuration from ./client.cnf
Check that the request matches the signature
Signature ok
ERROR:There is already a certificate for /C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org
The matching entry has the following details
Type :Valid
Expires on :200908024833Z
Serial Number :02
File name :unknown
Subject Name :/C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org
make: *** [Makefile:128: client.crt] Error 1
Add the check to fix the above error and it does the same for server.crt.
Upstream-Status: Pending
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
raddb/certs/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile
index c9fbc9e864..d064fe252d 100644
--- a/raddb/certs/Makefile
+++ b/raddb/certs/Makefile
@@ -92,7 +92,7 @@ server.csr server.key: server.cnf
chmod g+r server.key
server.crt: ca.key ca.pem server.csr
- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
+ @[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
server.p12: server.crt
$(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
@@ -117,7 +117,7 @@ client.csr client.key: client.cnf
chmod g+r client.key
client.crt: ca.key ca.pem client.csr
- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
+ @[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
client.p12: client.crt
$(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
--
2.25.1

View File

@@ -0,0 +1,136 @@
From bb1cb2ffc7a31c0a2bb2de51ef82d304b0a107c3 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Wed, 5 Aug 2020 07:23:11 +0000
Subject: [PATCH] raddb/certs/Makefile: fix the occasional verification failure
Fixes:
# cd /etc/raddb/certs
# ./bootstrap
[snip]
chmod g+r ca.key
openssl pkcs12 -in server.p12 -out server.pem -passin pass:'whatever' -passout pass:'whatever'
chmod g+r server.pem
C = FR, ST = Radius, O = Example Inc., CN = Example Server Certificate, emailAddress = admin@example.org
error 7 at 0 depth lookup: certificate signature failure
140066667427072:error:04067084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus:../openssl-1.1.1g/crypto/rsa/rsa_ossl.c:553:
140066667427072:error:0D0C5006:asn1 encoding routines:ASN1_item_verify:EVP lib:../openssl-1.1.1g/crypto/asn1/a_verify.c:170:
error server.pem: verification failed
make: *** [Makefile:107: server.vrfy] Error 2
It seems the ca.pem mismatchs server.pem which results in failing to
execute "openssl verify -CAfile ca.pem server.pem", so add to check
the file to avoid inconsistency.
Upstream-Status: Pending
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
raddb/certs/Makefile | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile
index d064fe252d..86f4547804 100644
--- a/raddb/certs/Makefile
+++ b/raddb/certs/Makefile
@@ -59,7 +59,7 @@ passwords.mk: server.cnf ca.cnf client.cnf inner-server.cnf
#
######################################################################
dh:
- $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE)
+ @[ -f dh ] || $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE)
######################################################################
#
@@ -69,17 +69,17 @@ dh:
ca.key ca.pem: ca.cnf
@[ -f index.txt ] || $(MAKE) index.txt
@[ -f serial ] || $(MAKE) serial
- $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \
+ @[ -f ca.pem ] || $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \
-days $(CA_DEFAULT_DAYS) -config ./ca.cnf \
-passin pass:$(PASSWORD_CA) -passout pass:$(PASSWORD_CA)
chmod g+r ca.key
ca.der: ca.pem
- $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der
+ @[ -f ca.der ] || $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der
ca.crl: ca.pem
- $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA)
- $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl
+ @[ -f ca-crl.pem ] || $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA)
+ @[ -f ca.crl ] || $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl
rm ca-crl.pem
######################################################################
@@ -88,18 +88,18 @@ ca.crl: ca.pem
#
######################################################################
server.csr server.key: server.cnf
- $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf
+ @[ -f server.csr ] || $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf
chmod g+r server.key
server.crt: ca.key ca.pem server.csr
@[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
server.p12: server.crt
- $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+ @[ -f server.p12 ] || $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
chmod g+r server.p12
server.pem: server.p12
- $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
+ @[ -f server.pem ] || $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
chmod g+r server.pem
.PHONY: server.vrfy
@@ -113,19 +113,19 @@ server.vrfy: ca.pem
#
######################################################################
client.csr client.key: client.cnf
- $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf
+ @[ -f client.csr ] || $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf
chmod g+r client.key
client.crt: ca.key ca.pem client.csr
@[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
client.p12: client.crt
- $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+ @[ -f client.p12 ] || $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
chmod g+r client.p12
cp client.p12 $(USER_NAME).p12
client.pem: client.p12
- $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
+ @[ -f client.pem ] || $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
chmod g+r client.pem
cp client.pem $(USER_NAME).pem
@@ -140,18 +140,18 @@ client.vrfy: ca.pem client.pem
#
######################################################################
inner-server.csr inner-server.key: inner-server.cnf
- $(OPENSSL) req -new -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf
+ @[ -f inner-server.csr] || $(OPENSSL) req -new -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf
chmod g+r inner-server.key
inner-server.crt: ca.key ca.pem inner-server.csr
- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf
+ @[ -f inner-server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf
inner-server.p12: inner-server.crt
- $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12 -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
+ @[ -f inner-server.p12 ] || $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12 -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
chmod g+r inner-server.p12
inner-server.pem: inner-server.p12
- $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
+ @[ -f inner-server.pem ] || $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER)
chmod g+r inner-server.pem
.PHONY: inner-server.vrfy
--
2.25.1

View File

@@ -0,0 +1,42 @@
From c591da4a361496eec93625cf8c4f89bddfedaca7 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Sun, 7 Feb 2021 16:02:36 +0800
Subject: [PATCH] Workaround error with autoconf 2.7
While using autoconf 2.7, the AM_MISSING_PROG caused unexpected error:
...
configure.ac: error: required file 'missing' not found
...
Since these tools were explicitly added by autotools bbclass,
remove the testing to workaround the error with autoconf 2.7
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
configure.ac | 8 --------
1 file changed, 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 263098f7fd..fc296832d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -878,14 +878,6 @@ fi
AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers)
-dnl #
-dnl # FIXME This is truly gross.
-dnl #
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-
AC_PATH_PROG(DIRNAME,dirname)
AC_PATH_PROG(GREP,grep)
--
2.25.1

View File

@@ -0,0 +1,44 @@
From 78494ea005bd38324953b05176d6eb2c3f55af2c Mon Sep 17 00:00:00 2001
From: Kai Kang <kai.kang@windriver.com>
Date: Sun, 8 Jan 2023 23:21:24 +0800
Subject: [PATCH] bootstrap: check commands of openssl exist
It calls openssl commands dhparam and pkcs12 in script bootstrap. These
commands are configurable based on configure options 'no-dh' and
'no-des', and may not be provided by openssl. So check existence of
these commands. If not, abort running of script bootstrap.
1. https://github.com/openssl/openssl/blob/master/apps/build.info#L37
2. https://github.com/openssl/openssl/blob/master/apps/build.info#L22
Upstream-Status: Denied [https://github.com/FreeRADIUS/freeradius-server/pull/4059]
The maintainer commented in the pull that the script could
be run on a host which provides these openssl commands.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
raddb/certs/bootstrap | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap
index 57de8cf0d7..4641c71700 100755
--- a/raddb/certs/bootstrap
+++ b/raddb/certs/bootstrap
@@ -13,6 +13,14 @@
umask 027
cd `dirname $0`
+# check commands of openssl exist
+for cmd in dhparam pkcs12; do
+ if ! openssl ${cmd} -help >/dev/null 2>&1; then
+ echo "Error: command ${cmd} is not supported by openssl."
+ exit 1
+ fi
+done
+
make -h > /dev/null 2>&1
#
--
2.25.1

View File

@@ -0,0 +1,41 @@
From cbbb62ddda5c189c225f96bf6b599b3b3e8c8252 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Wed, 3 Aug 2022 16:44:29 +0800
Subject: [PATCH] version.c: don't print build flags
Don't print the build flags to avoid collecting the build environment info.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
src/main/version.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/src/main/version.c b/src/main/version.c
index f1f1e87810..3ffcbb25a0 100644
--- a/src/main/version.c
+++ b/src/main/version.c
@@ -589,19 +589,6 @@ void version_print(void)
DEBUG2(" unknown");
#endif
- DEBUG2("Compilation flags:");
-#ifdef BUILT_WITH_CPPFLAGS
- DEBUG2(" cppflags : " BUILT_WITH_CPPFLAGS);
-#endif
-#ifdef BUILT_WITH_CFLAGS
- DEBUG2(" cflags : " BUILT_WITH_CFLAGS);
-#endif
-#ifdef BUILT_WITH_LDFLAGS
- DEBUG2(" ldflags : " BUILT_WITH_LDFLAGS);
-#endif
-#ifdef BUILT_WITH_LIBS
- DEBUG2(" libs : " BUILT_WITH_LIBS);
-#endif
DEBUG2(" ");
}
INFO("FreeRADIUS Version " RADIUSD_VERSION_STRING);
--
2.25.1

View File

@@ -0,0 +1,61 @@
From 40abff4062d0521cf2b2a8a4660a3d2933f86f9d Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Mon, 1 Apr 2024 09:09:07 +0000
Subject: [PATCH] Add acinclude.m4 to include required macros
* These micro files are in the m4 directories, but the aclocal didn't
add them to aclocal.m4 automatically, so add them to acinclude.m4
manually.
* The runlog.m4 is added for python.m4.
Upstream-Status: Inappropriate [OE Specific]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
acinclude.m4 | 8 ++++++++
m4/runlog.m4 | 17 +++++++++++++++++
2 files changed, 25 insertions(+)
create mode 100644 acinclude.m4
create mode 100644 m4/runlog.m4
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000000..118b7f0e5f
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,8 @@
+m4_include([m4/fr_init_module.m4])
+m4_include([m4/ax_with_prog.m4])
+m4_include([m4/runlog.m4])
+m4_include([m4/python.m4])
+m4_include([m4/ax_compare_version.m4])
+m4_include([m4/libcurl_check_config.m4])
+m4_include([m4/ax_ruby_devel.m4])
+m4_include([m4/ax_prog_ruby_version.m4])
diff --git a/m4/runlog.m4 b/m4/runlog.m4
new file mode 100644
index 0000000000..690efc3258
--- /dev/null
+++ b/m4/runlog.m4
@@ -0,0 +1,17 @@
+## -*- Autoconf -*-
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
--
2.35.5

View File

@@ -0,0 +1,110 @@
#!/bin/sh
# Start/stop the FreeRADIUS daemon.
### BEGIN INIT INFO
# Provides: freeradius
# Required-Start: $remote_fs $network $syslog
# Should-Start: $time mysql slapd postgresql samba krb5-kdc
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Radius Daemon
# Description: Extensible, configurable radius daemon
### END INIT INFO
set -e
# Source function library.
. /etc/init.d/functions
if [ -f /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
fi
PROG="radiusd"
PROGRAM="/usr/sbin/radiusd"
PIDFILE="/var/run/radiusd/radiusd.pid"
DESCR="FreeRADIUS daemon"
if [ -r /etc/default/$PROG ]; then
. /etc/default/$PROG
fi
test -f $PROGRAM || exit 0
check_certs() {
if [ ! -f /etc/raddb/certs/server.pem ]; then
echo -n "Creating certificates for freeradius..."
if sudo -u radiusd /etc/raddb/certs/bootstrap 1> /dev/null 2> /dev/null; then
echo "done"
else
echo "failed!"
fi
fi
}
# /var/run may be a tmpfs
if [ ! -d /var/run/radiusd ]; then
mkdir -p /var/run/radiusd
chown radiusd:radiusd /var/run/radiusd
fi
if [ ! -d /var/log/radius ]; then
mkdir -p /var/log/radius
touch /var/log/radius/radius.log
chown radiusd:radiusd /var/run/radius
fi
if [ ! -f ${PIDFILE} ]; then
touch ${PIDFILE}
chown radiusd:radiusd ${PIDFILE}
fi
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
ret=0
case "$1" in
start)
check_certs
echo -n "Starting $DESCR" "$PROG"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM -- $FREERADIUS_OPTIONS || ret=$?
[ "$ret" == 0 ] && echo " Success" || echo " Failed"
exit $ret
;;
stop)
echo -n "Stopping $DESCR" "$PROG"
if [ -f "$PIDFILE" ] ; then
start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$?
else
echo -n "$PIDFILE not found"
ret=1
fi
[ "$ret" == 0 ] && echo " Success" || echo " Failed"
;;
status)
status $PROGRAM;
exit $?
;;
restart)
$0 stop
$0 start
;;
reload|force-reload)
echo -n "Reloading $DESCR" "$PROG"
if [ -f "$PIDFILE" ] ; then
start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE || ret=$?
else
echo -n "$PIDFILE not found"
ret=1
fi
[ "$ret" == 0 ] && echo " Success" || echo " Failed"
;;
*)
echo "Usage: $0 start|stop|status|restart|force-reload|reload"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,2 @@
d /var/log/radius 0755 radiusd radiusd -
d /run/radiusd 0755 radiusd radiusd -

View File

@@ -0,0 +1,16 @@
[Unit]
Description=FreeRADIUS high performance RADIUS server.
After=syslog.target network.target
[Service]
Type=forking
EnvironmentFile=-/etc/sysconfig/radiusd
PIDFile=/run/radiusd/radiusd.pid
ExecStartPre=-@BASE_BINDIR@/chown -R radiusd:radiusd /run/radiusd
ExecStartPre=@SBINDIR@/radiusd -C
ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/${MLPREFIX}raddb
ExecReload=@SBINDIR@/radiusd -C
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,3 @@
# <type> <owner> <group> <mode> <path> <linksource>
d radiusd radiusd 0755 /var/run/radiusd none
d radiusd radiusd 0755 /var/log/radius none

View File

@@ -0,0 +1,298 @@
DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \
protocol, as defined in RFC 2865 (and others). It allows Network Access \
Servers (NAS boxes) to perform authentication for dial-up users. There are \
also RADIUS clients available for Web servers, firewalls, Unix logins, and \
more. Using RADIUS allows authentication and authorization for a network to \
be centralized, and minimizes the amount of re-configuration which has to be \
done when adding or deleting new users."
SUMMARY = "High-performance and highly configurable RADIUS server"
HOMEPAGE = "http://www.freeradius.org/"
SECTION = "System/Servers"
LICENSE = "GPL-2.0-only & LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc"
SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.2.x;lfs=0;;protocol=https \
file://freeradius \
file://volatiles.58_radiusd \
file://radiusd.service \
file://radiusd-volatiles.conf \
file://0001-Add-autogen.sh.patch \
file://0002-Enable-and-change-user-and-group-of-freeradius-serve.patch \
file://0003-configure.ac-allow-cross-compilation.patch \
file://0004-Fix-libtool-detection.patch \
file://0005-configure.ac-add-option-for-libcap.patch \
file://0006-Avoid-searching-host-dirs.patch \
file://0007-rlm_python-add-PY_INC_DIR-in-search-dir.patch \
file://0008-libtool-do-not-use-jlibtool.patch \
file://0009-Fix-quoting-for-BUILD_WITH.patch \
file://0010-fix-error-for-expansion-of-macro-in-thread.h.patch \
file://0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \
file://0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch \
file://0013-raddb-certs-Makefile-fix-the-occasional-verification.patch \
file://0014-Workaround-error-with-autoconf-2.7.patch \
file://0015-bootstrap-check-commands-of-openssl-exist.patch \
file://0016-version.c-don-t-print-build-flags.patch \
file://0017-Add-acinclude.m4-to-include-required-macros.patch \
"
raddbdir = "${sysconfdir}/${MLPREFIX}raddb"
SRCREV = "a7acce80f5ba2271d9aeb737a4a91a5bf8317f31"
UPSTREAM_CHECK_GITTAGREGEX = "release_(?P<pver>\d+(\_\d+)+)"
CVE_STATUS[CVE-2002-0318] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
CVE_STATUS[CVE-2011-4966] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
PARALLEL_MAKE = ""
S = "${WORKDIR}/git"
LDFLAGS:append:powerpc = " -latomic"
LDFLAGS:append:mipsarch = " -latomic"
LDFLAGS:append:armv5 = " -latomic"
EXTRA_OECONF = " --enable-strict-dependencies \
--with-docdir=${docdir}/freeradius-${PV} \
--with-openssl-includes=${STAGING_INCDIR} \
--with-openssl-libraries=${STAGING_LIBDIR} \
--with-raddbdir=${raddbdir} \
--without-rlm_ippool \
--without-rlm_cache_memcached \
--without-rlm_counter \
--without-rlm_couchbase \
--without-rlm_dbm \
--without-rlm_eap_tnc \
--without-rlm_eap_ikev2 \
--without-rlm_opendirectory \
--without-rlm_redis \
--without-rlm_rediswho \
--without-rlm_cache_redis \
--without-rlm_sql_db2 \
--without-rlm_sql_firebird \
--without-rlm_sql_freetds \
--without-rlm_sql_iodbc \
--without-rlm_sql_oracle \
--without-rlm_sql_sybase \
--without-rlm_sql_mongo \
--without-rlm_sqlhpwippool \
--without-rlm_securid \
--without-rlm_unbound \
--without-rlm_python \
ac_cv_path_PERL=${bindir}/perl \
ax_cv_cc_builtin_choose_expr=no \
ax_cv_cc_builtin_types_compatible_p=no \
ax_cv_cc_builtin_bswap64=no \
ax_cv_cc_bounded_attribute=no \
"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
pcre libcap \
openssl rlm-eap-fast rlm-eap-pwd \
"
PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5"
PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam"
PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap"
PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5"
PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3"
PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc"
PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql"
PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl"
PACKAGECONFIG[python3] = "--with-rlm_python3 --with-rlm-python3-bin=${STAGING_BINDIR_NATIVE}/python3-native/python3 --with-rlm-python3-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python3,python3-native python3"
PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest --without-rlm_json,curl json-c"
PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl"
PACKAGECONFIG[rlm-eap-fast] = "--with-rlm_eap_fast, --without-rlm_eap_fast"
PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd"
inherit useradd autotools-brokensep update-rc.d systemd multilib_script multilib_header
MULTILIB_SCRIPTS = "${PN}:${sbindir}/checkrad"
# This is not a cpan or python based package, but it needs some definitions
# from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python
# correctly.
inherit cpan-base python3-dir
# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
# in order to handle the subdirs correctly.
do_configure() {
./autogen.sh
# the configure of rlm_perl needs this to get correct
# mod_cflags and mod_ldflags
if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then
export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
fi
oe_runconf
# we don't need dhcpclient
sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk
}
INITSCRIPT_NAME = "radiusd"
SYSTEMD_SERVICE:${PN} = "radiusd.service"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd"
do_install() {
rm -rf ${D}
install -d ${D}/${sysconfdir}/logrotate.d
install -d ${D}/${sysconfdir}/pam.d
install -d ${D}/${localstatedir}/lib/radiusd
export LD_LIBRARY_PATH=${D}/${libdir}
oe_runmake install R=${D} INSTALLSTRIP=""
# remove unsupported config files
rm -f ${D}/${raddbdir}/experimental.conf
# remove scripts that required Perl(DBI)
rm -rf ${D}/${bindir}/radsqlrelay
rm -f ${D}/${sbindir}/rc.radiusd
rm -rf ${D}/${localstatedir}/run/
rm -rf ${D}/${localstatedir}/log/
chown -R radiusd:radiusd ${D}/${raddbdir}
chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd
# For sysvinit
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/default/volatiles
install -m 0755 ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd
install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd
fi
# For systemd
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-e 's,@SBINDIR@,${sbindir},g' \
-e 's,@STATEDIR@,${localstatedir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
${D}${systemd_unitdir}/system/radiusd.service
install -d ${D}${sysconfdir}/tmpfiles.d/
install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/radiusd.conf
fi
oe_multilib_header freeradius/autoconf.h
oe_multilib_header freeradius/missing.h
oe_multilib_header freeradius/radpaths.h
}
# This is only needed when we install/update on a running target.
#
pkg_postinst:${PN} () {
if [ -z "$D" ]; then
if command -v systemd-tmpfiles >/dev/null; then
# create /var/log/radius, /var/run/radiusd
systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
fi
# Fix ownership for /etc/raddb/*, /var/lib/radiusd
chown -R radiusd:radiusd ${raddbdir}
chown -R radiusd:radiusd ${localstatedir}/lib/radiusd
# for radiusd.service with multilib
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${sysconfdir}/sysconfig
echo "MLPREFIX=${MLPREFIX}" > ${sysconfdir}/sysconfig/radiusd
fi
else
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d $D${sysconfdir}/sysconfig
echo "MLPREFIX=${MLPREFIX}" > $D${sysconfdir}/sysconfig/radiusd
fi
fi
}
pkg_postrm:${PN} () {
# only try to remove ${sysconfdir}/sysconfig/radiusd for systemd
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
exit 0
fi
if [ -d ${sysconfdir}/raddb ]; then
exit 0
fi
for variant in ${MULTILIB_GLOBAL_VARIANTS}; do
if [ -d ${sysconfdir}/${variant}-raddb ]; then
exit 0
fi
done
rm -f ${sysconfdir}/sysconfig/radiusd
rmdir --ignore-fail-on-non-empty ${sysconfdir}/sysconfig
}
# We really need the symlink :(
INSANE_SKIP:${PN} = "dev-so"
INSANE_SKIP:${PN}-krb5 = "dev-so"
INSANE_SKIP:${PN}-ldap = "dev-so"
INSANE_SKIP:${PN}-mysql = "dev-so"
INSANE_SKIP:${PN}-perl = "dev-so"
INSANE_SKIP:${PN}-postgresql = "dev-so"
INSANE_SKIP:${PN}-python = "dev-so"
INSANE_SKIP:${PN}-unixodbc = "dev-so"
PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \
${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc"
FILES:${PN}-utils = "${bindir}/*"
FILES:${PN}-ldap = "${libdir}/rlm_ldap.so* \
${raddbdir}/mods-available/ldap \
"
FILES:${PN}-krb5 = "${libdir}/rlm_krb5.so* \
${raddbdir}/mods-available/krb5 \
"
FILES:${PN}-perl = "${libdir}/rlm_perl.so* \
${raddbdir}/mods-config/perl \
${raddbdir}/mods-available/perl \
"
FILES:${PN}-python = "${libdir}/rlm_python3.so* \
${raddbdir}/mods-config/python3 \
${raddbdir}/mods-available/python3 \
"
FILES:${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \
${raddbdir}/mods-config/sql/*/mysql \
${raddbdir}/mods-available/sql \
"
FILES:${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \
${raddbdir}/mods-config/sql/*/postgresql \
"
FILES:${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*"
FILES:${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*"
RDEPENDS:${PN} += "perl"
RDEPENDS:${PN}-utils = "${PN} perl"
RDEPENDS:${PN}-krb5 = "${PN}"
RDEPENDS:${PN}-ldap = "${PN}"
RDEPENDS:${PN}-mysql = "${PN}"
RDEPENDS:${PN}-perl = "${PN}"
RDEPENDS:${PN}-postgresql = "${PN}"
RDEPENDS:${PN}-python = "${PN}"
RDEPENDS:${PN}-unixodbc = "${PN}"
CLEANBROKEN = "1"