nftables: bump to 2014-09-30, disable gmp
Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 42802
This commit is contained in:
parent
f9cccd2c14
commit
8243e57167
|
@ -7,30 +7,34 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nftables
|
||||
PKG_VERSION:=0.3+2014-09-18
|
||||
PKG_VERSION:=0.3+2014-09-30
|
||||
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:=013dbc6b0a8490ba24805a8ae35d7707183b9615
|
||||
PKG_SOURCE_VERSION:=36c8a131af6217579da582bc320e16171df0f3af
|
||||
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-debug \
|
||||
--without-libgmp \
|
||||
--without-libreadline \
|
||||
|
||||
define Package/nftables
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Firewall
|
||||
TITLE:=nftables packet filtering userspace utility
|
||||
DEPENDS:=+kmod-nft-core +kmod-nft-nat +libnftnl +libgmp
|
||||
DEPENDS:=+kmod-nft-core +kmod-nft-nat +libnftnl
|
||||
URL:=http://netfilter.org/projects/nftables/
|
||||
endef
|
||||
|
||||
|
||||
define Package/nftables/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_BUILD_DIR)/src/nft $(1)/usr/sbin/
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -3,7 +3,6 @@ PROGRAMS += nft
|
||||
nft-destdir := @sbindir@
|
||||
|
||||
nft-obj += main.o
|
||||
-nft-obj += cli.o
|
||||
nft-obj += rule.o
|
||||
nft-obj += statement.o
|
||||
nft-obj += datatype.o
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -335,7 +335,7 @@ int main(int argc, char * const *argv)
|
||||
if (scanner_read_file(scanner, filename, &internal_location) < 0)
|
||||
goto out;
|
||||
} else if (interactive) {
|
||||
- cli_init(&state);
|
||||
+ fprintf(stderr, "%s: interactive mode not supported\n", argv[0]);
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr, "%s: no command specified\n", argv[0]);
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -71,13 +71,11 @@ 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]))
|
||||
|
||||
# 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], ,
|
|
@ -0,0 +1,63 @@
|
|||
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);
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,11 @@
|
|||
--- 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], ,
|
|
@ -0,0 +1,10 @@
|
|||
--- a/Makefile.defs.in
|
||||
+++ b/Makefile.defs.in
|
||||
@@ -24,6 +24,7 @@ LDFLAGS += @LIBS@
|
||||
|
||||
CPPFLAGS += @CPPFLAGS@
|
||||
|
||||
+CFLAGS :=
|
||||
CFLAGS += @CFLAGS@ @DEFS@
|
||||
CFLAGS += -DDEFAULT_INCLUDE_PATH="\"$(confdir)\""
|
||||
CFLAGS += -include config.h
|
Loading…
Reference in New Issue