summaryrefslogtreecommitdiffstats
path: root/pym/portage/repository/config.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-04 06:26:12 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-04 06:38:32 -0800
commit1d6850f3ac839326c5596db5a570bc7832bb394e (patch)
treee4885704fdf44262533485fced95c493842957fe /pym/portage/repository/config.py
parent9ad263416ec282d8c6cf007ca84bf716c49c4f69 (diff)
downloadportage-1d6850f3ac839326c5596db5a570bc7832bb394e.tar.gz
portage-1d6850f3ac839326c5596db5a570bc7832bb394e.tar.bz2
portage-1d6850f3ac839326c5596db5a570bc7832bb394e.zip
repoman: support git commit --gpg-sign
In order to sign commits with git, you will need Git >=1.7.9 and your key will have to be configured by `git config user.signingkey key_id`. Also, the repository will need to have "sign-commits = true" in metadata/layout.conf. This will fix bug #333687.
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index ebee234c3..84d97411e 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -49,7 +49,7 @@ class RepoConfig(object):
'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
'eclass_db', 'eclass_locations', 'eclass_overrides', 'format', 'location',
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
- 'name', 'priority', 'sign_manifest', 'sync', 'thin_manifest',
+ 'name', 'priority', 'sign_commit', 'sign_manifest', 'sync', 'thin_manifest',
'update_changelog', 'user_location', 'portage1_profiles',
'portage1_profiles_compat')
@@ -117,6 +117,9 @@ class RepoConfig(object):
self.eapi = eapi
self.name = name
self.missing_repo_name = missing
+ # sign_commit is disabled by default, since it requires Git >=1.7.9,
+ # and key_id configured by `git config user.signingkey key_id`
+ self.sign_commit = False
self.sign_manifest = True
self.thin_manifest = False
self.allow_missing_manifest = False
@@ -148,7 +151,7 @@ class RepoConfig(object):
for value in ('allow-missing-manifest', 'cache-formats',
'create-manifest', 'disable-manifest', 'manifest-hashes',
- 'sign-manifest', 'thin-manifest', 'update-changelog'):
+ 'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'):
setattr(self, value.lower().replace("-", "_"), layout_data[value])
self.portage1_profiles = any(x.startswith("portage-1") \
@@ -688,6 +691,9 @@ def parse_layout_conf(repo_location, repo_name=None):
data['masters'] = masters
data['aliases'] = tuple(layout_data.get('aliases', '').split())
+ data['sign-commit'] = layout_data.get('sign-commits', 'false').lower() \
+ == 'true'
+
data['sign-manifest'] = layout_data.get('sign-manifests', 'true').lower() \
== 'true'