Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/xtables-addons: drop XTABLES_ADDONS_DISABLE_GEOIP_HELPERS
@ 2023-02-23 16:07 Fabrice Fontaine
  2023-02-23 22:58 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2023-02-23 16:07 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Drop XTABLES_ADDONS_DISABLE_GEOIP_HELPERS which raises the following
build failure (probably since the addition of the package):

make[3]: *** No rule to make target '/xt_geoip_query', needed by 'all-am'.  Stop.

unzip and perl don't seem to be needed

Fixes:
 - http://autobuild.buildroot.org/results/f2d596b510f027b94a6b1fad10c363922c50cbec

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/xtables-addons/xtables-addons.mk | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/package/xtables-addons/xtables-addons.mk b/package/xtables-addons/xtables-addons.mk
index 77dcfd741c..b656ab0e81 100644
--- a/package/xtables-addons/xtables-addons.mk
+++ b/package/xtables-addons/xtables-addons.mk
@@ -16,12 +16,6 @@ XTABLES_ADDONS_CONF_OPTS = \
 	--with-xtables="$(STAGING_DIR)/usr" \
 	--with-xtlibdir="/usr/lib/xtables"
 
-# geoip helpers need perl with modules and unzip so disable
-define XTABLES_ADDONS_DISABLE_GEOIP_HELPERS
-	$(SED) 's/ geoip//' $(@D)/Makefile.in
-endef
-XTABLES_ADDONS_POST_PATCH_HOOKS += XTABLES_ADDONS_DISABLE_GEOIP_HELPERS
-
 define XTABLES_ADDONS_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS)
 endef
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/xtables-addons: drop XTABLES_ADDONS_DISABLE_GEOIP_HELPERS
  2023-02-23 16:07 [Buildroot] [PATCH 1/1] package/xtables-addons: drop XTABLES_ADDONS_DISABLE_GEOIP_HELPERS Fabrice Fontaine
@ 2023-02-23 22:58 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-23 22:58 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

Hello Fabrice,

On Thu, 23 Feb 2023 17:07:14 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Drop XTABLES_ADDONS_DISABLE_GEOIP_HELPERS which raises the following
> build failure (probably since the addition of the package):

No, it is not since the addition of the package.

Upstream commit 7ad55ad6210d450521664f64453f854b3ba13d8d looks like this:

commit 7ad55ad6210d450521664f64453f854b3ba13d8d
Author: Jan Engelhardt <jengelh@inai.de>
Date:   Tue Aug 16 10:44:56 2022 +0200

    build: eliminate geoip/ make recursion

diff --git a/Makefile.am b/Makefile.am
index c051d53..0518bb6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,16 @@
 # -*- Makefile -*-
 
 ACLOCAL_AMFLAGS  = -I m4
-SUBDIRS          = extensions extensions/ACCOUNT extensions/pknock geoip
-
-pkglibexec_SCRIPTS = asn/xt_asn_build asn/xt_asn_dl asn/xt_asn_fetch
-man_MANS = xtables-addons.8 asn/xt_asn_build.1 asn/xt_asn_dl.1
+SUBDIRS          = extensions extensions/ACCOUNT extensions/pknock
+
+bin_SCRIPTS = geoip/xt_geoip_query
+pkglibexec_SCRIPTS = asn/xt_asn_build asn/xt_asn_dl asn/xt_asn_fetch \
+       geoip/xt_geoip_build geoip/xt_geoip_build_maxmind \
+       geoip/xt_geoip_dl geoip/xt_geoip_dl_maxmind
+man_MANS = xtables-addons.8 asn/xt_asn_build.1 asn/xt_asn_dl.1 \
+       geoip/xt_geoip_build.1 geoip/xt_geoip_dl.1 \
+       geoip/xt_geoip_build_maxmind.1 geoip/xt_geoip_dl_maxmind.1 \
+       geoip/xt_geoip_query.1
 
 .PHONY: FORCE
 FORCE:

So up to this commit (which was part of the xtables-addons v3.22
release), the $(SED) invocation was working fine to drop geoip from the
SUBDIRS variable.

Now that they have removed the recursive make, replace " geoip" with
nothing causes:

bin_SCRIPTS = geoip/xt_geoip_query

to become:

bin_SCRIPTS = xt_geoip_query

causing the build breakage. So it's actually Buildroot commit
53f2999edfa5e67923d4d8a102c15fa3200e089c (from you!) that broke this :-)

> make[3]: *** No rule to make target '/xt_geoip_query', needed by 'all-am'.  Stop.
> 
> unzip and perl don't seem to be needed

They are, but not at build time. The comment was referring to the fact
that they are needed at runtime: the scripts in the geoip/ subdir are
written in Perl, and one of them uses unzip. So practically speaking,
installing them on the target is useless because xtables-addons does
not force installing Perl on the target.

However, the package anyway also installs asn/xt_asn_fetch and
asn/xt_asn_build which are also written in Perl.

So perhaps what needs to be done is simply to remove these scripts in a
POST_INSTALL_TARGET_HOOKS ? (And indeed drop the SED expression as you
did).

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-02-23 22:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 16:07 [Buildroot] [PATCH 1/1] package/xtables-addons: drop XTABLES_ADDONS_DISABLE_GEOIP_HELPERS Fabrice Fontaine
2023-02-23 22:58 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox