diff options
-rw-r--r-- | package/freeradius-server/Makefile | 14 | ||||
-rw-r--r-- | package/freeradius-server/files/radiusd.conf | 8 | ||||
-rw-r--r-- | package/freeradius-server/patches/patch-src_include_threads_h | 36 | ||||
-rw-r--r-- | package/freeradius-server/patches/patch-src_main_tls_c | 16 | ||||
-rw-r--r-- | package/libatomic/Makefile | 31 |
5 files changed, 76 insertions, 29 deletions
diff --git a/package/freeradius-server/Makefile b/package/freeradius-server/Makefile index 60647d336..5644f8afe 100644 --- a/package/freeradius-server/Makefile +++ b/package/freeradius-server/Makefile @@ -4,12 +4,12 @@ include ${ADK_TOPDIR}/rules.mk PKG_NAME:= freeradius-server -PKG_VERSION:= 3.0.13 +PKG_VERSION:= 3.0.21 PKG_RELEASE:= 1 -PKG_HASH:= 34da25c1a0e39dc57821ed6d1af1c1cc8bb7e280169cc8b4003acbfc4184328e +PKG_HASH:= 2bf914d471d4409fd72e708e308fa32ca8d01d698c518497a1d4b867d50132ae PKG_DESCR:= flexible radius server PKG_SECTION:= net/radius -PKG_DEPENDS:= libltdl libpcre libtalloc libressl +PKG_DEPENDS:= libltdl libpcre libtalloc libressl libatomic PKG_BUILDDEP:= libtool pcre talloc libressl PKG_NEEDS:= threads PKG_URL:= http://www.freeradius.org/ @@ -203,14 +203,10 @@ freeradius-server-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m} ${IDIR_FREERADIUS_SERVER}/etc/freeradius/ ; \ done ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius - ${CP} ${WRKINST}/usr/share/freeradius/dictionary \ + ${CP} ${WRKINST}/usr/share/freeradius/dictionary* \ ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius/ - for f in freeradius freeradius.internal rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 rfc4072 rfc4372 rfc4675 rfc4679 rfc5176; do \ - cp ${WRKINST}/usr/share/freeradius/dictionary.$${f} \ - ${IDIR_FREERADIUS_SERVER}/usr/share/freeradius/ ; \ - done ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/lib/freeradius - ${CP} ${WRKINST}/usr/lib/freeradius/libfreeradius-radius.so \ + ${CP} ${WRKINST}/usr/lib/freeradius/libfreeradius-{dhcp,eap,server,radius}.so \ ${IDIR_FREERADIUS_SERVER}/usr/lib ${INSTALL_DIR} ${IDIR_FREERADIUS_SERVER}/usr/sbin ${CP} ${WRKINST}/usr/sbin/radiusd \ diff --git a/package/freeradius-server/files/radiusd.conf b/package/freeradius-server/files/radiusd.conf index b9a573f69..c07f65680 100644 --- a/package/freeradius-server/files/radiusd.conf +++ b/package/freeradius-server/files/radiusd.conf @@ -15,9 +15,6 @@ run_dir = ${localstatedir}/run db_dir = ${raddbdir} libdir = /usr/lib/freeradius pidfile = ${run_dir}/${name}.pid -user = radius -group = radius -#chroot = /path/to/chroot/directory max_request_time = 30 cleanup_delay = 5 @@ -36,7 +33,6 @@ listen { } hostname_lookups = no -allow_core_dumps = no regular_expressions = yes extended_expressions = yes @@ -55,6 +51,10 @@ security { max_attributes = 200 reject_delay = 1 status_server = yes + user = radius + group = radius + allow_core_dumps = no +# chroot = /path/to/chroot/directory } $INCLUDE clients.conf diff --git a/package/freeradius-server/patches/patch-src_include_threads_h b/package/freeradius-server/patches/patch-src_include_threads_h new file mode 100644 index 000000000..4626536e4 --- /dev/null +++ b/package/freeradius-server/patches/patch-src_include_threads_h @@ -0,0 +1,36 @@ + fix for: + | src/lib/log.c:37:31: error: 'fr_strerror_buffer' undeclared (first use in this function) + found in https://github.com/Optware/Optware-ng/commit/6ece960830b3291bc4ad5780cdb49b0a377aab2e + +--- freeradius-server-3.0.21.orig/src/include/threads.h 2020-03-24 15:55:09.000000000 +0100 ++++ freeradius-server-3.0.21/src/include/threads.h 2021-02-16 03:54:58.449715370 +0100 +@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pt + # 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_## + 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_set(_n, _v) ((int)!((_n = _v) || 1)) ++# define fr_thread_local_get(_n) _n + #endif + #endif diff --git a/package/freeradius-server/patches/patch-src_main_tls_c b/package/freeradius-server/patches/patch-src_main_tls_c deleted file mode 100644 index 3eb635e97..000000000 --- a/package/freeradius-server/patches/patch-src_main_tls_c +++ /dev/null @@ -1,16 +0,0 @@ ---- freeradius-server-3.0.13.orig/src/main/tls.c 2017-03-06 14:58:04.000000000 +0100 -+++ freeradius-server-3.0.13/src/main/tls.c 2017-03-30 05:52:35.584542618 +0200 -@@ -2131,13 +2131,9 @@ int cbtls_verify(int ok, X509_STORE_CTX - } - - if (lookup == 0) { --#if OPENSSL_VERSION_NUMBER >= 0x10100000L -- ext_list = X509_get0_extensions(client_cert); --#else - X509_CINF *client_inf; - client_inf = client_cert->cert_info; - ext_list = client_inf->extensions; --#endif - } else { - ext_list = NULL; - } diff --git a/package/libatomic/Makefile b/package/libatomic/Makefile new file mode 100644 index 000000000..9f050b937 --- /dev/null +++ b/package/libatomic/Makefile @@ -0,0 +1,31 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${ADK_TOPDIR}/rules.mk +include ${ADK_TOPDIR}/toolchain/gcc/Makefile.inc + +PKG_NAME:= libatomic +PKG_DESCR:= gcc atomic library +PKG_SECTION:= base/libs +PKG_OPTS:= noremove + +PKG_DFLT_LIBATOMIC:= y if !ADK_APPLIANCE_TOOLCHAIN + +NO_DISTFILES:= 1 + +include ${ADK_TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,LIBATOMIC,libatomic,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) + +CONFIG_STYLE:= manual +BUILD_STYLE:= manual +INSTALL_STYLE:= manual + +libatomic-install: + $(INSTALL_DIR) ${IDIR_LIBATOMIC}/$(ADK_TARGET_LIBC_PATH) +ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),) + # XXX: properly install libatomic + ${CP} ${TOOLCHAIN_BUILD_DIR}/w-gcc*/gcc-*-final/*/libatomic/.libs/libatomic*.so* ${IDIR_LIBATOMIC}/$(ADK_TARGET_LIBC_PATH) +endif + +include ${ADK_TOPDIR}/mk/pkg-bottom.mk |