All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
@ 2021-07-16 17:20 Fabrice Fontaine
  2021-07-17  9:11 ` Yann E. MORIN
  0 siblings, 1 reply; 10+ messages in thread
From: Fabrice Fontaine @ 2021-07-16 17:20 UTC (permalink / raw)
  To: buildroot

Build with libmaxminddb is broken since bump to version 3.0.5 in commit
464d0be380c84ac7c3f1684e49153c3868280d7e because of
https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788

So revert this commit until upstream answer to comment to
https://github.com/SpiderLabs/ModSecurity/issues/2131

Fixes:
 - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...Revert-Fix-maxminddb-link-on-FreeBSD.patch | 28 +++++++++++++++++++
 package/libmodsecurity/libmodsecurity.mk      |  2 ++
 2 files changed, 30 insertions(+)
 create mode 100644 package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch

diff --git a/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
new file mode 100644
index 0000000000..9608e3d935
--- /dev/null
+++ b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
@@ -0,0 +1,28 @@
+From 6737dc133cb4811a000c02b4e0a92b72f0b220ee Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 16 Jul 2021 19:12:51 +0200
+Subject: [PATCH] Revert "Fix maxminddb link on FreeBSD"
+
+This reverts commit 785958f9b5089b918c7d054cbcc2fe4a3c7b3788.
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ build/libmaxmind.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/libmaxmind.m4 b/build/libmaxmind.m4
+index 656fc250..02820b5a 100644
+--- a/build/libmaxmind.m4
++++ b/build/libmaxmind.m4
+@@ -10,7 +10,7 @@ dnl  MAXMIND_VERSION
+ AC_DEFUN([PROG_MAXMIND], [
+ 
+ # Possible names for the maxmind library/package (pkg-config)
+-MAXMIND_POSSIBLE_LIB_NAMES="maxminddb maxmind"
++MAXMIND_POSSIBLE_LIB_NAMES="libmaxminddb maxminddb maxmind"
+ 
+ # Possible extensions for the library
+ MAXMIND_POSSIBLE_EXTENSIONS="so la sl dll dylib"
+-- 
+2.30.2
+
diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
index b2637257b6..66e7e522a1 100644
--- a/package/libmodsecurity/libmodsecurity.mk
+++ b/package/libmodsecurity/libmodsecurity.mk
@@ -12,6 +12,8 @@ LIBMODSECURITY_LICENSE = Apache-2.0
 LIBMODSECURITY_LICENSE_FILES = LICENSE
 LIBMODSECURITY_CPE_ID_VENDOR = trustwave
 LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
+# We're patching build/libmaxmind.m4
+LIBMODSECURITY_AUTORECONF = YES
 
 LIBMODSECURITY_DEPENDENCIES = pcre
 LIBMODSECURITY_CONF_OPTS = \
-- 
2.30.2

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-16 17:20 [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb Fabrice Fontaine
@ 2021-07-17  9:11 ` Yann E. MORIN
  2021-07-17 19:33   ` Fabrice Fontaine
  0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2021-07-17  9:11 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2021-07-16 19:20 +0200, Fabrice Fontaine spake thusly:
> Build with libmaxminddb is broken since bump to version 3.0.5 in commit
> 464d0be380c84ac7c3f1684e49153c3868280d7e because of
> https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788
> 
> So revert this commit until upstream answer to comment to
> https://github.com/SpiderLabs/ModSecurity/issues/2131
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

I was about to just push this, but the autoreconf spews out a lot of
warning for out-of-tree builds:

    >>> libmodsecurity 3.0.5 Autoreconfiguring
    fatal: not a git repository (or any of the parent directories): .git
    [...x10...]
    fatal: not a git repository (or any of the parent directories): .git
    libtoolize: putting auxiliary files in '.'.
    libtoolize: copying file './ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build'.
    libtoolize: copying file 'build/libtool.m4'
    libtoolize: copying file 'build/ltoptions.m4'
    libtoolize: copying file 'build/ltsugar.m4'
    libtoolize: copying file 'build/ltversion.m4'
    libtoolize: copying file 'build/lt~obsolete.m4'
    fatal: not a git repository (or any of the parent directories): .git
    [...x18...]
    fatal: not a git repository (or any of the parent directories): .git
    configure.ac:50: installing './compile'
    configure.ac:45: installing './missing'
    examples/multiprocess_c/Makefile.am: installing './depcomp'

Not sure yet what causes that, but this is not clean, and I'd prefer to
know that it has no impact on libmodsecurity build.

Could you please look into that?

Regards,
Yann E. MORIN.

> ---
>  ...Revert-Fix-maxminddb-link-on-FreeBSD.patch | 28 +++++++++++++++++++
>  package/libmodsecurity/libmodsecurity.mk      |  2 ++
>  2 files changed, 30 insertions(+)
>  create mode 100644 package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> 
> diff --git a/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> new file mode 100644
> index 0000000000..9608e3d935
> --- /dev/null
> +++ b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> @@ -0,0 +1,28 @@
> +From 6737dc133cb4811a000c02b4e0a92b72f0b220ee Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Fri, 16 Jul 2021 19:12:51 +0200
> +Subject: [PATCH] Revert "Fix maxminddb link on FreeBSD"
> +
> +This reverts commit 785958f9b5089b918c7d054cbcc2fe4a3c7b3788.
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + build/libmaxmind.m4 | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/build/libmaxmind.m4 b/build/libmaxmind.m4
> +index 656fc250..02820b5a 100644
> +--- a/build/libmaxmind.m4
> ++++ b/build/libmaxmind.m4
> +@@ -10,7 +10,7 @@ dnl  MAXMIND_VERSION
> + AC_DEFUN([PROG_MAXMIND], [
> + 
> + # Possible names for the maxmind library/package (pkg-config)
> +-MAXMIND_POSSIBLE_LIB_NAMES="maxminddb maxmind"
> ++MAXMIND_POSSIBLE_LIB_NAMES="libmaxminddb maxminddb maxmind"
> + 
> + # Possible extensions for the library
> + MAXMIND_POSSIBLE_EXTENSIONS="so la sl dll dylib"
> +-- 
> +2.30.2
> +
> diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> index b2637257b6..66e7e522a1 100644
> --- a/package/libmodsecurity/libmodsecurity.mk
> +++ b/package/libmodsecurity/libmodsecurity.mk
> @@ -12,6 +12,8 @@ LIBMODSECURITY_LICENSE = Apache-2.0
>  LIBMODSECURITY_LICENSE_FILES = LICENSE
>  LIBMODSECURITY_CPE_ID_VENDOR = trustwave
>  LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> +# We're patching build/libmaxmind.m4
> +LIBMODSECURITY_AUTORECONF = YES
>  
>  LIBMODSECURITY_DEPENDENCIES = pcre
>  LIBMODSECURITY_CONF_OPTS = \
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-17  9:11 ` Yann E. MORIN
@ 2021-07-17 19:33   ` Fabrice Fontaine
  2021-07-17 20:33     ` Yann E. MORIN
  0 siblings, 1 reply; 10+ messages in thread
From: Fabrice Fontaine @ 2021-07-17 19:33 UTC (permalink / raw)
  To: buildroot

Yann,

Le sam. 17 juil. 2021 ? 11:11, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>
> Fabrice, All,
>
> On 2021-07-16 19:20 +0200, Fabrice Fontaine spake thusly:
> > Build with libmaxminddb is broken since bump to version 3.0.5 in commit
> > 464d0be380c84ac7c3f1684e49153c3868280d7e because of
> > https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788
> >
> > So revert this commit until upstream answer to comment to
> > https://github.com/SpiderLabs/ModSecurity/issues/2131
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
> I was about to just push this, but the autoreconf spews out a lot of
> warning for out-of-tree builds:
>
>     >>> libmodsecurity 3.0.5 Autoreconfiguring
>     fatal: not a git repository (or any of the parent directories): .git
>     [...x10...]
>     fatal: not a git repository (or any of the parent directories): .git
>     libtoolize: putting auxiliary files in '.'.
>     libtoolize: copying file './ltmain.sh'
>     libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build'.
>     libtoolize: copying file 'build/libtool.m4'
>     libtoolize: copying file 'build/ltoptions.m4'
>     libtoolize: copying file 'build/ltsugar.m4'
>     libtoolize: copying file 'build/ltversion.m4'
>     libtoolize: copying file 'build/lt~obsolete.m4'
>     fatal: not a git repository (or any of the parent directories): .git
>     [...x18...]
>     fatal: not a git repository (or any of the parent directories): .git
>     configure.ac:50: installing './compile'
>     configure.ac:45: installing './missing'
>     examples/multiprocess_c/Makefile.am: installing './depcomp'
>
> Not sure yet what causes that, but this is not clean, and I'd prefer to
> know that it has no impact on libmodsecurity build.
>
> Could you please look into that?
I wasn't able to reproduce this issue with in-tree build:

>>> libmodsecurity 3.0.5 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find
/home/fabrice/buildroot/output/build/libmodsecurity-3.0.5 -name
$file); do cp support/gnuconfig/$file $i; done; done
>>> libmodsecurity 3.0.5 Configuring
>>> libmodsecurity 3.0.5 Autoreconfiguring
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build'.
libtoolize: copying file 'build/libtool.m4'
libtoolize: copying file 'build/ltoptions.m4'
libtoolize: copying file 'build/ltsugar.m4'
libtoolize: copying file 'build/ltversion.m4'
libtoolize: copying file 'build/lt~obsolete.m4'
configure.ac:50: installing './compile'
configure.ac:45: installing './missing'
examples/multiprocess_c/Makefile.am: installing './depcomp'

I assume that those warnings because "git log" is used in configure.ac
to retrieve MSC_GIT_HASH  and SECLANG_TEST_VERSION but this should
have no effect on libmodsecurity behavior.
>
> Regards,
> Yann E. MORIN.
>
> > ---
> >  ...Revert-Fix-maxminddb-link-on-FreeBSD.patch | 28 +++++++++++++++++++
> >  package/libmodsecurity/libmodsecurity.mk      |  2 ++
> >  2 files changed, 30 insertions(+)
> >  create mode 100644 package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> >
> > diff --git a/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > new file mode 100644
> > index 0000000000..9608e3d935
> > --- /dev/null
> > +++ b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > @@ -0,0 +1,28 @@
> > +From 6737dc133cb4811a000c02b4e0a92b72f0b220ee Mon Sep 17 00:00:00 2001
> > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +Date: Fri, 16 Jul 2021 19:12:51 +0200
> > +Subject: [PATCH] Revert "Fix maxminddb link on FreeBSD"
> > +
> > +This reverts commit 785958f9b5089b918c7d054cbcc2fe4a3c7b3788.
> > +
> > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +---
> > + build/libmaxmind.m4 | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/build/libmaxmind.m4 b/build/libmaxmind.m4
> > +index 656fc250..02820b5a 100644
> > +--- a/build/libmaxmind.m4
> > ++++ b/build/libmaxmind.m4
> > +@@ -10,7 +10,7 @@ dnl  MAXMIND_VERSION
> > + AC_DEFUN([PROG_MAXMIND], [
> > +
> > + # Possible names for the maxmind library/package (pkg-config)
> > +-MAXMIND_POSSIBLE_LIB_NAMES="maxminddb maxmind"
> > ++MAXMIND_POSSIBLE_LIB_NAMES="libmaxminddb maxminddb maxmind"
> > +
> > + # Possible extensions for the library
> > + MAXMIND_POSSIBLE_EXTENSIONS="so la sl dll dylib"
> > +--
> > +2.30.2
> > +
> > diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> > index b2637257b6..66e7e522a1 100644
> > --- a/package/libmodsecurity/libmodsecurity.mk
> > +++ b/package/libmodsecurity/libmodsecurity.mk
> > @@ -12,6 +12,8 @@ LIBMODSECURITY_LICENSE = Apache-2.0
> >  LIBMODSECURITY_LICENSE_FILES = LICENSE
> >  LIBMODSECURITY_CPE_ID_VENDOR = trustwave
> >  LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> > +# We're patching build/libmaxmind.m4
> > +LIBMODSECURITY_AUTORECONF = YES
> >
> >  LIBMODSECURITY_DEPENDENCIES = pcre
> >  LIBMODSECURITY_CONF_OPTS = \
> > --
> > 2.30.2
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-17 19:33   ` Fabrice Fontaine
@ 2021-07-17 20:33     ` Yann E. MORIN
  2021-07-18  7:55       ` Fabrice Fontaine
  2021-07-18 12:06       ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Yann E. MORIN @ 2021-07-17 20:33 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2021-07-17 21:33 +0200, Fabrice Fontaine spake thusly:
> Le sam. 17 juil. 2021 ? 11:11, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > On 2021-07-16 19:20 +0200, Fabrice Fontaine spake thusly:
> > > Build with libmaxminddb is broken since bump to version 3.0.5 in commit
> > > 464d0be380c84ac7c3f1684e49153c3868280d7e because of
> > > https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788
> > >
> > > So revert this commit until upstream answer to comment to
> > > https://github.com/SpiderLabs/ModSecurity/issues/2131
> > >
> > > Fixes:
> > >  - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c
> > >
> > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > I was about to just push this, but the autoreconf spews out a lot of
> > warning for out-of-tree builds:
> >     >>> libmodsecurity 3.0.5 Autoreconfiguring
> >     fatal: not a git repository (or any of the parent directories): .git
[--SNIP--]
> I wasn't able to reproduce this issue with in-tree build:

Not surprising, because it then uses the git tree of Buildroot. And that
issue would also happen with a release tarball of Buildroot, as there is
no git tree there either...

[--SNIP--]
> I assume that those warnings because "git log" is used in configure.ac
> to retrieve MSC_GIT_HASH  and SECLANG_TEST_VERSION

  - MSC_GIT_HASH is used nowhere

  - LIBINJECTION_VERSION is onle used to report the version at the end
    of configure

  - SECLANG_TEST_VERSION ditto

  - msc_version_git is used once, to set MSC_GIT_VERSION

  - MSC_GIT_VERSION is AC_SUBSTituted, but is only ever used to report
    the version at the end of configure.

> but this should
> have no effect on libmodsecurity behavior.

Still, this is very unclean to have those warnings... :-(

    diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
    index b2637257b6..10338dad7c 100644
    --- a/package/libmodsecurity/libmodsecurity.mk
    +++ b/package/libmodsecurity/libmodsecurity.mk
    @@ -14,6 +14,24 @@ LIBMODSECURITY_CPE_ID_VENDOR = trustwave
     LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
     
     LIBMODSECURITY_DEPENDENCIES = pcre
    +
    +# configure.ac will call git to get various version strings, from
    +# libmodsecurity itself, but also from bundled dependencies, just
    +# for the sake of siplaying them at the end of configure.
    +# Fake a git that returns the version for libmodescurity, to quiesce
    +# warnings...
    +define LIBMODSECURITY_FAKE_GIT
    +	$(Q)mkdir -p $(@D)/.buildroot
    +	$(Q)printf '#!/usr/bin/env sh\necho "$(LIBMODSECURITY_VERSION)"\n' \
    +		>$(@D)/.buildroot/git
    +	@(Q)chmod 755 $(@D)/.buildroot/git
    +endef
    +LIBMODSECURITY_POST_EXTRACT_HOOKS += LIBMODSECURITY_FAKE_GIT
    +
    +# 0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
    +LIBMODSECURITY_AUTORECONF = YES
    +LIBMODSECURITY_AUTORECONF_ENV = PATH="$(@D)/.buildroot:$(BR_PATH)"
    +
     LIBMODSECURITY_CONF_OPTS = \
     	--with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
     	--disable-examples \

Regards,
Yann E. MORIN.

> > Regards,
> > Yann E. MORIN.
> >
> > > ---
> > >  ...Revert-Fix-maxminddb-link-on-FreeBSD.patch | 28 +++++++++++++++++++
> > >  package/libmodsecurity/libmodsecurity.mk      |  2 ++
> > >  2 files changed, 30 insertions(+)
> > >  create mode 100644 package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > >
> > > diff --git a/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > > new file mode 100644
> > > index 0000000000..9608e3d935
> > > --- /dev/null
> > > +++ b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > > @@ -0,0 +1,28 @@
> > > +From 6737dc133cb4811a000c02b4e0a92b72f0b220ee Mon Sep 17 00:00:00 2001
> > > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > +Date: Fri, 16 Jul 2021 19:12:51 +0200
> > > +Subject: [PATCH] Revert "Fix maxminddb link on FreeBSD"
> > > +
> > > +This reverts commit 785958f9b5089b918c7d054cbcc2fe4a3c7b3788.
> > > +
> > > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > +---
> > > + build/libmaxmind.m4 | 2 +-
> > > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > > +
> > > +diff --git a/build/libmaxmind.m4 b/build/libmaxmind.m4
> > > +index 656fc250..02820b5a 100644
> > > +--- a/build/libmaxmind.m4
> > > ++++ b/build/libmaxmind.m4
> > > +@@ -10,7 +10,7 @@ dnl  MAXMIND_VERSION
> > > + AC_DEFUN([PROG_MAXMIND], [
> > > +
> > > + # Possible names for the maxmind library/package (pkg-config)
> > > +-MAXMIND_POSSIBLE_LIB_NAMES="maxminddb maxmind"
> > > ++MAXMIND_POSSIBLE_LIB_NAMES="libmaxminddb maxminddb maxmind"
> > > +
> > > + # Possible extensions for the library
> > > + MAXMIND_POSSIBLE_EXTENSIONS="so la sl dll dylib"
> > > +--
> > > +2.30.2
> > > +
> > > diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> > > index b2637257b6..66e7e522a1 100644
> > > --- a/package/libmodsecurity/libmodsecurity.mk
> > > +++ b/package/libmodsecurity/libmodsecurity.mk
> > > @@ -12,6 +12,8 @@ LIBMODSECURITY_LICENSE = Apache-2.0
> > >  LIBMODSECURITY_LICENSE_FILES = LICENSE
> > >  LIBMODSECURITY_CPE_ID_VENDOR = trustwave
> > >  LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> > > +# We're patching build/libmaxmind.m4
> > > +LIBMODSECURITY_AUTORECONF = YES
> > >
> > >  LIBMODSECURITY_DEPENDENCIES = pcre
> > >  LIBMODSECURITY_CONF_OPTS = \
> > > --
> > > 2.30.2
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/buildroot
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'
> Best Regards,
> 
> Fabrice
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-17 20:33     ` Yann E. MORIN
@ 2021-07-18  7:55       ` Fabrice Fontaine
  2021-07-18  8:08         ` Yann E. MORIN
  2021-07-18 12:06       ` Thomas Petazzoni
  1 sibling, 1 reply; 10+ messages in thread
From: Fabrice Fontaine @ 2021-07-18  7:55 UTC (permalink / raw)
  To: buildroot

Yann,

Le sam. 17 juil. 2021 ? 22:33, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>
> Fabrice, All,
>
> On 2021-07-17 21:33 +0200, Fabrice Fontaine spake thusly:
> > Le sam. 17 juil. 2021 ? 11:11, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > > On 2021-07-16 19:20 +0200, Fabrice Fontaine spake thusly:
> > > > Build with libmaxminddb is broken since bump to version 3.0.5 in commit
> > > > 464d0be380c84ac7c3f1684e49153c3868280d7e because of
> > > > https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788
> > > >
> > > > So revert this commit until upstream answer to comment to
> > > > https://github.com/SpiderLabs/ModSecurity/issues/2131
> > > >
> > > > Fixes:
> > > >  - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c
> > > >
> > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > I was about to just push this, but the autoreconf spews out a lot of
> > > warning for out-of-tree builds:
> > >     >>> libmodsecurity 3.0.5 Autoreconfiguring
> > >     fatal: not a git repository (or any of the parent directories): .git
> [--SNIP--]
> > I wasn't able to reproduce this issue with in-tree build:
>
> Not surprising, because it then uses the git tree of Buildroot. And that
> issue would also happen with a release tarball of Buildroot, as there is
> no git tree there either...
>
> [--SNIP--]
> > I assume that those warnings because "git log" is used in configure.ac
> > to retrieve MSC_GIT_HASH  and SECLANG_TEST_VERSION
>
>   - MSC_GIT_HASH is used nowhere
>
>   - LIBINJECTION_VERSION is onle used to report the version at the end
>     of configure
>
>   - SECLANG_TEST_VERSION ditto
>
>   - msc_version_git is used once, to set MSC_GIT_VERSION
>
>   - MSC_GIT_VERSION is AC_SUBSTituted, but is only ever used to report
>     the version at the end of configure.
>
> > but this should
> > have no effect on libmodsecurity behavior.
>
> Still, this is very unclean to have those warnings... :-(
Agreed, but then what would be the best option?
 - Remove autoreconf and patch directly the configure file?
 - Set LIBMODSECURITY_GIT_SUBMODULE to YES and retrieve the full
libmodsecurity git tree?
>
>     diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
>     index b2637257b6..10338dad7c 100644
>     --- a/package/libmodsecurity/libmodsecurity.mk
>     +++ b/package/libmodsecurity/libmodsecurity.mk
>     @@ -14,6 +14,24 @@ LIBMODSECURITY_CPE_ID_VENDOR = trustwave
>      LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
>
>      LIBMODSECURITY_DEPENDENCIES = pcre
>     +
>     +# configure.ac will call git to get various version strings, from
>     +# libmodsecurity itself, but also from bundled dependencies, just
>     +# for the sake of siplaying them at the end of configure.
>     +# Fake a git that returns the version for libmodescurity, to quiesce
>     +# warnings...
>     +define LIBMODSECURITY_FAKE_GIT
>     +   $(Q)mkdir -p $(@D)/.buildroot
>     +   $(Q)printf '#!/usr/bin/env sh\necho "$(LIBMODSECURITY_VERSION)"\n' \
>     +           >$(@D)/.buildroot/git
>     +   @(Q)chmod 755 $(@D)/.buildroot/git
>     +endef
>     +LIBMODSECURITY_POST_EXTRACT_HOOKS += LIBMODSECURITY_FAKE_GIT
>     +
>     +# 0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
>     +LIBMODSECURITY_AUTORECONF = YES
>     +LIBMODSECURITY_AUTORECONF_ENV = PATH="$(@D)/.buildroot:$(BR_PATH)"
>     +
>      LIBMODSECURITY_CONF_OPTS = \
>         --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
>         --disable-examples \
>
> Regards,
> Yann E. MORIN.
>
> > > Regards,
> > > Yann E. MORIN.
> > >
> > > > ---
> > > >  ...Revert-Fix-maxminddb-link-on-FreeBSD.patch | 28 +++++++++++++++++++
> > > >  package/libmodsecurity/libmodsecurity.mk      |  2 ++
> > > >  2 files changed, 30 insertions(+)
> > > >  create mode 100644 package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > > >
> > > > diff --git a/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > > > new file mode 100644
> > > > index 0000000000..9608e3d935
> > > > --- /dev/null
> > > > +++ b/package/libmodsecurity/0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > > > @@ -0,0 +1,28 @@
> > > > +From 6737dc133cb4811a000c02b4e0a92b72f0b220ee Mon Sep 17 00:00:00 2001
> > > > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > > +Date: Fri, 16 Jul 2021 19:12:51 +0200
> > > > +Subject: [PATCH] Revert "Fix maxminddb link on FreeBSD"
> > > > +
> > > > +This reverts commit 785958f9b5089b918c7d054cbcc2fe4a3c7b3788.
> > > > +
> > > > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > > +---
> > > > + build/libmaxmind.m4 | 2 +-
> > > > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > +
> > > > +diff --git a/build/libmaxmind.m4 b/build/libmaxmind.m4
> > > > +index 656fc250..02820b5a 100644
> > > > +--- a/build/libmaxmind.m4
> > > > ++++ b/build/libmaxmind.m4
> > > > +@@ -10,7 +10,7 @@ dnl  MAXMIND_VERSION
> > > > + AC_DEFUN([PROG_MAXMIND], [
> > > > +
> > > > + # Possible names for the maxmind library/package (pkg-config)
> > > > +-MAXMIND_POSSIBLE_LIB_NAMES="maxminddb maxmind"
> > > > ++MAXMIND_POSSIBLE_LIB_NAMES="libmaxminddb maxminddb maxmind"
> > > > +
> > > > + # Possible extensions for the library
> > > > + MAXMIND_POSSIBLE_EXTENSIONS="so la sl dll dylib"
> > > > +--
> > > > +2.30.2
> > > > +
> > > > diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> > > > index b2637257b6..66e7e522a1 100644
> > > > --- a/package/libmodsecurity/libmodsecurity.mk
> > > > +++ b/package/libmodsecurity/libmodsecurity.mk
> > > > @@ -12,6 +12,8 @@ LIBMODSECURITY_LICENSE = Apache-2.0
> > > >  LIBMODSECURITY_LICENSE_FILES = LICENSE
> > > >  LIBMODSECURITY_CPE_ID_VENDOR = trustwave
> > > >  LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> > > > +# We're patching build/libmaxmind.m4
> > > > +LIBMODSECURITY_AUTORECONF = YES
> > > >
> > > >  LIBMODSECURITY_DEPENDENCIES = pcre
> > > >  LIBMODSECURITY_CONF_OPTS = \
> > > > --
> > > > 2.30.2
> > > >
> > > > _______________________________________________
> > > > buildroot mailing list
> > > > buildroot at busybox.net
> > > > http://lists.busybox.net/mailman/listinfo/buildroot
> > >
> > > --
> > > .-----------------.--------------------.------------------.--------------------.
> > > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > > '------------------------------^-------^------------------^--------------------'
> > Best Regards,
> >
> > Fabrice
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-18  7:55       ` Fabrice Fontaine
@ 2021-07-18  8:08         ` Yann E. MORIN
  2021-07-18  8:33           ` Fabrice Fontaine
  0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2021-07-18  8:08 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2021-07-18 09:55 +0200, Fabrice Fontaine spake thusly:
> Le sam. 17 juil. 2021 ? 22:33, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > On 2021-07-17 21:33 +0200, Fabrice Fontaine spake thusly:
> > > Le sam. 17 juil. 2021 ? 11:11, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > > > On 2021-07-16 19:20 +0200, Fabrice Fontaine spake thusly:
> > > > > Build with libmaxminddb is broken since bump to version 3.0.5 in commit
> > > > > 464d0be380c84ac7c3f1684e49153c3868280d7e because of
> > > > > https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788
> > > > >
> > > > > So revert this commit until upstream answer to comment to
> > > > > https://github.com/SpiderLabs/ModSecurity/issues/2131
> > > > >
> > > > > Fixes:
> > > > >  - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c
> > > > >
> > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > > I was about to just push this, but the autoreconf spews out a lot of
> > > > warning for out-of-tree builds:
[--SNIP--]
> > Still, this is very unclean to have those warnings... :-(
> Agreed, but then what would be the best option?
>  - Remove autoreconf and patch directly the configure file?
>  - Set LIBMODSECURITY_GIT_SUBMODULE to YES and retrieve the full

Well, with the little patch I proposed below, this provides a fake 'git'
that just prints the libmodsecurity version string, which should be just
enough to pass the autoreconf step, no?

> >     diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> >     index b2637257b6..10338dad7c 100644
> >     --- a/package/libmodsecurity/libmodsecurity.mk
> >     +++ b/package/libmodsecurity/libmodsecurity.mk
> >     @@ -14,6 +14,24 @@ LIBMODSECURITY_CPE_ID_VENDOR = trustwave
> >      LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> >
> >      LIBMODSECURITY_DEPENDENCIES = pcre
> >     +
> >     +# configure.ac will call git to get various version strings, from
> >     +# libmodsecurity itself, but also from bundled dependencies, just
> >     +# for the sake of siplaying them at the end of configure.
> >     +# Fake a git that returns the version for libmodescurity, to quiesce
> >     +# warnings...
> >     +define LIBMODSECURITY_FAKE_GIT
> >     +   $(Q)mkdir -p $(@D)/.buildroot
> >     +   $(Q)printf '#!/usr/bin/env sh\necho "$(LIBMODSECURITY_VERSION)"\n' \
> >     +           >$(@D)/.buildroot/git
> >     +   @(Q)chmod 755 $(@D)/.buildroot/git
> >     +endef
> >     +LIBMODSECURITY_POST_EXTRACT_HOOKS += LIBMODSECURITY_FAKE_GIT
> >     +
> >     +# 0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> >     +LIBMODSECURITY_AUTORECONF = YES
> >     +LIBMODSECURITY_AUTORECONF_ENV = PATH="$(@D)/.buildroot:$(BR_PATH)"
> >     +
> >      LIBMODSECURITY_CONF_OPTS = \
> >         --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
> >         --disable-examples \

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-18  8:08         ` Yann E. MORIN
@ 2021-07-18  8:33           ` Fabrice Fontaine
  2021-07-18  9:25             ` Yann E. MORIN
  0 siblings, 1 reply; 10+ messages in thread
From: Fabrice Fontaine @ 2021-07-18  8:33 UTC (permalink / raw)
  To: buildroot

Le dim. 18 juil. 2021 ? 10:08, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>
> Fabrice, All,
>
> On 2021-07-18 09:55 +0200, Fabrice Fontaine spake thusly:
> > Le sam. 17 juil. 2021 ? 22:33, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > > On 2021-07-17 21:33 +0200, Fabrice Fontaine spake thusly:
> > > > Le sam. 17 juil. 2021 ? 11:11, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > > > > On 2021-07-16 19:20 +0200, Fabrice Fontaine spake thusly:
> > > > > > Build with libmaxminddb is broken since bump to version 3.0.5 in commit
> > > > > > 464d0be380c84ac7c3f1684e49153c3868280d7e because of
> > > > > > https://github.com/SpiderLabs/ModSecurity/commit/785958f9b5089b918c7d054cbcc2fe4a3c7b3788
> > > > > >
> > > > > > So revert this commit until upstream answer to comment to
> > > > > > https://github.com/SpiderLabs/ModSecurity/issues/2131
> > > > > >
> > > > > > Fixes:
> > > > > >  - http://autobuild.buildroot.org/results/4c639fd967faa06f8ae362bacd38f3409c47267c
> > > > > >
> > > > > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > > > I was about to just push this, but the autoreconf spews out a lot of
> > > > > warning for out-of-tree builds:
> [--SNIP--]
> > > Still, this is very unclean to have those warnings... :-(
> > Agreed, but then what would be the best option?
> >  - Remove autoreconf and patch directly the configure file?
> >  - Set LIBMODSECURITY_GIT_SUBMODULE to YES and retrieve the full
>
> Well, with the little patch I proposed below, this provides a fake 'git'
> that just prints the libmodsecurity version string, which should be just
> enough to pass the autoreconf step, no?
Sure, I missed it, sorry, I'll take a second coffee ;-).
>
> > >     diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> > >     index b2637257b6..10338dad7c 100644
> > >     --- a/package/libmodsecurity/libmodsecurity.mk
> > >     +++ b/package/libmodsecurity/libmodsecurity.mk
> > >     @@ -14,6 +14,24 @@ LIBMODSECURITY_CPE_ID_VENDOR = trustwave
> > >      LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> > >
> > >      LIBMODSECURITY_DEPENDENCIES = pcre
> > >     +
> > >     +# configure.ac will call git to get various version strings, from
> > >     +# libmodsecurity itself, but also from bundled dependencies, just
> > >     +# for the sake of siplaying them at the end of configure.
> > >     +# Fake a git that returns the version for libmodescurity, to quiesce
> > >     +# warnings...
> > >     +define LIBMODSECURITY_FAKE_GIT
> > >     +   $(Q)mkdir -p $(@D)/.buildroot
> > >     +   $(Q)printf '#!/usr/bin/env sh\necho "$(LIBMODSECURITY_VERSION)"\n' \
> > >     +           >$(@D)/.buildroot/git
> > >     +   @(Q)chmod 755 $(@D)/.buildroot/git
> > >     +endef
> > >     +LIBMODSECURITY_POST_EXTRACT_HOOKS += LIBMODSECURITY_FAKE_GIT
> > >     +
> > >     +# 0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > >     +LIBMODSECURITY_AUTORECONF = YES
> > >     +LIBMODSECURITY_AUTORECONF_ENV = PATH="$(@D)/.buildroot:$(BR_PATH)"
> > >     +
> > >      LIBMODSECURITY_CONF_OPTS = \
> > >         --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
> > >         --disable-examples \
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-18  8:33           ` Fabrice Fontaine
@ 2021-07-18  9:25             ` Yann E. MORIN
  0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2021-07-18  9:25 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2021-07-18 10:33 +0200, Fabrice Fontaine spake thusly:
> Le dim. 18 juil. 2021 ? 10:08, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
[--SNIP--]
> > > >     diff --git a/package/libmodsecurity/libmodsecurity.mk b/package/libmodsecurity/libmodsecurity.mk
> > > >     index b2637257b6..10338dad7c 100644
> > > >     --- a/package/libmodsecurity/libmodsecurity.mk
> > > >     +++ b/package/libmodsecurity/libmodsecurity.mk
> > > >     @@ -14,6 +14,24 @@ LIBMODSECURITY_CPE_ID_VENDOR = trustwave
> > > >      LIBMODSECURITY_CPE_ID_PRODUCT = modsecurity
> > > >
> > > >      LIBMODSECURITY_DEPENDENCIES = pcre
> > > >     +
> > > >     +# configure.ac will call git to get various version strings, from
> > > >     +# libmodsecurity itself, but also from bundled dependencies, just
> > > >     +# for the sake of siplaying them at the end of configure.
> > > >     +# Fake a git that returns the version for libmodescurity, to quiesce
> > > >     +# warnings...
> > > >     +define LIBMODSECURITY_FAKE_GIT
> > > >     +   $(Q)mkdir -p $(@D)/.buildroot
> > > >     +   $(Q)printf '#!/usr/bin/env sh\necho "$(LIBMODSECURITY_VERSION)"\n' \
> > > >     +           >$(@D)/.buildroot/git
> > > >     +   @(Q)chmod 755 $(@D)/.buildroot/git
> > > >     +endef
> > > >     +LIBMODSECURITY_POST_EXTRACT_HOOKS += LIBMODSECURITY_FAKE_GIT
> > > >     +
> > > >     +# 0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
> > > >     +LIBMODSECURITY_AUTORECONF = YES
> > > >     +LIBMODSECURITY_AUTORECONF_ENV = PATH="$(@D)/.buildroot:$(BR_PATH)"

Becarefull here: BR_PATH is already quoted:

    Makefile:478:BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(PATH)"

How do other packages do? Hmm... It sems they usually do not quote
anything, e.g.:

    package/nodejs/nodejs.mk:91:            PATH=$(@D)/bin:$(BR_PATH)
    package/qt5/qt5webkit/qt5webkit.mk:33:QT5WEBKIT_CONF_ENV = PATH=$(@D)/host-bin:$(BR_PATH)

So, no quoting...

However, wireshark got it wrong:

    package/wireshark/wireshark.mk:24:      PATH="$(@D)/bin:$(BR_PATH)"

Regards,
Yann E. MORIN.

> > > >     +
> > > >      LIBMODSECURITY_CONF_OPTS = \
> > > >         --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
> > > >         --disable-examples \
> >
> > Regards,
> > Yann E. MORIN.
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'
> Best Regards,
> 
> Fabrice

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-17 20:33     ` Yann E. MORIN
  2021-07-18  7:55       ` Fabrice Fontaine
@ 2021-07-18 12:06       ` Thomas Petazzoni
  2021-07-18 12:25         ` Yann E. MORIN
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2021-07-18 12:06 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 17 Jul 2021 22:33:43 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

>     +
>     +# configure.ac will call git to get various version strings, from
>     +# libmodsecurity itself, but also from bundled dependencies, just
>     +# for the sake of siplaying them at the end of configure.
>     +# Fake a git that returns the version for libmodescurity, to quiesce
>     +# warnings...
>     +define LIBMODSECURITY_FAKE_GIT
>     +	$(Q)mkdir -p $(@D)/.buildroot
>     +	$(Q)printf '#!/usr/bin/env sh\necho "$(LIBMODSECURITY_VERSION)"\n' \
>     +		>$(@D)/.buildroot/git
>     +	@(Q)chmod 755 $(@D)/.buildroot/git
>     +endef
>     +LIBMODSECURITY_POST_EXTRACT_HOOKS += LIBMODSECURITY_FAKE_GIT
>     +
>     +# 0001-Revert-Fix-maxminddb-link-on-FreeBSD.patch
>     +LIBMODSECURITY_AUTORECONF = YES
>     +LIBMODSECURITY_AUTORECONF_ENV = PATH="$(@D)/.buildroot:$(BR_PATH)"
>     +
>      LIBMODSECURITY_CONF_OPTS = \
>      	--with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
>      	--disable-examples \

Shouldn't we "simply" teach to libmodsecurity configure.ac that it may
be autoreconf'ed outside of a Git repository ?

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

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

* [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb
  2021-07-18 12:06       ` Thomas Petazzoni
@ 2021-07-18 12:25         ` Yann E. MORIN
  0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2021-07-18 12:25 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2021-07-18 14:06 +0200, Thomas Petazzoni spake thusly:
> On Sat, 17 Jul 2021 22:33:43 +0200
> "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> >     +# configure.ac will call git to get various version strings, from
> >     +# libmodsecurity itself, but also from bundled dependencies, just
> >     +# for the sake of siplaying them at the end of configure.
> >     +# Fake a git that returns the version for libmodescurity, to quiesce
> >     +# warnings...
[--SNIP--]
> Shouldn't we "simply" teach to libmodsecurity configure.ac that it may
> be autoreconf'ed outside of a Git repository ?

Easier said than done... That was my initial thought, but given how
configure.ac is written, this will have to be quite some intrusive
changes. The most problematic being test/test-cases/secrules-language-tests
and others/libinjection, which are both managed via git submodules.

And no, switching over to downloading via git, will not help: we still
do not have a .git/ directory in the archives we generate, and from
which we do the build.

But really, sice these version strings are only ever used as informative
text at the end of configure, I don't think we should care much what
they get set to:

    configure.ac:
    414 # Print a fancy summary
    415 echo " "
    416 echo " "
    417 echo "ModSecurity - ${MSC_GIT_VERSION} for $PLATFORM"
    418 echo " "
    419 echo " Mandatory dependencies"
    420 echo -n "   + libInjection                                  ...."
    421 echo LIBINJECTION_VERSION
    422 echo -n "   + SecLang tests                                 ...."
    423 echo SECLANG_TEST_VERSION
    424
    425 echo " "
    426 echo " Optional dependencies"

    configure:
    24978 # Print a fancy summary
    24979 echo " "
    24980 echo " "
    24981 echo "ModSecurity - ${MSC_GIT_VERSION} for $PLATFORM"
    24982 echo " "
    24983 echo " Mandatory dependencies"
    24984 echo -n "   + libInjection                                  ...."
    24985 echo v3.9.2-46-gbfba51f
    24986 echo -n "   + SecLang tests                                 ...."
    24987 echo a3d4405
    24988
    24989 echo " "
    24990 echo " Optional dependencies"

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2021-07-18 12:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 17:20 [Buildroot] [PATCH 1/1] package/libmodsecurity: fix build with libmaxminddb Fabrice Fontaine
2021-07-17  9:11 ` Yann E. MORIN
2021-07-17 19:33   ` Fabrice Fontaine
2021-07-17 20:33     ` Yann E. MORIN
2021-07-18  7:55       ` Fabrice Fontaine
2021-07-18  8:08         ` Yann E. MORIN
2021-07-18  8:33           ` Fabrice Fontaine
2021-07-18  9:25             ` Yann E. MORIN
2021-07-18 12:06       ` Thomas Petazzoni
2021-07-18 12:25         ` Yann E. MORIN

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.