On 3/1/2024 4:52 PM, Khem Raj wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Fri, Mar 1, 2024 at 12:20 PM Lyu, William <william....@windriver.com> wrote:

I am running into this error on some builders on AB

stdio: ERROR: Task
(/home/pokybuild/yocto-worker/meta-oe/build/meta/recipes-support/libexif/libexif_0.6.24.bb:do_package_qa)
failed with exit code '1'
stdio: ERROR: e2tools-0.1.0+git-r0 do_package_qa: QA Issue:
/usr/lib/e2tools/ptest/git/.git/hooks/update.sample contained in
package e2tools-ptest requires /usr/bin/sh, but no providers found in
RDEPENDS:e2tools-ptest? [file-rdeps]

File "update.sample" is from ".git" directory. I do not actually need this
file or anything from ".git" directory. I only need the source tree for ptest
to run.

However, I am a bit confused about this QA issue because:
-   I do not see any file that has "#!/usr/bin/sh". Even "update.sample" has
     "#!/bin/sh" as the first line. There are files in the source tree (not
     under ".git" directory) that have "#!/bin/sh" as the first line.
-   "/bin/sh" is referring to the default POSIX shell, and the "bash" in the
     RDEPENDS:e2tools-ptest should already fulfill this runtime dependency,
-   I am not yet able to reproduce this issue using poky. I assume this is
     because the QA Issue checker "file-rdeps" in poky do not check "sh" by
     default (excerpt taken from "meta/classes-global/insane.bbclass"):

     if "file-rdeps" not in skip:
         ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)'])
         if bb.utils.contains('DISTRO_FEATURES', 'usrmerge', True, False, d):
             ignored_file_rdeps |= set(['/usr/bin/sh'])
         if bb.data.inherits_class('nativesdk', d):
             ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl', 'perl'])
             if bb.utils.contains('DISTRO_FEATURES', 'usrmerge', True, False, 
d):
                 ignored_file_rdeps |= set(['/usr/bin/bash'])

William

what distro features do you have enabled ? perhaps try it with and
without usermerge in DISTRO_FEATURES
and rebuild this package after doing cleansstate to ensure its being
rebuilt in both cases.

I have not been able to reproduce this "QA Issue" error yet. Is it possible that the [file-rdeps] checker on the autobuilder (AB) where you saw this issue is defined differently than the default poky? The following are the details regarding my previous and new builds.

For my previous builds, there are no specified DISTRO_FEATURES. In conf/local.conf, I only added the following line. The build command I used was "bitbake core-image-minimal".

IMAGE_INSTALL:append = " libexif e2tools e2tools-ptest"

I tried a new build with the following line added to conf/local.conf.

DISTRO_FEATURES:append = " usermerge"

I also did "bitbake -c cleansstate e2tools" and "bitbake -c cleansstate core-image-minimal" before each build.

William



stdio: ERROR: e2tools-0.1.0+git-r0 do_package_qa: Fatal QA errors were
found, failing task.
stdio: ERROR: Logfile of failure stored in:
/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/e2tools/0.1.0+git/temp/log.do_package_qa.3114961

On Thu, Feb 22, 2024 at 5:56 AM Lyu, William via
lists.openembedded.org
<william.lyu=windriver....@lists.openembedded.org> wrote:

From: William Lyu <william....@windriver.com>

Signed-off-by: William Lyu <william....@windriver.com>
---
  .../recipes-utils/e2tools/e2tools_git.bb      | 51 ++++++++++++++++++-
  .../recipes-utils/e2tools/files/run-ptest     |  5 ++
  2 files changed, 54 insertions(+), 2 deletions(-)
  create mode 100644 meta-filesystems/recipes-utils/e2tools/files/run-ptest

diff --git a/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb 
b/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb
index caf0025c8..a80b6f598 100644
--- a/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb
+++ b/meta-filesystems/recipes-utils/e2tools/e2tools_git.bb
@@ -9,17 +9,64 @@ SECTION = "base"
  LICENSE = "GPL-2.0-only"
  LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

-DEPENDS += "e2fsprogs"
+DEPENDS += "coreutils e2fsprogs"

  PV = "0.1.0+git"

  SRC_URI = " \
             git://github.com/e2tools/e2tools;protocol=https;branch=master \
+           file://run-ptest \
  "
+
  SRCREV = "fd092754a6b65c3a769f74f888668c066f09c36d"

  S = "${WORKDIR}/git"

-inherit autotools pkgconfig
+inherit autotools pkgconfig ptest
+
+do_configure:prepend() {
+    git -C "${WORKDIR}/git" reset --hard HEAD
+
+    # To install ptest for this package, special configuration needs to be
+    # done before do_configure(). So, do_configure_ptest() which is scheduled
+    # after do_configure() cannot be used.
+
+    # We only do special configuration if we are installing ptest for this
+    # package.
+    if [ "${@d.getVar('PTEST_ENABLED')}" -eq "1" ]; then
+        # Since we guarantee run-time dependency when installing the ptest for
+        # this package, we do not need the check macros under section "checks
+        # for programs" in "configure.ac". Plus, these check macros set the
+        # ouput variables to incorrect values as these checks are performed on
+        # the host environment. Still, we need these variables outputted from
+        # these check macros. So, we insert the following lines to manually
+        # set these output variables to the correct value in "configure.ac".
+
+        # Note that HAVE_DD_COMMAND and HAVE_MKE2FS_COMMAND are only ever used
+        # in tests/Makefile-files which determines whether to include the test
+        # cases. As for output variables CHMOD, DD, and MKE2FS, they only
+        # point to the programs which test cases need to run. Since these
+        # commands are guaranteed to be present due to RDEPENDS and are
+        # guaranteed to be accessible under PATH environment variable on the
+        # target, we only need to specify the name of these programs.
+
+        perl -i -0777 -pe 's/(^dnl\s*=+\s*^dnl\s*Checks for compiler 
flags\s*^dnl\s*=+)/
+AC_SUBST([CHMOD], 'chmod')
+AC_SUBST([DD], 'dd')
+AC_SUBST([MKE2FS], 'mke2fs')
+AM_CONDITIONAL([HAVE_DD_COMMAND], [true])
+AM_CONDITIONAL([HAVE_MKE2FS_COMMAND], [true])
+\1/ms' "${WORKDIR}/git/configure.ac"
+    fi
+}
+
+do_install_ptest() {
+    rm -rf "${D}${PTEST_PATH}/*"
+    cp -r ../build "${D}${PTEST_PATH}"
+    cp -r "${S}/build-aux" "${D}${PTEST_PATH}/build"
+    cp -r "${S}" "${D}${PTEST_PATH}"
+}
+
+RDEPENDS:${PN}-ptest += "bash coreutils e2fsprogs e2tools gawk make perl"

  BBCLASSEXTEND = "native"
diff --git a/meta-filesystems/recipes-utils/e2tools/files/run-ptest 
b/meta-filesystems/recipes-utils/e2tools/files/run-ptest
new file mode 100644
index 000000000..3d4dd9cf3
--- /dev/null
+++ b/meta-filesystems/recipes-utils/e2tools/files/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+make -C build check
--
2.43.0



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

Reply via email to