public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: chombourger@gmail.com, isar-users <isar-users@googlegroups.com>
Subject: Re: bind mount for /downloads not happening
Date: Wed, 28 Feb 2018 18:55:02 +0100	[thread overview]
Message-ID: <c201bbfa-1aae-718d-9001-85b17c8c9707@siemens.com> (raw)
In-Reply-To: <be130220-e395-440f-bd20-409784d46877@googlegroups.com>

On 2018-02-28 18:37, chombourger@gmail.com wrote:
> Hi Jan,
> 
> I was in the process of rebasing to the latest Isar/next to discard some of 
> the local commits we had.
> In particular we had a change from Christian to make git trees available to 
> the build process.
> This change should no longer be required thanks to 
> 9a8b7fe77cbd006b6053f85e593301c60ea0cfbd (Make sure git repos are usable 
> inside buildchroot)
> 
> It unfortunately did not quite work for me. I believe I understand why and 
> wanted to run my theory by you to double-check!.
> 
> # 
> https://github.com/ilbers/isar/blob/next/meta/classes/dpkg-base.bbclass#L44
> do_build() { 
>      mkdir -p ${BUILDROOT} 
>      sudo mount --bind ${WORKDIR} ${BUILDROOT} 
> 
>      sudo flock ${MOUNT_LOCKFILE} -c ' \ 
>          if ! grep -q ${BUILDCHROOT_DIR}/isar-apt /proc/mounts; then \ 
>             mount --bind ${DEPLOY_DIR_APT}/${DISTRO} 
> ${BUILDCHROOT_DIR}/isar-apt; \ 
>             mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads; \ 
>             mount -t devtmpfs -o mode=0755,nosuid devtmpfs 
> ${BUILDCHROOT_DIR}/dev; \ 
>             mount -t proc none ${BUILDCHROOT_DIR}/proc; \ 
>         fi' 
> 
> We check if isar-apt was mounted to mount everything else. OK.
> 
> We however have the following code also mounting isar-apt:
> 
> # 
> https://github.com/ilbers/isar/blob/next/meta/recipes-devtools/buildchroot/buildchroot.bb#L68
> do_build() {
>     ...
>     sudo mount --bind ${DEPLOY_DIR_APT}/${DISTRO} 
> ${BUILDCHROOT_DIR}/isar-apt 
>     sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs 
> ${BUILDCHROOT_DIR}/dev 
>     sudo mount -t proc none ${BUILDCHROOT_DIR}/proc
>     ...
> 
> If you do a full platform build, isar-apt will get mounted from the 
> buildchroot recipe and our downloads folder will not be mounted from 
> dpkg-base.bb (and cause our swiupdate recipe to fail)
> 
> I would be tempted to add a bind mount for downloads in the buildchroot 
> recipe. The other option would be add a check in dpkg-base.bb for downloads 
> being mounted (we would then have 2 "if" statements in the code block 
> passed to flock.
> 
> Thoughts?

Good catch. I probably missed this during tests because I didn't check
the result of a full rebuild.

Let's just quickly add the download mount also to buildchroot.bb. Things
should get centralized soon with the switch to debootstrap and Claudius'
refactorings along that.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2018-02-28 17:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 17:37 chombourger
2018-02-28 17:55 ` Jan Kiszka [this message]

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=c201bbfa-1aae-718d-9001-85b17c8c9707@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=chombourger@gmail.com \
    --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