qubes-installer-qubes-os/pungi/Hacky-way-to-pass-gpgkey-to-lorax.patch
Marek Marczykowski-Górecki f2edc02cac
lorax, pungi: pass gpgkey info from pungi to lorax
Since lorax is running as a separate process, it no longer use
repositories objects setup by pykickstart (which is already patched to
support gpgkey). This means we need somehow pass that info, otherwise
packages will not be verified.

QubesOS/qubes-issues#1807
2016-04-21 19:56:26 +02:00

49 lines
1.9 KiB
Diff

From 3599db0a7bb047ac482eef45b0885ff8d8318d8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Wed, 20 Apr 2016 03:06:02 +0200
Subject: [PATCH] Hacky way to pass gpgkey to lorax
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Invisible Things Lab
Cc: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Since lorax is running in separate process, it no longer use repo
objects initialized by pungi. Because of this, gpgkey+gpgcheck must be
passed down some other way. Appending it to the repository URL is awful,
but is effective:
- if lorax version used doesn't support verification, it will fail
(good)
- it binds key to the repository
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
pungi/gather.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pungi/gather.py b/pungi/gather.py
index 66212d2..6be45e6 100644
--- a/pungi/gather.py
+++ b/pungi/gather.py
@@ -1413,13 +1413,14 @@ class Pungi(PungiBase):
pass
for repo in self.ksparser.handler.repo.repoList:
+ url_suffix = '({})'.format(repo.gpgkey) if repo.gpgkey else ''
if repo.mirrorlist:
# The not bool() thing is because pykickstart is yes/no on
# whether to ignore groups, but yum is a yes/no on whether to
# include groups. Awkward.
- cmd.extend(["--mirrorlist", repo.mirrorlist])
+ cmd.extend(["--mirrorlist", repo.mirrorlist + url_suffix])
else:
- cmd.extend(["--source", repo.baseurl])
+ cmd.extend(["--source", repo.baseurl + url_suffix])
# Add the repo in the destdir to our yum object
cmd.extend(["--source", "file://%s" % self.topdir])
--
2.1.0