From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6788114222392803328 X-Received: by 2002:a05:6512:1041:: with SMTP id c1mr5855677lfb.14.1585230213766; Thu, 26 Mar 2020 06:43:33 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:8e69:: with SMTP id t9ls1594644ljk.4.gmail; Thu, 26 Mar 2020 06:43:33 -0700 (PDT) X-Google-Smtp-Source: APiQypIeHeJcibM8t7w2hsx4ts9ADa0dXRilFVv8LJLNcKv+wJoUOma3HRii8JOZXbikREjBBrbI X-Received: by 2002:a2e:7e08:: with SMTP id z8mr5365741ljc.180.1585230213107; Thu, 26 Mar 2020 06:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585230213; cv=none; d=google.com; s=arc-20160816; b=U9BnaBGZbxz7yCf53DE7aU9raqeTbH39ShFVPOjr71iJ9HxnGd7ZMJL/1CvXrV+y23 2AdBh53aF5IcM4DVtIC8FQ86sh5+KpfdxTJ7TMTVRJO05/97YiZ+VaIwDOze9D8d0IsV Yh6mlBcf/x3eOsmG+GPOpqBoVvna28rXLfdnAKcj3ROEBBmNIiVnuHlJlm5dcKW2gzZd egRk+d4pvy7aZqzmlx1Q9JgGzt0Y75m8Bm+McfheTMg+VBBpiltpT1pDeV0iScSsSvX7 upWpCVKzBc80IToVjq5+HZPWXKmqOFyNRqpH8L2p2M5GrKyYUxKtAlH5AhgR2MbamC/A W9+A== 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:date:subject:cc:to:from; bh=pC8w7Q6EzJTEv2P8gvrzkdzCvlYEjMiV1xRaKPb8zro=; b=UqxaPDFnAWXYCYdx7h9wgYF/5/jIt/6dQQan3mUDI1qaBSRN+yeNdiSg6ijz7npdRR fYlJjugW6Uz6JSECbAJWi45KvMIp8GLMARLld0ibnG/hWy7VzxSHhjEisskrt+vpeHc8 G7aOpjEH7hgBfBYFVMYbB4/cMO8n2cJ7qpUhTgTqa6Ibo+W4IBakoExmiRTfK1k8e5pd Misvci1p4XtXL9e1Hyismf6ycuLTcjTpadJ+BnD+0DlYWXAZAZ9brYNR/islZyuCBqI6 lEnyEdaMdL3Y1SjRfGswW8sW45VXds887KCNyo7f5TaOZBxdyaYCmQCg0/ZpSmLuGxoR hBew== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id q13si153604lfo.3.2020.03.26.06.43.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 06:43:33 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@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 henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 02QDhVRH023472 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Mar 2020 14:43:32 +0100 Received: from localhost.localdomain ([167.87.11.29]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 02QDhSBc031897; Thu, 26 Mar 2020 14:43:31 +0100 From: Henning Schild To: isar-users@googlegroups.com Cc: Vijai Kumar K , Baurzhan Ismagulov , Jan Kiszka , Henning Schild Subject: [PATCHv8 06/29] base-apt: do not skip gpg check when it is signed Date: Thu, 26 Mar 2020 14:43:02 +0100 Message-Id: <20200326134325.8672-7-henning.schild@siemens.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200326134325.8672-1-henning.schild@siemens.com> References: <20200326134325.8672-1-henning.schild@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: QQR21N2d0b5O From: Henning Schild We used to have "trusted=yes" hardcoded even for a signed base-apt. Make that flag depend on whether it is signed and generate that file with two echos, it is simple enough. Signed-off-by: Henning Schild --- .../isar-bootstrap/files/base-apt-sources | 2 -- .../isar-bootstrap/isar-bootstrap.inc | 16 ++++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 meta/recipes-core/isar-bootstrap/files/base-apt-sources diff --git a/meta/recipes-core/isar-bootstrap/files/base-apt-sources b/meta/recipes-core/isar-bootstrap/files/base-apt-sources deleted file mode 100644 index 2a4ab2c..0000000 --- a/meta/recipes-core/isar-bootstrap/files/base-apt-sources +++ /dev/null @@ -1,2 +0,0 @@ -deb [trusted=yes] file:///base-apt/{BASE_DISTRO} {BASE_DISTRO_CODENAME} main -deb-src [trusted=yes] file:///base-apt/{BASE_DISTRO} {BASE_DISTRO_CODENAME} main diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 16b4395..cf3df40 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -12,8 +12,7 @@ SRC_URI = " \ file://isar-apt.conf \ file://isar-apt-fallback.conf \ file://locale \ - file://chroot-setup.sh \ - file://base-apt-sources" + file://chroot-setup.sh" PV = "1.0" DEBOOTSTRAP ?= "qemu-debootstrap" @@ -21,7 +20,6 @@ ROOTFSDIR = "${WORKDIR}/rootfs" APTPREFS = "${WORKDIR}/apt-preferences" APTSRCS = "${WORKDIR}/apt-sources" APTSRCS_INIT = "${WORKDIR}/apt-sources-init" -BASEAPTSRCS = "${WORKDIR}/base-apt-sources" DISTRO_BOOTSTRAP_KEYFILES = "" THIRD_PARTY_APT_KEYFILES = "" DEPLOY_ISAR_BOOTSTRAP ?= "" @@ -266,13 +264,15 @@ isar_bootstrap() { "${ROOTFSDIR}/etc/apt/preferences.d/bootstrap" mkdir -p "${ROOTFSDIR}/etc/apt/sources.list.d" if [ "${ISAR_USE_CACHED_BASE_REPO}" = "1" ]; then - sed -e "s#{BASE_DISTRO}#"${BASE_DISTRO}"#g" \ - -e "s#{BASE_DISTRO_CODENAME}#"${BASE_DISTRO_CODENAME}"#g" \ - -i ${BASEAPTSRCS} + line="file:///base-apt/${BASE_DISTRO} ${BASE_DISTRO_CODENAME} main" + if [ -z "${BASE_REPO_KEY}" ]; then + line="[trusted=yes] ${line}" + fi + echo "deb ${line}" > "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" + echo "deb-src ${line}" >> "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" + mkdir -p ${ROOTFSDIR}/base-apt mount --bind ${REPO_BASE_DIR} ${ROOTFSDIR}/base-apt - install -v -m644 "${BASEAPTSRCS}" \ - "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" else install -v -m644 "${APTSRCS}" \ "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" -- 2.24.1