All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency
@ 2019-03-24 12:00 Fabrice Fontaine
  2019-03-24 12:05 ` Baruch Siach
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2019-03-24 12:00 UTC (permalink / raw)
  To: buildroot

nftables support has been added since version 2.0.11 and
https://github.com/acassen/keepalived/commit/aa12175ea638912a7789e832634d7ccf80fdf48d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/keepalived/keepalived.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/keepalived/keepalived.mk b/package/keepalived/keepalived.mk
index fcdb43ce13..d93f8be057 100644
--- a/package/keepalived/keepalived.mk
+++ b/package/keepalived/keepalived.mk
@@ -46,4 +46,14 @@ else
 KEEPALIVED_CONF_OPTS += --disable-libiptc
 endif
 
+ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y)
+KEEPALIVED_DEPENDENCIES += iptables
+KEEPALIVED_CONF_OPTS += --enable-nftables
+else ifeq ($(BR2_PACKAGE_NFTABLES),y)
+KEEPALIVED_DEPENDENCIES += nftables
+KEEPALIVED_CONF_OPTS += --enable-nftables
+else
+KEEPALIVED_CONF_OPTS += --disable-nftables
+endif
+
 $(eval $(autotools-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency
  2019-03-24 12:00 [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency Fabrice Fontaine
@ 2019-03-24 12:05 ` Baruch Siach
  2019-03-25 17:54   ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2019-03-24 12:05 UTC (permalink / raw)
  To: buildroot

Hi Fabrice,

On Sun, Mar 24 2019, Fabrice Fontaine wrote:
> nftables support has been added since version 2.0.11 and
> https://github.com/acassen/keepalived/commit/aa12175ea638912a7789e832634d7ccf80fdf48d
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/keepalived/keepalived.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/package/keepalived/keepalived.mk b/package/keepalived/keepalived.mk
> index fcdb43ce13..d93f8be057 100644
> --- a/package/keepalived/keepalived.mk
> +++ b/package/keepalived/keepalived.mk
> @@ -46,4 +46,14 @@ else
>  KEEPALIVED_CONF_OPTS += --disable-libiptc
>  endif
>  
> +ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y)
> +KEEPALIVED_DEPENDENCIES += iptables
> +KEEPALIVED_CONF_OPTS += --enable-nftables

What do you need that for? Please explain in the commit log and in an
inline comment.

> +else ifeq ($(BR2_PACKAGE_NFTABLES),y)
> +KEEPALIVED_DEPENDENCIES += nftables
> +KEEPALIVED_CONF_OPTS += --enable-nftables
> +else
> +KEEPALIVED_CONF_OPTS += --disable-nftables
> +endif
> +
>  $(eval $(autotools-package))

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency
  2019-03-24 12:05 ` Baruch Siach
@ 2019-03-25 17:54   ` Thomas Petazzoni
  2019-03-25 18:22     ` Baruch Siach
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-03-25 17:54 UTC (permalink / raw)
  To: buildroot

On Sun, 24 Mar 2019 14:05:21 +0200
Baruch Siach <baruch@tkos.co.il> wrote:

> > +ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y)
> > +KEEPALIVED_DEPENDENCIES += iptables
> > +KEEPALIVED_CONF_OPTS += --enable-nftables  
> 
> What do you need that for? Please explain in the commit log and in an
> inline comment.

I'm not sure what needs to be further explained. The fact that nftables
can be provided either by the iptables package or by the nftables
package ? Baruch, could you clarify what additional explanations you
are looking for ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency
  2019-03-25 17:54   ` Thomas Petazzoni
@ 2019-03-25 18:22     ` Baruch Siach
  2019-03-25 21:22       ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2019-03-25 18:22 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, Mar 25, 2019 at 06:54:21PM +0100, Thomas Petazzoni wrote:
> On Sun, 24 Mar 2019 14:05:21 +0200
> Baruch Siach <baruch@tkos.co.il> wrote:
> 
> > > +ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y)
> > > +KEEPALIVED_DEPENDENCIES += iptables
> > > +KEEPALIVED_CONF_OPTS += --enable-nftables  
> > 
> > What do you need that for? Please explain in the commit log and in an
> > inline comment.
> 
> I'm not sure what needs to be further explained. The fact that nftables
> can be provided either by the iptables package or by the nftables
> package ? Baruch, could you clarify what additional explanations you
> are looking for ?

I had the impression that BR2_PACKAGE_IPTABLES_NFTABLES itself depends on 
BR2_PACKAGE_NFTABLES to provide nftables support. I see now that this is not 
the case. Still, the fact that --enable-nftables enables support for both 
packages looks strange. So I think that a comment that says something like 
"iptables and nftables both provide compatible API" would be nice.

BTW, what happens when both BR2_PACKAGE_NFTABLES and 
BR2_PACKAGE_IPTABLES_NFTABLES are enabled? Do both coexist? If they do, I see 
no way for keepalived to know which library to link against. iptables will 
always build before keepalived because it optionally depends on 
BR2_PACKAGE_IPTABLES anyway. But nftables might not build before keepalived in 
that case.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency
  2019-03-25 18:22     ` Baruch Siach
@ 2019-03-25 21:22       ` Arnout Vandecappelle
  2019-03-27 17:45         ` Fabrice Fontaine
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2019-03-25 21:22 UTC (permalink / raw)
  To: buildroot



On 25/03/2019 19:22, Baruch Siach wrote:
> BTW, what happens when both BR2_PACKAGE_NFTABLES and 
> BR2_PACKAGE_IPTABLES_NFTABLES are enabled? Do both coexist? If they do, I see 
> no way for keepalived to know which library to link against. iptables will 
> always build before keepalived because it optionally depends on 
> BR2_PACKAGE_IPTABLES anyway. But nftables might not build before keepalived in 
> that case.

 I guess the configure script will prefer one over the other if both are available.

 If the configure script prefers iptables over nftables, then the proposed patch
looks good to me. If, however, the configure script prefers nftables over
iptables, then the patch is wrong because the keepalived would be built
differently depending on whether nftables is built first or not.

 Regards,
 Arnout

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

* [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency
  2019-03-25 21:22       ` Arnout Vandecappelle
@ 2019-03-27 17:45         ` Fabrice Fontaine
  0 siblings, 0 replies; 6+ messages in thread
From: Fabrice Fontaine @ 2019-03-27 17:45 UTC (permalink / raw)
  To: buildroot

Dear all,

Le lun. 25 mars 2019 ? 22:22, Arnout Vandecappelle <arnout@mind.be> a ?crit :
>
>
>
> On 25/03/2019 19:22, Baruch Siach wrote:
> > BTW, what happens when both BR2_PACKAGE_NFTABLES and
> > BR2_PACKAGE_IPTABLES_NFTABLES are enabled? Do both coexist? If they do, I see
> > no way for keepalived to know which library to link against. iptables will
> > always build before keepalived because it optionally depends on
> > BR2_PACKAGE_IPTABLES anyway. But nftables might not build before keepalived in
> > that case.
>
>  I guess the configure script will prefer one over the other if both are available.
>
>  If the configure script prefers iptables over nftables, then the proposed patch
> looks good to me. If, however, the configure script prefers nftables over
> iptables, then the patch is wrong because the keepalived would be built
> differently depending on whether nftables is built first or not.
I sent a v2, nftables support in keepalived depends on libmnl and
libnftnl, it does not depend on iptables/nftables applications.
>
>  Regards,
>  Arnout
Best Regards,

Fabrice

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

end of thread, other threads:[~2019-03-27 17:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-24 12:00 [Buildroot] [PATCH 1/1] package/keepalived: add optional nftables dependency Fabrice Fontaine
2019-03-24 12:05 ` Baruch Siach
2019-03-25 17:54   ` Thomas Petazzoni
2019-03-25 18:22     ` Baruch Siach
2019-03-25 21:22       ` Arnout Vandecappelle
2019-03-27 17:45         ` Fabrice Fontaine

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.