From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 2/8] Prioritize isar-apt repo over all others
Date: Fri, 9 Feb 2018 18:15:30 +0100 [thread overview]
Message-ID: <20180209181530.6c0b172a@mmd1pvb1c.ad001.siemens.net> (raw)
In-Reply-To: <f7c8f308-8b01-31f7-31fd-ca20b13831e7@siemens.com>
Am Fri, 9 Feb 2018 17:52:20 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> On 2018-02-09 17:46, Henning Schild wrote:
> > Am Thu, 8 Feb 2018 18:22:53 +0100
> > schrieb "[ext] Jan Kiszka" <jan.kiszka@siemens.com>:
> >
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> 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 <jan.kiszka@siemens.com>
> >> ---
> >> 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##
> >
>
>
next prev parent reply other threads:[~2018-02-09 17:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 17:22 [PATCH v2 0/8] Provide infrastructure and examples for custom kernels and modules Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 1/8] Forward proxy settings to dpkg build Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 2/8] Prioritize isar-apt repo over all others Jan Kiszka
2018-02-09 16:46 ` Henning Schild
2018-02-09 16:52 ` Jan Kiszka
2018-02-09 17:15 ` Henning Schild [this message]
2018-02-08 17:22 ` [PATCH v2 3/8] Replace SRC_DIR with S Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 4/8] Install kernel via replaceable recipe Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 5/8] Provide include file for easy custom kernel builds Jan Kiszka
2018-02-09 16:59 ` Henning Schild
2018-02-09 17:24 ` Jan Kiszka
2018-02-09 17:31 ` Henning Schild
2018-02-09 17:30 ` Henning Schild
2018-02-09 17:54 ` Jan Kiszka
2018-02-09 19:04 ` Henning Schild
2018-02-11 15:16 ` Jan Kiszka
2018-02-09 17:57 ` [PATCH v3 " Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 6/8] Add custom kernel examples Jan Kiszka
2018-02-09 17:01 ` Henning Schild
2018-02-08 17:22 ` [PATCH v2 7/8] Provide include file for easy custom module builds Jan Kiszka
2018-02-08 17:22 ` [PATCH v2 8/8] Add exemplary kernel module Jan Kiszka
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=20180209181530.6c0b172a@mmd1pvb1c.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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