diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-04 18:44:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-10 12:04:08 +0000 |
commit | 571c12b93e1906230f4b20e500647d578113a26b (patch) | |
tree | 3077c07a47a8d28a7d15142f88b26a9c785250db /main/coova-chilli | |
parent | 8ef272f6dbe54073de5005748810719d9d4978f0 (diff) | |
download | aports-571c12b93e1906230f4b20e500647d578113a26b.tar.bz2 aports-571c12b93e1906230f4b20e500647d578113a26b.tar.xz |
main/coova-chilli: upgrade to 1.3.2 and use libressl
Diffstat (limited to 'main/coova-chilli')
-rw-r--r-- | main/coova-chilli/APKBUILD | 43 | ||||
-rw-r--r-- | main/coova-chilli/automake.patch | 11 | ||||
-rw-r--r-- | main/coova-chilli/chilli_limits.patch | 15 | ||||
-rw-r--r-- | main/coova-chilli/des.patch | 42 | ||||
-rw-r--r-- | main/coova-chilli/posix-regex.patch | 122 | ||||
-rw-r--r-- | main/coova-chilli/system.patch | 38 |
6 files changed, 172 insertions, 99 deletions
diff --git a/main/coova-chilli/APKBUILD b/main/coova-chilli/APKBUILD index 03754eb05b..08ece0b9d2 100644 --- a/main/coova-chilli/APKBUILD +++ b/main/coova-chilli/APKBUILD @@ -1,24 +1,23 @@ # Contributor: grharry # Maintainer: pkgname=coova-chilli -pkgver=1.3.0 -pkgrel=7 +pkgver=1.3.2 +pkgrel=0 pkgdesc="CoovaChilli is an open source access controller for wireless LAN" url="http://www.coova.org/" arch="all" license="GPL3+" depends="" -makedepends="perl openssl-dev autoconf automake libtool curl-dev - linux-headers" +makedepends="perl libressl-dev autoconf automake libtool curl-dev + linux-headers gengetopt-dev" install="$pkgname.pre-install" pkgusers="chilli" pkggroups="chilli" subpackages="$pkgname-doc $pkgname-dev" -source="https://coova.github.io/coova-chilli/coova-chilli-$pkgver.tar.gz - automake.patch - chilli_limits.patch +source="$pkgname-$pkgver.tar.gz::https://github.com/coova/coova-chilli/archive/$pkgver.tar.gz posix-regex.patch system.patch + des.patch " options="suid" @@ -34,7 +33,7 @@ prepare() { sed -i 's/-Werror//g' src/Makefile.am || return 1 sed -i 's%(localstatedir)/run%(localstatedir)%' src/Makefile.am || return 1 libtoolize --force \ - && aclocal && autoconf && automake --add-missing || return 1 + && autoreconf -vif || return 1 } build() { @@ -66,7 +65,6 @@ build() { --enable-chilliscript \ --enable-layer3 \ --enable-dhcpopt \ - --enable-curl \ --enable-largelimits \ || return 1 export CFLAGS="$CFLAGS -Wno-error=unused-but-set-variable" @@ -82,18 +80,15 @@ package() { chown -R chilli:chilli $pkgdir/var/run/chilli } -md5sums="0f8718f494586f05298b2224ad49c69d coova-chilli-1.3.0.tar.gz -b3aaf43bcdb5cfbf39d1c730d1de1a3b automake.patch -95d7550c5c29bcb3d41ec8e4b1597d23 chilli_limits.patch -42918782a1c9f377c665c89a3dcc91b6 posix-regex.patch -ba24925e6a3290a928e8ca65c5372fa1 system.patch" -sha256sums="e624c11211c0d8acf41fa9410aec57acc8ea22d26668c4d519f04d1bd8455cbb coova-chilli-1.3.0.tar.gz -16f529c7deee24155bd900a3f64fc110207d435ad12bd91e71823acd6156ab25 automake.patch -e3a31714aa9395f6be01cf0cd2899dc0f6934cd2954fa16af186b527be1aa09a chilli_limits.patch -e9f989efaf07dee4cea55f1ce02a7e820cee39973031dd25a33a737ba51dfa6b posix-regex.patch -775250d76935310c68a7a7f400ec3fbbc779212a34e568acab734191a3f209ad system.patch" -sha512sums="46143d848df435afc05820c28e03513c95d56265dae243929a44e84f0468484c676b0952324e91d3ebcc322391993a58fd6a0d4aeb42ff3c10ff8de3a46079bd coova-chilli-1.3.0.tar.gz -643b99f473753881f15e8b049ae1e071a8fe6164fd92b30a54ad27a0a8b58d26727ab82d28b587defc1f28f4213c64d298bf707b9bf6a3a98013578b26a79733 automake.patch -b12f387fdce54281d134d20e1785e4a1af9fc02a532c82c955f970ab344822a20a12c6b4bed10b1adf3f4ddaa87f650048212ad25a82bfc4f6e955e23ba63c91 chilli_limits.patch -cafe0899ce95c7b75fcc54c3e70fd8b0d7962c05616c759bec45e16be41ad28a8304507dfc74fc14fe09923d7fdbd8f3c3351241256df63b06aba84ce11faffa posix-regex.patch -5d00133e48eb38995ac14e3ec136fa64cd447cc14dd93fda80c6c7ad28cc6704ce6a70561d3bb293f0c13fcef9fc4f01daa4dfed7f7ce8fa540e1fdc141041da system.patch" +md5sums="26e02689f632ad27ad599bc0d9f5ae3d coova-chilli-1.3.2.tar.gz +ed92f843b016386373cf75ef103e0c52 posix-regex.patch +f5362ff39e5f8aebded93600445b33e3 system.patch +096390f1ad301e3e31343a060acfea9f des.patch" +sha256sums="dae4f91a0f735292bf65e2abd2761f83ce1c3f56286165265633fdec8e9e800e coova-chilli-1.3.2.tar.gz +4784df2b94fd659699f853a24ed54a74926313d02f6704f3f6d7160c210df895 posix-regex.patch +89cae49e154e0d4990378c0a3277214a297c86df292ede146781f04f4c98caab system.patch +7a6e18bd1d2ee7ff391da1bf1f36c65e44aca1aeaf816a78f85783184882f83b des.patch" +sha512sums="03fc50c1c206419b1d785c2b23dab7ebde72e49b5656ee3be6b6110d075ebc91a832d4bdf337f8f446f3c899d75655a7503bbfd4e7aca7889cff1edde596d5ae coova-chilli-1.3.2.tar.gz +d47d176d01eda436b04700bb4404fe2a3c17e00bd8c2e4ed08149841c3e692435fee4f7dc22135d07b95556dd2f2d08b540a345bb7d5bdff3266bfcc46dcda76 posix-regex.patch +7dbfa571f5eb7065a3a6c2f7c14e2d33cec52771e0236f29837d28cc216ca5a12eb31e1f3d3a780964c8e0f65eb057a9c040b14c65d84cd8483858f757240d6b system.patch +b2dce18c72808e58dd97a235191e9b843f0bfa06805b12c39488bf4464d055c0734248c89c571cc8069e0f06856f7fcf8458aac84f895da4ed2b0ceb7cbd6f82 des.patch" diff --git a/main/coova-chilli/automake.patch b/main/coova-chilli/automake.patch deleted file mode 100644 index 4b50fc01dd..0000000000 --- a/main/coova-chilli/automake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./configure.in.orig 2012-12-31 10:19:51.189518846 +0000 -+++ ./configure.in 2012-12-31 10:20:07.352988340 +0000 -@@ -7,7 +7,7 @@ - - AM_INIT_AUTOMAKE - --AM_CONFIG_HEADER([config.h]) -+AC_CONFIG_HEADER([config.h]) - - AC_CONFIG_MACRO_DIR([m4]) - diff --git a/main/coova-chilli/chilli_limits.patch b/main/coova-chilli/chilli_limits.patch deleted file mode 100644 index 300dae9318..0000000000 --- a/main/coova-chilli/chilli_limits.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: src/chilli_limits.h -=================================================================== ---- a/src/chilli_limits.h (revision 492) -+++ b/src/chilli_limits.h (working copy) -@@ -18,8 +18,8 @@ - * - */ - --#ifndef _LIMITS_H --#define _LIMITS_H -+#ifndef _CHILLI_LIMITS_H -+#define _CHILLI_LIMITS_H - - /* - * extracted from various .h files, needs some cleanup. diff --git a/main/coova-chilli/des.patch b/main/coova-chilli/des.patch new file mode 100644 index 0000000000..ae647d5970 --- /dev/null +++ b/main/coova-chilli/des.patch @@ -0,0 +1,42 @@ +From 1a809062ecab70de13e299487fdd635434bc86d8 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 4 Oct 2016 20:31:54 +0200 +Subject: [PATCH] Replace deprecated des_ with DES_ + +The des_* fuctions were renamed to DES_ with openssl 0.9.7 (2002). This +fixes building with libressl and probably openssl 1.1.0 too. +--- + src/ms_chap.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/ms_chap.c b/src/ms_chap.c +index 2c236d2..8ad8327 100644 +--- 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 +-- +2.10.0 + diff --git a/main/coova-chilli/posix-regex.patch b/main/coova-chilli/posix-regex.patch index 73cb417e18..12ce4427d8 100644 --- a/main/coova-chilli/posix-regex.patch +++ b/main/coova-chilli/posix-regex.patch @@ -1,9 +1,25 @@ -Index: src/garden.h -=================================================================== ---- a/src/garden.h (revision 492) -+++ b/src/garden.h (working copy) -@@ -39,13 +39,18 @@ - (a)->port == (b)->port) +From 60031538ecbf9004ae195114cc5e4ea40cca7d06 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 4 Oct 2016 20:01:49 +0200 +Subject: [PATCH] Improve portability for regex + +Do not depend on internal, platform dependant field in regex_t to detect +if the regex was compiled or not. Instead, use a flag that we set for +that. + +This fixes build with musl libc. +--- + src/garden.h | 11 ++++++++--- + src/main-redir.c | 26 +++++++++++--------------- + src/options.c | 27 +++++++++++++++------------ + 3 files changed, 34 insertions(+), 30 deletions(-) + +diff --git a/src/garden.h b/src/garden.h +index 1b07a23..84563e9 100644 +--- a/src/garden.h ++++ b/src/garden.h +@@ -39,13 +39,18 @@ typedef struct pass_through_t { + (a)->port == (b)->port) #ifdef ENABLE_CHILLIREDIR +struct chilli_regex { @@ -21,14 +37,14 @@ Index: src/garden.h + struct chilli_regex re_host; + struct chilli_regex re_path; + struct chilli_regex re_qs; - char inuse:1; - char neg_host:1; - char neg_path:1; -Index: src/main-redir.c -=================================================================== ---- a/src/main-redir.c (revision 492) -+++ b/src/main-redir.c (working copy) -@@ -503,7 +503,7 @@ + uint8_t inuse:1; + uint8_t neg_host:1; + uint8_t neg_path:1; +diff --git a/src/main-redir.c b/src/main-redir.c +index c7b0f07..001f882 100644 +--- a/src/main-redir.c ++++ b/src/main-redir.c +@@ -501,29 +501,25 @@ static int redir_conn_read(struct conn_t *conn, void *ctx) { } static int @@ -37,39 +53,60 @@ Index: src/main-redir.c int ret; #if(_debug_) -@@ -510,22 +510,19 @@ - log_dbg("Checking %s =~ %s", s, regex); + syslog(LOG_DEBUG, "Checking %s =~ %s", s, regex); #endif -#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) - if (!re->re_g) -#else -- if (!re->allocated) +- if (!re->allocated) -#endif -+ if (!re->allocated) - { -- if ((ret = regcomp(re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { +- { +- if ((ret = regcomp(re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { +- char error[512]; +- regerror(ret, re, error, sizeof(error)); +- syslog(LOG_ERR, "regcomp(%s) failed (%s)", regex, error); +- regex[0] = 0; +- return -1; +- } ++ if (!re->allocated) { + if ((ret = regcomp(&re->re, regex, REG_EXTENDED | REG_NOSUB)) != 0) { - char error[512]; -- regerror(ret, re, error, sizeof(error)); ++ char error[512]; + regerror(ret, &re->re, error, sizeof(error)); - log_err(0, "regcomp(%s) failed (%s)", regex, error); - regex[0] = 0; - return -1; ++ syslog(LOG_ERR, "regcomp(%s) failed (%s)", regex, error); ++ regex[0] = 0; ++ return -1; } + re->allocated = 1; - } - ++ } + - if ((ret = regexec(re, s, 0, 0, 0)) == 0) { + if ((ret = regexec(&re->re, s, 0, 0, 0)) == 0) { - - log_dbg("Matched regex %s", regex); + + syslog(LOG_DEBUG, "Matched regex %s", regex); return 0; -Index: src/options.c -=================================================================== ---- a/src/options.c (revision 492) -+++ b/src/options.c (working copy) -@@ -373,18 +373,12 @@ +diff --git a/src/options.c b/src/options.c +index 28f1b35..d6be8d0 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -219,6 +219,16 @@ int options_mkdir(char *path) { + return 0; + } + ++#ifdef ENABLE_CHILLIREDIR ++static void chilli_regfree(struct chilli_regex *re) ++{ ++ if (!re->allocated) ++ return; ++ regfree(&re->re); ++ re->allocated = 0; ++} ++#endif ++ + int options_fromfd(int fd, bstring bt) { + uint8_t cksum[16], cksum_check[16]; + struct options_t o; +@@ -380,18 +390,11 @@ int options_fromfd(int fd, bstring bt) { #ifdef ENABLE_CHILLIREDIR for (i = 0; i < MAX_REGEX_PASS_THROUGHS; i++) { @@ -78,16 +115,21 @@ Index: src/options.c - regfree(&_options.regex_pass_throughs[i].re_path); - regfree(&_options.regex_pass_throughs[i].re_qs); -#else - if (_options.regex_pass_throughs[i].re_host.allocated) +- if (_options.regex_pass_throughs[i].re_host.allocated) - regfree(&_options.regex_pass_throughs[i].re_host); -+ regfree(&_options.regex_pass_throughs[i].re_host.re); - if (_options.regex_pass_throughs[i].re_path.allocated) +- if (_options.regex_pass_throughs[i].re_path.allocated) - regfree(&_options.regex_pass_throughs[i].re_path); -+ regfree(&_options.regex_pass_throughs[i].re_path.re); - if (_options.regex_pass_throughs[i].re_qs.allocated) +- if (_options.regex_pass_throughs[i].re_qs.allocated) - regfree(&_options.regex_pass_throughs[i].re_qs); -#endif -+ regfree(&_options.regex_pass_throughs[i].re_qs.re); ++ if (_options.regex_pass_throughs[i].re_host.allocated) { ++ chilli_regfree(&_options.regex_pass_throughs[i].re_host); ++ chilli_regfree(&_options.regex_pass_throughs[i].re_path); ++ chilli_regfree(&_options.regex_pass_throughs[i].re_qs); ++ } } #endif +-- +2.10.0 + diff --git a/main/coova-chilli/system.patch b/main/coova-chilli/system.patch index b5958f7279..17d3ba3bb7 100644 --- a/main/coova-chilli/system.patch +++ b/main/coova-chilli/system.patch @@ -1,7 +1,9 @@ ---- ./src/system.h.orig 2014-05-01 13:22:35.122472244 -0200 -+++ ./src/system.h 2014-05-01 13:23:19.896392972 -0200 -@@ -121,18 +121,6 @@ - #include <signal.h> +diff --git a/src/system.h b/src/system.h +index 6ddf98c..3efef6a 100644 +--- a/src/system.h ++++ b/src/system.h +@@ -117,27 +117,6 @@ + #include <inttypes.h> #endif -#if defined(__linux__) @@ -16,10 +18,19 @@ -#include <linux/un.h> -#endif - - #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) +-#ifdef HAVE_SYS_SYSINFO_H +-#include <sys/sysinfo.h> +-#else +-#ifdef HAVE_LINUX_SYSINFO_H +-#define _LINUX_KERNEL_H +-#include <linux/sysinfo.h> +-#endif +-#endif +- + #elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__) #include <net/if.h> #include <net/bpf.h> -@@ -256,6 +244,18 @@ +@@ -244,6 +223,27 @@ #include <unistd.h> #include <errno.h> @@ -35,6 +46,15 @@ +#include <linux/un.h> +#endif + - #define safe_snprintf portable_snprintf - char *safe_strncpy(char *dst, const char *src, size_t size); - ++#ifdef HAVE_SYS_SYSINFO_H ++#include <sys/sysinfo.h> ++#else ++#ifdef HAVE_LINUX_SYSINFO_H ++#define _LINUX_KERNEL_H ++#include <linux/sysinfo.h> ++#endif ++#endif ++ + int safe_accept(int fd, struct sockaddr *sa, socklen_t *lenptr); + int safe_select(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout); |