From: Henning Schild <henning.schild@siemens.com>
To: "[ext] Gylstorff Quirin" <quirin.gylstorff@siemens.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2] meta: rootfs: Fix manifest generation
Date: Tue, 22 Oct 2019 18:36:19 +0200 [thread overview]
Message-ID: <20191022183619.4ecc0033@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <28666b08-fc78-8ad3-083b-f94a345b98ce@siemens.com>
Am Tue, 22 Oct 2019 18:28:57 +0200
schrieb "[ext] Gylstorff Quirin" <quirin.gylstorff@siemens.com>:
> On 10/22/19 4:53 PM, vijaikumar.kanagarajan@gmail.com wrote:
> > From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> >
> > finalize-rootfs task removes qemu-*-static. It is needed for
> > rootfs_generate_manifest to work when HOST_ARCH != DISTRO_ARCH.
> >
> > Make sure a proper chroot environment is available when
> > generating manifest.
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> > Changes in v2:
> > - Updated commit message.
> >
> > meta/classes/rootfs.bbclass | 20 ++++++++++----------
> > 1 file changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/meta/classes/rootfs.bbclass
> > b/meta/classes/rootfs.bbclass index da66b3f..1da27ff 100644
> > --- a/meta/classes/rootfs.bbclass
> > +++ b/meta/classes/rootfs.bbclass
> > @@ -9,8 +9,8 @@ ROOTFS_PACKAGES ?= ""
> > # available features are:
> > # 'deploy-package-cache' - copy the package cache
> > ${WORKDIR}/apt_cache # 'clean-package-cache' - delete package cache
> > from rootfs -# 'finalize-rootfs' - delete files needed to chroot
> > into the rootfs # 'generate-manifest' - generate a package manifest
> > of the rootfs into ${ROOTFS_MANIFEST_DEPLOY_DIR} +#
> > 'finalize-rootfs' - delete files needed to chroot into the rootfs
> > ROOTFS_FEATURES ?= ""
> > ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes"
> > @@ -185,6 +185,15 @@ rootfs_postprocess_clean_package_cache() {
> > sudo rm -rf "${ROOTFSDIR}/var/lib/apt/lists/"*
> > }
> >
> > +ROOTFS_POSTPROCESS_COMMAND +=
> > "${@bb.utils.contains('ROOTFS_FEATURES', 'generate-manifest',
> > 'rootfs_generate_manifest', '', d)}" +rootfs_generate_manifest () {
> > + mkdir -p ${ROOTFS_MANIFEST_DEPLOY_DIR}
> > + sudo -E chroot --userspec=$(id -u):$(id -g) '${ROOTFSDIR}' \
> > + dpkg-query -W -f \
> > +
> > '${source:Package}|${source:Version}|${binary:Package}|${Version}\n'
> > > \
> > + ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".manifest
> > +}
> > +
> > ROOTFS_POSTPROCESS_COMMAND +=
> > "${@bb.utils.contains('ROOTFS_FEATURES', 'finalize-rootfs',
> > 'rootfs_postprocess_finalize', '', d)}"
> > rootfs_postprocess_finalize() { sudo -s <<'EOSUDO' @@ -223,15
> > +232,6 @@ rootfs_postprocess_finalize() { EOSUDO
> > }
> >
>
> Is it possible to add a guard to finalize to check that it is the
> last command in ROOTFS_POSTPROCESS_COMMAND.
>
> > -ROOTFS_POSTPROCESS_COMMAND +=
> > "${@bb.utils.contains('ROOTFS_FEATURES', 'generate-manifest',
> > 'rootfs_generate_manifest', '', d)}" -rootfs_generate_manifest () {
> > - mkdir -p ${ROOTFS_MANIFEST_DEPLOY_DIR}
> > - sudo -E chroot --userspec=$(id -u):$(id -g) '${ROOTFSDIR}' \
> > - dpkg-query -W -f \
> > -
> > '${source:Package}|${source:Version}|${binary:Package}|${Version}\n'
> > > \
> > - ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".manifest
> > -}
> > -
> > do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}"
> > python do_rootfs_postprocess() {
> > # Take care that its correctly mounted:
> >
>
> Thanks.
>
> This should have been found in the CI build.
> Is the CrossBuild not part of the CI configuration?
Not sure whether i can see which args ci_build.sh was called with, but
i quickly found a failing build of next in the CI.
For those who have access:
http://isar-build.org:8080/job/isar_next/488/console
>> chroot: failed to run command 'dpkg-query': No such file or directory
...
that is the missing qemu
...
>> ERROR: mc:qemuarm64-stretch:isar-image-base-1.0-r0
>> do_rootfs_postprocess: Function failed: rootfs_generate_manifest
>> (log file is located
>> at /workspace/build/isar_next/488/build/tmp/work/debian-stretch-arm64/isar-image-base-qemuarm64-ext4-img/1.0-r0/temp/log.do_rootfs_postprocess.23077)
Henning
> Quirin
>
next prev parent reply other threads:[~2019-10-22 16:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 14:49 [PATCH] " vijaikumar.kanagarajan
2019-10-22 14:53 ` [PATCH v2] meta: rootfs: " vijaikumar.kanagarajan
2019-10-22 16:28 ` Gylstorff Quirin
2019-10-22 16:36 ` Henning Schild [this message]
2019-10-23 5:16 ` Vijai Kumar K
2019-10-23 16:25 ` Baurzhan Ismagulov
2019-10-24 5:37 ` Vijai Kumar K
2019-10-24 12:26 ` Henning Schild
2019-10-24 10:54 ` Baurzhan Ismagulov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191022183619.4ecc0033@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=quirin.gylstorff@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox