From 1d6850f3ac839326c5596db5a570bc7832bb394e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 4 Feb 2012 06:26:12 -0800 Subject: 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. --- pym/portage/repository/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pym/portage/repository') 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' -- cgit v1.2.3-1-g7c22