[elbe-devel] [PATCH 4/5] rfs: convert repo.pub to a keyring and use that

Torben Hohn torben.hohn at linutronix.de
Thu Dec 17 14:32:15 CET 2020


it should probably not reside in the RFS root.
maybe /etc/apt/trusted.gpg.d/elbe-cdrom.gpg ?

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/rfs.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index 28fdce188..cf8ec6046 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -229,8 +229,8 @@ class BuildEnv:
                 strapcmd, arch, suite, self.rfs.path, primary_mirror)
         else:
             if self.xml.has("project/mirror/cdrom"):
-                keyring = ' --keyring="%s/targetrepo/repo.pub"' % (
-                    self.rfs.fname("cdrom"))
+                keyring = ' --keyring="%s"' % (
+                    self.rfs.fname('/elbe.keyring'))
             else:
                 keyring = ''
 
@@ -239,6 +239,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"]
-- 
2.20.1



More information about the elbe-devel mailing list