From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.223.196.13 with SMTP id v13mr225775wrf.22.1518110581042; Thu, 08 Feb 2018 09:23:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.31.200 with SMTP id f191ls1137448wmf.5.canary-gmail; Thu, 08 Feb 2018 09:23:00 -0800 (PST) X-Google-Smtp-Source: AH8x225lKSmknfA5K9BPpEJfpq3JPGWxGSbYP+HcyzeXCqJitjGCtt/KgjVQvp7mWOH/JDEiEFD5 X-Received: by 10.28.3.11 with SMTP id 11mr17881wmd.4.1518110580435; Thu, 08 Feb 2018 09:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518110580; cv=none; d=google.com; s=arc-20160816; b=KHlBd229E5/6rKNLtAdbydw50Ay6HnR86S+jyTGZ7V16acQ3LmGP/S/oU7RuLqioMQ e7JsKYjUar3d6QoFlG7fXXDRDa6mTC9k8/Nj4Sfquw/DQwhNevzLZ110d7wJfIv69GVY ZeA9sCq7rVI/yTep8nIUMotzROsJB+sHNg5TCeKh2X8vbVbwd/6AalWE8qbib6VAxFVp E75kZgdmTgUX3dvpdohony/ANhCx10eP26lsdHYxUPuPVhzvGP0/mQzEro6l9IYVaPDo XKygk9Ag02jAjHfnHr8TyTZZK2+e+HFgLfB6pwSAkXajE6ga/FgvrCYYt6v1fIREO4x7 /Fcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:to:from:arc-authentication-results; bh=4p9IpkIwqVymDXx4d8mdz4snakah2EXxWg0X/N486Js=; b=mrq2qlJlw8LCLO4J8J3nKOsbVApZY01/Xvv6doPRApDx4AdIIZu98MzL/xFB3UN0jc ji5DNpKZbzal6rwpWw+EZWbGzATaWbiumj9BNNYzjch9DKc+IH3Q6fiptokHt40zrfz8 w7aHAUFUojbyUZim+6Wg9P8gpbB+CuedWKPXvcf9fCNG8ZI5NbA4OF0yE5liQrBz8lGa 57vO1LjcoHNwFpU0Pr3PUGUItX1mbydbT3897VdlZpviR6szfyTmL053LTFD1vZulyAA 4Wxoea60b2PkksO1yCResPTW1B6+7hEzUrJzdQ4vXMKAaGW8Udq8pRP67Z8WZg0Z1m0X D5uw== 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 f8si24529wmc.2.2018.02.08.09.23.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Feb 2018 09:23:00 -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 w18HMxBc004599 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 8 Feb 2018 18:23:00 +0100 Received: from md1f2u6c.ad001.siemens.net (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w18HMxfg025766 for ; Thu, 8 Feb 2018 18:22:59 +0100 From: Jan Kiszka To: isar-users Subject: [PATCH v2 2/8] Prioritize isar-apt repo over all others Date: Thu, 8 Feb 2018 18:22:53 +0100 Message-Id: <4bf281bca0d2afbf2bc661b70ed9a6932c72fcde.1518110579.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: X-TUID: njxSO7OcuPeX 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 [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## -- 2.13.6