diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-08-15 14:34:50 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-16 00:03:15 +0100 |
commit | d27f45a692b07caeb3021cc1701f7a1fb77d2ff7 (patch) | |
tree | 1fa207a90fd2e130f63bd12a6d60bffeeea336cd /meta | |
parent | 08128ecf6ba165503e08702d51710eb979d2d1f5 (diff) | |
download | poky-d27f45a692b07caeb3021cc1701f7a1fb77d2ff7.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | 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 518cf8dbe3..942f2dd903 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -104,13 +104,25 @@ class Indexer(object, metaclass=ABCMeta): | |||
104 | class RpmIndexer(Indexer): | 104 | class RpmIndexer(Indexer): |
105 | def write_index(self): | 105 | def write_index(self): |
106 | if self.d.getVar('PACKAGE_FEED_SIGN') == '1': | 106 | if self.d.getVar('PACKAGE_FEED_SIGN') == '1': |
107 | raise NotImplementedError('Package feed signing not yet implementd for rpm') | 107 | signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND')) |
108 | else: | ||
109 | signer = None | ||
108 | 110 | ||
109 | createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c") | 111 | createrepo_c = bb.utils.which(os.environ['PATH'], "createrepo_c") |
110 | result = create_index("%s --update -q %s" % (createrepo_c, self.deploy_dir)) | 112 | result = create_index("%s --update -q %s" % (createrepo_c, self.deploy_dir)) |
111 | if result: | 113 | if result: |
112 | bb.fatal(result) | 114 | bb.fatal(result) |
113 | 115 | ||
116 | # Sign repomd | ||
117 | if signer: | ||
118 | sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE') | ||
119 | is_ascii_sig = (sig_type.upper() != "BIN") | ||
120 | signer.detach_sign(os.path.join(self.deploy_dir, 'repodata', 'repomd.xml'), | ||
121 | self.d.getVar('PACKAGE_FEED_GPG_NAME'), | ||
122 | self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'), | ||
123 | armor=is_ascii_sig) | ||
124 | |||
125 | |||
114 | class OpkgIndexer(Indexer): | 126 | class OpkgIndexer(Indexer): |
115 | def write_index(self): | 127 | def write_index(self): |
116 | arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS", | 128 | arch_vars = ["ALL_MULTILIB_PACKAGE_ARCHS", |