From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.28.241.15 with SMTP id p15mr348224wmh.5.1518195142308; Fri, 09 Feb 2018 08:52:22 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.141.4 with SMTP id p4ls1658535wmd.12.canary-gmail; Fri, 09 Feb 2018 08:52:21 -0800 (PST) X-Google-Smtp-Source: AH8x227M6h17iOh9eOVKszqfgIONosUT+Sa96MW7u20X0+c3F3bU3sWem6cP+IDrym9TDXClrTFh X-Received: by 10.28.3.11 with SMTP id 11mr359071wmd.4.1518195141692; Fri, 09 Feb 2018 08:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518195141; cv=none; d=google.com; s=arc-20160816; b=L/5d2IRwwDkqwAqXIm0pmMpq7JQ6hSiTFSuk/1eNQ7ZvSxgCQT/NiTu9abHxb1kjdu ERCP7Q9MN1ulF+PXxiFe7FgOUI8EveFhY+7ZbG2ZWa82r9bEMiukRxtjukflxZXd7Rf0 EFBgFIzMJeJTQo8xAjSuLU/CMNOBfOfH+aRPaAw8SKZHPN2cVeAudjdZgBRwGwugMgc+ AAfG0IsbP0VpyMVA7ELoel4gBJsBqCJmKQhZYLF+uT+IcBcHKXfdRcfkdS9n6PQ9dycm /atwdNHl+8AHGz4LisHUltDoFqpI3UhnZ7p3R8N2UDe3P3uhpi42d/D4OCYMVfqge1QR NpWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=mE72LRm5jQM5wKy4DBaWvqDA4yJUFKb6psMlpPwnhk4=; b=vhiJ+G4ZoCFm1mE08IoQTTONIhnazrEp5WMHFJEUwDWA3TGdRJ80Zmq1vtmPazkLY9 38s5BUO4HxyXQCq4pTMic+NPmd6BjIJIafMLZnfSbAHrdNp2Zd+kxauipvfCeN0PJHfd UwCbnuAHhkErJahMZiC5gEHL5Jnp5Syd7GVL2RYAW0ZCGyPOoPYDYv/stvnSDSmoE0UF XcBJOtVVMmCU92VjY/rIAfA9TH8ETMf/SfWkbGDfvGarHoUn5QsyZ6O7/fC/KCPYDjRu PxI58JMSoAgiYGGh4f3RI/IIxmQMDW2bvpaivaA1SwByTiPPDRdVvYVasQMdRIM9JnBl jZsw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id q6si31106wrc.4.2018.02.09.08.52.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 08:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w19GqLaT020053 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 9 Feb 2018 17:52:21 +0100 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w19GqLcj026793; Fri, 9 Feb 2018 17:52:21 +0100 Subject: Re: [PATCH v2 2/8] Prioritize isar-apt repo over all others To: Henning Schild Cc: isar-users References: <4bf281bca0d2afbf2bc661b70ed9a6932c72fcde.1518110579.git.jan.kiszka@siemens.com> <20180209174636.1072b5c3@mmd1pvb1c.ad001.siemens.net> From: Jan Kiszka Message-ID: Date: Fri, 9 Feb 2018 17:52:20 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180209174636.1072b5c3@mmd1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: Z97P7UZqa4L0 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. 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## > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux