Skip to contentSkip to conversation

valgrind: Enable network for ptest builds

PATCH In review Khem Raj 4 participants 6 messages Jan 13, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 valgrind: Enable network for ptest builds

do_compile_ptest_base uses xmllint which accesses internet for validating DTD

---
 meta/recipes-devtools/valgrind/valgrind_3.18.1.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-devtools/valgrind/valgrind_3.18.1.bb +5 -0
index 7837034f92e..5ebcae467fa 100644
@@ -98,6 +98,11 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
 # which fixes build path issue in DWARF.
 SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
 
+# This is needed because xmllint needs access to network to
+# validate DTD 4.3 onwards it uses --dtdvalid http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd 
+# to xmllint, allow it to access internet
+do_compile_ptest_base[network] = "1"
+
 do_configure:prepend () {
     rm -rf ${S}/config.h
     sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am
Signature · 1 line
2.34.1
#1 lore raw

Why wasn't this exposed by AB testing? And can there be a better solution (e.g. skip the validation step), since this would still break on hosts without internet.

Alex

Quoted 43 lines · Khem Raj

do_compile_ptest_base uses xmllint which accesses internet for validating DTD

---
 meta/recipes-devtools/valgrind/valgrind_3.18.1.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-devtools/valgrind/valgrind_3.18.1.bb +0 -0
index 7837034f92e..5ebcae467fa 100644
@@ -98,6 +98,11 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env

perl'"

 # which fixes build path issue in DWARF.
 SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
meta/recipes-devtools/valgrind/valgrind_3.18.1.bb +2 -0
+# This is needed because xmllint needs access to network to
+# validate DTD 4.3 onwards it uses --dtdvalid

http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd

meta/recipes-devtools/valgrind/valgrind_3.18.1.bb +3 -0
+# to xmllint, allow it to access internet
+do_compile_ptest_base[network] = "1"
+
 do_configure:prepend () {
     rm -rf ${S}/config.h
     sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g'

${S}/none/tests/Makefile.am
--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#160526):
https://lists.openembedded.org/g/openembedded-core/message/160526
Mute This Topic: https://lists.openembedded.org/mt/88401996/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

My understanding is to add

--nonet

to XMLLINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent

in docs/Makefile.in

and we should be good - haven't tried it yet but it should do the trick

Quoted 56 lines · Alexander Kanavin

Why wasn't this exposed by AB testing? And can there be a better solution (e.g. skip the validation step), since this would still break on hosts without internet.

Alex

On Thu, 13 Jan 2022 at 18:36, Khem Raj <[email protected] <mailto:[email protected]>> wrote:

    do_compile_ptest_base uses xmllint which accesses internet for
    validating DTD

    Signed-off-by: Khem Raj <[email protected] <mailto:[email protected]>>
    ---
      meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb> | 5 +++++
      1 file changed, 5 insertions(+)

    diff --git a/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    b/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    index 7837034f92e..5ebcae467fa 100644
    --- a/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    +++ b/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    @@ -98,6 +98,11 @@ CACHED_CONFIGUREVARS +=
    "ac_cv_path_PERL='/usr/bin/env perl'"
      # which fixes build path issue in DWARF.
      SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"

    +# This is needed because xmllint needs access to network to
    +# validate DTD 4.3 onwards it uses --dtdvalid
    http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd
    <http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd>
    +# to xmllint, allow it to access internet
    +do_compile_ptest_base[network] = "1"
    +
      do_configure:prepend () {
          rm -rf ${S}/config.h
          sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g'
    ${S}/none/tests/Makefile.am
    -- 
    2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160527): https://lists.openembedded.org/g/openembedded-core/message/160527
Mute This Topic: https://lists.openembedded.org/mt/88401996/3647476
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#3 lore raw
Quoted 10 lines · Konrad Weihmann

My understanding is to add

--nonet

to XMLLINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent

in docs/Makefile.in

and we should be good - haven't tried it yet but it should do the trick

right, good suggestion but it did not work originally thats why this patch.

Quoted 61 lines · Alexander Kanavin
Quoted 59 lines

Why wasn't this exposed by AB testing? And can there be a better solution (e.g. skip the validation step), since this would still break on hosts without internet.

Alex

On Thu, 13 Jan 2022 at 18:36, Khem Raj <[email protected] <mailto:[email protected]>> wrote:

    do_compile_ptest_base uses xmllint which accesses internet for
    validating DTD

    Signed-off-by: Khem Raj <[email protected] <mailto:[email protected]>>
    ---
      meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb> | 5 +++++
      1 file changed, 5 insertions(+)

    diff --git a/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    b/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    index 7837034f92e..5ebcae467fa 100644
    --- a/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    +++ b/meta/recipes-devtools/valgrind/valgrind_3.18.1.bb
    <http://valgrind_3.18.1.bb>
    @@ -98,6 +98,11 @@ CACHED_CONFIGUREVARS +=
    "ac_cv_path_PERL='/usr/bin/env perl'"
      # which fixes build path issue in DWARF.
      SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"

    +# This is needed because xmllint needs access to network to
    +# validate DTD 4.3 onwards it uses --dtdvalid
    http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd
    <http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd>
    +# to xmllint, allow it to access internet
    +do_compile_ptest_base[network] = "1"
    +
      do_configure:prepend () {
          rm -rf ${S}/config.h
          sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g'
    ${S}/none/tests/Makefile.am
    --
    2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160527): https://lists.openembedded.org/g/openembedded-core/message/160527
Mute This Topic: https://lists.openembedded.org/mt/88401996/3647476
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 6 lines · Khem Raj
Quoted 5 lines · Konrad Weihmann

My understanding is to add

--nonet

Quoted 7 lines
Quoted 5 lines

to XMLLINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent

in docs/Makefile.in

and we should be good - haven't tried it yet but it should do the trick

right, good suggestion but it did not work originally thats why this patch.

I would rather disable this than allow network access. We need to understand why we don't see this on the autobuilder, something isn't adding up here...

Cheers,

Richard

author
#5 lore raw
Quoted 10 lines · Richard Purdie
Quoted 8 lines · Khem Raj
Quoted 7 lines · Konrad Weihmann

My understanding is to add

--nonet

to XMLLINT_FLAGS = --noblanks --noout --xinclude --postvalid --noent

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

in docs/Makefile.in

and we should be good - haven't tried it yet but it should do the trick

right, good suggestion but it did not work originally thats why this patch.

I would rather disable this than allow network access. We need to understand why we don't see this on the autobuilder, something isn't adding up here...

I am not sure either since this is not AB runners where I am seeing it but I get it everywhere

https://errors.yoctoproject.org/Errors/Details/622559/

Quoted 5 lines

Cheers,

Richard