[elbe-devel] [PATCH] Import Debian repository key to chroot directory
Manuel Traut
manuel.traut at linutronix.de
Mon Jun 12 07:10:39 CEST 2017
Hi Philipp,
> https://github.com/Linutronix/elbe/issues/100
>
> Signed-off-by: Philipp Arras <philipp.arras at linutronix.de>
> ---
> elbepack/elbeproject.py | 4 ++++
> elbepack/rfs.py | 12 ++++++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 7197b5f..4b63eae 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -240,6 +240,10 @@ class ElbeProject (object):
> build_sources = build_sources, clean = True )
> skip_pkglist = False
>
> + # Import keyring
> + self.buildenv.import_keys()
> + self.log.printo ("Keys imported")
> +
> # Install packages
> if not skip_pkglist:
> self.install_packages()
> diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> index eadf0e0..cd24d0f 100644
> --- a/elbepack/rfs.py
> +++ b/elbepack/rfs.py
> @@ -188,6 +188,18 @@ class BuildEnv ():
> self.rfs.mkdir_p ("/state/lists/partial")
> self.rfs.touch_file ("/state/status")
>
> + def import_keys(self):
> + if self.xml.has('project/mirror/url-list'):
> + for url in self.xml.node('project/mirror/url-list'):
> + if url.has('key'):
> + l = url.text('key').strip() # URL to key
> + name = l.split('/')[-1] # Filename of key
> +
> + # Download key and add it to Debian keyring
> + self.log.chroot(self.rfs.path, 'wget %s' % l )
this is not working:
04:09:00.736 [split10] running cmd +chroot
/var/cache/elbe/5be6bb32-e8e4-4ffa-9243-1afba9fdedcb/chroot wget
http://debian.linutronix.de/elbe/elbe-repo.pub+
04:09:00.736 [split10]
------------------------------------------------------------------------------
04:09:00.736 [split10] chroot: failed to run command 'wget': No such file or
directory
Because wget is not installed by debootstrap. You need to Download the Key
outside the chroot and then copy it into the chroot.
Your patch was already applied to devel/elbe-2.0. So please send an extra patch
that fixes this.
Thanks,
Manuel
> + self.log.chroot(self.rfs.path, 'apt-key add %s' % name )
> + self.log.chroot(self.rfs.path, 'rm %s' % name)
> +
> def initialize_dirs (self, build_sources=False):
> mirror = self.xml.create_apt_sources_list (build_sources=build_sources)
>
> --
> 2.1.4
>
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
More information about the elbe-devel
mailing list