[elbe-devel] [PATCH 1/1] cdrom rebuild: Use gpg keyring stored on CDROM

Benedikt Spranger b.spranger at linutronix.de
Thu Jul 6 07:40:21 CEST 2017


E.L.B.E. can recreate a RFS from a previously build binary CDROM.
The created Debian repository stored in CDROM is signed by gpg.
Use the stored public gpg-key to verify the repo.

Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
---
 elbepack/rfs.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/elbepack/rfs.py b/elbepack/rfs.py
index 67181b65..239c2336 100644
--- a/elbepack/rfs.py
+++ b/elbepack/rfs.py
@@ -143,8 +143,13 @@ class BuildEnv ():
             cmd = 'debootstrap --no-check-gpg --foreign --arch=%s "%s" "%s" "%s"' % (
                 arch, suite, self.rfs.path, primary_mirror)
         else:
-            cmd = 'debootstrap --foreign --arch=%s "%s" "%s" "%s"' % (
-                arch, suite, self.rfs.path, primary_mirror)
+            if self.xml.has("project/mirror/cdrom"):
+                keyring = ' --keyring="%s/targetrepo/elbe-keyring.gpg"' % (
+                    self.rfs.fname("cdrom"))
+            else:
+                keyring = ''
+            cmd = 'debootstrap --foreign --arch=%s %s "%s" "%s" "%s"' % (
+                arch, keyring, suite, self.rfs.path, primary_mirror)
 
         try:
             self.cdrom_mount()
-- 
2.13.2





More information about the elbe-devel mailing list