* [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS
@ 2019-08-09 11:06 Jan Kiszka
2019-08-19 10:25 ` Baurzhan Ismagulov
2019-08-22 11:14 ` Baurzhan Ismagulov
0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2019-08-09 11:06 UTC (permalink / raw)
To: isar-users; +Cc: Claudius Heine
From: Jan Kiszka <jan.kiszka@siemens.com>
Analogously to DISTRO_BOOTSTRAP_KEYS, this allows to override the key
used for bootstrapping the host distro. This is required when using
custom repos e.g.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
doc/user_manual.md | 1 +
meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/user_manual.md b/doc/user_manual.md
index ed181aa..289fd1d 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -318,6 +318,7 @@ Some other variables include:
- `HOST_ARCH` - The Debian architecture of SDK root filesystem (e.g., `amd64`). By default set to current Debian host architecture. This variable is optional.
- `HOST_DISTRO_APT_SOURCES` - List of apt source files for SDK root filesystem. This variable is optional.
- `HOST_DISTRO_APT_PREFERENCES` - List of apt preference files for SDK root filesystem. This variable is optional.
+ - `HOST_DISTRO_BOOTSTRAP_KEYS` - Analogously to DISTRO_BOOTSTRAP_KEYS: List of gpg key URIs used to verify apt bootstrap repo for the host.
- `DISTRO_APT_PREMIRRORS` - The preferred mirror (append it to the default URI in the format `ftp.debian.org my.preferred.mirror`. This variable is optional.
- `THIRD_PARTY_APT_KEYS` - List of gpg key URIs used to verify apt repos for apt installation after bootstrapping
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
index ee8f362..8363465 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
@@ -12,8 +12,9 @@ DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}-${D
ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}.lock"
require isar-bootstrap.inc
-# We only build debian host buildchroot environments
-DISTRO_BOOTSTRAP_KEYS = ""
+
+HOST_DISTRO_BOOTSTRAP_KEYS ?= ""
+DISTRO_BOOTSTRAP_KEYS = "${HOST_DISTRO_BOOTSTRAP_KEYS}"
do_apt_config_prepare[dirs] = "${WORKDIR}"
do_apt_config_prepare[vardeps] += "\
--
2.16.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS
2019-08-09 11:06 [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS Jan Kiszka
@ 2019-08-19 10:25 ` Baurzhan Ismagulov
2019-08-19 11:21 ` Jan Kiszka
2019-08-22 11:14 ` Baurzhan Ismagulov
1 sibling, 1 reply; 4+ messages in thread
From: Baurzhan Ismagulov @ 2019-08-19 10:25 UTC (permalink / raw)
To: isar-users
On Fri, Aug 09, 2019 at 01:06:26PM +0200, Jan Kiszka wrote:
> Analogously to DISTRO_BOOTSTRAP_KEYS, this allows to override the key
> used for bootstrapping the host distro. This is required when using
> custom repos e.g.
This fails on my host as shown below. Does it work for you?
With kind regards,
Baurzhan.
. isar-init-build-env ../build
time bitbake multiconfig:qemuamd64-stretch:isar-image-base
ERROR: /home/ibr/w/work/j/isar/src/isarr/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb: Error executing a python function in <code>:
The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 3, function: <module>
0001:__anon_125__home_ibr_w_work_j_isar_src_isarr_meta_classes_base_bbclass(d)
0002:__anon_144__home_ibr_w_work_j_isar_src_isarr_meta_classes_base_bbclass(d)
*** 0003:__anon_62__home_ibr_w_work_j_isar_src_isarr_meta_recipes_core_isar_bootstrap_isar_bootstrap_inc(d)
File: '/home/ibr/w/work/j/isar/src/isarr/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc', lineno: 53, function: __anon_62__home_ibr_w_work_j_isar_src_isarr_meta_recipes_core_isar_bootstrap_isar_bootstrap_inc
0049: distro_bootstrap_keys += own_pub_key.split()
0050:
0051: for key in distro_bootstrap_keys:
0052: d.appendVar("SRC_URI", " %s" % key)
*** 0053: fetcher = bb.fetch2.Fetch([key], d)
0054: filename = fetcher.localpath(key)
0055: d.appendVar("DISTRO_BOOTSTRAP_KEYFILES", " %s" % filename)
0056:
0057: for key in third_party_apt_keys:
File: '/home/ibr/w/work/j/isar/src/isarr/bitbake/lib/bb/fetch2/__init__.py', lineno: 1604, function: __init__
1600:
1601: for url in urls:
1602: if url not in self.ud:
1603: try:
*** 1604: self.ud[url] = FetchData(url, d, localonly)
1605: except NonLocalMethod:
1606: if localonly:
1607: self.ud[url] = None
1608: pass
File: '/home/ibr/w/work/j/isar/src/isarr/bitbake/lib/bb/fetch2/__init__.py', lineno: 1227, function: __init__
1223: self.lockfile = None
1224: self.mirrortarballs = []
1225: self.basename = None
1226: self.basepath = None
*** 1227: (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(d.expand(url))
1228: self.date = self.getSRCDate(d)
1229: self.url = url
1230: if not self.user and "user" in self.parm:
1231: self.user = self.parm["user"]
File: '/home/ibr/w/work/j/isar/src/isarr/bitbake/lib/bb/fetch2/__init__.py', lineno: 368, function: decodeurl
0364: """
0365:
0366: m = re.compile('(?P<type>[^:]*)://((?P<user>[^/;]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
0367: if not m:
*** 0368: raise MalformedUrl(url)
0369:
0370: type = m.group('type')
0371: location = m.group('location')
0372: if not location:
Exception: bb.fetch2.MalformedUrl: The URL: '' is invalid and cannot be interpreted
ERROR: Failed to parse recipe: /home/ibr/w/work/j/isar/src/isarr/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS
2019-08-19 10:25 ` Baurzhan Ismagulov
@ 2019-08-19 11:21 ` Jan Kiszka
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2019-08-19 11:21 UTC (permalink / raw)
To: isar-users
On 19.08.19 12:25, Baurzhan Ismagulov wrote:
> On Fri, Aug 09, 2019 at 01:06:26PM +0200, Jan Kiszka wrote:
>> Analogously to DISTRO_BOOTSTRAP_KEYS, this allows to override the key
>> used for bootstrapping the host distro. This is required when using
>> custom repos e.g.
>
> This fails on my host as shown below. Does it work for you?
>
Reproduced, preparatory patch the fix the reason for this sent. This patch can
then go on top.
Jan
> With kind regards,
> Baurzhan.
>
>
> . isar-init-build-env ../build
> time bitbake multiconfig:qemuamd64-stretch:isar-image-base
> ERROR: /home/ibr/w/work/j/isar/src/isarr/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb: Error executing a python function in <code>:
>
> The stack trace of python calls that resulted in this exception/failure was:
> File: '<code>', lineno: 3, function: <module>
> 0001:__anon_125__home_ibr_w_work_j_isar_src_isarr_meta_classes_base_bbclass(d)
> 0002:__anon_144__home_ibr_w_work_j_isar_src_isarr_meta_classes_base_bbclass(d)
> *** 0003:__anon_62__home_ibr_w_work_j_isar_src_isarr_meta_recipes_core_isar_bootstrap_isar_bootstrap_inc(d)
> File: '/home/ibr/w/work/j/isar/src/isarr/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc', lineno: 53, function: __anon_62__home_ibr_w_work_j_isar_src_isarr_meta_recipes_core_isar_bootstrap_isar_bootstrap_inc
> 0049: distro_bootstrap_keys += own_pub_key.split()
> 0050:
> 0051: for key in distro_bootstrap_keys:
> 0052: d.appendVar("SRC_URI", " %s" % key)
> *** 0053: fetcher = bb.fetch2.Fetch([key], d)
> 0054: filename = fetcher.localpath(key)
> 0055: d.appendVar("DISTRO_BOOTSTRAP_KEYFILES", " %s" % filename)
> 0056:
> 0057: for key in third_party_apt_keys:
> File: '/home/ibr/w/work/j/isar/src/isarr/bitbake/lib/bb/fetch2/__init__.py', lineno: 1604, function: __init__
> 1600:
> 1601: for url in urls:
> 1602: if url not in self.ud:
> 1603: try:
> *** 1604: self.ud[url] = FetchData(url, d, localonly)
> 1605: except NonLocalMethod:
> 1606: if localonly:
> 1607: self.ud[url] = None
> 1608: pass
> File: '/home/ibr/w/work/j/isar/src/isarr/bitbake/lib/bb/fetch2/__init__.py', lineno: 1227, function: __init__
> 1223: self.lockfile = None
> 1224: self.mirrortarballs = []
> 1225: self.basename = None
> 1226: self.basepath = None
> *** 1227: (self.type, self.host, self.path, self.user, self.pswd, self.parm) = decodeurl(d.expand(url))
> 1228: self.date = self.getSRCDate(d)
> 1229: self.url = url
> 1230: if not self.user and "user" in self.parm:
> 1231: self.user = self.parm["user"]
> File: '/home/ibr/w/work/j/isar/src/isarr/bitbake/lib/bb/fetch2/__init__.py', lineno: 368, function: decodeurl
> 0364: """
> 0365:
> 0366: m = re.compile('(?P<type>[^:]*)://((?P<user>[^/;]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
> 0367: if not m:
> *** 0368: raise MalformedUrl(url)
> 0369:
> 0370: type = m.group('type')
> 0371: location = m.group('location')
> 0372: if not location:
> Exception: bb.fetch2.MalformedUrl: The URL: '' is invalid and cannot be interpreted
>
> ERROR: Failed to parse recipe: /home/ibr/w/work/j/isar/src/isarr/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS
2019-08-09 11:06 [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS Jan Kiszka
2019-08-19 10:25 ` Baurzhan Ismagulov
@ 2019-08-22 11:14 ` Baurzhan Ismagulov
1 sibling, 0 replies; 4+ messages in thread
From: Baurzhan Ismagulov @ 2019-08-22 11:14 UTC (permalink / raw)
To: isar-users
On Fri, Aug 09, 2019 at 01:06:26PM +0200, Jan Kiszka wrote:
> Analogously to DISTRO_BOOTSTRAP_KEYS, this allows to override the key
> used for bootstrapping the host distro. This is required when using
> custom repos e.g.
Applied to next, thanks.
With kind regards,
Baurzhan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-22 11:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 11:06 [PATCH] isar-bootstrap-host: Introduce HOST_DISTRO_BOOTSTRAP_KEYS Jan Kiszka
2019-08-19 10:25 ` Baurzhan Ismagulov
2019-08-19 11:21 ` Jan Kiszka
2019-08-22 11:14 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox