public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] Refresh /etc/resolv.conf on partial rebuilds
Date: Mon, 12 Nov 2018 10:07:10 +0100	[thread overview]
Message-ID: <20181112100710.39e92ac9@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <8937d771-52f0-750c-61f3-25963d8e6a94@web.de>

Am Sat, 10 Nov 2018 18:35:47 +0100
schrieb Jan Kiszka <jan.kiszka@web.de>:

> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This addresses the scenario "mobile build host" where the resolv.conf
> as once generated during bootstrap and then propagated into the
> buildchroots as well the image rootfs may have become stale.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  meta/classes/buildchroot.bbclass           | 6 +++++-
>  meta/classes/isar-bootstrap-helper.bbclass | 3 +++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/buildchroot.bbclass
> b/meta/classes/buildchroot.bbclass index 870d27c..78e21d9 100644
> --- a/meta/classes/buildchroot.bbclass
> +++ b/meta/classes/buildchroot.bbclass
> @@ -29,5 +29,9 @@ buildchroot_do_mounts() {
>              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'
> +        fi
> +
> +        # Refresh /etc/resolv.conf at this chance
> +        cp /etc/resolv.conf ${BUILDCHROOT_DIR}/etc
> +        '

You probably want to use "cp -L", modern network managing tools often
work with symlinks and there seem to be versions of cp that do not
default to "-L". Not sure whether we can get problems in Isar, but
the gentoo manuals always mention "-L" for that step.

Henning

>  }
> diff --git a/meta/classes/isar-bootstrap-helper.bbclass
> b/meta/classes/isar-bootstrap-helper.bbclass index 1ac39db..99c1fb7
> 100644 --- a/meta/classes/isar-bootstrap-helper.bbclass
> +++ b/meta/classes/isar-bootstrap-helper.bbclass
> @@ -106,6 +106,9 @@ setup_root_file_system() {
>      sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs
> $ROOTFSDIR/dev sudo mount -t proc none $ROOTFSDIR/proc
>  
> +    # Refresh /etc/resolv.conf
> +    sudo cp /etc/resolv.conf ${ROOTFSDIR}/etc
> +
>      # Install packages:
>      E="${@ bb.utils.export_proxies(d)}"
>      export DEBIAN_FRONTEND=noninteractive


  reply	other threads:[~2018-11-12  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 17:35 Jan Kiszka
2018-11-12  9:07 ` Henning Schild [this message]
2018-11-12  9:15   ` [PATCH v2] " Jan Kiszka
2018-11-14  3:18     ` Maxim Yu. Osipov

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=20181112100710.39e92ac9@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@web.de \
    /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