summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/package_manager.py14
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):
104class RpmIndexer(Indexer): 104class 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
114class OpkgIndexer(Indexer): 126class 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",