[elbe-devel] [PATCH 06/10] rfs: add key for local repository

Manuel Traut manut at linutronix.de
Wed Apr 3 18:09:39 CEST 2019


On 17:59 Wed 03 Apr     , Torben Hohn wrote:
> On Wed, Apr 03, 2019 at 12:34:54PM +0200, Manuel Traut wrote:
> > newer apt versions (like in stretch) verify the signature of copy
> > repositories.
> > 
> > Error Updating rpcaptcache: W:GPG error: copy:/repo stretch InRelease: The
> > following signatures couldn't be verified because the public key is not
> > available: NO_PUBKEY DCE4316BFFF45EAD, E:The repository 'copy:/repo stretch
> > InRelease' is not signed.
> > 
> > Therefore add the key while entering the chroot and remove it on exit.
> > 
> > Signed-off-by: Manuel Traut <manut at linutronix.de>
> > ---
> >  elbepack/rfs.py | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/elbepack/rfs.py b/elbepack/rfs.py
> > index cb72aba0..6edf7496 100644
> > --- a/elbepack/rfs.py
> > +++ b/elbepack/rfs.py
> > @@ -78,6 +78,7 @@ class BuildEnv (object):
> >                              self.xml.text("project/suite"), self.path))
> >          self.cdrom_mount()
> >          self.rfs.__enter__()
> > +        self.log.chroot(self.rfs.path, 'apt-key add /repo/repo.pub')
> >          return self
> >  
> >      def __exit__(self, typ, value, traceback):
> > @@ -86,6 +87,7 @@ class BuildEnv (object):
> >          if os.path.exists(self.path + '/repo'):
> >              self.log.do("mv %s/repo %s/../" % (self.path, self.path))
> >              self.log.do("rm %s/etc/apt/sources.list.d/local.list" % self.path)
> > +        self.log.do("rm %s/etc/apt/trusted.gpg" % self.path)
> 
> you can not remove /etc/apt/trusted.gpg

it is not there, as long nobody called apt-key add

> it might be ok to create /etc/apt/trusted.gpg.d/local.elbe
> and remove that.

how to create that?

I tried

apt-key --keyring /etc/apt/trusted.gpg.d/elbe.gpg elbe-repo.pub

but it returns with the usage of the commando..


> >  
> >      def debootstrap(self):
> >  
> > -- 
> > 2.20.1
> > 
> 
> -- 
> Torben Hohn
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99
> 
> Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
> can be found here): https://linutronix.de/kontakt/Datenschutz.php
> 
> Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
> Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
> 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner





More information about the elbe-devel mailing list