From 011b546df6aa411f6726b615cf1a25d7ce64da02 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 25 Jan 2020 17:48:50 -0800 Subject: [PATCH] radsecproxy: update to 1.8.1 Removed upstreamed OpenSSL patch. Added PKG_BUILD_PARALLEL for faster compilation. Cleaned up Makefile slightly. Ran init script through shellcheck. Signed-off-by: Rosen Penev --- net/radsecproxy/Makefile | 14 +++++------- net/radsecproxy/files/radsecproxy.init | 8 +++---- .../patches/100-openssl-deprecated.patch | 22 ------------------- .../patches/200-logdest-on-foreground.patch | 2 +- 4 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 net/radsecproxy/patches/100-openssl-deprecated.patch diff --git a/net/radsecproxy/Makefile b/net/radsecproxy/Makefile index 8a0f9ebeb..239ade010 100644 --- a/net/radsecproxy/Makefile +++ b/net/radsecproxy/Makefile @@ -8,18 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=radsecproxy -PKG_VERSION:=1.7.2 -PKG_RELEASE:=2 +PKG_VERSION:=1.8.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/radsecproxy/radsecproxy/releases/download/$(PKG_VERSION)/ -PKG_HASH:=2cf23e618ab9275221350acf5a97bce4ff18aee472045f8a3b4c7673491079d2 +PKG_HASH:=c6f9380f049818e71c129ee9bdfa20c8e0e3a13ca1c806643e0d44c310914e63 +PKG_MAINTAINER:=Toke Høiland-Jørgensen PKG_LICENSE:=BSD-3-CLAUSE PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:uninett:radsecproxy PKG_FIXUP:=autoreconf +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -30,7 +32,6 @@ define Package/radsecproxy DEPENDS:=+libopenssl +libpthread +libnettle TITLE:=radsecproxy URL:=https://radsecproxy.github.io/ - MAINTAINER:=Toke Høiland-Jørgensen endef define Package/radsecproxy/description @@ -40,11 +41,6 @@ endef CONFIGURE_ARGS+= \ --with-ssl="$(STAGING_DIR)/usr" -#TARGET_CFLAGS += -ansi -#TARGET_CFLAGS += -std=c99 -TARGET_CFLAGS += -Wno-long-long - - define Package/radsecproxy/install $(INSTALL_DIR) $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radsecproxy $(1)/usr/sbin/ diff --git a/net/radsecproxy/files/radsecproxy.init b/net/radsecproxy/files/radsecproxy.init index 7b22396ec..f070f2aad 100644 --- a/net/radsecproxy/files/radsecproxy.init +++ b/net/radsecproxy/files/radsecproxy.init @@ -13,10 +13,10 @@ append_params() { local value local section="$1" shift - for param in $*; do + for param in "$@"; do config_get value "$section" "$param" [ -z "$value" ] && { - param=$(echo $param | tr [A-Z] [a-z]) + param=$(echo "$param" | tr 'A-Z' 'a-z') config_get value "$section" "$param" } IFS="$LIST_SEP" @@ -32,10 +32,10 @@ append_bools() { local value local section="$1" shift - for param in $*; do + for param in "$@"; do config_get_bool value "$section" "$param" [ -z "$value" ] && { - param=$(echo $param | tr [A-Z] [a-z]) + param=$(echo "$param" | tr 'A-Z' 'a-z') config_get_bool value "$section" "$param" } [ -n "$value" ] && { diff --git a/net/radsecproxy/patches/100-openssl-deprecated.patch b/net/radsecproxy/patches/100-openssl-deprecated.patch deleted file mode 100644 index 24c214079..000000000 --- a/net/radsecproxy/patches/100-openssl-deprecated.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/tlscommon.c -+++ b/tlscommon.c -@@ -44,8 +44,8 @@ static uint8_t cookie_secret_initialized = 0; - #if OPENSSL_VERSION_NUMBER < 0x10100000 - static pthread_mutex_t *ssl_locks = NULL; - --unsigned long ssl_thread_id() { -- return (unsigned long)pthread_self(); -+void ssl_thread_id(CRYPTO_THREADID *id) { -+ CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self()); - } - - void ssl_locking_callback(int mode, int type, const char *file, int line) { -@@ -69,7 +69,7 @@ void sslinit() { - for (i = 0; i < CRYPTO_num_locks(); i++) { - pthread_mutex_init(&ssl_locks[i], NULL); - } -- CRYPTO_set_id_callback(ssl_thread_id); -+ CRYPTO_THREADID_set_callback(ssl_thread_id); - CRYPTO_set_locking_callback(ssl_locking_callback); - SSL_load_error_strings(); - #else diff --git a/net/radsecproxy/patches/200-logdest-on-foreground.patch b/net/radsecproxy/patches/200-logdest-on-foreground.patch index 9af20b7f3..e50c45ff1 100644 --- a/net/radsecproxy/patches/200-logdest-on-foreground.patch +++ b/net/radsecproxy/patches/200-logdest-on-foreground.patch @@ -1,6 +1,6 @@ --- a/radsecproxy.c +++ b/radsecproxy.c -@@ -3385,15 +3385,13 @@ int radsecproxy_main(int argc, char **ar +@@ -3005,15 +3005,13 @@ int radsecproxy_main(int argc, char **argv) { options.loglevel = loglevel; else if (options.loglevel) debug_set_level(options.loglevel);