[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7199/8267] lib/oe/package_manager: re-implement rpm feed signing
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7199/8267] lib/oe/package_manager: re-implement rpm feed signing
- Date: Sun, 17 Dec 2017 05:54:46 +0000 (UTC)
commit d27f45a692b07caeb3021cc1701f7a1fb77d2ff7
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date: Tue Aug 15 14:34:50 2017 +0300
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>
meta/lib/oe/package_manager.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 518cf8d..942f2dd 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]