mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
lib/oe/package_manager: re-implement rpm feed signing
[YOCTO #11209] (From OE-Core rev: 7a33426561ddc72296e33c5e7b8ca38763a7ab07) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
08128ecf6b
commit
d27f45a692
@@ -104,13 +104,25 @@ class Indexer(object, metaclass=ABCMeta):
|
||||
class RpmIndexer(Indexer):
|
||||
def write_index(self):
|
||||
if self.d.getVar('PACKAGE_FEED_SIGN') == '1':
|
||||
raise NotImplementedError('Package feed signing not yet implementd for rpm')
|
||||
signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND'))
|
||||
else:
|
||||
signer = None
|
||||
|
||||
createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c")
|
||||
result = create_index("%s --update -q %s" % (createrepo_c, self.deploy_dir))
|
||||
if result:
|
||||
bb.fatal(result)
|
||||
|
||||
# Sign repomd
|
||||
if signer:
|
||||
sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE')
|
||||
is_ascii_sig = (sig_type.upper() != "BIN")
|
||||
signer.detach_sign(os.path.join(self.deploy_dir, 'repodata', 'repomd.xml'),
|
||||
self.d.getVar('PACKAGE_FEED_GPG_NAME'),
|
||||
self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'),
|
||||
armor=is_ascii_sig)
|
||||
|
||||
|
||||
class OpkgIndexer(Indexer):
|
||||
def write_index(self):
|
||||
arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS",
|
||||
|
||||
Reference in New Issue
Block a user