public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: "Maxim Yu. Osipov" <mosipov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/2] isar-bootstrap: Keep the initial APT sources list
Date: Mon, 17 Dec 2018 12:41:45 +0100	[thread overview]
Message-ID: <20181217124145.1b2038d5@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20181217054034.12236-1-mosipov@ilbers.de>

Am Mon, 17 Dec 2018 06:40:33 +0100
schrieb "Maxim Yu. Osipov" <mosipov@ilbers.de>:

> Keep the initial copy of APT sources list passed
> via DISTRO_APT_SOURCES as the contents of APTSRCS
> get modified during isar-bootstrap.
> 
> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
> ---
>  meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb   | 2 ++
>  meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb | 2 ++
>  meta/recipes-core/isar-bootstrap/isar-bootstrap.inc       | 3 +++
>  3 files changed, 7 insertions(+)
> 
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb index
> 19b60dc..7b83f80 100644 ---
> a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb +++
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb @@ -34,8
> +34,10 @@ python do_apt_config_prepare() { aggregate_files(d,
> apt_preferences_list, apt_preferences_out) 
>          apt_sources_out = d.getVar("APTSRCS", True)
> +        apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
>          apt_sources_list = (d.getVar("HOST_DISTRO_APT_SOURCES",
> True) or "").split() 
> +        aggregate_files(d, apt_sources_list, apt_sources_init_out)
>          aggregate_aptsources_list(d, apt_sources_list,
> apt_sources_out) }
>  addtask apt_config_prepare before do_bootstrap after do_unpack
> diff --git
> a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb index
> 3631506..c264123 100644 ---
> a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb +++
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb @@ -33,8
> +33,10 @@ python do_apt_config_prepare() { aggregate_files(d,
> apt_preferences_list, apt_preferences_out) apt_sources_out =
> d.getVar("APTSRCS", True)
> +        apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
>          apt_sources_list = (d.getVar("DISTRO_APT_SOURCES", True) or
> "").split() 
> +        aggregate_files(d, apt_sources_list, apt_sources_init_out)
>          aggregate_aptsources_list(d, apt_sources_list,
> apt_sources_out) }
>  addtask apt_config_prepare before do_bootstrap after do_unpack
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index
> 811d50e..f411ad1 100644 ---
> a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -20,6 +20,7
> @@ DEBOOTSTRAP ?= "qemu-debootstrap" ROOTFSDIR = "${WORKDIR}/rootfs"
>  APTPREFS = "${WORKDIR}/apt-preferences"
>  APTSRCS = "${WORKDIR}/apt-sources"
> +APTSRCS_INIT = "${WORKDIR}/apt-sources-init"
>  BASEAPTSRCS = "${WORKDIR}/base-apt-sources"
>  APTKEYFILES = ""
>  APTKEYRING = "${WORKDIR}/apt-keyring.gpg"
> @@ -222,6 +223,8 @@ isar_bootstrap() {
>                  install -v -m644 "${APTSRCS}" \
>                                   "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
>              fi
> +            install -v -m644 "${APTSRCS_INIT}" \
> +                                 "${ROOTFSDIR}/etc/apt/sources-list"

That file should get another name, and ideally not sit in the rootfs at
all. If something goes wrong, this looks dangerously close to a valid
file, with no clue where it came from.

Henning

>              rm -f "${ROOTFSDIR}/etc/apt/sources.list"
>              mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d"
>              install -v -m644 "${WORKDIR}/isar-apt.conf" \


  parent reply	other threads:[~2018-12-17 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  5:40 Maxim Yu. Osipov
2018-12-17  5:40 ` [PATCH 2/2] classes/isar-image: Replace the apt sources file with the original Maxim Yu. Osipov
2018-12-17 11:42   ` Henning Schild
2018-12-17 11:41 ` Henning Schild [this message]
2018-12-17 13:15   ` [PATCH 1/2] isar-bootstrap: Keep the initial APT sources list Maxim Yu. Osipov
2018-12-19 11:45 ` 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=20181217124145.1b2038d5@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=mosipov@ilbers.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