[elbe-devel] [PATCH v2 1/7] rfs: fix cdrom build keyring problems
Bastian Germann
bage at linutronix.de
Fri Jan 15 17:39:44 CET 2021
Am 14.01.21 um 18:07 schrieb Torben Hohn:
> elbe-keyring.gpg is not put on the cdrom anymore.
>
> Create a keyring containing repo.pub from the cdrom
> in /etc/apt/trusted.gpg.d/elbe-cdrom.gpg
>
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
Reviewed-by: Bastian Germann <bage at linutronix.de>
(resent because there was a typo)
> ---
> elbepack/rfs.py | 28 +++++++++++++++++++---------
> 1 file changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index 2f4336376..4bc58707b 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -200,19 +200,25 @@ class BuildEnv:
> strapcmd += ' --include="%s"' % includepkgs
>
> if not self.xml.is_cross(host_arch):
> - # ignore gpg verification if install from cdrom, cause debootstrap
> - # seems to ignore /etc/apt/trusted.gpg.d/elbe-keyring.gpg
> - # 01/2017 manut
> - if self.xml.has(
> - "project/noauth") or self.xml.has("project/mirror/cdrom"):
> + if self.xml.has("project/noauth"):
> cmd = '%s --no-check-gpg --arch=%s "%s" "%s" "%s"' % (
> strapcmd, arch, suite, self.rfs.path, primary_mirror)
> else:
> - cmd = '%s --arch=%s "%s" "%s" "%s"' % (
> - strapcmd, arch, suite, self.rfs.path, primary_mirror)
> + if self.xml.has("project/mirror/cdrom"):
> + keyring = ' --keyring="%s"' % (
> + self.rfs.fname('/elbe.keyring'))
> + else:
> + keyring = ''
> +
> + cmd = '%s --arch=%s %s "%s" "%s" "%s"' % (
> + strapcmd, arch, keyring, suite, self.rfs.path, primary_mirror)
>
> try:
> self.cdrom_mount()
> + if keyring:
> + do('apt-key --keyring "%s" add "%s/targetrepo/repo.pub"' % (
> + self.rfs.fname('/elbe.keyring'),
> + self.rfs.fname("cdrom")))
> do(cmd)
> except CommandError:
> cleanup = True
> @@ -229,8 +235,8 @@ class BuildEnv:
> strapcmd, arch, suite, self.rfs.path, primary_mirror)
> else:
> if self.xml.has("project/mirror/cdrom"):
> - keyring = ' --keyring="%s/targetrepo/elbe-keyring.gpg"' % (
> - self.rfs.fname("cdrom"))
> + keyring = ' --keyring="%s"' % (
> + self.rfs.fname('/elbe.keyring'))
> else:
> keyring = ''
>
> @@ -239,6 +245,10 @@ class BuildEnv:
>
> try:
> self.cdrom_mount()
> + if keyring:
> + do('apt-key --keyring "%s" add "%s/targetrepo/repo.pub"' % (
> + self.rfs.fname('/elbe.keyring'),
> + self.rfs.fname("cdrom")))
> do(cmd)
>
> ui = "/usr/share/elbe/qemu-elbe/" + self.xml.defs["userinterpr"]
>
More information about the elbe-devel
mailing list