From: Henning Schild <henning.schild@siemens.com>
To: "Maxim Yu. Osipov" <mosipov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 06/10] isar-bootstrap: Make possible to reuse the cache
Date: Tue, 23 Oct 2018 18:30:20 +0200 [thread overview]
Message-ID: <20181023183020.343094fd@md1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <20181011165305.1622-7-mosipov@ilbers.de>
Am Thu, 11 Oct 2018 18:53:01 +0200
schrieb "Maxim Yu. Osipov" <mosipov@ilbers.de>:
> From: Alexander Smirnov <asmirnov@ilbers.de>
>
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
> ---
> .../isar-bootstrap/files/base-apt-sources | 1 +
> .../recipes-core/isar-bootstrap/isar-bootstrap.inc | 32
> ++++++++++++++++------ 2 files changed, 24 insertions(+), 9
> deletions(-) create mode 100644
> meta/recipes-core/isar-bootstrap/files/base-apt-sources
>
> diff --git a/meta/recipes-core/isar-bootstrap/files/base-apt-sources
> b/meta/recipes-core/isar-bootstrap/files/base-apt-sources new file
> mode 100644 index 0000000..594db56
> --- /dev/null
> +++ b/meta/recipes-core/isar-bootstrap/files/base-apt-sources
> @@ -0,0 +1 @@
> +deb file:///base-apt/debian {DISTRO} main
Try "[trusted=yes]" in here and drop the workaround patch if possible.
Henning
> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index
> cfad136..cc1791c 100644 ---
> a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++
> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -12,18
> +12,24 @@ SRC_URI = " \ file://isar-apt.conf \
> file://isar-apt-fallback.conf \
> file://locale \
> - file://chroot-setup.sh"
> + file://chroot-setup.sh \
> + file://base-apt-sources"
> PV = "1.0"
>
> DEBOOTSTRAP ?= "qemu-debootstrap"
> ROOTFSDIR = "${WORKDIR}/rootfs"
> APTPREFS = "${WORKDIR}/apt-preferences"
> APTSRCS = "${WORKDIR}/apt-sources"
> +BASEAPTSRCS = "${WORKDIR}/base-apt-sources"
> APTKEYFILES = ""
> APTKEYRING = "${WORKDIR}/apt-keyring.gpg"
> DEBOOTSTRAP_KEYRING = ""
> DEPLOY_ISAR_BOOTSTRAP ?= ""
>
> +DISTRO_APT_PREMIRRORS ?= "${@ "http://ftp\.(\S+\.)?debian.org
> file:///${REPO_BASE_DIR} \n" if
> bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) else "" }"
> + +inherit base-apt-helper +
> python () {
> from urllib.parse import urlparse
> distro_apt_keys = d.getVar("DISTRO_APT_KEYS", False)
> @@ -171,6 +177,10 @@ isar_bootstrap() {
> esac
> shift
> done
> + debootstrap_args="--verbose --variant=minbase --include=locales "
> + if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then
> + debootstrap_args="$debootstrap_args --no-check-gpg"
> + fi
> E="${@bb.utils.export_proxies(d)}"
> sudo -E flock "${ISAR_BOOTSTRAP_LOCK}" -c "\
> set -e
> @@ -181,9 +191,7 @@ isar_bootstrap() {
> rm -rf "${ROOTFSDIR}"
> fi
> if [ ${IS_HOST} ]; then
> - ${DEBOOTSTRAP} --verbose \
> - --variant=minbase \
> - --include=locales \
> + ${DEBOOTSTRAP} $debootstrap_args \
> ${@get_distro_components_argument(d,
> True)} \ ${DEBOOTSTRAP_KEYRING} \
> "${@get_distro_suite(d, True)}" \
> @@ -191,10 +199,8 @@ isar_bootstrap() {
> "${@get_distro_source(d, True)}"
>
> else
> - "${DEBOOTSTRAP}" --verbose \
> - --variant=minbase \
> + "${DEBOOTSTRAP}" $debootstrap_args \
> --arch="${DISTRO_ARCH}" \
> - --include=locales \
> ${@get_distro_components_argument(d,
> False)} \ ${DEBOOTSTRAP_KEYRING} \
> "${@get_distro_suite(d, False)}" \
> @@ -207,8 +213,16 @@ isar_bootstrap() {
> install -v -m644 "${APTPREFS}" \
> "${ROOTFSDIR}/etc/apt/preferences.d/bootstrap"
> mkdir -p "${ROOTFSDIR}/etc/apt/sources.list.d"
> - install -v -m644 "${APTSRCS}" \
> -
> "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
> + if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then
> + sed -i -e "s#{DISTRO}#"${DISTRO_SUITE}"#g"
> ${BASEAPTSRCS}
> + mkdir -p ${ROOTFSDIR}/base-apt
> + sudo mount --bind ${REPO_BASE_DIR}
> ${ROOTFSDIR}/base-apt
> + install -v -m644 "${BASEAPTSRCS}" \
> +
> "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list"
> + else
> + install -v -m644 "${APTSRCS}" \
> +
> "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
> + fi
> rm -f "${ROOTFSDIR}/etc/apt/sources.list"
> mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d"
> install -v -m644 "${WORKDIR}/isar-apt.conf" \
next prev parent reply other threads:[~2018-10-23 16:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 16:52 [PATCH v2 00/10] Introduce local apt repo to cache upstream debian packages for offline usage Maxim Yu. Osipov
2018-10-11 16:52 ` [PATCH v2 01/10] base-apt: Add helper class Maxim Yu. Osipov
2018-10-23 16:01 ` Henning Schild
2018-10-11 16:52 ` [PATCH v2 02/10] meta: Unify path names to local repositories Maxim Yu. Osipov
2018-10-11 16:52 ` [PATCH v2 03/10] base-apt: Introduce base implementation Maxim Yu. Osipov
2018-10-11 16:52 ` [PATCH v2 04/10] isar-boot-strap: Add option to keep cache Maxim Yu. Osipov
2018-10-23 16:06 ` Henning Schild
2018-10-25 14:28 ` Henning Schild
2018-10-11 16:53 ` [PATCH v2 05/10] image: Add cache_base_repo task Maxim Yu. Osipov
2018-10-11 16:53 ` [PATCH v2 06/10] isar-bootstrap: Make possible to reuse the cache Maxim Yu. Osipov
2018-10-23 16:30 ` Henning Schild [this message]
2018-10-11 16:53 ` [PATCH v2 07/10] buildchroot: Make it buildable from base-apt Maxim Yu. Osipov
2018-10-11 16:53 ` [PATCH v2 08/10] workaround: Use --allow-unauthenticated working with base-apt Maxim Yu. Osipov
2018-10-23 16:09 ` Henning Schild
2018-10-25 14:33 ` Henning Schild
2018-10-11 16:53 ` [PATCH v2 09/10] local.conf: Add option to use cached base repository Maxim Yu. Osipov
2018-10-11 16:53 ` [PATCH v2 10/10] doc: Creation of local apt repo caching upstream Debian packages Maxim Yu. Osipov
2018-10-17 12:13 ` [PATCH v2 00/10] Introduce local apt repo to cache upstream debian packages for offline usage Maxim Yu. Osipov
2018-10-17 17:11 ` Jan Kiszka
2018-10-17 18:15 ` Maxim Yu. Osipov
2018-10-23 9:56 ` Maxim Yu. Osipov
2018-11-19 8:48 ` Baurzhan Ismagulov
2018-11-19 8:58 ` Jan Kiszka
2018-10-23 16:14 ` Henning Schild
2018-10-29 12:28 ` 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=20181023183020.343094fd@md1pvb1c.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