All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] ptest: Strip build host paths from any installed Makefile
@ 2018-11-28  4:53 Douglas Royds
  2018-11-28  4:53 ` [PATCH 1/8] ptest: Reproducibility: " Douglas Royds
                   ` (12 more replies)
  0 siblings, 13 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

PTEST_BUILD_HOST_FILES

A common pattern for ptest is to install a Makefile that provides a make check
target. These generated Makefiles are normally full of build host paths, to
hosttools, and to files and scripts within the source or build tree. They also
commonly include the CFLAGS and CPPFLAGS. None of these build host paths
can possibly work on-target, so stripping them has no effect on the success of
the resulting ptests.

PTEST_BUILD_HOST_FILES is a whitespace-separated list of filenames within the
PTEST_PATH that should have build host paths stripped from them at
do_install_ptest_base time. It defaults to "Makefile".

PTEST_BUILD_HOST_PATTERN

Several packages install Makefiles or other build host
configuration files for ptest so that they can run `make check`, for instance.
These build host files commonly include paths and versions of build host tools,
(eg. rpm or perl) whose presence and version depends on the build host distro.

PTEST_BUILD_HOST_PATTERN is an extended regex pattern used to 
optionally strip lines from installed PTEST_BUILD_HOST_FILES.

Douglas Royds (8):
  ptest: Reproducibility: Strip build host paths from any installed Makefile
  ptest: Optionally strip build host tool info from installed files
  openssl ptest: Strip build host paths from configdata.pm
  openssl: Strip perl version from installed ptest configdata.pm file
  acl: Use install instead of cp
  acl: Strip build host tool details from installed ptest file
  attr: Strip build host paths and tool versions from ptest files
  strace: Strip build host tool details from installed ptest Makefile

 meta/classes/ptest.bbclass                    | 18 ++++++++++++++++
 .../openssl/openssl_1.1.1a.bb                 |  2 ++
 meta/recipes-devtools/strace/strace_4.25.bb   | 11 +---------
 meta/recipes-support/attr/acl_2.2.52.bb       | 21 ++++++++-----------
 meta/recipes-support/attr/attr.inc            |  9 +++-----
 5 files changed, 33 insertions(+), 28 deletions(-)

-- 
2.17.1



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

* [PATCH 1/8] ptest: Reproducibility: Strip build host paths from any installed Makefile
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  4:53 ` [PATCH 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

A common pattern for ptest is to install a Makefile that provides a make check
target. These generated Makefiles are normally full of build host paths, to
hosttools, and to files and scripts within the source or build tree. They also
commonly include the CFLAGS and CPPFLAGS. None of these build host paths
can possibly work on-target, so stripping them has no effect on the success of
the resulting ptests.

Stripping the HOSTTOOLS_DIR has this effect, for instance:

    -MKDIR_P = /home/douglas/workspace/upstream/build/tmp/hosttools/mkdir -p
    +MKDIR_P = mkdir -p

The curious WORKDIR/*= pattern avoids non-parseable -fdebug-prefix-map patterns
in the CFLAGS by adding an arbitrary ".", eg:

    -fdebug-prefix-map=.=/usr/src/debug/rsyslog/8.37.0-r0

In all other cases, we simply remove the WORKDIR, eg:

    CPP = arm-tait-linux-gnueabi-gcc -E --sysroot=recipe-sysroot ...

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/classes/ptest.bbclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 9d8a79854a..fa518f6d45 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -3,6 +3,8 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
 This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PTEST_BUILD_HOST_FILES ?= "Makefile"
+
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
 ALLOW_EMPTY_${PN}-ptest = "1"
@@ -45,6 +47,17 @@ do_install_ptest_base() {
     fi
     do_install_ptest
     chown -R root:root ${D}${PTEST_PATH}
+
+    # Strip build host paths from any installed Makefile
+    for filename in ${PTEST_BUILD_HOST_FILES}; do
+        for installed_ptest_file in $(find ${D}${PTEST_PATH} -type f -name $filename); do
+            bbnote "Stripping host paths from: $installed_ptest_file"
+            sed -e 's#${HOSTTOOLS_DIR}/*##g' \
+                -e 's#${WORKDIR}/*=#.=#g' \
+                -e 's#${WORKDIR}/*##g' \
+                -i $installed_ptest_file
+        done
+    done
 }
 
 do_configure_ptest_base[dirs] = "${B}"
-- 
2.17.1



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

* [PATCH 2/8] ptest: Optionally strip build host tool info from installed files
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28  4:53 ` [PATCH 1/8] ptest: Reproducibility: " Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  4:53 ` [PATCH 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

Several packages (eg. acl, attr, openssl) install Makefiles or other build host
configuration files for ptest so that they can run `make check`, for instance.
These build host files commonly include paths and versions of build host tools,
(eg. rpm or perl) whose presence and version depends on the build host distro.

Optionally strip lines from installed PTEST_BUILD_HOST_FILES using an
extended regex pattern defined in PTEST_BUILD_HOST_PATTERN. This has no
effect on the on-target ptest.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/classes/ptest.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index fa518f6d45..97865c9338 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -4,6 +4,7 @@ This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${BPN}/ptest"
 PTEST_BUILD_HOST_FILES ?= "Makefile"
+PTEST_BUILD_HOST_PATTERN ?= ""
 
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
@@ -56,6 +57,10 @@ do_install_ptest_base() {
                 -e 's#${WORKDIR}/*=#.=#g' \
                 -e 's#${WORKDIR}/*##g' \
                 -i $installed_ptest_file
+            if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
+               sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
+                   -i $installed_ptest_file
+            fi
         done
     done
 }
-- 
2.17.1



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

* [PATCH 3/8] openssl ptest: Strip build host paths from configdata.pm
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28  4:53 ` [PATCH 1/8] ptest: Reproducibility: " Douglas Royds
  2018-11-28  4:53 ` [PATCH 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  4:53 ` [PATCH 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

This file contains CC, CPP, CFLAGS, CXXFLAGS and the like.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index 3629f7e6a1..deeb865a6f 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -156,6 +156,7 @@ do_install_append_class-nativesdk () {
 	sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
 }
 
+PTEST_BUILD_HOST_FILES += "configdata.pm"
 do_install_ptest () {
 	# Prune the build tree
 	rm -f ${B}/fuzz/*.* ${B}/test/*.*
-- 
2.17.1



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

* [PATCH 4/8] openssl: Strip perl version from installed ptest configdata.pm file
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (2 preceding siblings ...)
  2018-11-28  4:53 ` [PATCH 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  4:53 ` [PATCH 5/8] acl: Use install instead of cp Douglas Royds
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index deeb865a6f..042e023de5 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -157,6 +157,7 @@ do_install_append_class-nativesdk () {
 }
 
 PTEST_BUILD_HOST_FILES += "configdata.pm"
+PTEST_BUILD_HOST_PATTERN = "perl_version ="
 do_install_ptest () {
 	# Prune the build tree
 	rm -f ${B}/fuzz/*.* ${B}/test/*.*
-- 
2.17.1



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

* [PATCH 5/8] acl: Use install instead of cp
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (3 preceding siblings ...)
  2018-11-28  4:53 ` [PATCH 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  8:04   ` Peter Kjellerstedt
  2018-11-28  4:53 ` [PATCH 6/8] acl: Strip build host tool details from installed ptest file Douglas Royds
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

Also, hard-tabs begone

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 8b89de9b42..260975d93e 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -27,27 +27,27 @@ require ea-acl.inc
 
 # avoid RPATH hardcode to staging dir
 do_configure_append() {
-	sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
-	${S}/config.status
+    sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
+    ${S}/config.status
 }
 
 # libdir should point to .la
 do_install_append() {
-	sed -i ${D}${libdir}/libacl.la -e \
-	    s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
+    sed -i ${D}${libdir}/libacl.la \
+        -e s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
 }
 
 inherit ptest
 
 do_install_ptest() {
-	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
-	mkdir ${D}${PTEST_PATH}/include
-	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
+    tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+    install -d ${D}${PTEST_PATH}/include
+    install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+    # Remove any build host references
+    sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
+        -e 's:${HOSTTOOLS_DIR}/::g' \
+        -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+        -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
-- 
2.17.1



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

* [PATCH 6/8] acl: Strip build host tool details from installed ptest file
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (4 preceding siblings ...)
  2018-11-28  4:53 ` [PATCH 5/8] acl: Use install instead of cp Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  4:53 ` [PATCH 7/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

Adopt the PTEST_BUILD_HOST_FILES mechanism to strip build host paths from the
installed builddefs file. Also strip the record of the build host rpm version.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 260975d93e..82c9277c92 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -39,15 +39,12 @@ do_install_append() {
 
 inherit ptest
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
 do_install_ptest() {
     tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
     install -d ${D}${PTEST_PATH}/include
     install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
-    # Remove any build host references
-    sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-        -e 's:${HOSTTOOLS_DIR}/::g' \
-        -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-        -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
-- 
2.17.1



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

* [PATCH 7/8] attr: Strip build host paths and tool versions from ptest files
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (5 preceding siblings ...)
  2018-11-28  4:53 ` [PATCH 6/8] acl: Strip build host tool details from installed ptest file Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28  4:53 ` [PATCH 8/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

Using the new PTEST_BUILD_HOST_FILES mechanism.
Specifically remove reference to build host rpm version, if any.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/attr.inc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 9fc0f33cce..cfa38a7196 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -29,6 +29,9 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "setfattr"
 ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
+
 do_install_ptest() {
 	tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	mkdir ${D}${PTEST_PATH}/include
@@ -36,12 +39,6 @@ do_install_ptest() {
 	  do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
 	done
 	sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
-    
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
-- 
2.17.1



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

* [PATCH 8/8] strace: Strip build host tool details from installed ptest Makefile
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (6 preceding siblings ...)
  2018-11-28  4:53 ` [PATCH 7/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
@ 2018-11-28  4:53 ` Douglas Royds
  2018-11-28 20:52 ` [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28  4:53 UTC (permalink / raw)
  To: openembedded-core

Adopt new PTEST_BUILD_HOST_PATTERN mechanism.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-devtools/strace/strace_4.25.bb | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/meta/recipes-devtools/strace/strace_4.25.bb b/meta/recipes-devtools/strace/strace_4.25.bb
index 117ebfbf72..58f6cf6e30 100644
--- a/meta/recipes-devtools/strace/strace_4.25.bb
+++ b/meta/recipes-devtools/strace/strace_4.25.bb
@@ -32,6 +32,7 @@ EXTRA_OECONF += "--enable-mpers=no"
 CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext"
 
 TESTDIR = "tests"
+PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD)"
 
 do_install_append() {
 	# We don't ship strace-graph here because it needs perl
@@ -46,16 +47,6 @@ do_install_ptest() {
 	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
 	install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
 	install -m 644 ${B}/config.h ${D}${PTEST_PATH}
-	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
-	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -e 's:${RECIPE_SYSROOT}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	    -e '/^DEB_CHANGELOGTIME/d' \
-	    -e '/^RPM_CHANGELOGTIME/d' \
-	${D}/${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-- 
2.17.1



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

* Re: [PATCH 5/8] acl: Use install instead of cp
  2018-11-28  4:53 ` [PATCH 5/8] acl: Use install instead of cp Douglas Royds
@ 2018-11-28  8:04   ` Peter Kjellerstedt
  2018-11-28 21:25     ` Douglas Royds
  0 siblings, 1 reply; 36+ messages in thread
From: Peter Kjellerstedt @ 2018-11-28  8:04 UTC (permalink / raw)
  To: Douglas Royds, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-bounces@lists.openembedded.org> On Behalf Of Douglas Royds
> Sent: den 28 november 2018 05:53
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 5/8] acl: Use install instead of cp
> 
> Also, hard-tabs begone

Shell-code in OE-Core is expected to be indented using tabs, so don't 
do this. (For reference, OpenEmbedded uses four spaces to indent 
shell-code). Additionally, it makes it harder to see what you actually 
changed.

> 
> Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
> ---
>  meta/recipes-support/attr/acl_2.2.52.bb | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
> index 8b89de9b42..260975d93e 100644
> --- a/meta/recipes-support/attr/acl_2.2.52.bb
> +++ b/meta/recipes-support/attr/acl_2.2.52.bb
> @@ -27,27 +27,27 @@ require ea-acl.inc
> 
>  # avoid RPATH hardcode to staging dir
>  do_configure_append() {
> -	sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
> -	${S}/config.status
> +    sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
> +    ${S}/config.status
>  }
> 
>  # libdir should point to .la
>  do_install_append() {
> -	sed -i ${D}${libdir}/libacl.la -e \
> -	    s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
> +    sed -i ${D}${libdir}/libacl.la \
> +        -e s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
>  }
> 
>  inherit ptest
> 
>  do_install_ptest() {
> -	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
> -	mkdir ${D}${PTEST_PATH}/include
> -	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
> -	# Remove any build host references
> -	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
> -	    -e 's:${HOSTTOOLS_DIR}/::g' \
> -	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
> -	    -i ${D}${PTEST_PATH}/include/builddefs
> +    tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
> +    install -d ${D}${PTEST_PATH}/include
> +    install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
> +    # Remove any build host references
> +    sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
> +        -e 's:${HOSTTOOLS_DIR}/::g' \
> +        -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
> +        -i ${D}${PTEST_PATH}/include/builddefs
>  }
> 
>  RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle
> perl-module-getopt-std perl-module-posix shadow"
> --
> 2.17.1

//Peter



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

* [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (7 preceding siblings ...)
  2018-11-28  4:53 ` [PATCH 8/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
@ 2018-11-28 20:52 ` Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 1/3] acl: Use install instead of cp Douglas Royds
                     ` (2 more replies)
  2018-11-28 21:03 ` ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev3) Patchwork
                   ` (3 subsequent siblings)
  12 siblings, 3 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 20:52 UTC (permalink / raw)
  To: openembedded-core

Only one change from v1: Simplified commit acl: Use install instead of cp

Douglas Royds (3):
  acl: Use install instead of cp
  acl: Strip build host tool details from installed ptest file
  attr: Strip build host paths and tool versions from ptest files

 meta/recipes-support/attr/acl_2.2.52.bb | 11 ++++-------
 meta/recipes-support/attr/attr.inc      |  9 +++------
 2 files changed, 7 insertions(+), 13 deletions(-)

-- 
2.17.1



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

* [PATCH v2 1/3] acl: Use install instead of cp
  2018-11-28 20:52 ` [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile Douglas Royds
@ 2018-11-28 20:52   ` Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 2/3] acl: Strip build host tool details from installed ptest file Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 3/3] attr: Strip build host paths and tool versions from ptest files Douglas Royds
  2 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 20:52 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 8b89de9b42..318308a009 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -41,8 +41,8 @@ inherit ptest
 
 do_install_ptest() {
 	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
-	mkdir ${D}${PTEST_PATH}/include
-	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+	install -d ${D}${PTEST_PATH}/include
+	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
 	# Remove any build host references
 	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
 	    -e 's:${HOSTTOOLS_DIR}/::g' \
-- 
2.17.1



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

* [PATCH v2 2/3] acl: Strip build host tool details from installed ptest file
  2018-11-28 20:52 ` [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 1/3] acl: Use install instead of cp Douglas Royds
@ 2018-11-28 20:52   ` Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 3/3] attr: Strip build host paths and tool versions from ptest files Douglas Royds
  2 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 20:52 UTC (permalink / raw)
  To: openembedded-core

Adopt the PTEST_BUILD_HOST_FILES mechanism to strip build host paths from the
installed builddefs file. Also strip the record of the build host rpm version.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 318308a009..6bc77d868d 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -39,15 +39,12 @@ do_install_append() {
 
 inherit ptest
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
 do_install_ptest() {
 	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	install -d ${D}${PTEST_PATH}/include
 	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
-- 
2.17.1



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

* [PATCH v2 3/3] attr: Strip build host paths and tool versions from ptest files
  2018-11-28 20:52 ` [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 1/3] acl: Use install instead of cp Douglas Royds
  2018-11-28 20:52   ` [PATCH v2 2/3] acl: Strip build host tool details from installed ptest file Douglas Royds
@ 2018-11-28 20:52   ` Douglas Royds
  2 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 20:52 UTC (permalink / raw)
  To: openembedded-core

Using the new PTEST_BUILD_HOST_FILES mechanism.
Specifically remove reference to build host rpm version, if any.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/attr.inc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 9fc0f33cce..cfa38a7196 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -29,6 +29,9 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "setfattr"
 ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
+
 do_install_ptest() {
 	tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	mkdir ${D}${PTEST_PATH}/include
@@ -36,12 +39,6 @@ do_install_ptest() {
 	  do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
 	done
 	sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
-    
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
-- 
2.17.1



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

* ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev3)
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (8 preceding siblings ...)
  2018-11-28 20:52 ` [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile Douglas Royds
@ 2018-11-28 21:03 ` Patchwork
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2018-11-28 21:03 UTC (permalink / raw)
  To: douglas.royds; +Cc: openembedded-core

== Series Details ==

Series: ptest: Strip build host paths from any installed Makefile (rev3)
Revision: 3
URL   : https://patchwork.openembedded.org/series/15114/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 21387613fe)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (9 preceding siblings ...)
  2018-11-28 21:03 ` ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev3) Patchwork
@ 2018-11-28 21:13 ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 1/8] ptest: Reproducibility: " Douglas Royds
                     ` (7 more replies)
  2018-11-28 21:33 ` ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev4) Patchwork
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  12 siblings, 8 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Only one change from v1: Simplified commit acl: Use install instead of cp

Douglas Royds (8):
  ptest: Reproducibility: Strip build host paths from any installed Makefile
  ptest: Optionally strip build host tool info from installed files
  openssl ptest: Strip build host paths from configdata.pm
  openssl: Strip perl version from installed ptest configdata.pm file
  strace: Strip build host tool details from installed ptest Makefile
  acl: Use install instead of cp
  acl: Strip build host tool details from installed ptest file
  attr: Strip build host paths and tool versions from ptest files

 meta/classes/ptest.bbclass                     | 18 ++++++++++++++++++
 .../openssl/openssl_1.1.1a.bb                  |  2 ++
 meta/recipes-devtools/strace/strace_4.25.bb    | 11 +----------
 meta/recipes-support/attr/acl_2.2.52.bb        | 11 ++++-------
 meta/recipes-support/attr/attr.inc             |  9 +++------
 5 files changed, 28 insertions(+), 23 deletions(-)

-- 
2.17.1



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

* [PATCH v3 1/8] ptest: Reproducibility: Strip build host paths from any installed Makefile
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

A common pattern for ptest is to install a Makefile that provides a make check
target. These generated Makefiles are normally full of build host paths, to
hosttools, and to files and scripts within the source or build tree. They also
commonly include the CFLAGS and CPPFLAGS. None of these build host paths
can possibly work on-target, so stripping them has no effect on the success of
the resulting ptests.

Stripping the HOSTTOOLS_DIR has this effect, for instance:

    -MKDIR_P = /home/douglas/workspace/upstream/build/tmp/hosttools/mkdir -p
    +MKDIR_P = mkdir -p

The curious WORKDIR/*= pattern avoids non-parseable -fdebug-prefix-map patterns
in the CFLAGS by adding an arbitrary ".", eg:

    -fdebug-prefix-map=.=/usr/src/debug/rsyslog/8.37.0-r0

In all other cases, we simply remove the WORKDIR, eg:

    CPP = arm-tait-linux-gnueabi-gcc -E --sysroot=recipe-sysroot ...

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/ptest.bbclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 9d8a79854a..fa518f6d45 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -3,6 +3,8 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
 This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PTEST_BUILD_HOST_FILES ?= "Makefile"
+
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
 ALLOW_EMPTY_${PN}-ptest = "1"
@@ -45,6 +47,17 @@ do_install_ptest_base() {
     fi
     do_install_ptest
     chown -R root:root ${D}${PTEST_PATH}
+
+    # Strip build host paths from any installed Makefile
+    for filename in ${PTEST_BUILD_HOST_FILES}; do
+        for installed_ptest_file in $(find ${D}${PTEST_PATH} -type f -name $filename); do
+            bbnote "Stripping host paths from: $installed_ptest_file"
+            sed -e 's#${HOSTTOOLS_DIR}/*##g' \
+                -e 's#${WORKDIR}/*=#.=#g' \
+                -e 's#${WORKDIR}/*##g' \
+                -i $installed_ptest_file
+        done
+    done
 }
 
 do_configure_ptest_base[dirs] = "${B}"
-- 
2.17.1



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

* [PATCH v3 2/8] ptest: Optionally strip build host tool info from installed files
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 1/8] ptest: Reproducibility: " Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Several packages (eg. acl, attr, openssl) install Makefiles or other build host
configuration files for ptest so that they can run `make check`, for instance.
These build host files commonly include paths and versions of build host tools,
(eg. rpm or perl) whose presence and version depends on the build host distro.

Optionally strip lines from installed PTEST_BUILD_HOST_FILES using an
extended regex pattern defined in PTEST_BUILD_HOST_PATTERN. This has no
effect on the on-target ptest.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/ptest.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index fa518f6d45..97865c9338 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -4,6 +4,7 @@ This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${BPN}/ptest"
 PTEST_BUILD_HOST_FILES ?= "Makefile"
+PTEST_BUILD_HOST_PATTERN ?= ""
 
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
@@ -56,6 +57,10 @@ do_install_ptest_base() {
                 -e 's#${WORKDIR}/*=#.=#g' \
                 -e 's#${WORKDIR}/*##g' \
                 -i $installed_ptest_file
+            if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
+               sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
+                   -i $installed_ptest_file
+            fi
         done
     done
 }
-- 
2.17.1



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

* [PATCH v3 3/8] openssl ptest: Strip build host paths from configdata.pm
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 1/8] ptest: Reproducibility: " Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

This file contains CC, CPP, CFLAGS, CXXFLAGS and the like.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index 3629f7e6a1..deeb865a6f 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -156,6 +156,7 @@ do_install_append_class-nativesdk () {
 	sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
 }
 
+PTEST_BUILD_HOST_FILES += "configdata.pm"
 do_install_ptest () {
 	# Prune the build tree
 	rm -f ${B}/fuzz/*.* ${B}/test/*.*
-- 
2.17.1



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

* [PATCH v3 4/8] openssl: Strip perl version from installed ptest configdata.pm file
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (2 preceding siblings ...)
  2018-11-28 21:13   ` [PATCH v3 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 5/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index deeb865a6f..042e023de5 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -157,6 +157,7 @@ do_install_append_class-nativesdk () {
 }
 
 PTEST_BUILD_HOST_FILES += "configdata.pm"
+PTEST_BUILD_HOST_PATTERN = "perl_version ="
 do_install_ptest () {
 	# Prune the build tree
 	rm -f ${B}/fuzz/*.* ${B}/test/*.*
-- 
2.17.1



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

* [PATCH v3 5/8] strace: Strip build host tool details from installed ptest Makefile
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (3 preceding siblings ...)
  2018-11-28 21:13   ` [PATCH v3 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 6/8] acl: Use install instead of cp Douglas Royds
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Adopt new PTEST_BUILD_HOST_PATTERN mechanism.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/strace/strace_4.25.bb | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/meta/recipes-devtools/strace/strace_4.25.bb b/meta/recipes-devtools/strace/strace_4.25.bb
index 117ebfbf72..58f6cf6e30 100644
--- a/meta/recipes-devtools/strace/strace_4.25.bb
+++ b/meta/recipes-devtools/strace/strace_4.25.bb
@@ -32,6 +32,7 @@ EXTRA_OECONF += "--enable-mpers=no"
 CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext"
 
 TESTDIR = "tests"
+PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD)"
 
 do_install_append() {
 	# We don't ship strace-graph here because it needs perl
@@ -46,16 +47,6 @@ do_install_ptest() {
 	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
 	install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
 	install -m 644 ${B}/config.h ${D}${PTEST_PATH}
-	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
-	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -e 's:${RECIPE_SYSROOT}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	    -e '/^DEB_CHANGELOGTIME/d' \
-	    -e '/^RPM_CHANGELOGTIME/d' \
-	${D}/${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-- 
2.17.1



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

* [PATCH v3 6/8] acl: Use install instead of cp
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (4 preceding siblings ...)
  2018-11-28 21:13   ` [PATCH v3 5/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 7/8] acl: Strip build host tool details from installed ptest file Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 8/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 8b89de9b42..318308a009 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -41,8 +41,8 @@ inherit ptest
 
 do_install_ptest() {
 	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
-	mkdir ${D}${PTEST_PATH}/include
-	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+	install -d ${D}${PTEST_PATH}/include
+	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
 	# Remove any build host references
 	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
 	    -e 's:${HOSTTOOLS_DIR}/::g' \
-- 
2.17.1



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

* [PATCH v3 7/8] acl: Strip build host tool details from installed ptest file
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (5 preceding siblings ...)
  2018-11-28 21:13   ` [PATCH v3 6/8] acl: Use install instead of cp Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  2018-11-28 21:13   ` [PATCH v3 8/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Adopt the PTEST_BUILD_HOST_FILES mechanism to strip build host paths from the
installed builddefs file. Also strip the record of the build host rpm version.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 318308a009..6bc77d868d 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -39,15 +39,12 @@ do_install_append() {
 
 inherit ptest
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
 do_install_ptest() {
 	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	install -d ${D}${PTEST_PATH}/include
 	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
-- 
2.17.1



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

* [PATCH v3 8/8] attr: Strip build host paths and tool versions from ptest files
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (6 preceding siblings ...)
  2018-11-28 21:13   ` [PATCH v3 7/8] acl: Strip build host tool details from installed ptest file Douglas Royds
@ 2018-11-28 21:13   ` Douglas Royds
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:13 UTC (permalink / raw)
  To: openembedded-core

Using the new PTEST_BUILD_HOST_FILES mechanism.
Specifically remove reference to build host rpm version, if any.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/attr.inc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 9fc0f33cce..cfa38a7196 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -29,6 +29,9 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "setfattr"
 ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
+
 do_install_ptest() {
 	tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	mkdir ${D}${PTEST_PATH}/include
@@ -36,12 +39,6 @@ do_install_ptest() {
 	  do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
 	done
 	sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
-    
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
-- 
2.17.1



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

* Re: [PATCH 5/8] acl: Use install instead of cp
  2018-11-28  8:04   ` Peter Kjellerstedt
@ 2018-11-28 21:25     ` Douglas Royds
  0 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 21:25 UTC (permalink / raw)
  To: Peter Kjellerstedt, OE Core mailing list

On 28/11/18 9:04 PM, Peter Kjellerstedt wrote:

>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org <openembedded-
>> core-bounces@lists.openembedded.org> On Behalf Of Douglas Royds
>> Sent: den 28 november 2018 05:53
>> To: openembedded-core@lists.openembedded.org
>> Subject: [OE-core] [PATCH 5/8] acl: Use install instead of cp
>>
>> Also, hard-tabs begone
> Shell-code in OE-Core is expected to be indented using tabs, so don't
> do this. (For reference, OpenEmbedded uses four spaces to indent
> shell-code). Additionally, it makes it harder to see what you actually
> changed.


Fair point. I shouldn't have muddled the two together.




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

* ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev4)
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (10 preceding siblings ...)
  2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
@ 2018-11-28 21:33 ` Patchwork
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  12 siblings, 0 replies; 36+ messages in thread
From: Patchwork @ 2018-11-28 21:33 UTC (permalink / raw)
  To: douglas.royds; +Cc: openembedded-core

== Series Details ==

Series: ptest: Strip build host paths from any installed Makefile (rev4)
Revision: 4
URL   : https://patchwork.openembedded.org/series/15114/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 21387613fe)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile
  2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                   ` (11 preceding siblings ...)
  2018-11-28 21:33 ` ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev4) Patchwork
@ 2018-11-28 23:43 ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 1/8] ptest: Reproducibility: " Douglas Royds
                     ` (7 more replies)
  12 siblings, 8 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Only one change from v1: Simplified commit acl: Use install instead of cp

Douglas Royds (8):
  ptest: Reproducibility: Strip build host paths from any installed
    Makefile
  ptest: Optionally strip build host tool info from installed files
  openssl ptest: Strip build host paths from configdata.pm
  openssl: Strip perl version from installed ptest configdata.pm file
  strace: Strip build host tool details from installed ptest Makefile
  acl: Use install instead of cp
  acl: Strip build host tool details from installed ptest file
  attr: Strip build host paths and tool versions from ptest files

 meta/classes/ptest.bbclass                     | 18 ++++++++++++++++++
 .../openssl/openssl_1.1.1a.bb                  |  2 ++
 meta/recipes-devtools/strace/strace_4.25.bb    | 11 +----------
 meta/recipes-support/attr/acl_2.2.52.bb        | 11 ++++-------
 meta/recipes-support/attr/attr.inc             |  9 +++------
 5 files changed, 28 insertions(+), 23 deletions(-)

-- 
2.17.1



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

* [PATCH v4 1/8] ptest: Reproducibility: Strip build host paths from any installed Makefile
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

A common pattern for ptest is to install a Makefile that provides a make check
target. These generated Makefiles are normally full of build host paths, to
hosttools, and to files and scripts within the source or build tree. They also
commonly include the CFLAGS and CPPFLAGS. None of these build host paths
can possibly work on-target, so stripping them has no effect on the success of
the resulting ptests.

Stripping the HOSTTOOLS_DIR has this effect, for instance:

    -MKDIR_P = /home/douglas/workspace/upstream/build/tmp/hosttools/mkdir -p
    +MKDIR_P = mkdir -p

The curious WORKDIR/*= pattern avoids non-parseable -fdebug-prefix-map patterns
in the CFLAGS by adding an arbitrary ".", eg:

    -fdebug-prefix-map=.=/usr/src/debug/rsyslog/8.37.0-r0

In all other cases, we simply remove the WORKDIR, eg:

    CPP = arm-tait-linux-gnueabi-gcc -E --sysroot=recipe-sysroot ...

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/classes/ptest.bbclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index 9d8a79854a..fa518f6d45 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -3,6 +3,8 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
 This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${BPN}/ptest"
+PTEST_BUILD_HOST_FILES ?= "Makefile"
+
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
 ALLOW_EMPTY_${PN}-ptest = "1"
@@ -45,6 +47,17 @@ do_install_ptest_base() {
     fi
     do_install_ptest
     chown -R root:root ${D}${PTEST_PATH}
+
+    # Strip build host paths from any installed Makefile
+    for filename in ${PTEST_BUILD_HOST_FILES}; do
+        for installed_ptest_file in $(find ${D}${PTEST_PATH} -type f -name $filename); do
+            bbnote "Stripping host paths from: $installed_ptest_file"
+            sed -e 's#${HOSTTOOLS_DIR}/*##g' \
+                -e 's#${WORKDIR}/*=#.=#g' \
+                -e 's#${WORKDIR}/*##g' \
+                -i $installed_ptest_file
+        done
+    done
 }
 
 do_configure_ptest_base[dirs] = "${B}"
-- 
2.17.1



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

* [PATCH v4 2/8] ptest: Optionally strip build host tool info from installed files
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 1/8] ptest: Reproducibility: " Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Several packages (eg. acl, attr, openssl) install Makefiles or other build host
configuration files for ptest so that they can run `make check`, for instance.
These build host files commonly include paths and versions of build host tools,
(eg. rpm or perl) whose presence and version depends on the build host distro.

Optionally strip lines from installed PTEST_BUILD_HOST_FILES using an
extended regex pattern defined in PTEST_BUILD_HOST_PATTERN. This has no
effect on the on-target ptest.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/classes/ptest.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass
index fa518f6d45..97865c9338 100644
--- a/meta/classes/ptest.bbclass
+++ b/meta/classes/ptest.bbclass
@@ -4,6 +4,7 @@ This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${BPN}/ptest"
 PTEST_BUILD_HOST_FILES ?= "Makefile"
+PTEST_BUILD_HOST_PATTERN ?= ""
 
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
@@ -56,6 +57,10 @@ do_install_ptest_base() {
                 -e 's#${WORKDIR}/*=#.=#g' \
                 -e 's#${WORKDIR}/*##g' \
                 -i $installed_ptest_file
+            if [ -n "${PTEST_BUILD_HOST_PATTERN}" ]; then
+               sed -E '/${PTEST_BUILD_HOST_PATTERN}/d' \
+                   -i $installed_ptest_file
+            fi
         done
     done
 }
-- 
2.17.1



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

* [PATCH v4 3/8] openssl ptest: Strip build host paths from configdata.pm
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 1/8] ptest: Reproducibility: " Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

This file contains CC, CPP, CFLAGS, CXXFLAGS and the like.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index 3629f7e6a1..deeb865a6f 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -156,6 +156,7 @@ do_install_append_class-nativesdk () {
 	sed 's|/usr/lib/ssl/|/usr/lib/ssl-1.1/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh
 }
 
+PTEST_BUILD_HOST_FILES += "configdata.pm"
 do_install_ptest () {
 	# Prune the build tree
 	rm -f ${B}/fuzz/*.* ${B}/test/*.*
-- 
2.17.1



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

* [PATCH v4 4/8] openssl: Strip perl version from installed ptest configdata.pm file
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (2 preceding siblings ...)
  2018-11-28 23:43   ` [PATCH v4 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 5/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-connectivity/openssl/openssl_1.1.1a.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
index deeb865a6f..042e023de5 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1a.bb
@@ -157,6 +157,7 @@ do_install_append_class-nativesdk () {
 }
 
 PTEST_BUILD_HOST_FILES += "configdata.pm"
+PTEST_BUILD_HOST_PATTERN = "perl_version ="
 do_install_ptest () {
 	# Prune the build tree
 	rm -f ${B}/fuzz/*.* ${B}/test/*.*
-- 
2.17.1



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

* [PATCH v4 5/8] strace: Strip build host tool details from installed ptest Makefile
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (3 preceding siblings ...)
  2018-11-28 23:43   ` [PATCH v4 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 6/8] acl: Use install instead of cp Douglas Royds
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Adopt new PTEST_BUILD_HOST_PATTERN mechanism.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-devtools/strace/strace_4.25.bb | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/meta/recipes-devtools/strace/strace_4.25.bb b/meta/recipes-devtools/strace/strace_4.25.bb
index 117ebfbf72..58f6cf6e30 100644
--- a/meta/recipes-devtools/strace/strace_4.25.bb
+++ b/meta/recipes-devtools/strace/strace_4.25.bb
@@ -32,6 +32,7 @@ EXTRA_OECONF += "--enable-mpers=no"
 CFLAGS_append_libc-musl = " -Dsigcontext_struct=sigcontext"
 
 TESTDIR = "tests"
+PTEST_BUILD_HOST_PATTERN = "^(DEB_CHANGELOGTIME|RPM_CHANGELOGTIME|WARN_CFLAGS_FOR_BUILD)"
 
 do_install_append() {
 	# We don't ship strace-graph here because it needs perl
@@ -46,16 +47,6 @@ do_install_ptest() {
 	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
 	install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
 	install -m 644 ${B}/config.h ${D}${PTEST_PATH}
-	sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
-	    -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -e 's:${RECIPE_SYSROOT}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	    -e '/^DEB_CHANGELOGTIME/d' \
-	    -e '/^RPM_CHANGELOGTIME/d' \
-	${D}/${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-- 
2.17.1



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

* [PATCH v4 6/8] acl: Use install instead of cp
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (4 preceding siblings ...)
  2018-11-28 23:43   ` [PATCH v4 5/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:47     ` Mark Hatle
  2018-11-28 23:43   ` [PATCH v4 7/8] acl: Strip build host tool details from installed ptest file Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 8/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
  7 siblings, 1 reply; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 8b89de9b42..318308a009 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -41,8 +41,8 @@ inherit ptest
 
 do_install_ptest() {
 	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
-	mkdir ${D}${PTEST_PATH}/include
-	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+	install -d ${D}${PTEST_PATH}/include
+	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
 	# Remove any build host references
 	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
 	    -e 's:${HOSTTOOLS_DIR}/::g' \
-- 
2.17.1



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

* [PATCH v4 7/8] acl: Strip build host tool details from installed ptest file
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (5 preceding siblings ...)
  2018-11-28 23:43   ` [PATCH v4 6/8] acl: Use install instead of cp Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  2018-11-28 23:43   ` [PATCH v4 8/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Adopt the PTEST_BUILD_HOST_FILES mechanism to strip build host paths from the
installed builddefs file. Also strip the record of the build host rpm version.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/acl_2.2.52.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
index 318308a009..6bc77d868d 100644
--- a/meta/recipes-support/attr/acl_2.2.52.bb
+++ b/meta/recipes-support/attr/acl_2.2.52.bb
@@ -39,15 +39,12 @@ do_install_append() {
 
 inherit ptest
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
 do_install_ptest() {
 	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	install -d ${D}${PTEST_PATH}/include
 	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
-- 
2.17.1



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

* [PATCH v4 8/8] attr: Strip build host paths and tool versions from ptest files
  2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
                     ` (6 preceding siblings ...)
  2018-11-28 23:43   ` [PATCH v4 7/8] acl: Strip build host tool details from installed ptest file Douglas Royds
@ 2018-11-28 23:43   ` Douglas Royds
  7 siblings, 0 replies; 36+ messages in thread
From: Douglas Royds @ 2018-11-28 23:43 UTC (permalink / raw)
  To: openembedded-core

Using the new PTEST_BUILD_HOST_FILES mechanism.
Specifically remove reference to build host rpm version, if any.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/recipes-support/attr/attr.inc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
index 9fc0f33cce..cfa38a7196 100644
--- a/meta/recipes-support/attr/attr.inc
+++ b/meta/recipes-support/attr/attr.inc
@@ -29,6 +29,9 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "setfattr"
 ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
 
+PTEST_BUILD_HOST_FILES = "builddefs"
+PTEST_BUILD_HOST_PATTERN = "^RPM"
+
 do_install_ptest() {
 	tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	mkdir ${D}${PTEST_PATH}/include
@@ -36,12 +39,6 @@ do_install_ptest() {
 	  do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
 	done
 	sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
-    
-	# Remove any build host references
-	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -i ${D}${PTEST_PATH}/include/builddefs
 }
 
 RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
-- 
2.17.1



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

* Re: [PATCH v4 6/8] acl: Use install instead of cp
  2018-11-28 23:43   ` [PATCH v4 6/8] acl: Use install instead of cp Douglas Royds
@ 2018-11-28 23:47     ` Mark Hatle
  0 siblings, 0 replies; 36+ messages in thread
From: Mark Hatle @ 2018-11-28 23:47 UTC (permalink / raw)
  To: Douglas Royds, openembedded-core

You should explain in the commit message -why- you made the change.  It's
already clear WHAT the change is, but not why you did it.

On 11/28/18 5:43 PM, Douglas Royds wrote:
> Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
> ---
>  meta/recipes-support/attr/acl_2.2.52.bb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb
> index 8b89de9b42..318308a009 100644
> --- a/meta/recipes-support/attr/acl_2.2.52.bb
> +++ b/meta/recipes-support/attr/acl_2.2.52.bb
> @@ -41,8 +41,8 @@ inherit ptest
>  
>  do_install_ptest() {
>  	tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
> -	mkdir ${D}${PTEST_PATH}/include
> -	cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
> +	install -d ${D}${PTEST_PATH}/include
> +	install -m 644 ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
>  	# Remove any build host references
>  	sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
>  	    -e 's:${HOSTTOOLS_DIR}/::g' \
> 



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

end of thread, other threads:[~2018-11-28 23:47 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28  4:53 [PATCH 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
2018-11-28  4:53 ` [PATCH 1/8] ptest: Reproducibility: " Douglas Royds
2018-11-28  4:53 ` [PATCH 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
2018-11-28  4:53 ` [PATCH 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
2018-11-28  4:53 ` [PATCH 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
2018-11-28  4:53 ` [PATCH 5/8] acl: Use install instead of cp Douglas Royds
2018-11-28  8:04   ` Peter Kjellerstedt
2018-11-28 21:25     ` Douglas Royds
2018-11-28  4:53 ` [PATCH 6/8] acl: Strip build host tool details from installed ptest file Douglas Royds
2018-11-28  4:53 ` [PATCH 7/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
2018-11-28  4:53 ` [PATCH 8/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
2018-11-28 20:52 ` [PATCH v2 0/3] ptest: Strip build host paths from any installed Makefile Douglas Royds
2018-11-28 20:52   ` [PATCH v2 1/3] acl: Use install instead of cp Douglas Royds
2018-11-28 20:52   ` [PATCH v2 2/3] acl: Strip build host tool details from installed ptest file Douglas Royds
2018-11-28 20:52   ` [PATCH v2 3/3] attr: Strip build host paths and tool versions from ptest files Douglas Royds
2018-11-28 21:03 ` ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev3) Patchwork
2018-11-28 21:13 ` [PATCH v3 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
2018-11-28 21:13   ` [PATCH v3 1/8] ptest: Reproducibility: " Douglas Royds
2018-11-28 21:13   ` [PATCH v3 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
2018-11-28 21:13   ` [PATCH v3 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
2018-11-28 21:13   ` [PATCH v3 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
2018-11-28 21:13   ` [PATCH v3 5/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
2018-11-28 21:13   ` [PATCH v3 6/8] acl: Use install instead of cp Douglas Royds
2018-11-28 21:13   ` [PATCH v3 7/8] acl: Strip build host tool details from installed ptest file Douglas Royds
2018-11-28 21:13   ` [PATCH v3 8/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds
2018-11-28 21:33 ` ✗ patchtest: failure for ptest: Strip build host paths from any installed Makefile (rev4) Patchwork
2018-11-28 23:43 ` [PATCH v4 0/8] ptest: Strip build host paths from any installed Makefile Douglas Royds
2018-11-28 23:43   ` [PATCH v4 1/8] ptest: Reproducibility: " Douglas Royds
2018-11-28 23:43   ` [PATCH v4 2/8] ptest: Optionally strip build host tool info from installed files Douglas Royds
2018-11-28 23:43   ` [PATCH v4 3/8] openssl ptest: Strip build host paths from configdata.pm Douglas Royds
2018-11-28 23:43   ` [PATCH v4 4/8] openssl: Strip perl version from installed ptest configdata.pm file Douglas Royds
2018-11-28 23:43   ` [PATCH v4 5/8] strace: Strip build host tool details from installed ptest Makefile Douglas Royds
2018-11-28 23:43   ` [PATCH v4 6/8] acl: Use install instead of cp Douglas Royds
2018-11-28 23:47     ` Mark Hatle
2018-11-28 23:43   ` [PATCH v4 7/8] acl: Strip build host tool details from installed ptest file Douglas Royds
2018-11-28 23:43   ` [PATCH v4 8/8] attr: Strip build host paths and tool versions from ptest files Douglas Royds

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.