From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.46.89.196 with SMTP id g65mr252033ljf.14.1518196533056; Fri, 09 Feb 2018 09:15:33 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.51.1 with SMTP id d1ls778135ljc.12.gmail; Fri, 09 Feb 2018 09:15:32 -0800 (PST) X-Google-Smtp-Source: AH8x226AnbLmJWjgqQDW6U2ECdmkNJIVV3HRywQyC1KZ+qunbh55SF+IpMv3/LOla1BP5fnpKr9q X-Received: by 10.46.45.2 with SMTP id t2mr251496ljt.30.1518196532505; Fri, 09 Feb 2018 09:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518196532; cv=none; d=google.com; s=arc-20160816; b=g7aS0EhcRjS9W7XdX3PBmOD+57DxPqkutjS+kA0x3/RnaYY6hBjOc2QF298KSN8oBx 9Tvoqq4L6jrXpZPggIxTqNA4JeGyPCch6HRmXDfHo0x9o+Hk8D9QUgTN7V0kvVTsQKBu I5Ho+AxYfEBZDIloEs0vxXC5DZ39YekQDlrwqPjoMUQya840/t1V1XSxwzjMlnQwg4rQ 3lm7mVXrYC5rvYR5zcoIRK0BTkU1oBRd5Mh4v5fzxmMGprwflx9vGzy6iprLSlQOqppA ZkMsKylM0UTsF6dwa0Nq8Z81pcc9m7YxqEZFg9TIMpeBTX38ayGlBaVL4pvr3QqJ31oK FDBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=J0kbAzzGXCCczJRONsgzFSISwUvF/5EkzqPfFqmC9Nc=; b=Fdk38uxLZqYArdVoy7YuG7FaykEFf3V4wtEDAwUcKWde0uKF9t19UyJ7wW8PDDGGUZ Jm5O5jDH0fVzGQVKcipoKGkOQORP7aH7efBn557GlESipgNMXf9XSfxNguYBcAAE2qTL fX3bNkBTzCMfNDIsqdSU9AqU6H5BLoDqsp9ECXwB82mEV7SSaQc6Xd1vxvJNOi/kyjx4 ptcTW4U4/SqkMS5l2dPPpBtdx60Zuy6bQt/prmheb4igmYZP/H8FcYjp7yH1KUQa61+z 7d8h3+9UkXid36hhfbOvAHpnq1MblHeIdgYO2CtPPiu02gy1QJlPDN9UYMr2pCza+En/ We/g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id z11si179465lff.1.2018.02.09.09.15.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 09:15:32 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w19HFVD9014754 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 9 Feb 2018 18:15:31 +0100 Received: from mmd1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w19HFVeu017694; Fri, 9 Feb 2018 18:15:31 +0100 Date: Fri, 9 Feb 2018 18:15:30 +0100 From: Henning Schild To: Jan Kiszka Cc: isar-users Subject: Re: [PATCH v2 2/8] Prioritize isar-apt repo over all others Message-ID: <20180209181530.6c0b172a@mmd1pvb1c.ad001.siemens.net> In-Reply-To: References: <4bf281bca0d2afbf2bc661b70ed9a6932c72fcde.1518110579.git.jan.kiszka@siemens.com> <20180209174636.1072b5c3@mmd1pvb1c.ad001.siemens.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: zbcOcrD6jMA3 Am Fri, 9 Feb 2018 17:52:20 +0100 schrieb Jan Kiszka : > On 2018-02-09 17:46, Henning Schild wrote: > > Am Thu, 8 Feb 2018 18:22:53 +0100 > > schrieb "[ext] Jan Kiszka" : > > > >> From: Jan Kiszka > >> > >> This ensures that we can override packages from upstream Debian or > >> other external sources with our self-built versions. We achieve > >> this for now by asking multistrap to drop a preferences file for > >> the buildchroot so that dependency installations use the right > >> priority. For the image build, this does not work because all > >> packages are pull during the bootstrap. Therefore, we set > >> aptdefaultrelease to isar to ensure that our repo gets the higher > >> priority. > >> > >> Signed-off-by: Jan Kiszka > >> --- > >> meta-isar/recipes-core/images/files/multistrap.conf.in | 1 + > >> meta-isar/recipes-core/images/isar-image-base.bb | 1 + > >> meta/recipes-devtools/buildchroot/buildchroot.bb | 4 > >> +++- meta/recipes-devtools/buildchroot/files/isar-apt-prefs | > >> 3 +++ meta/recipes-devtools/buildchroot/files/multistrap.conf.in | > >> 1 + 5 files changed, 9 insertions(+), 1 deletion(-) > >> create mode 100644 > >> meta/recipes-devtools/buildchroot/files/isar-apt-prefs > >> > >> diff --git a/meta-isar/recipes-core/images/files/multistrap.conf.in > >> b/meta-isar/recipes-core/images/files/multistrap.conf.in index > >> 432b6af..2ab7eab 100644 --- > >> a/meta-isar/recipes-core/images/files/multistrap.conf.in +++ > >> b/meta-isar/recipes-core/images/files/multistrap.conf.in @@ -10,6 > >> +10,7 @@ aptsources=##DISTRO_MULTICONF_APTSOURCES## > >> configscript=##CONFIG_SCRIPT## setupscript=##SETUP_SCRIPT## > >> hookdir=##DIR_HOOKS## > >> +aptdefaultrelease=isar > > > > This is a hack for the bootstrap environment, we probably need the > > prevs here as well. I guess an apt-get update/upgrade in the image > > would get me the debian kernel again. > > It is not a bullet-proof approach until we fully control apt prios and > pinnings on the target for all of out packages. > > We either need packet pinning rules on the target for all packages > that come from the then unavailable isar-apt repo. Or the user makes > that repo available via a server so that we can prioritize it as well. > > But none of that exists yet, and until then this should be good enough > to at least generate consistent images. Right, i forgot about the absence of isar-apt when the image has been deployed. Henning > Jan > > > > > Henning > > > >> [base] > >> source=##DISTRO_APT_SOURCE## > >> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb > >> b/meta-isar/recipes-core/images/isar-image-base.bb index > >> 8ddbabb..e54b9a6 100644 --- > >> a/meta-isar/recipes-core/images/isar-image-base.bb +++ > >> b/meta-isar/recipes-core/images/isar-image-base.bb @@ -53,6 +53,7 > >> @@ do_rootfs() { -e 's|##IMAGE_INSTALL##|${IMAGE_INSTALL}|g' \ > >> -e > >> 's|##DEPLOY_DIR_APT##|copy:///${DEPLOY_DIR_APT}/${DISTRO}|g' \ -e > >> 's|##ISAR_DISTRO_SUITE##|${DEBDISTRONAME}|g' \ > >> + -e 's|##APT_PREFS##|./'"$WORKDIR_REL"'/isar-apt-prefs|g' \ > >> "${WORKDIR}/multistrap.conf.in" > > >> "${WORKDIR}/multistrap.conf" > >> # Do not use bitbake flag [dirs] here because this folder > >> should have diff --git > >> a/meta/recipes-devtools/buildchroot/buildchroot.bb > >> b/meta/recipes-devtools/buildchroot/buildchroot.bb index > >> df9df19..bf80114 100644 --- > >> a/meta/recipes-devtools/buildchroot/buildchroot.bb +++ > >> b/meta/recipes-devtools/buildchroot/buildchroot.bb @@ -12,7 +12,8 > >> @@ FILESPATH =. > >> "${LAYERDIR_core}/recipes-devtools/buildchroot/files:" SRC_URI = > >> "file://multistrap.conf.in \ file://configscript.sh \ > >> file://setup.sh \ > >> - file://build.sh" > >> + file://build.sh \ > >> + file://isar-apt-prefs" > >> PV = "1.0" > >> > >> BUILDCHROOT_PREINSTALL ?= "gcc \ > >> @@ -58,6 +59,7 @@ do_build() { > >> -e > >> 's|##CONFIG_SCRIPT##|./'"$WORKDIR_REL"'/configscript.sh|g' \ -e > >> 's|##SETUP_SCRIPT##|./'"$WORKDIR_REL"'/setup.sh|g' \ -e > >> 's|##DIR_HOOKS##|./'"$WORKDIR_REL"'/hooks_multistrap|g' \ > >> + -e 's|##APT_PREFS##|./'"$WORKDIR_REL"'/isar-apt-prefs|g' \ > >> "${WORKDIR}/multistrap.conf.in" > > >> "${WORKDIR}/multistrap.conf" > >> do_setup_mounts > >> diff --git a/meta/recipes-devtools/buildchroot/files/isar-apt-prefs > >> b/meta/recipes-devtools/buildchroot/files/isar-apt-prefs new file > >> mode 100644 index 0000000..2db40e5 > >> --- /dev/null > >> +++ b/meta/recipes-devtools/buildchroot/files/isar-apt-prefs > >> @@ -0,0 +1,3 @@ > >> +Package: * > >> +Pin: release n=isar,c=main > >> +Pin-Priority: 1001 > >> diff --git > >> a/meta/recipes-devtools/buildchroot/files/multistrap.conf.in > >> b/meta/recipes-devtools/buildchroot/files/multistrap.conf.in index > >> 480a4b8..89c4968 100644 --- > >> a/meta/recipes-devtools/buildchroot/files/multistrap.conf.in +++ > >> b/meta/recipes-devtools/buildchroot/files/multistrap.conf.in @@ > >> -10,6 +10,7 @@ aptsources=isar-apt ##DISTRO_MULTICONF_APTSOURCES## > >> configscript=##CONFIG_SCRIPT## setupscript=##SETUP_SCRIPT## > >> hookdir=##DIR_HOOKS## +aptpreferences=##APT_PREFS## > >> > >> [base] > >> source=##DISTRO_APT_SOURCE## > > > >