From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6524973730788016128 X-Received: by 10.46.56.13 with SMTP id f13mr354343lja.19.1521037598041; Wed, 14 Mar 2018 07:26:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.126.11 with SMTP id z11ls203087ljc.7.gmail; Wed, 14 Mar 2018 07:26:37 -0700 (PDT) X-Google-Smtp-Source: AG47ELtZPB48UpHxO1ZbSRaar3Fyd03KrRPDg5N8CCgyp98ud9dwtZYUX7waeMzHeNbLYyrKs9SW X-Received: by 10.46.114.9 with SMTP id n9mr379283ljc.30.1521037597358; Wed, 14 Mar 2018 07:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521037597; cv=none; d=google.com; s=arc-20160816; b=Ivu1I57vG/LA28vTHpfv6X6q9HOrSfUlVY97X4Qzel8is9NQFNj5hkaR3Fkuqd82/y Bxc/xthx9Y11d1wKQzR5RaDAfIe6gHml4Zm3Pr5YgR7NPzIY5P3stpm23g+7mvaee1AP kJRrsg8DDdyD++CqP208FHKZlq8z7KKjsO9dqTKB9efZ2+gINxD+2O4VW9K7tI+pAxxY obUaXv56TdSdNJZsCdFcfITMlfGEvuDIv6cj+yHGLfqp16gSRtEwv3mah0rysDZ/c4Bc u9Gk3EbNIZVddryQV520jQGYsBI6DbvYg4leJohv5S8ZwIPYMrh7AUwbxrDZ8Hm8xxtr 0QlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:date:to:from:subject:message-id :arc-authentication-results; bh=aVIzwR0Laj78KDZ0vx4H9KrlNfy632CM8RVw+n77lP4=; b=FnbTquKBBvBI9Xa3c342SWJ9lNC85JuHSzapSxv2y1AdhmgJOiBGHBWHPFU57R1gHj yFLfo876cw66R+NwXcmgxwG8b9f0pkoVhfiKjatGiYwjrWhlgHCiiEEqS0Iu6vH6olfK LDnCuNtZKwKrkdpcTERo/7ZClyVHXUE3cR28vEFLkDVtgHpdxmw/JaxvB1ocd89SJBER lC5EymcdAch76hDNuGkubD1MVS7dDkYNQRk+3CZXzBmhPUR+CO9s6197kc78WYsPNAw8 e9ydPBgOe6T4+Z6MQSUluWhWJ55LmoyfrvYhrdGCG6WLnj0Jy3x+nG4MkRS/W7TH9APS L0OA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id z79-v6si121042lfd.1.2018.03.14.07.26.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 07:26:37 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) client-ip=212.18.0.9; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of ch@denx.de) smtp.mailfrom=ch@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 401Yv04NxGz1qym4; Wed, 14 Mar 2018 15:26:36 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 401Yv044Mwz1sQx2; Wed, 14 Mar 2018 15:26:36 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id TEMEjZ87bnOx; Wed, 14 Mar 2018 15:26:31 +0100 (CET) X-Auth-Info: Gn4kh+Ln4c919Unk0PxmrEZZdfehBafAe62+rTqk0L8= Received: from Orrorin (p578a821c.dip0.t-ipconnect.de [87.138.130.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 14 Mar 2018 15:26:30 +0100 (CET) Message-ID: <1521037585.16621.124.camel@denx.de> Subject: Re: [PATCH v4 1/5] implement isar-bootstrap using debootstrap From: Claudius Heine To: Alexander Smirnov , claudius.heine.ext@siemens.com, isar-users@googlegroups.com Date: Wed, 14 Mar 2018 15:26:25 +0100 In-Reply-To: References: <20180307164457.31933-1-claudius.heine.ext@siemens.com> <20180307164457.31933-2-claudius.heine.ext@siemens.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7dDO1y6NqQovq1R1AWN8" X-Mailer: Evolution 3.26.5 Mime-Version: 1.0 X-TUID: XqPMKLk72hhs --=-7dDO1y6NqQovq1R1AWN8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Alex, On Wed, 2018-03-14 at 17:04 +0300, Alexander Smirnov wrote: >=20 > On 03/07/2018 07:44 PM, claudius.heine.ext@siemens.com wrote: > > From: Claudius Heine > >=20 > > Since multistrap is deprecated for some years, it is required to > > change > > to debootstrap. > >=20 > > This patch introduces the 'isar-bootstrap' recipe that implement > > the > > creation of a minimal base root file system using debootstrap. > >=20 > > Signed-off-by: Claudius Heine > > --- > > meta-isar/conf/distro/debian-jessie.conf | 15 +- > > meta-isar/conf/distro/debian-jessie.list | 3 + > > meta-isar/conf/distro/debian-stretch.conf | 11 +- > > meta-isar/conf/distro/debian-stretch.list | 3 + > > meta-isar/conf/distro/debian-wheezy.conf | 11 +- > > meta-isar/conf/distro/debian-wheezy.list | 3 + > > meta-isar/conf/distro/raspbian-jessie.conf | 10 +- > > meta-isar/conf/distro/raspbian-jessie.list | 1 + > > .../isar-bootstrap/files/isar-apt.conf | 2 + > > meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 205 > > +++++++++++++++++++++ > > 10 files changed, 247 insertions(+), 17 deletions(-) > > create mode 100644 meta-isar/conf/distro/debian-jessie.list > > create mode 100644 meta-isar/conf/distro/debian-stretch.list > > create mode 100644 meta-isar/conf/distro/debian-wheezy.list > > create mode 100644 meta-isar/conf/distro/raspbian-jessie.list > > create mode 100644 meta/recipes-core/isar-bootstrap/files/isar- > > apt.conf > > create mode 100644 meta/recipes-core/isar-bootstrap/isar- > > bootstrap.bb > >=20 > > diff --git a/meta-isar/conf/distro/debian-jessie.conf b/meta- > > isar/conf/distro/debian-jessie.conf > > index 3e62b14..df27fd7 100644 > > --- a/meta-isar/conf/distro/debian-jessie.conf > > +++ b/meta-isar/conf/distro/debian-jessie.conf > > @@ -1,16 +1,19 @@ > > -# Debian jessie multistrap configuration > > +# Debian jessie distribution configuration > > # > > # This software is a part of ISAR. > > # Copyright (C) 2015-2016 ilbers GmbH > > =20 > > +DISTRO_APT_SOURCES +=3D "conf/distro/debian-jessie.list" > > +DISTRO_CONFIG_SCRIPT ?=3D "debian-configscript.sh" > > +DISTRO_KERNELS ?=3D "486 4kc-malta 586 5kc-malta 686-pae amd64 arm64 > > armmp \ > > + armmp-lpae ixp4xx kirkwood loongson-2e loongson-2f loongson-3 > > octeon \ > > + orion5x powerpc powerpc-smp powerpc64 powerpc64le r4k-ip22 > > r5k-ip32 \ > > + s390x sb1-bcm91250a versatile" > > + > > +# No longer needed: > > DISTRO_SUITE ?=3D "jessie" > > DISTRO_COMPONENTS ?=3D "main contrib non-free" > > DISTRO_APT_SOURCE ?=3D "http://ftp.debian.org/debian" > > DISTRO_APT_SOURCE_SEC ?=3D "http://security.debian.org/debian-secur > > ity" > > -DISTRO_CONFIG_SCRIPT ?=3D "debian-configscript.sh" > > DISTRO_MULTICONF_BOOTSTRAP ?=3D "base updates security" > > DISTRO_MULTICONF_APTSOURCES ?=3D "${DISTRO_MULTICONF_BOOTSTRAP}" > > -DISTRO_KERNELS ?=3D "486 4kc-malta 586 5kc-malta 686-pae amd64 arm64 > > armmp \ > > - armmp-lpae ixp4xx kirkwood loongson-2e loongson-2f loongson-3 > > octeon \ > > - orion5x powerpc powerpc-smp powerpc64 powerpc64le r4k-ip22 > > r5k-ip32 \ > > - s390x sb1-bcm91250a versatile" > > diff --git a/meta-isar/conf/distro/debian-jessie.list b/meta- > > isar/conf/distro/debian-jessie.list > > new file mode 100644 > > index 0000000..be46a57 > > --- /dev/null > > +++ b/meta-isar/conf/distro/debian-jessie.list > > @@ -0,0 +1,3 @@ > > +deb http://ftp.de.debian.org/debian class=3D"Apple-tab-span" > > style=3D"white-space:pre"> jessie main contrib non-free > > +deb http://ftp.de.debian.org/debian jessie-updates m > > ain contrib non-free > > +deb http://security.debian.org class=3D"Apple-tab-span" > > style=3D"white-space:pre"> jessie/updates main contrib non- > > free > > diff --git a/meta-isar/conf/distro/debian-stretch.conf b/meta- > > isar/conf/distro/debian-stretch.conf > > index 5a85d52..13c4f94 100644 > > --- a/meta-isar/conf/distro/debian-stretch.conf > > +++ b/meta-isar/conf/distro/debian-stretch.conf > > @@ -1,13 +1,16 @@ > > # This software is a part of ISAR. > > # Copyright (C) 2017 ilbers GmbH > > =20 > > +DISTRO_APT_SOURCES +=3D "conf/distro/debian-stretch.list" > > +DISTRO_CONFIG_SCRIPT ?=3D "debian-configscript.sh" > > +DISTRO_KERNELS ?=3D "4kc-malta 586 5kc-malta 686 686-pae amd64 arm64 > > armmp \ > > + armmp-lpae kirkwood loongson-3 marvell octeon orion5x > > powerpc64le \ > > + rt-686-pae rt-amd64 s390x" > > + > > +# No longer needed: > > DISTRO_SUITE ?=3D "stretch" > > DISTRO_COMPONENTS ?=3D "main contrib non-free" > > DISTRO_APT_SOURCE ?=3D "http://ftp.debian.org/debian" > > DISTRO_APT_SOURCE_SEC ?=3D "http://security.debian.org/debian-secur > > ity" > > -DISTRO_CONFIG_SCRIPT ?=3D "debian-configscript.sh" > > DISTRO_MULTICONF_BOOTSTRAP ?=3D "base updates security" > > DISTRO_MULTICONF_APTSOURCES ?=3D "${DISTRO_MULTICONF_BOOTSTRAP}" > > -DISTRO_KERNELS ?=3D "4kc-malta 586 5kc-malta 686 686-pae amd64 arm64 > > armmp \ > > - armmp-lpae kirkwood loongson-3 marvell octeon orion5x > > powerpc64le \ > > - rt-686-pae rt-amd64 s390x" > > diff --git a/meta-isar/conf/distro/debian-stretch.list b/meta- > > isar/conf/distro/debian-stretch.list > > new file mode 100644 > > index 0000000..bfa5cf9 > > --- /dev/null > > +++ b/meta-isar/conf/distro/debian-stretch.list > > @@ -0,0 +1,3 @@ > > +deb http://ftp.de.debian.org/debian stretch main > > contrib non-free > > +deb http://ftp.de.debian.org/debian stretch-updates=09 > > main contrib non-free > > +deb http://security.debian.org class=3D"Apple-tab-span" > > style=3D"white-space:pre"> stretch/updates main contrib non- > > free > > diff --git a/meta-isar/conf/distro/debian-wheezy.conf b/meta- > > isar/conf/distro/debian-wheezy.conf > > index f5ab6eb..2108f9b 100644 > > --- a/meta-isar/conf/distro/debian-wheezy.conf > > +++ b/meta-isar/conf/distro/debian-wheezy.conf > > @@ -1,14 +1,17 @@ > > -# Debian wheezy multistrap configuration > > +# Debian wheezy distribution configuration > > # > > # This software is a part of ISAR. > > # Copyright (C) 2015-2016 ilbers GmbH > > =20 > > +DISTRO_APT_SOURCES +=3D "conf/distro/debian-wheezy.list" > > +DISTRO_CONFIG_SCRIPT ?=3D "debian-configscript.sh" > > +DISTRO_KERNELS ?=3D "486 686-pae amd64 rt-686-pae rt-amd64 versatile > > vexpress \ > > + iop32x ixp4xx kirkwood mv78xx0 mx5 omap orion5x" > > + > > +# No longer needed: > > DISTRO_SUITE ?=3D "wheezy" > > DISTRO_COMPONENTS ?=3D "main contrib non-free" > > DISTRO_APT_SOURCE ?=3D "http://ftp.debian.org/debian" > > DISTRO_APT_SOURCE_SEC ?=3D "http://security.debian.org/debian-secur > > ity" > > -DISTRO_CONFIG_SCRIPT ?=3D "debian-configscript.sh" > > DISTRO_MULTICONF_BOOTSTRAP ?=3D "base updates security" > > DISTRO_MULTICONF_APTSOURCES ?=3D "${DISTRO_MULTICONF_BOOTSTRAP}" > > -DISTRO_KERNELS ?=3D "486 686-pae amd64 rt-686-pae rt-amd64 versatile > > vexpress \ > > - iop32x ixp4xx kirkwood mv78xx0 mx5 omap orion5x" > > diff --git a/meta-isar/conf/distro/debian-wheezy.list b/meta- > > isar/conf/distro/debian-wheezy.list > > new file mode 100644 > > index 0000000..0bfa98e > > --- /dev/null > > +++ b/meta-isar/conf/distro/debian-wheezy.list > > @@ -0,0 +1,3 @@ > > +deb http://ftp.de.debian.org/debian wheezy main > > contrib non-free > > +deb http://ftp.de.debian.org/debian wheezy-updates m > > ain contrib non-free > > +deb http://security.debian.org class=3D"Apple-tab-span" > > style=3D"white-space:pre"> wheezy/updates main contrib non- > > free > > diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta- > > isar/conf/distro/raspbian-jessie.conf > > index c2a867d..57d0e7d 100644 > > --- a/meta-isar/conf/distro/raspbian-jessie.conf > > +++ b/meta-isar/conf/distro/raspbian-jessie.conf > > @@ -1,13 +1,17 @@ > > -# Raspbian stable multistrap configuration > > +# Raspbian stable distribution configuration > > # > > # This software is a part of ISAR. > > # Copyright (C) 2015-2016 ilbers GmbH > > =20 > > +DISTRO_APT_SOURCES +=3D "conf/distro/raspbian-jessie.list" > > +DISTRO_APT_KEYS +=3D "https://archive.raspbian.org/raspbian.public.k > > ey;sha256sum=3Dca59cd4f2bcbc3a1d41ba6815a02a8dc5c175467a59bd87edeac45 > > 8f4a5345de" > > +DISTRO_CONFIG_SCRIPT?=3D "raspbian-configscript.sh" > > +DISTRO_KERNELS ?=3D "rpi rpi2 rpi-rpfv rpi2-rpfv" > > + > > +# No longer needed: > > DISTRO_SUITE ?=3D "jessie" > > DISTRO_COMPONENTS ?=3D "main contrib non-free firmware" > > DISTRO_APT_SOURCE ?=3D "http://archive.raspbian.org/raspbian" > > DISTRO_APT_SOURCE_SEC ?=3D "" > > -DISTRO_CONFIG_SCRIPT ?=3D "raspbian-configscript.sh" > > DISTRO_MULTICONF_BOOTSTRAP ?=3D "base" > > DISTRO_MULTICONF_APTSOURCES ?=3D "${DISTRO_MULTICONF_BOOTSTRAP}" > > -DISTRO_KERNELS ?=3D "rpi rpi2 rpi-rpfv rpi2-rpfv" > > diff --git a/meta-isar/conf/distro/raspbian-jessie.list b/meta- > > isar/conf/distro/raspbian-jessie.list > > new file mode 100644 > > index 0000000..792f9c6 > > --- /dev/null > > +++ b/meta-isar/conf/distro/raspbian-jessie.list > > @@ -0,0 +1 @@ > > +deb http://archive.raspbian.org/raspbian class=3D"Apple-tab- > > span" style=3D"white-space:pre"> jessie main contrib non-free > > firmware > > diff --git a/meta/recipes-core/isar-bootstrap/files/isar-apt.conf > > b/meta/recipes-core/isar-bootstrap/files/isar-apt.conf > > new file mode 100644 > > index 0000000..a62feb1 > > --- /dev/null > > +++ b/meta/recipes-core/isar-bootstrap/files/isar-apt.conf > > @@ -0,0 +1,2 @@ > > +APT::Install-Recommends "0"; > > +APT::Install-Suggests "0"; > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb > > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb > > new file mode 100644 > > index 0000000..2ddefa4 > > --- /dev/null > > +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb > > @@ -0,0 +1,205 @@ > > +# Minimal debian root file system > > +# > > +# This software is a part of ISAR. > > +# Copyright (c) Siemens AG, 2018 > > +# > > +# SPDX-License-Identifier: MIT > > + > > +Description =3D "Minimal debian root file system" > > + > > +LICENSE =3D "gpl-2.0" > > +LIC_FILES_CHKSUM =3D > > "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=3D751419260aa9544 > > 99f7abaabaa882bbe" > > +FILESPATH_prepend :=3D "${THISDIR}/files:" > > +SRC_URI =3D "file://isar-apt.conf" > > +PV =3D "1.0" > > + > > +WORKDIR =3D "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}" > > +DEBOOTSTRAP ?=3D "" > > +ROOTFSDIR =3D "${WORKDIR}/rootfs" > > +APTPREFS =3D "${WORKDIR}/apt-preferences" > > +APTSRCS =3D "${WORKDIR}/apt-sources" > > +APTKEYFILES =3D "" > > +APTKEYRING =3D "${WORKDIR}/apt-keyring.gpg" > > +DEBOOTSTRAP_KEYRING =3D "" > > + > > +python () { > > + from urllib.parse import urlparse > > + > > + debootstrap =3D d.getVar("DEBOOTSTRAP", True) > > + if not debootstrap: > > + target =3D d.getVar("DISTRO_ARCH", True) > > + machine =3D os.uname()[4] > > + m =3D { > > + "x86_64": ["i386", "amd64"], > > + "x86": ["i386"], > > + } > > + if machine not in m or target not in m[machine]: > > + debootstrap =3D "qemu-debootstrap" > > + else: > > + debootstrap =3D "debootstrap" > > + d.setVar("DEBOOTSTRAP", debootstrap) > > + > > + distro_apt_keys =3D d.getVar("DISTRO_APT_KEYS", False) > > + if distro_apt_keys: > > + d.setVar("DEBOOTSTRAP_KEYRING", "--keyring ${APTKEYRING}") > > + for key in distro_apt_keys.split(): > > + url =3D urlparse(key) > > + filename =3D os.path.basename(url.path) > > + d.appendVar("SRC_URI", " %s" % key) > > + d.appendVar("APTKEYFILES", " %s" % filename) > > +} > > + > > +def aggregate_files(d, file_list, file_out): > > + import shutil > > + > > + with open(file_out, "wb") as out_fd: > > + for entry in file_list: > > + entry_real =3D bb.parse.resolve_file(entry, d) > > + with open(entry_real, "rb") as in_fd: > > + shutil.copyfileobj(in_fd, out_fd, 1024*1024*10) > > + out_fd.write("\n".encode()) > > + > > +def parse_aptsources_list_line(source_list_line): > > + import re > > + > > + s =3D source_list_line.strip() > > + > > + if s.startswith("#"): > > + return None > > + > > + type, s =3D re.split("\s+", s, maxsplit=3D1) > > + if type not in ["deb", "deb-src"]: > > + return None > > + > > + options =3D "" > > + options_match =3D > > re.match("\[\s*(\S+=3D\S+(?=3D\s))*\s*(\S+=3D\S+)\s*\]\s+", s) > > + if options_match: > > + options =3D options_match.group(0).strip() > > + s =3D s[options_match.end():] > > + > > + source, s =3D re.split("\s+", s, maxsplit=3D1) > > + > > + suite, s =3D re.split("\s+", s, maxsplit=3D1) > > + > > + components =3D " ".join(s.split()) > > + > > + return type, options, source, suite, components > > + > > +def get_distro_primary_source_entry(d): > > + apt_sources_list =3D (d.getVar("DISTRO_APT_SOURCES", True) or > > "").split() > > + for entry in apt_sources_list: > > + entry_real =3D bb.parse.resolve_file(entry, d) > > + with open(entry_real, "r") as in_fd: > > + for line in in_fd: > > + parsed =3D parse_aptsources_list_line(line) > > + if parsed: > > + type, _, source, suite, components =3D parsed > > + if type =3D=3D "deb": > > + return source, suite, components > > + return "", "", "" > > + > > +def get_distro_source(d): > > + return get_distro_primary_source_entry(d)[0] > > + > > +def get_distro_suite(d): > > + return get_distro_primary_source_entry(d)[1] > > + > > +def get_distro_components_argument(d): > > + components =3D get_distro_primary_source_entry(d)[2] > > + if components and components.strip(): > > + return "--components=3D%s" % ",".join(components.split()) > > + else: > > + return "" > > + > > +do_generate_keyring[stamp-extra-info] =3D "${DISTRO}-${DISTRO_ARCH}" > > +do_generate_keyring[dirs] =3D "${WORKDIR}" > > +do_generate_keyring[vardeps] +=3D "DISTRO_APT_KEYS" > > +do_generate_keyring() { > > + if [ -n "${@d.getVar("APTKEYFILES", True) or ""}" ]; then > > + for keyfile in ${@d.getVar("APTKEYFILES", True)}; do > > + gpg --no-default-keyring --keyring "${APTKEYRING}" -- > > import "$keyfile" >=20 > This code touches my private "~/.gnupg" folder's content, what is > not=20 > desirable behavior. Isar should touch files *only* in "build/tmp" > folder. Are you sure? $ find .gnupg -type f | sort | xargs b2sum > gpgsums.a $ gpg --no-default-keyring --keyring ./test1.db --import raspbian.public.key gpg: enabled debug flags: memstat gpg: keybox './test1.db' created gpg: key 9165938D90FDDD2E: public key "Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) " imported gpg: Total number processed: 1 gpg: imported: 1 gpg: keydb: handles=3D3 locks=3D2 parse=3D2 get=3D2 gpg: build=3D1 update=3D0 insert=3D1 delete=3D0 gpg: reset=3D1 found=3D2 not=3D2 cache=3D0 not=3D0 gpg: kid_not_found_cache: count=3D0 peak=3D0 flushes=3D0 gpg: sig_cache: total=3D6 cached=3D4 good=3D4 bad=3D0 gpg: random usage: poolsize=3D600 mixed=3D0 polls=3D0/0 added=3D0/0 outmix=3D0 getlvl1=3D0/0 getlvl2=3D0/0 gpg: rndjent stat: collector=3D0x0000000000000000 calls=3D0 bytes=3D0 gpg: secmem usage: 0/32768 bytes in 0 blocks $ find .gnupg -type f | sort | xargs b2sum > gpgsums.b $ diff -u gpgsums.a gpgsums.b [no output] I could add the '--homedir' parameter, but normally it shouldn't use it because I manually select a different keyring. Claudius >=20 > gpg already supports changing of home directory using --homedir > option.=20 > So I think we could create dedicated folder "${TMPDIR}/gpg" and > store=20 > keys here. >=20 > At the moment I'm testing if debootstrap supports custom gpg > storage.=20 > Will come back with the results. >=20 > Alex >=20 > > + done > > + fi > > +} > > +addtask generate_keyring before do_build after do_unpack > > + > > +do_apt_config_prepare[stamp-extra-info] =3D "${DISTRO}- > > ${DISTRO_ARCH}" > > +do_apt_config_prepare[vardeps] +=3D "\ > > + APTPREFS \ > > + DISTRO_APT_PREFERENCES \ > > + DEBDISTRONAME \ > > + APTSRCS \ > > + DISTRO_APT_SOURCES \ > > + " > > +python do_apt_config_prepare() { > > + apt_preferences_out =3D d.getVar("APTPREFS", True) > > + apt_preferences_list =3D (d.getVar("DISTRO_APT_PREFERENCES", > > True) or "" > > + ).split() > > + aggregate_files(d, apt_preferences_list, apt_preferences_out) > > + > > + apt_sources_out =3D d.getVar("APTSRCS", True) > > + apt_sources_list =3D (d.getVar("DISTRO_APT_SOURCES", True) or > > "").split() > > + > > + aggregate_files(d, apt_sources_list, apt_sources_out) > > +} > > +addtask apt_config_prepare before do_build after > > do_generate_keyring > > + > > +do_bootstrap[stamp-extra-info] =3D "${DISTRO}-${DISTRO_ARCH}" > > +do_bootstrap[vardeps] +=3D "DISTRO_APT_SOURCES" > > +do_bootstrap() { > > + if [ -e "${ROOTFSDIR}" ]; then > > + sudo umount -l "${ROOTFSDIR}/dev" || true > > + sudo umount -l "${ROOTFSDIR}/proc" || true > > + sudo rm -rf "${ROOTFSDIR}" > > + fi > > + E=3D"${@bb.utils.export_proxies(d)}" > > + sudo -E "${DEBOOTSTRAP}" --verbose \ > > + --variant minbase \ > > + --arch "${DISTRO_ARCH}" \ > > + ${@get_distro_components_argument(d)} > > \ > > + ${DEBOOTSTRAP_KEYRING} \ > > + "${@get_distro_suite(d)}" \ > > + "${ROOTFSDIR}" \ > > + "${@get_distro_source(d)}" > > +} > > +addtask bootstrap before do_build after do_apt_config_prepare > > + > > +do_apt_config_install[stamp-extra-info] =3D "${DISTRO}- > > ${DISTRO_ARCH}" > > +do_apt_config_install() { > > + sudo mkdir -p "${ROOTFSDIR}/etc/apt/preferences.d" > > + sudo install -v -m644 "${APTPREFS}" \ > > + "${ROOTFSDIR}/etc/apt/preferences.d/boot > > strap" > > + sudo mkdir -p "${ROOTFSDIR}/etc/apt/sources.list.d" > > + sudo install -v -m644 "${APTSRCS}" \ > > + "${ROOTFSDIR}/etc/apt/sources.list.d/boo > > tstrap.list" > > + sudo rm -f "${ROOTFSDIR}/etc/apt/sources.list" > > + sudo mkdir -p "${ROOTFSDIR}/etc/apt/apt.conf.d" > > + sudo install -v -m644 "${WORKDIR}/isar-apt.conf" \ > > + "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar. > > conf" > > +} > > +addtask apt_config_install before do_build after do_bootstrap > > + > > +do_apt_update[stamp-extra-info] =3D "${DISTRO}-${DISTRO_ARCH}" > > +do_apt_update() { > > + sudo mount -t devtmpfs -o mode=3D0755,nosuid devtmpfs > > ${ROOTFSDIR}/dev > > + sudo mount -t proc none ${ROOTFSDIR}/proc > > + > > + E=3D"${@bb.utils.export_proxies(d)}" > > + export DEBIAN_FRONTEND=3Dnoninteractive > > + sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y > > + sudo -E chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y > > \ > > + -o > > Debug::pkgProblemResolver=3Dyes > > +} > > +addtask apt_update before do_build after do_apt_config_install > > + > > +do_deploy[stamp-extra-info] =3D "${DISTRO}-${DISTRO_ARCH}" > > +do_deploy[dirs] =3D "${DEPLOY_DIR_IMAGE}" > > +do_deploy() { > > + ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}- > > ${DISTRO_ARCH}" > > +} > > +addtask deploy before do_build after do_apt_update > > + > > +CLEANFUNCS =3D "clean_deploy" > > +clean_deploy() { > > + rm -f "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${DISTRO_ARCH}" > > +} > >=20 >=20 >=20 --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153 Keyserver: hkp://pool.sks-keyservers.net --=-7dDO1y6NqQovq1R1AWN8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEb/LlnwDGvCgx2GTBEXPLGZgIsVMFAlqpMRIACgkQEXPLGZgI sVPhkQ//a03ZUKdryIN+Bra81VslS6FdJw3FVr7Wf/ISUh+9qCMogX/78sTES5pl 1CY/JCsFoC29FSjCCbjXyp4tFK0/Hzx5qD6GuZH1ndnknXUQqYKj3tfIFXXu5+6+ gobbcnh/864GOLkFZ4R31FIZwQEcf7TYANbGmIg/XWtz+kcuoyjAlPKyaNbvFXgJ j95oyt2D98fn54Zje9wKY5d+BrMXjnmeyhCAtcrtcbQYhXy/EAKnQbXy+9+a/oLK 9LgVHy5iRuMQnCEemrBdW7Ir5MOGClM1SidoIS8UKWFw8VPKTwlLKZ+AstwXBzLp xjqkKsbIqQ9T/p4Miw+ih9B/xr+Wj/vQDzFHJTeACgXfad8w9ZYyuVbrdGUO9y3v JRWw2oYUSnNebKj7h95hCGHZr5eUg+kwNwVObR608JUZQDFc3dgWfZvZVp3TQG3I R9hquLeH31NeBg8FvTbIJNtJOc050MjV7VyyjCAgCsyS6Rjvg1ogKfX33LF+8nbm QYHyG3pKz/sOKgRzqdZ1KqcgcoBtfAjkX8mGmp6tv0CBK/ExAUW6gimaifjpNOAR iw7BLTPmpNhMO1L3M+cASm9fpAl714yglkDfveS+BZ2VpH1nuAj8teQEEhPpQYZD Z5P3Ci1rYrY2vhXuYD079AU86x5SqAHxLuRjaYBtAw3SYBWHF+4= =qV6o -----END PGP SIGNATURE----- --=-7dDO1y6NqQovq1R1AWN8--