Skip to content

Commit

Permalink
Add support for "repo --gpgkey" kickstart option
Browse files Browse the repository at this point in the history
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:
pykickstart/pykickstart#32
  • Loading branch information
marmarek committed Sep 26, 2015
1 parent 46aa54c commit ad0598e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyanaconda/kickstart.py
Expand Up @@ -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.F23_RepoData):
def __init__(self, *args, **kwargs):
""" Add enabled kwarg
Expand All @@ -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.F23_RepoData.__init__(self, *args, **kwargs)

class ReqPart(commands.reqpart.F23_ReqPart):
def execute(self, storage, ksdata, instClass):
Expand Down
4 changes: 4 additions & 0 deletions pyanaconda/packaging/dnfpayload.py
Expand Up @@ -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
Expand Down

0 comments on commit ad0598e

Please sign in to comment.