From: Jan Kiszka <jan.kiszka@siemens.com>
To: Claudius Heine <ch@denx.de>,
Alexander Smirnov <asmirnov@ilbers.de>,
claudius.heine.ext@siemens.com, isar-users@googlegroups.com
Subject: Re: [PATCH v2 0/5] Debootstrap integration
Date: Fri, 23 Feb 2018 21:35:47 +0100 [thread overview]
Message-ID: <0aefe5d7-cf4f-b5c7-a58a-b6ca3c233142@siemens.com> (raw)
In-Reply-To: <7f7c073f-804a-9f98-356d-7818928156ce@denx.de>
On 2018-02-23 08:40, Claudius Heine wrote:
> Hi Alex,
>
> On 02/22/2018 03:21 PM, Alexander Smirnov wrote:
>> On 02/22/2018 04:18 PM, claudius.heine.ext@siemens.com wrote:
>>> From: Claudius Heine <ch@denx.de>
>>>
>>> Hi,
>>>
>>> this is the new rebased and fixed version of this patchset.
>>>
>>> Cheers,
>>> Claudius
>>>
>>> Changes from v1:
>>> - rebased to current next
>>> - added unmounting of /dev and /proc at the end of do_rootfs in
>>> isar-image-base
>>> This was necessary for image file creation, otherwise it tried to
>>> package stuff from the host.
>>> - added 'isar-bootstrap:do_deploy' dependency to do_rootfs task in
>>> image.bbclass.
>>> - Changed 'RFSDIR' variable name to 'ROOTFSDIR' in
>>> isar-bootstrap-helper.bbclass to be consistent with the variable
>>> name in isar-bootstrap.bb
>>> - Moved 'isar-apt' apt-preference settings from isar-bootstrap.bb to
>>> isar-bootstrap-helper.bbclass
>>> - Removed '--no-install-recommends' parameters in favor of adding the
>>> apt configuration in 'isar-bootstrap.bb'
>>> - unmount and remove possible existing bootstraped directories before
>>> bootstrapping in do_bootstrap task of 'isar-bootstrap.bb'
>>> - changed from /dev ro bind mounts to mounting devtmpfs to /dev to be
>>> consistent with the other places where /dev is mounted.
>>>
>>
>> $ time bitbake multiconfig:qemuarm-wheezy:isar-image-base
>> multiconfig:qemuarm-jessie:isar-image-base
>> multiconfig:qemuarm-stretch:isar-image-base
>> multiconfig:qemui386-jessie:isar-image-base
>> multiconfig:qemui386-stretch:isar-image-base
>> multiconfig:qemuamd64-jessie:isar-image-base
>> multiconfig:qemuamd64-stretch:isar-image-base
>> multiconfig:rpi-jessie:isar-image-base
>> multiconfig:qemuarm64-stretch:isar-image-base
>>
>> ERROR: mc:rpi-jessie:isar-bootstrap-1.0-r0 do_bootstrap: Function
>> failed: do_bootstrap (log file is located at
>> /home/builder/isar/build/tmp/work/raspbian-jessie-armhf/isar-bootstrap/temp/log.do_bootstrap.29056)
>>
>> ERROR: Logfile of failure stored in:
>> /home/builder/isar/build/tmp/work/raspbian-jessie-armhf/isar-bootstrap/temp/log.do_bootstrap.29056
>>
>> ERROR: Task
>> (multiconfig:rpi-jessie:/home/builder/isar/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb:do_bootstrap)
>> failed with exit code '1'
>>
>> builder@zbook:~/isar$ cat
>> /home/builder/isar/build/tmp/work/raspbian-jessie-armhf/isar-bootstrap/temp/log.do_bootstrap.29056
>>
>> DEBUG: Executing shell function do_bootstrap
>> I: Running command: debootstrap --arch armhf --foreign --verbose
>> --variant minbase --components=main,contrib,non-free,firmware jessie
>> /home/builder/isar/build/tmp/work/raspbian-jessie-armhf/isar-bootstrap/rootfs
>> http://archive.raspbian.org/raspbian
>> I: Retrieving Release
>> I: Retrieving Release.gpg
>> I: Checking Release signature
>> E: Release signed by unknown key (key id 9165938D90FDDD2E)
>> WARNING: exit code 1 from a shell command.
>> ERROR: Function failed: do_bootstrap (log file is located at
>> /home/builder/isar/build/tmp/work/raspbian-jessie-armhf/isar-bootstrap/temp/log.do_bootstrap.29056)
>
> Thx.
>
> Is that the only issue that occured? In other words do all the other
> targets where the key was available on the host run through without any
> problems and the resulting image looks good? I am just asking to
> decrease iteration over the testing-fixing cycle. If that is the only
> problem, then I guess that this patchset can be merged after I
> successfully fixed the usage of repository keys, right?
There are some more issues, will comment on them in the patches.
This one here consists of several problems. First, we are missing the
Raspbian repo key. The question is how to obtain it. We could do this:
---8<---
From: Jan Kiszka <jan.kiszka@siemens.com>
Subject: [PATCH] Carry Raspbian public key ring
debootstrap only contains the Debian keys and requires a specific one
for other bootstrap repositories. One of them we support is Raspbian.
This imports the Raspbian public key in GPG format and makes them
available for bootstrapping by defining DISTRO_KEYRING in the distro
conf.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta-isar/conf/distro/raspbian-jessie.conf | 1 +
.../isar-bootstrap/files/raspbian.public.key.gpg | Bin 0 -> 1225 bytes
meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 10 ++++++++--
3 files changed, 9 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-core/isar-bootstrap/files/raspbian.public.key.gpg
diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-isar/conf/distro/raspbian-jessie.conf
index 51d3023..89b769f 100644
--- a/meta-isar/conf/distro/raspbian-jessie.conf
+++ b/meta-isar/conf/distro/raspbian-jessie.conf
@@ -9,3 +9,4 @@ DISTRO_COMPONENTS ?= "main contrib non-free firmware"
DISTRO_APT_SOURCE ?= "http://archive.raspbian.org/raspbian"
DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
+DISTRO_KEYRING ?= "raspbian.public.key.gpg"
diff --git a/meta/recipes-core/isar-bootstrap/files/raspbian.public.key.gpg b/meta/recipes-core/isar-bootstrap/files/raspbian.public.key.gpg
new file mode 100644
index 0000000000000000000000000000000000000000..c438c3e4c06d6c679db3071c9bdda71416a99b35
GIT binary patch
literal 1225
zcmV;)1UCDb0SyFCc*1D`2msGpm>Th%h_P)c%5B{Gj^+H_Vx<@C+wVtcMV`p^QtJm(
zbt-pSjSf2f>lpyXa#ruMvl*a~bH)1r4uc;)MCe)%sbh>c#z@(>gCXt%zmPi`IKcBc
z1hyn0(A*d@ut#D`JhgPk_BZ_ED2q-|uPxdFH$h_Xd)JqP<uBn?EkN&+M?UDNvoCH9
z_6t^_4fwd%ubA#?DHSo{@}N$IlSYBsw&O)>=pRi8Y_L0PW&6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ugmAlBIONUj4dyDteI1x_4VwY<=I6iOpo_VJ2|I`r&{YYVn=&Z~oGgxp(s28D#K
zMe+nz9q+c9_)ah`otuZ5O`(m`0Pk`Z7sCQf6^WhC{2DVai;i%@mo6`Z<e9Ec)L^z!
zJ^e`78-FA+JGR31L&WH)kPniYl(%?ajZDnB!yHF&%mIp3{$6glaSD791WsXiBU_0?
zxR4qtYZCpD0jP(W9#)J+fXV5Nu56V>rk@yKE8A1>u2VD9vs@=k8y;K>B*E1Ln$Ni-
n5>?)d^5cjU@!t24JXLnUVEu?)?E{fxrcsM-z{P+pGkx~<R=X+6
literal 0
HcmV?d00001
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
index 60da4b1..0eb26f1 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
@@ -10,7 +10,9 @@ Description = "Minimal debian root file system"
LICENSE = "gpl-2.0"
LIC_FILES_CHKSUM = "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
FILESPATH_prepend := "${THISDIR}/files:"
-SRC_URI = "file://isar-apt.conf"
+SRC_URI = " \
+ file://isar-apt.conf \
+ file://raspbian.public.key.gpg"
PV = "1.0"
WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}"
@@ -61,10 +63,14 @@ do_bootstrap() {
sudo umount -l "${ROOTFSDIR}/proc" || true
sudo rm -rf "${ROOTFSDIR}"
fi
+ if [ -n "${DISTRO_KEYRING}" ]; then
+ KEYRING_ARG="--keyring ${WORKDIR}/${DISTRO_KEYRING}"
+ fi
E="${@bb.utils.export_proxies(d)}"
sudo -E "${DEBOOTSTRAP}" --verbose \
--variant minbase \
--arch "${DISTRO_ARCH}" \
+ ${KEYRING_ARG} \
${@ gen_components_argument(d)} \
"${DISTRO_SUITE}" \
"${ROOTFSDIR}" \
@@ -125,4 +131,4 @@ do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
do_deploy() {
ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${DISTRO_ARCH}"
}
-addtask deploy before do_build after do_apt_update
\ No newline at end of file
+addtask deploy before do_build after do_apt_update
--
2.13.6
We could, of course, also download the key and convert it to gpg format
on-the-fly for use by debootstrap.
The second problem is then apparently a bug related to qemu-debootstrap:
The second stage bootstrap is called without specifying the mirror URL
once again, and that causes debootstrap to leave DEF_MIRROR in
/etc/apt/sources.list behind. That's a debian mirror, not a raspbian,
and the succeeding installation will fail.
I worked around it via this:
diff --git a/meta-isar/conf/distro/raspbian-jessie.conf b/meta-isar/conf/distro/raspbian-jessie.conf
index 89b769f..36faf01 100644
--- a/meta-isar/conf/distro/raspbian-jessie.conf
+++ b/meta-isar/conf/distro/raspbian-jessie.conf
@@ -7,6 +7,7 @@ DISTRO_SUITE ?= "jessie"
# For bootstrap purposes still needed:
DISTRO_COMPONENTS ?= "main contrib non-free firmware"
DISTRO_APT_SOURCE ?= "http://archive.raspbian.org/raspbian"
+DISTRO_APT_SOURCES += "conf/distro/raspbian-jessie.list"
DISTRO_CONFIG_SCRIPT?= "raspbian-configscript.sh"
DISTRO_KERNELS ?= "rpi rpi2 rpi-rpfv rpi2-rpfv"
DISTRO_KEYRING ?= "raspbian.public.key.gpg"
diff --git a/meta-isar/conf/distro/raspbian-jessie.list b/meta-isar/conf/distro/raspbian-jessie.list
new file mode 100644
index 0000000..c9a353c
--- /dev/null
+++ b/meta-isar/conf/distro/raspbian-jessie.list
@@ -0,0 +1 @@
+deb http://archive.raspbian.org/raspbian jessie main contrib non-free firmware
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
index 0eb26f1..af9f494 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.bb
@@ -75,6 +75,7 @@ do_bootstrap() {
"${DISTRO_SUITE}" \
"${ROOTFSDIR}" \
"${DISTRO_APT_SOURCE}"
+ sudo rm -f ${ROOTFSDIR}/etc/apt/sources.list
}
addtask bootstrap before do_build after do_unpack
Jan
next prev parent reply other threads:[~2018-02-23 20:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 13:18 claudius.heine.ext
2018-02-22 13:18 ` [PATCH v2 1/5] implement isar-bootstrap using debootstrap claudius.heine.ext
2018-02-23 20:39 ` Jan Kiszka
2018-02-22 13:18 ` [PATCH v2 2/5] meta/isar-bootstrap-helper.bbclass: handle rfs customization centrally claudius.heine.ext
2018-02-22 13:18 ` [PATCH v2 3/5] meta/buildchroot: switch to using isar-bootstrap claudius.heine.ext
2018-02-23 20:44 ` Jan Kiszka
2018-02-22 13:19 ` [PATCH v2 4/5] meta-isar/isar-image-base: " claudius.heine.ext
2018-02-23 20:45 ` Jan Kiszka
2018-02-22 13:19 ` [PATCH v2 5/5] meta-isar/multiconfig: remove multistrap references claudius.heine.ext
2018-02-23 20:46 ` Jan Kiszka
2018-02-22 14:21 ` [PATCH v2 0/5] Debootstrap integration Alexander Smirnov
2018-02-22 18:09 ` Jan Kiszka
2018-02-23 7:40 ` Claudius Heine
2018-02-23 20:35 ` Jan Kiszka [this message]
2018-02-26 6:43 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0aefe5d7-cf4f-b5c7-a58a-b6ca3c233142@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=asmirnov@ilbers.de \
--cc=ch@denx.de \
--cc=claudius.heine.ext@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox