Re: [OE-core] [PATCH] nativesdk-gzip: fix reproducibility issues

2024-04-12 Thread Oleh Matiusha via lists.openembedded.org

​How far did you get builds to work on Solaris out of interest?


Perhaps you have misunderstood me. I have neither the desire nor the hardware 
to work on providing Solaris support, but I asked if Yocto supports or plans to 
support Solaris to see if my patch is compatible with the current version.



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198173): 
https://lists.openembedded.org/g/openembedded-core/message/198173
Mute This Topic: https://lists.openembedded.org/mt/105462485/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] nativesdk-gzip: fix reproducibility issues

2024-04-12 Thread Oleh Matiusha via lists.openembedded.org
Can it be accepted in upstream then?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198156): 
https://lists.openembedded.org/g/openembedded-core/message/198156
Mute This Topic: https://lists.openembedded.org/mt/105462485/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] nativesdk-gzip: fix reproducibility issues

2024-04-11 Thread Oleh Matiusha via lists.openembedded.org
There is absolute path in zgrep binary. It is related
to the changes that fix an issue with zgrep on Solaris
and other platforms with 'grep -e'. I'd like to ask here
if Yocto supports Solaris as host architecture, and
if there's a reliable way to detect the host arch.
If there is, I'll place additional check to be
compatible with it.

Original change:
git.savannah.gnu.org/cgit/gzip.git/commit?id=60b3f4eb672a85de28ecaad47ed426f8c8fe6c32

Signed-off-by: Oleh Matiusha 
---
 meta/recipes-extended/gzip/gzip.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/gzip/gzip.inc 
b/meta/recipes-extended/gzip/gzip.inc
index b32584033b..62b3e2f4f9 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -8,6 +8,7 @@ inherit autotools texinfo
 export DEFS="NO_ASM"
 
 EXTRA_OEMAKE:class-target = "GREP=${base_bindir}/grep"
+EXTRA_OEMAKE:append:class-nativesdk = " GREP=grep"
 EXTRA_OECONF:append:libc-musl = " gl_cv_func_fflush_stdin=yes "
 
 do_install:append () {
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198130): 
https://lists.openembedded.org/g/openembedded-core/message/198130
Mute This Topic: https://lists.openembedded.org/mt/105462485/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3] bash: improve reproducibility

2024-04-05 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-bash package contains host references in output packages.
remove them.

Signed-off-by: Oleh Matiusha 
---
v2
 - moved common code to separate function 
v3
 - absolute path cleanup for all classes
---
---
 meta/recipes-extended/bash/bash.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 7832ad052b..42a187bc11 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -74,7 +74,8 @@ do_install:append () {
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
 }
-do_install:append:class-target () {
+
+do_install:append () {
# Clean buildhost references in bashbug
sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
-e "s,-I${WORKDIR}/\S* ,,g" \
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197981): 
https://lists.openembedded.org/g/openembedded-core/message/197981
Mute This Topic: https://lists.openembedded.org/mt/105345530/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3] gmp: improve reproducibility

2024-04-05 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-gmp package contains host references in output packages.
remove them.

Signed-off-by: Oleh Matiusha 
---
v2
 - moved common code to separate function 
v3
 - absolute path cleanup for all classes
---
---
 meta/recipes-support/gmp/gmp_6.3.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/gmp/gmp_6.3.0.bb 
b/meta/recipes-support/gmp/gmp_6.3.0.bb
index 3dbcd68b5c..94346745fd 100644
--- a/meta/recipes-support/gmp/gmp_6.3.0.bb
+++ b/meta/recipes-support/gmp/gmp_6.3.0.bb
@@ -29,7 +29,7 @@ do_install:append() {
oe_multilib_header gmp.h
 }
 
-do_install:prepend:class-target() {
+do_install:prepend() {
 sed -i \
 -e "s|--sysroot=${STAGING_DIR_HOST}||g" \
 -e "s|${DEBUG_PREFIX_MAP}||g" \
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197980): 
https://lists.openembedded.org/g/openembedded-core/message/197980
Mute This Topic: https://lists.openembedded.org/mt/105345496/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v3] curl: improve reproducibility

2024-04-05 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-curl package contains host references in output files.
remove them.

Signed-off-by: Oleh Matiusha 
---
v2
 - moved common code to separate function 
v3
 - absolute path cleanup for all classes
---
---
 meta/recipes-support/curl/curl_8.6.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/curl/curl_8.6.0.bb 
b/meta/recipes-support/curl/curl_8.6.0.bb
index ea69164d76..003f3edf3f 100644
--- a/meta/recipes-support/curl/curl_8.6.0.bb
+++ b/meta/recipes-support/curl/curl_8.6.0.bb
@@ -79,7 +79,7 @@ EXTRA_OECONF = " \
 ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls 
openssl', d) == '') else ''} \
 "
 
-do_install:append:class-target() {
+do_install:append() {
# cleanup buildpaths from curl-config
sed -i \
-e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197979): 
https://lists.openembedded.org/g/openembedded-core/message/197979
Mute This Topic: https://lists.openembedded.org/mt/105345472/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH v2] curl: improve reproducibility

2024-04-03 Thread Oleh Matiusha via lists.openembedded.org
What about --with-libtool-sysroot and DEBUG_PREFIX_MAP?

Oleh

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197913): 
https://lists.openembedded.org/g/openembedded-core/message/197913
Mute This Topic: https://lists.openembedded.org/mt/105181578/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] bash: improve reproducibility

2024-04-03 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-bash package contains host references in output packages.
remove them.

Signed-off-by: Oleh Matiusha 
---
v2
 - moved common code to separate function
---
---
 meta/recipes-extended/bash/bash.inc | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 7832ad052b..e541161c75 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -74,7 +74,8 @@ do_install:append () {
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
 }
-do_install:append:class-target () {
+
+fix_absolute_paths () {
# Clean buildhost references in bashbug
sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
-e "s,-I${WORKDIR}/\S* ,,g" \
@@ -93,6 +94,14 @@ do_install:append:class-target () {
${D}${libdir}/bash/Makefile.inc
 }
 
+do_install:append:class-target () {
+   fix_absolute_paths
+}
+
+do_install:append:class-nativesdk () {
+   fix_absolute_paths
+}
+
 do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
cp ${B}/Makefile ${D}${PTEST_PATH}
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197912): 
https://lists.openembedded.org/g/openembedded-core/message/197912
Mute This Topic: https://lists.openembedded.org/mt/105304955/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] gmp: improve reproducibility

2024-03-27 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-gmp package contains host references in output packages.
remove them.

Signed-off-by: Oleh Matiusha 
---
v2
 - move common code to separate function
---
---
 meta/recipes-support/gmp/gmp_6.3.0.bb | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/gmp/gmp_6.3.0.bb 
b/meta/recipes-support/gmp/gmp_6.3.0.bb
index 3dbcd68b5c..fd4aec92fd 100644
--- a/meta/recipes-support/gmp/gmp_6.3.0.bb
+++ b/meta/recipes-support/gmp/gmp_6.3.0.bb
@@ -29,13 +29,21 @@ do_install:append() {
oe_multilib_header gmp.h
 }
 
-do_install:prepend:class-target() {
+fix_absolute_paths () {
 sed -i \
 -e "s|--sysroot=${STAGING_DIR_HOST}||g" \
 -e "s|${DEBUG_PREFIX_MAP}||g" \
  ${B}/gmp.h
 }
 
+do_install:prepend:class-target() {
+fix_absolute_paths
+}
+
+do_install:prepend:class-nativesdk() {
+fix_absolute_paths
+}
+
 SSTATE_SCAN_FILES += "gmp.h"
 
 # Doesn't compile in MIPS16e mode due to use of hand-written
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197565): 
https://lists.openembedded.org/g/openembedded-core/message/197565
Mute This Topic: https://lists.openembedded.org/mt/105181617/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] curl: improve reproducibility

2024-03-27 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-curl package contains host references in output files.
remove them.

Signed-off-by: Oleh Matiusha 
---
v2
 - moved common code to separate function 
---
---
 meta/recipes-support/curl/curl_8.6.0.bb | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/curl/curl_8.6.0.bb 
b/meta/recipes-support/curl/curl_8.6.0.bb
index ea69164d76..49ba0cb4a7 100644
--- a/meta/recipes-support/curl/curl_8.6.0.bb
+++ b/meta/recipes-support/curl/curl_8.6.0.bb
@@ -79,7 +79,7 @@ EXTRA_OECONF = " \
 ${@'--without-ssl' if (bb.utils.filter('PACKAGECONFIG', 'gnutls mbedtls 
openssl', d) == '') else ''} \
 "
 
-do_install:append:class-target() {
+fix_absolute_paths () {
# cleanup buildpaths from curl-config
sed -i \
-e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
@@ -89,6 +89,14 @@ do_install:append:class-target() {
${D}${bindir}/curl-config
 }
 
+do_install:append:class-target() {
+   fix_absolute_paths
+}
+
+do_install:append:class-nativesdk() {
+   fix_absolute_paths
+}
+
 do_compile_ptest() {
oe_runmake -C ${B}/tests
 }
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197564): 
https://lists.openembedded.org/g/openembedded-core/message/197564
Mute This Topic: https://lists.openembedded.org/mt/105181578/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] bash: improve reproducibility

2024-02-28 Thread Oleh Matiusha via lists.openembedded.org
Nativesdk package contains host references in output packages.
Remove them.

Signed-off-by: Oleh Matiusha 
---
 meta/recipes-extended/bash/bash.inc | 21 +
 1 file changed, 21 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 2c3e605511..c8275c0443 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -74,6 +74,7 @@ do_install:append () {
mv ${D}${bindir}/bash ${D}${base_bindir}
fi
 }
+
 do_install:append:class-target () {
# Clean buildhost references in bashbug
sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
@@ -93,6 +94,26 @@ do_install:append:class-target () {
${D}${libdir}/bash/Makefile.inc
 }
 
+
+do_install:append:class-nativesdk () {
+   # Clean buildhost references in bashbug
+   sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+   -e "s,-I${WORKDIR}/\S* ,,g" \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   ${D}${bindir}/bashbug
+
+   # Clean buildhost references in bash.pc
+   sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+${D}${libdir}/pkgconfig/bash.pc
+
+   # Clean buildhost references in Makefile.inc
+   sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   ${D}${libdir}/bash/Makefile.inc
+}
+
 do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
cp ${B}/Makefile ${D}${PTEST_PATH}
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196387): 
https://lists.openembedded.org/g/openembedded-core/message/196387
Mute This Topic: https://lists.openembedded.org/mt/104624288/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] curl: improve reproducibility

2024-02-26 Thread Oleh Matiusha via lists.openembedded.org
Nativesdk package contains host references in output packages.
Remove them.

Signed-off-by: Oleh Matiusha 
---
 meta/recipes-support/curl/curl_7.85.0.bb | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/meta/recipes-support/curl/curl_7.85.0.bb 
b/meta/recipes-support/curl/curl_7.85.0.bb
index 1e71ed821e..2d60f9aba1 100644
--- a/meta/recipes-support/curl/curl_7.85.0.bb
+++ b/meta/recipes-support/curl/curl_7.85.0.bb
@@ -110,6 +110,16 @@ do_install:append:class-target() {
${D}${bindir}/curl-config
 }
 
+do_install:append:class-nativesdk() {
+   # cleanup buildpaths from curl-config
+   sed -i \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's|${@" ".join(d.getVar("DEBUG_PREFIX_MAP").split())}||g' \
+   ${D}${bindir}/curl-config
+}
+
 do_compile_ptest() {
oe_runmake test
oe_runmake -C ${B}/tests/server
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196204): 
https://lists.openembedded.org/g/openembedded-core/message/196204
Mute This Topic: https://lists.openembedded.org/mt/104582066/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] gmp: improve reproducibility

2024-02-26 Thread Oleh Matiusha via lists.openembedded.org
nativesdk-gmp package contains host references in output packages.
Remove them.

Signed-off-by: Oleh Matiusha 
---
 meta/recipes-support/gmp/gmp_6.2.1.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-support/gmp/gmp_6.2.1.bb 
b/meta/recipes-support/gmp/gmp_6.2.1.bb
index 29055492c2..3128350e5f 100644
--- a/meta/recipes-support/gmp/gmp_6.2.1.bb
+++ b/meta/recipes-support/gmp/gmp_6.2.1.bb
@@ -38,6 +38,13 @@ do_install:prepend:class-target() {
  ${B}/gmp.h
 }
 
+do_install:prepend:class-nativesdk() {
+sed -i \
+-e "s|--sysroot=${STAGING_DIR_HOST}||g" \
+-e "s|${DEBUG_PREFIX_MAP}||g" \
+ ${B}/gmp.h
+}
+
 SSTATE_SCAN_FILES += "gmp.h"
 
 # Doesn't compile in MIPS16e mode due to use of hand-written
-- 
2.33.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196202): 
https://lists.openembedded.org/g/openembedded-core/message/196202
Mute This Topic: https://lists.openembedded.org/mt/104581927/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] findutils: add ptest

2021-09-30 Thread Oleh Matiusha via lists.openembedded.org

Fixed warning in v1 by adding findutils-ptest to ptest-packagelists.inc.
Placed it in PTESTS_SLOW since it takes 36s to execute this ptest on qemu.

Signed-off-by: Oleh Matiusha 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-extended/findutils/findutils.inc |  6 +-
 .../findutils/findutils/run-ptest | 57 +++
 .../findutils/findutils_4.8.0.bb  | 11 
 4 files changed, 73 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/findutils/findutils/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index e0ae1dd971..2cd97d90ec 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -71,6 +71,7 @@ PTESTS_SLOW = "\
 coreutils-ptest \
 dbus-test-ptest \
 e2fsprogs-ptest \
+findutils-ptest \
 glib-2.0-ptest \
 gstreamer1.0-ptest \
 libevent-ptest \
diff --git a/meta/recipes-extended/findutils/findutils.inc 
b/meta/recipes-extended/findutils/findutils.inc
index ea8a1b7afe..ddcc05750b 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -6,9 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/;
 BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils;
 SECTION = "console/utils"
 
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \
+  file://run-ptest \
+  "
 
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives ptest
 
 ALTERNATIVE:${PN} = "find xargs"
 ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/findutils/findutils/run-ptest 
b/meta/recipes-extended/findutils/findutils/run-ptest
new file mode 100644
index 00..ec71583c51
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/run-ptest
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# create temporary symlink to workaround missing oldfind
+ln -s /usr/bin/find /tmp/oldfind
+# make oldfind visible
+export PATH="/tmp:${PATH}"
+
+export built_programs="find xargs locate updatedb"
+
+# this gets substituted by sed during build
+export VERSION="__run_ptest_version__"
+
+# define missing functions for tests/init.sh
+fu_path_prepend_ () {
+   path_prepend_ $@
+}
+
+print_ver_ () {
+   :
+}
+
+skip_if_root_ () {
+   [ $(id -u) = 0 ] && exit 77;
+}
+
+require_root_ () {
+   [ $(id -u) = 0 ] || exit 77;
+}
+
+expensive_ () {
+   :
+}
+
+export -f fu_path_prepend_
+export -f print_ver_
+export -f skip_if_root_
+export -f require_root_
+export -f expensive_
+
+
+for f in tests/*/*.sh; do
+   bash $f ;
+   case $? in
+   0 )
+   echo -n "PASS";;
+   77 )
+   echo -n "SKIP";;
+   * )
+   echo -n "FAIL";;
+   esac
+   echo ": $f"
+done
+
+#remove symlink
+rm -f /tmp/oldfind
+
+echo
diff --git a/meta/recipes-extended/findutils/findutils_4.8.0.bb 
b/meta/recipes-extended/findutils/findutils_4.8.0.bb
index 675e53c0da..356fb05be6 100644
--- a/meta/recipes-extended/findutils/findutils_4.8.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.8.0.bb
@@ -12,3 +12,14 @@ SRC_URI[sha256sum] = 
"57127b7e97d91282c6ace556378d5455a9509898297e46e10443016ea1
 CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
 
 EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
+
+RDEPENDS:${PN}-ptest += "bash sed grep"
+
+do_install_ptest:class-target() {
+   mkdir -p ${D}${PTEST_PATH}/tests/
+   cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
+
+   # substitute value in run-ptest with actual version
+   sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest
+
+}
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156486): 
https://lists.openembedded.org/g/openembedded-core/message/156486
Mute This Topic: https://lists.openembedded.org/mt/85968939/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2] findutils: add ptest

2021-09-08 Thread Oleh Matiusha via lists.openembedded.org
Fixed warning spotted by Alexandre Belloni by adding findutils-ptest to 
ptest-packagelists.inc. 
Placed it in PTESTS_SLOW since it takes 36s to execute this ptest on qemu.

Signed-off-by: Oleh Matiusha 
---
 .../distro/include/ptest-packagelists.inc |  1 +
 meta/recipes-extended/findutils/findutils.inc |  6 +-
 .../findutils/findutils/run-ptest | 57 +++
 .../findutils/findutils_4.8.0.bb  | 11 
 4 files changed, 73 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/findutils/findutils/run-ptest

diff --git a/meta/conf/distro/include/ptest-packagelists.inc 
b/meta/conf/distro/include/ptest-packagelists.inc
index e0ae1dd971..2cd97d90ec 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -71,6 +71,7 @@ PTESTS_SLOW = "\
 coreutils-ptest \
 dbus-test-ptest \
 e2fsprogs-ptest \
+findutils-ptest \
 glib-2.0-ptest \
 gstreamer1.0-ptest \
 libevent-ptest \
diff --git a/meta/recipes-extended/findutils/findutils.inc 
b/meta/recipes-extended/findutils/findutils.inc
index ea8a1b7afe..ddcc05750b 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -6,9 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/;
 BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils;
 SECTION = "console/utils"
 
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \
+  file://run-ptest \
+  "
 
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives ptest
 
 ALTERNATIVE:${PN} = "find xargs"
 ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/findutils/findutils/run-ptest 
b/meta/recipes-extended/findutils/findutils/run-ptest
new file mode 100644
index 00..ec71583c51
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/run-ptest
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# create temporary symlink to workaround missing oldfind
+ln -s /usr/bin/find /tmp/oldfind
+# make oldfind visible
+export PATH="/tmp:${PATH}"
+
+export built_programs="find xargs locate updatedb"
+
+# this gets substituted by sed during build
+export VERSION="__run_ptest_version__"
+
+# define missing functions for tests/init.sh
+fu_path_prepend_ () {
+   path_prepend_ $@
+}
+
+print_ver_ () {
+   :
+}
+
+skip_if_root_ () {
+   [ $(id -u) = 0 ] && exit 77;
+}
+
+require_root_ () {
+   [ $(id -u) = 0 ] || exit 77;
+}
+
+expensive_ () {
+   :
+}
+
+export -f fu_path_prepend_
+export -f print_ver_
+export -f skip_if_root_
+export -f require_root_
+export -f expensive_
+
+
+for f in tests/*/*.sh; do
+   bash $f ;
+   case $? in
+   0 )
+   echo -n "PASS";;
+   77 )
+   echo -n "SKIP";;
+   * )
+   echo -n "FAIL";;
+   esac
+   echo ": $f"
+done
+
+#remove symlink
+rm -f /tmp/oldfind
+
+echo
diff --git a/meta/recipes-extended/findutils/findutils_4.8.0.bb 
b/meta/recipes-extended/findutils/findutils_4.8.0.bb
index 675e53c0da..356fb05be6 100644
--- a/meta/recipes-extended/findutils/findutils_4.8.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.8.0.bb
@@ -12,3 +12,14 @@ SRC_URI[sha256sum] = 
"57127b7e97d91282c6ace556378d5455a9509898297e46e10443016ea1
 CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
 
 EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
+
+RDEPENDS:${PN}-ptest += "bash sed grep"
+
+do_install_ptest:class-target() {
+   mkdir -p ${D}${PTEST_PATH}/tests/
+   cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
+
+   # substitute value in run-ptest with actual version
+   sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest
+
+}
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155802): 
https://lists.openembedded.org/g/openembedded-core/message/155802
Mute This Topic: https://lists.openembedded.org/mt/85464768/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] findutils: add ptest

2021-09-07 Thread Oleh Matiusha via lists.openembedded.org
Signed-off-by: Oleh Matiusha 
---
 meta/recipes-extended/findutils/findutils.inc |  6 +-
 .../findutils/findutils/run-ptest | 57 +++
 .../findutils/findutils_4.8.0.bb  | 11 
 3 files changed, 72 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/findutils/findutils/run-ptest

diff --git a/meta/recipes-extended/findutils/findutils.inc 
b/meta/recipes-extended/findutils/findutils.inc
index ea8a1b7afe..ddcc05750b 100644
--- a/meta/recipes-extended/findutils/findutils.inc
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -6,9 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/;
 BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils;
 SECTION = "console/utils"
 
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \
+  file://run-ptest \
+  "
 
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives ptest
 
 ALTERNATIVE:${PN} = "find xargs"
 ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/findutils/findutils/run-ptest 
b/meta/recipes-extended/findutils/findutils/run-ptest
new file mode 100644
index 00..ec71583c51
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/run-ptest
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+# create temporary symlink to workaround missing oldfind
+ln -s /usr/bin/find /tmp/oldfind
+# make oldfind visible
+export PATH="/tmp:${PATH}"
+
+export built_programs="find xargs locate updatedb"
+
+# this gets substituted by sed during build
+export VERSION="__run_ptest_version__"
+
+# define missing functions for tests/init.sh
+fu_path_prepend_ () {
+   path_prepend_ $@
+}
+
+print_ver_ () {
+   :
+}
+
+skip_if_root_ () {
+   [ $(id -u) = 0 ] && exit 77;
+}
+
+require_root_ () {
+   [ $(id -u) = 0 ] || exit 77;
+}
+
+expensive_ () {
+   :
+}
+
+export -f fu_path_prepend_
+export -f print_ver_
+export -f skip_if_root_
+export -f require_root_
+export -f expensive_
+
+
+for f in tests/*/*.sh; do
+   bash $f ;
+   case $? in
+   0 )
+   echo -n "PASS";;
+   77 )
+   echo -n "SKIP";;
+   * )
+   echo -n "FAIL";;
+   esac
+   echo ": $f"
+done
+
+#remove symlink
+rm -f /tmp/oldfind
+
+echo
diff --git a/meta/recipes-extended/findutils/findutils_4.8.0.bb 
b/meta/recipes-extended/findutils/findutils_4.8.0.bb
index 675e53c0da..356fb05be6 100644
--- a/meta/recipes-extended/findutils/findutils_4.8.0.bb
+++ b/meta/recipes-extended/findutils/findutils_4.8.0.bb
@@ -12,3 +12,14 @@ SRC_URI[sha256sum] = 
"57127b7e97d91282c6ace556378d5455a9509898297e46e10443016ea1
 CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
 
 EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
+
+RDEPENDS:${PN}-ptest += "bash sed grep"
+
+do_install_ptest:class-target() {
+   mkdir -p ${D}${PTEST_PATH}/tests/
+   cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
+
+   # substitute value in run-ptest with actual version
+   sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest
+
+}
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155753): 
https://lists.openembedded.org/g/openembedded-core/message/155753
Mute This Topic: https://lists.openembedded.org/mt/85431986/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-