From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks
Date: Tue, 12 Dec 2017 13:05:21 +0100 [thread overview]
Message-ID: <20171212130521.53a9632c@md1pvb1c> (raw)
In-Reply-To: <b8384250-c0f7-35da-36f2-5a5ce1e4833a@ilbers.de>
Am Mon, 11 Dec 2017 22:56:42 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> Hi,
>
> On 12/11/2017 09:29 PM, Henning Schild wrote:
> > Just found another issue with this one. Building something on
> > current next.
> >
> >>> ERROR: Nothing PROVIDES '${IMAGE_INSTALL}' (but
> >>> multiconfig:qemuamd64-stretch:/builder/isar/meta/recipes-devtools/buildchroot/buildchroot.bb
> >>> DEPENDS on or otherwise requires it)
> >
> > a 'IMAGE_INSTALL ?= ""' fixes that.
> >
>
> Thanks for this catch.
>
> It would be helpful if you describe your changes from upstream Isar
> that leads to this issue. Am I right, that you do not set
> IMAGE_INSTALL variable in local.conf file?
Yes it is a layer with IMAGE_INSTALL not set in its local.conf, no
changes to Isar.
> Also an ideas how to handle such cases in pure Isar are welcome.
If we really need a VARIABLE to be initialized in a local.conf that
should probably be documented.
It might make sense to extend the testing to actually testing the
layering a well. Such a layer could be in the tree and we should build
targets with and without the layer.
But before that we should probably sort meta and meta-isar. As far as i
see it "meta" should be the core of Isar while "meta-isar" could
eventually be the layer using that core. At the moment i do not really
have an idea what the idea behind the current split is, and whether
that cut is clean.
I am already thinking about patches for more layering features,
i.e. customization of multistrap.conf.
Henning
> Alex
>
> > Henning
> >
> > Am Thu, 23 Nov 2017 13:25:31 +0300
> > schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> >
> >> Some packages could require builchroot filesystem tunning, for
> >> example share Isar downloads folder with chroot filesystem.
> >>
> >> This patch adds two tasks for buildchroot:
> >>
> >> 1. 'do_prepare': This task is executed after buildchroot rootfs
> >> generation and before 'do_build' from packages to be built.
> >> Some notes:
> >> - An individual task is required for the case when you want to
> >> rebuild some package, this would require to run this preparation
> >> stuff for existing buildchroot rootfs.
> >> - This task should not have stamp. This means that anytime you
> >> want to build something, 'do_prepare' should be executed.
> >>
> >> 2. 'do_cleanup': This task is executed after all the packages are
> >> deployed. Some notes:
> >> - This task also should not have stamp.
> >> - This task depends from the recipes listed in IMAGE_INSTALL.
> >>
> >> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> >> ---
> >> meta/classes/dpkg-base.bbclass | 2 +-
> >> meta/classes/image.bbclass | 1 +
> >> meta/recipes-devtools/buildchroot/buildchroot.bb | 21
> >> +++++++++++++++++++++ 3 files changed, 23 insertions(+), 1
> >> deletion(-)
> >>
> >> diff --git a/meta/classes/dpkg-base.bbclass
> >> b/meta/classes/dpkg-base.bbclass index 4941f9b..21ae88d 100644
> >> --- a/meta/classes/dpkg-base.bbclass
> >> +++ b/meta/classes/dpkg-base.bbclass
> >> @@ -2,7 +2,7 @@
> >> # Copyright (C) 2017 Siemens AG
> >>
> >> # Add dependency from buildchroot creation
> >> -do_build[depends] = "buildchroot:do_build"
> >> +do_build[depends] = "buildchroot:do_prepare"
> >>
> >> # Each package should have its own unique build folder, so use
> >> # recipe name as identifier
> >> diff --git a/meta/classes/image.bbclass
> >> b/meta/classes/image.bbclass index 7813b16..b0f645c 100644
> >> --- a/meta/classes/image.bbclass
> >> +++ b/meta/classes/image.bbclass
> >> @@ -83,6 +83,7 @@ do_populate() {
> >>
> >> addtask populate before do_build after do_unpack
> >> do_populate[deptask] = "do_deploy_deb"
> >> +do_populate[depends] = "buildchroot:do_cleanup"
> >>
> >> do_rootfs[stamp-extra-info] = "${MACHINE}-${DISTRO}"
> >>
> >> diff --git a/meta/recipes-devtools/buildchroot/buildchroot.bb
> >> b/meta/recipes-devtools/buildchroot/buildchroot.bb index
> >> 6a94733..fe88e98 100644 ---
> >> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++
> >> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -67,7 +67,28
> >> @@ do_build() { # Install package builder script
> >> sudo install -m 755 ${WORKDIR}/build.sh ${BUILDCHROOT_DIR}
> >>
> >> + # Create share point for downloads
> >> + sudo install -d ${BUILDCHROOT_DIR}/git
> >> +
> >> # Configure root filesystem
> >> sudo chroot ${BUILDCHROOT_DIR} /configscript.sh
> >> _do_build_cleanup
> >> }
> >> +
> >> +do_prepare[nostamp] = "1"
> >> +
> >> +do_prepare() {
> >> + sudo mount --bind ${GITDIR} ${BUILDCHROOT_DIR}/git
> >> +}
> >> +
> >> +addtask prepare after do_build
> >> +
> >> +DEPENDS += "${IMAGE_INSTALL}"
> >> +do_cleanup[deptask] = "do_deploy_deb"
> >> +do_cleanup[nostamp] = "1"
> >> +
> >> +do_cleanup() {
> >> + sudo umount ${BUILDCHROOT_DIR}/git
> >> +}
> >> +
> >> +addtask cleanup after do_prepare
> >
>
next prev parent reply other threads:[~2017-12-12 12:05 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 10:25 [PATCH 0/4 v2] Buildchroot prepare/cleanup Alexander Smirnov
2017-11-23 10:25 ` [PATCH 1/4 v2] dpkg-base: Fix buildchroot dependancy Alexander Smirnov
2017-11-23 10:25 ` [PATCH 2/4 v2] image: Add do_rootfs template to image class Alexander Smirnov
2017-11-23 10:25 ` [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks Alexander Smirnov
2017-11-24 14:55 ` Henning Schild
2017-11-24 15:48 ` Alexander Smirnov
2017-11-24 16:34 ` Henning Schild
2017-11-24 16:51 ` Alexander Smirnov
2017-11-27 7:56 ` Henning Schild
2017-11-27 8:15 ` Alexander Smirnov
2017-12-08 7:58 ` Christian Storm
2017-12-11 9:23 ` Alexander Smirnov
2017-12-11 12:16 ` Henning Schild
2017-12-11 13:37 ` Storm, Christian (CT RDA ITP SES-DE)
2017-12-11 14:12 ` Alexander Smirnov
2017-12-11 15:14 ` Christian Storm
2017-12-12 7:39 ` Alexander Smirnov
2017-12-12 8:01 ` Christian Storm
2017-12-12 8:21 ` Alexander Smirnov
2017-12-11 11:32 ` Henning Schild
2017-12-11 18:29 ` Henning Schild
2017-12-11 19:56 ` Alexander Smirnov
2017-12-12 8:04 ` Christian Storm
2017-12-12 12:05 ` Henning Schild [this message]
2017-12-13 5:43 ` Jan Kiszka
2017-12-11 18:32 ` Henning Schild
2017-11-23 10:25 ` [PATCH 4/4 v2] dpkg-base: Update git alternates Alexander Smirnov
2017-11-24 14:57 ` Henning Schild
2017-11-24 15:12 ` Alexander Smirnov
2017-11-27 7:44 ` Henning Schild
2017-11-27 8:03 ` Alexander Smirnov
2017-11-27 15:42 ` Henning Schild
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=20171212130521.53a9632c@md1pvb1c \
--to=henning.schild@siemens.com \
--cc=asmirnov@ilbers.de \
--cc=isar-users@googlegroups.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