[master 1/3] Add support for "repo --gpgkey" kickstart option
marmarek
installerbot-noreply at redhat.com
Fri Oct 2 22:29:43 UTC 2015
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek at invisiblethingslab.com>
This adds ability to verify gpg signatures on downloaded packages, which is
especially important when installing from network repository (instead of local
DVD/disk).
This change depends on pykickstart support here:
https://github.com/rhinstaller/pykickstart/pull/32
---
pyanaconda/kickstart.py | 4 ++--
pyanaconda/packaging/dnfpayload.py | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 4fead23..23dc9a2 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1575,7 +1575,7 @@ def execute(self, storage, ksdata, instClass):
parents=request)
storage.createDevice(luksdev)
-class RepoData(commands.repo.F21_RepoData):
+class RepoData(commands.repo.F24_RepoData):
def __init__(self, *args, **kwargs):
""" Add enabled kwarg
@@ -1585,7 +1585,7 @@ def __init__(self, *args, **kwargs):
self.enabled = kwargs.pop("enabled", True)
self.repo_id = kwargs.pop("repo_id", None)
- commands.repo.F21_RepoData.__init__(self, *args, **kwargs)
+ commands.repo.F24_RepoData.__init__(self, *args, **kwargs)
class ReqPart(commands.reqpart.F23_ReqPart):
def execute(self, storage, ksdata, instClass):
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index db49d66..7d4dffb 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -269,6 +269,10 @@ def _add_repo(self, ksrepo):
if ksrepo.excludepkgs:
repo.exclude = ksrepo.excludepkgs
+ if ksrepo.gpgkey:
+ repo.gpgkey = ksrepo.gpgkey
+ repo.gpgcheck = True
+
# If this repo is already known, it's one of two things:
# (1) The user is trying to do "repo --name=updates" in a kickstart file
# and we should just know to enable the already existing on-disk
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/4b31e153d61682d0c7f3446ec19ec306830713bc
More information about the anaconda-patches
mailing list