From 68b5a71883ab8b421c2ce4e0a9486ec1d391e7f8 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 3 Dec 2019 19:40:14 -0800 Subject: [PATCH] coova-chilli: Update to 1.5 Remove upstreamed patches. Added patch to fix compilation. Signed-off-by: Rosen Penev --- net/coova-chilli/Makefile | 6 +- .../patches/200-fix-compile-with-musl.patch | 30 ------- .../{400-wolfssl.patch => 200-wolfssl.patch} | 0 .../patches/300-openssl-deprecated.patch | 84 ------------------- net/coova-chilli/patches/300-sysinfo.patch | 25 ++++++ net/coova-chilli/patches/500-redir.patch | 44 ---------- 6 files changed, 28 insertions(+), 161 deletions(-) delete mode 100644 net/coova-chilli/patches/200-fix-compile-with-musl.patch rename net/coova-chilli/patches/{400-wolfssl.patch => 200-wolfssl.patch} (100%) delete mode 100644 net/coova-chilli/patches/300-openssl-deprecated.patch create mode 100644 net/coova-chilli/patches/300-sysinfo.patch delete mode 100644 net/coova-chilli/patches/500-redir.patch diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile index 510c4a197..5a284874a 100644 --- a/net/coova-chilli/Makefile +++ b/net/coova-chilli/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coova-chilli -PKG_VERSION:=1.4 -PKG_RELEASE:=11 +PKG_VERSION:=1.5 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)? -PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9 +PKG_HASH:=75e15fd00a870b8a95df1440977c688a05a109f90b57bf679b931101d427d0fb PKG_MAINTAINER:=Jaehoon You PKG_LICENSE:=GPL-2.0-or-later diff --git a/net/coova-chilli/patches/200-fix-compile-with-musl.patch b/net/coova-chilli/patches/200-fix-compile-with-musl.patch deleted file mode 100644 index cbc201c44..000000000 --- a/net/coova-chilli/patches/200-fix-compile-with-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/system.h -+++ b/src/system.h -@@ -112,6 +112,11 @@ - #include - #endif - -+#ifdef HAVE_SYS_SYSINFO_H -+#define _LINUX_SYSINFO_H -+#include -+#endif -+ - #ifdef HAVE_INTTYPES_H - #define __STDC_FORMAT_MACROS - #include -@@ -129,15 +134,6 @@ - #include - #endif - --#ifdef HAVE_SYS_SYSINFO_H --#include --#else --#ifdef HAVE_LINUX_SYSINFO_H --#define _LINUX_KERNEL_H --#include --#endif --#endif -- - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) - #include - #include diff --git a/net/coova-chilli/patches/400-wolfssl.patch b/net/coova-chilli/patches/200-wolfssl.patch similarity index 100% rename from net/coova-chilli/patches/400-wolfssl.patch rename to net/coova-chilli/patches/200-wolfssl.patch diff --git a/net/coova-chilli/patches/300-openssl-deprecated.patch b/net/coova-chilli/patches/300-openssl-deprecated.patch deleted file mode 100644 index 70ce863cf..000000000 --- a/net/coova-chilli/patches/300-openssl-deprecated.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/src/ms_chap.c -+++ b/src/ms_chap.c -@@ -96,18 +96,18 @@ MakeKey(u_char *key, u_char *des_key) - des_key[6] = Get7Bits(key, 42); - des_key[7] = Get7Bits(key, 49); - -- des_set_odd_parity((des_cblock *)des_key); -+ DES_set_odd_parity((DES_cblock *)des_key); - } - - static void /* IN 8 octets IN 7 octest OUT 8 octets */ - DesEncrypt(u_char *clear, u_char *key, u_char *cipher) - { -- des_cblock des_key; -- des_key_schedule key_schedule; -+ DES_cblock des_key; -+ DES_key_schedule key_schedule; - - MakeKey(key, des_key); -- des_set_key(&des_key, key_schedule); -- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, key_schedule, 1); -+ DES_set_key(&des_key, &key_schedule); -+ DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, &key_schedule, 1); - } - - #define LENGTH 20 ---- a/src/ssl.c -+++ b/src/ssl.c -@@ -35,11 +35,13 @@ openssl_env * initssl() { - if (openssl_init == 0) { - openssl_init = 1; - #ifdef HAVE_OPENSSL -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - if (_options.debug) { - SSL_load_error_strings(); - } - SSL_library_init(); - OpenSSL_add_all_algorithms(); -+#endif - #else - matrixSslOpen(); - syslog(LOG_DEBUG, "%s(%d): MatrixSslOpen()", __FUNCTION__, __LINE__); -@@ -55,11 +57,13 @@ openssl_env * initssl_cli() { - if (openssl_init == 0) { - openssl_init = 1; - #ifdef HAVE_OPENSSL -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - if (_options.debug) { - SSL_load_error_strings(); - } - SSL_library_init(); - OpenSSL_add_all_algorithms(); -+#endif - #else - matrixSslOpen(); - syslog(LOG_DEBUG, "%s(%d): MatrixSslOpen()", __FUNCTION__, __LINE__); -@@ -132,7 +136,7 @@ _openssl_env_init(openssl_env *env, char *engine, int server) { - if (_options.sslciphers) { - SSL_CTX_set_cipher_list(env->ctx, _options.sslciphers); - } --#ifdef HAVE_OPENSSL_ENGINE -+#ifndef OPENSSL_NO_ENGINE - if (engine) { - retry: - if ((env->engine = ENGINE_by_id(engine)) == NULL) { -@@ -609,7 +613,7 @@ openssl_env_free(openssl_env *env) { - #endif - #ifdef HAVE_OPENSSL - if (env->ctx) SSL_CTX_free(env->ctx); --#ifdef HAVE_OPENSSL_ENGINE -+#ifndef OPENSSL_NO_ENGINE - if (env->engine) ENGINE_free(env->engine); - #endif - #endif ---- a/src/ssl.h -+++ b/src/ssl.h -@@ -41,6 +41,7 @@ typedef struct { - #include - #include - #include -+#include - #elif HAVE_CYASSL - #include - #include diff --git a/net/coova-chilli/patches/300-sysinfo.patch b/net/coova-chilli/patches/300-sysinfo.patch new file mode 100644 index 000000000..033b5ef94 --- /dev/null +++ b/net/coova-chilli/patches/300-sysinfo.patch @@ -0,0 +1,25 @@ +From 196b783b5ea7f8d6cf57ddbd41dc1881ef47a1c4 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Wed, 11 Dec 2019 19:33:58 -0800 +Subject: [PATCH] system.h: Fix compilation with kernel 4.19 + musl + + includes , which redefines struct sysinfo, leading to an error. +Define the linux header as included to solve compilation. + +Signed-off-by: Rosen Penev +--- + src/system.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/system.h b/src/system.h +index 257b65b..5c1aa4a 100644 +--- a/src/system.h ++++ b/src/system.h +@@ -114,6 +114,7 @@ + + #ifdef HAVE_SYS_SYSINFO_H + #include ++#define _LINUX_SYSINFO_H + #else + #ifdef HAVE_LINUX_SYSINFO_H + #define _LINUX_KERNEL_H diff --git a/net/coova-chilli/patches/500-redir.patch b/net/coova-chilli/patches/500-redir.patch deleted file mode 100644 index 444aa4887..000000000 --- a/net/coova-chilli/patches/500-redir.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/src/redir.c -+++ b/src/redir.c -@@ -3358,14 +3358,17 @@ int redir_main(struct redir_t *redir, - } - - #define redir_memcopy(msgtype) \ -+ do { \ - redir_challenge(challenge); \ - redir_chartohex(challenge, hexchal, REDIR_MD5LEN); \ - msg.mtype = msgtype; \ - memcpy(conn.s_state.redir.uamchal, challenge, REDIR_MD5LEN); \ -- if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal) -+ if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal); \ -+ } while (0) - - #ifdef USING_IPC_UNIX - #define redir_msg_send(msgopt) \ -+ do { \ - msg.mdata.opt = msgopt; \ - memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address)); \ - memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress)); \ -@@ -3375,9 +3378,11 @@ int redir_main(struct redir_t *redir, - syslog(LOG_ERR, "%s: write() failed! msgfd=%d type=%ld len=%d", \ - strerror(errno), redir->msgfd, msg.mtype, (int)sizeof(msg.mdata)); \ - return redir_main_exit(&socket, forked, rreq); \ -- } -+ } \ -+ } while (0) - #else - #define redir_msg_send(msgopt) \ -+ do { \ - msg.mdata.opt = msgopt; \ - memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address)); \ - memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress)); \ -@@ -3387,7 +3392,8 @@ int redir_main(struct redir_t *redir, - syslog(LOG_ERR, "%s: msgsnd() failed! msgid=%d type=%ld len=%d", \ - strerror(errno), redir->msgid, msg.mtype, (int)sizeof(msg.mdata)); \ - return redir_main_exit(&socket, forked, rreq); \ -- } -+ } \ -+ } while (0) - #endif - - /*