From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6520199916203016192 X-Received: by 10.28.156.21 with SMTP id f21mr180770wme.10.1518362721686; Sun, 11 Feb 2018 07:25:21 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.31.200 with SMTP id f191ls653031wmf.5.canary-gmail; Sun, 11 Feb 2018 07:25:21 -0800 (PST) X-Google-Smtp-Source: AH8x224Z4Fvswma3ysQGHZINjjk3+d37KBeYkHmmJZ5iNWvI8GPmIDJtuzTafpOJ7pm2hgRLkA4K X-Received: by 10.28.28.197 with SMTP id c188mr173988wmc.6.1518362721076; Sun, 11 Feb 2018 07:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518362721; cv=none; d=google.com; s=arc-20160816; b=ymlOJpo316oWEhICpFysplqTdaXGT4mfexRtg3cfIloHnUWHXTiolzQoCPfvm7kLrV JkUqrqbvC31fyhC19+bDndAUplxqH2+EqiR409kPJICl/QU7Qddxy4XxlWwgKG6V45Q4 Skd9B/9YL9HuEXF3s0o8KPi7ng3mvimDoA2rPchQiD9I60LI4D11MlmULC9MuXrN9NVd cnDzxBP3p27dce1x6njsyooz5f6PeyHhOBHCHpdRG1OjQOFTw1wnfxQu9LsAzsRMUaB5 Ygrr7r7GQ8pP+v3NQ9j7nQpq355Ge2ZCpJVhyPniIH+Ex9uFrQe7r2ONfA7qkzVd64it XYJQ== 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=pluhCXJaWKfMnmCcWIaL0veX8kQLICcqgaQTgnGYars=; b=rxK0hQqvTY2XALclVT4keJrO95jUFJDsJbqXIKLkLC7B0mkG62fZcmQAs8C9meR6Wz QNW+w9HOVw/GG54Tn4IwSFHT6UQjrJpa6wDUIWyVBIgcJYzxTT7o9dwP68FwrOy8P46+ 12L/mZh2jiG+jiGAcGgPV/cGOgFQIhgY2uzluTkoVwRAySNMW/GrV7V12BMnMB4XOiK0 cqaK/22jazZkrJTt9uTM2L+Nt3FCUfqLgGllmnjO0tD1BW41+CRe13rDL9K7HEVreiBP FbNJ08wEXraZBITr5eOBDYnasXljPs+vu+6c2Scrv5guNcqQbl+L2gh3opmyNyLfj140 rIGA== 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 g70si179346wmc.3.2018.02.11.07.25.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Feb 2018 07:25: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 mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w1BFPK1N010622 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 11 Feb 2018 16:25:20 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.7]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w1BFPKhA024517 for ; Sun, 11 Feb 2018 16:25:20 +0100 From: Jan Kiszka To: isar-users Subject: [PATCH v4 2/8] Prioritize isar-apt repo over all others Date: Sun, 11 Feb 2018 16:25:13 +0100 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: X-TUID: MIlct/Zrp2M/ 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 570c0ad..eb6a744 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