aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2014-10-21 20:00:56 +0000
committerSteven Barth <cyrus@openwrt.org>2014-10-21 20:00:56 +0000
commit71d05d211dd8eb3e4cd9a95b0d87d37e95d5aa60 (patch)
tree0e4d7f5f9cd1735a4193bac51b103a10e143c89c
parent0b3fec7e80cff3d87b0795c08ba0997441ae3e0c (diff)
downloadupstream-71d05d211dd8eb3e4cd9a95b0d87d37e95d5aa60.tar.gz
upstream-71d05d211dd8eb3e4cd9a95b0d87d37e95d5aa60.tar.bz2
upstream-71d05d211dd8eb3e4cd9a95b0d87d37e95d5aa60.zip
nftables: bump to latest, fix minigmp
Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 43013
-rw-r--r--package/network/utils/nftables/Makefile7
-rw-r--r--package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch63
-rw-r--r--package/network/utils/nftables/patches/102-build-allow-building-with-mini-gmp-instead-of-gmp.patch10
-rw-r--r--package/network/utils/nftables/patches/103-remove-libintl-check.patch11
4 files changed, 9 insertions, 82 deletions
diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile
index 3b33a1a0a6..4f25ee91e7 100644
--- a/package/network/utils/nftables/Makefile
+++ b/package/network/utils/nftables/Makefile
@@ -7,15 +7,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nftables
-PKG_VERSION:=0.3+2014-09-30
+PKG_VERSION:=0.3+2014-10-21
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=git://git.netfilter.org/nftables
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=36c8a131af6217579da582bc320e16171df0f3af
+PKG_SOURCE_VERSION:=17b495957b29e699f59874d1ceca9535921b1a79
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
+PKG_LICENSE:=GPL-2.0
PKG_FIXUP:=autoreconf
@@ -24,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--disable-debug \
--without-libgmp \
- --without-libreadline \
+ --without-cli \
define Package/nftables
SECTION:=net
diff --git a/package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch b/package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch
deleted file mode 100644
index 5219759a34..0000000000
--- a/package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From ace4c5eb69ee7dace955acdb23e30e8229b18619 Mon Sep 17 00:00:00 2001
-From: Steven Barth <cyrus@openwrt.org>
-Date: Wed, 1 Oct 2014 22:40:31 +0200
-Subject: [PATCH 1/2] build: allow disabling libreadline-support
-
-This makes nftables a bit more embedded-friendly.
-
-Signed-off-by: Steven Barth <cyrus@openwrt.org>
----
- configure.ac | 11 +++++++++--
- src/Makefile.in | 2 ++
- src/main.c | 6 ++++++
- 3 files changed, 17 insertions(+), 2 deletions(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -71,8 +71,15 @@ AC_CHECK_LIB([nftnl], [nft_rule_alloc],
- AC_CHECK_LIB([gmp], [__gmpz_init], ,
- AC_MSG_ERROR([No suitable version of libgmp found]))
-
--AC_CHECK_LIB([readline], [readline], ,
-- AC_MSG_ERROR([No suitable version of libreadline found]))
-+
-+AC_ARG_WITH([libreadline], [AS_HELP_STRING([--without-libreadline],
-+ [Disable libreadline support (no interactive CLI)])], [],
-+ [with_libreadline=yes])
-+AS_IF([test "x$with_libreadline" != xno], [
-+AC_CHECK_LIB([readline],[readline], , AC_MSG_ERROR([No suitable version of libreadline found]))
-+])
-+AC_SUBST(with_libreadline)
-+
-
- # Checks for header files.
- AC_HEADER_STDC
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -3,7 +3,9 @@ PROGRAMS += nft
- nft-destdir := @sbindir@
-
- nft-obj += main.o
-+ifeq (@with_libreadline@,yes)
- nft-obj += cli.o
-+endif
- nft-obj += rule.o
- nft-obj += statement.o
- nft-obj += datatype.o
---- a/src/main.c
-+++ b/src/main.c
-@@ -335,8 +335,14 @@ int main(int argc, char * const *argv)
- if (scanner_read_file(scanner, filename, &internal_location) < 0)
- goto out;
- } else if (interactive) {
-+#ifdef HAVE_LIBREADLINE
- cli_init(&state);
- return 0;
-+#else
-+ fprintf(stderr, "%s: interactive CLI not supported in this build\n",
-+ argv[0]);
-+ exit(NFT_EXIT_FAILURE);
-+#endif
- } else {
- fprintf(stderr, "%s: no command specified\n", argv[0]);
- exit(NFT_EXIT_FAILURE);
diff --git a/package/network/utils/nftables/patches/102-build-allow-building-with-mini-gmp-instead-of-gmp.patch b/package/network/utils/nftables/patches/102-build-allow-building-with-mini-gmp-instead-of-gmp.patch
index a7fba58934..211d32d48a 100644
--- a/package/network/utils/nftables/patches/102-build-allow-building-with-mini-gmp-instead-of-gmp.patch
+++ b/package/network/utils/nftables/patches/102-build-allow-building-with-mini-gmp-instead-of-gmp.patch
@@ -52,8 +52,8 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
+AC_MSG_ERROR([--without-libgmp MUST be used with --disable-debug])
+])
-
- AC_ARG_WITH([libreadline], [AS_HELP_STRING([--without-libreadline],
+ AC_ARG_WITH([cli], [AS_HELP_STRING([--without-cli],
+ [disable interactive CLI (libreadline support)])],
--- /dev/null
+++ b/include/bignum.h
@@ -0,0 +1,17 @@
@@ -425,7 +425,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
+endif
--- a/src/datatype.c
+++ b/src/datatype.c
-@@ -252,11 +252,9 @@ static struct error_record *integer_type
+@@ -267,11 +267,9 @@ static struct error_record *integer_type
struct expr **res)
{
mpz_t v;
@@ -463,7 +463,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
const char *fmt, ...)
--- a/src/evaluate.c
+++ b/src/evaluate.c
-@@ -228,9 +228,13 @@ static int expr_evaluate_value(struct ev
+@@ -232,9 +232,13 @@ static int expr_evaluate_value(struct ev
case TYPE_INTEGER:
mpz_init_bitmask(mask, ctx->ectx.len);
if (mpz_cmp((*expr)->value, mask) > 0) {
@@ -535,7 +535,7 @@ Signed-off-by: Steven Barth <cyrus@openwrt.org>
+ return -1;
+
+ len = mpz_sizeinbase(value, base);
-+ while (--prec >= len) {
++ while (prec-- > len) {
+ if (fputc('0', stdout) != '0')
+ return -1;
+
diff --git a/package/network/utils/nftables/patches/103-remove-libintl-check.patch b/package/network/utils/nftables/patches/103-remove-libintl-check.patch
deleted file mode 100644
index c52612d365..0000000000
--- a/package/network/utils/nftables/patches/103-remove-libintl-check.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -94,7 +94,7 @@ AC_SUBST(with_libreadline)
- # Checks for header files.
- AC_HEADER_STDC
- AC_HEADER_ASSERT
--AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h malloc.h \
-+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h malloc.h \
- netdb.h netinet/in.h netinet/ip.h netinet/ip6.h \
- netinet/tcp.h netinet/udp.h netinet/ip_icmp.h \
- stddef.h stdint.h stdlib.h string.h unistd.h], ,