All of lore.kernel.org
 help / color / mirror / Atom feed
* [iptables PATCH] configure: make libmnl and libnftnl hard requirements
@ 2016-04-26 19:27 Giuseppe Longo
  2016-04-26 21:20 ` Jan Engelhardt
  2016-04-27 17:09 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Giuseppe Longo @ 2016-04-26 19:27 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Giuseppe Longo

From: Giuseppe Longo <giuseppelng@gmail.com>

Iptables building is broken if either libmnl orlibnftnl
is not installed on the system.

Configure script actually checks if libmnl and libnftnl are installed,
but doesn't exit if they are not.

Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
 configure.ac | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/configure.ac b/configure.ac
index 12bffa9..b170add 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,8 +122,26 @@ AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
 if test "x$enable_nftables" = "xyes"; then
 	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
 
+	if test "$mnl" = 0;
+	then
+		echo "*** Error: No suitable libmnl found. ***"
+		echo "    Please install the 'libmnl' package"
+		echo "    Or consider --disable-nftables to skip"
+		echo "    iptables-compat over nftables support."
+		exit 1
+	fi
+
 	PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0.5], [nftables=1], [nftables=0])
 
+	if test "$nftables" = 0;
+	then
+		echo "*** Error: no suitable libnftnl found. ***"
+		echo "    Please install the 'libnftnl' package"
+		echo "    Or consider --disable-nftables to skip"
+		echo "    iptables-compat over nftables support."
+		exit 1
+	fi
+
 	AM_PROG_LEX
 	AC_PROG_YACC
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [iptables PATCH] configure: make libmnl and libnftnl hard requirements
  2016-04-26 19:27 [iptables PATCH] configure: make libmnl and libnftnl hard requirements Giuseppe Longo
@ 2016-04-26 21:20 ` Jan Engelhardt
  2016-04-26 21:37   ` Pablo Neira Ayuso
  2016-04-27 17:09 ` Pablo Neira Ayuso
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2016-04-26 21:20 UTC (permalink / raw)
  To: Giuseppe Longo; +Cc: netfilter-devel


On Tuesday 2016-04-26 21:27, Giuseppe Longo wrote:
>index 12bffa9..b170add 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -122,8 +122,26 @@ AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
> if test "x$enable_nftables" = "xyes"; then
> 	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
> 
>+	if test "$mnl" = 0;
>+	then
>+		echo "*** Error: No suitable libmnl found. ***"
>+		echo "    Please install the 'libmnl' package"
>+		echo "    Or consider --disable-nftables to skip"
>+		echo "    iptables-compat over nftables support."
>+		exit 1
>+	fi

As told you before, I find this unnecessary large.
Consider this instead.


>From afcbd592265af0c3a65c21e8f23e1c2f5a348396 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 26 Apr 2016 23:18:26 +0200
Subject: [PATCH] build: hard-require libmnl, libnftnl for iptables-nft

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 12bffa9..e4eafc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,9 +120,10 @@ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
 AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
 
 if test "x$enable_nftables" = "xyes"; then
-	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
-
-	PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0.5], [nftables=1], [nftables=0])
+	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0])
+	PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0.5])
+	mnl=1
+	nftables=1
 
 	AM_PROG_LEX
 	AC_PROG_YACC
-- 
2.6.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [iptables PATCH] configure: make libmnl and libnftnl hard requirements
  2016-04-26 21:20 ` Jan Engelhardt
@ 2016-04-26 21:37   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-26 21:37 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Giuseppe Longo, netfilter-devel

On Tue, Apr 26, 2016 at 11:20:19PM +0200, Jan Engelhardt wrote:
> 
> On Tuesday 2016-04-26 21:27, Giuseppe Longo wrote:
> >index 12bffa9..b170add 100644
> >--- a/configure.ac
> >+++ b/configure.ac
> >@@ -122,8 +122,26 @@ AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
> > if test "x$enable_nftables" = "xyes"; then
> > 	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
> > 
> >+	if test "$mnl" = 0;
> >+	then
> >+		echo "*** Error: No suitable libmnl found. ***"
> >+		echo "    Please install the 'libmnl' package"
> >+		echo "    Or consider --disable-nftables to skip"
> >+		echo "    iptables-compat over nftables support."
> >+		exit 1
> >+	fi
> 
> As told you before, I find this unnecessary large.
> Consider this instead.
> 
> 
> From afcbd592265af0c3a65c21e8f23e1c2f5a348396 Mon Sep 17 00:00:00 2001
> From: Jan Engelhardt <jengelh@inai.de>
> Date: Tue, 26 Apr 2016 23:18:26 +0200
> Subject: [PATCH] build: hard-require libmnl, libnftnl for iptables-nft
> 
> Signed-off-by: Jan Engelhardt <jengelh@inai.de>
> ---
>  configure.ac | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 12bffa9..e4eafc6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -120,9 +120,10 @@ PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
>  AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
>  
>  if test "x$enable_nftables" = "xyes"; then
> -	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
> -
> -	PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0.5], [nftables=1], [nftables=0])
> +	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0])
> +	PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0.5])
> +	mnl=1
> +	nftables=1

This doesn't give a clue to users on what they can actually do.

I find Giuseppe's patch more informative.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [iptables PATCH] configure: make libmnl and libnftnl hard requirements
  2016-04-26 19:27 [iptables PATCH] configure: make libmnl and libnftnl hard requirements Giuseppe Longo
  2016-04-26 21:20 ` Jan Engelhardt
@ 2016-04-27 17:09 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-27 17:09 UTC (permalink / raw)
  To: Giuseppe Longo; +Cc: netfilter-devel

On Tue, Apr 26, 2016 at 09:27:58PM +0200, Giuseppe Longo wrote:
> From: Giuseppe Longo <giuseppelng@gmail.com>
> 
> Iptables building is broken if either libmnl orlibnftnl
> is not installed on the system.
> 
> Configure script actually checks if libmnl and libnftnl are installed,
> but doesn't exit if they are not.

Applied, thanks Giuseppe.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-27 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 19:27 [iptables PATCH] configure: make libmnl and libnftnl hard requirements Giuseppe Longo
2016-04-26 21:20 ` Jan Engelhardt
2016-04-26 21:37   ` Pablo Neira Ayuso
2016-04-27 17:09 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.