Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow specifying signing key #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ To pass these commands to sdist_dsc when calling bdist_deb, do this::
dh_systemd_start helpers at the correct time during build.
--sign-results Use gpg to sign the resulting .dsc and
.changes file
--sign-key Specify signing key
--dist-dir (-d) directory to put final built
distributions in (default='deb_dist')
--patch-already-applied (-a) patch was already applied (used when
Expand Down
1 change: 1 addition & 0 deletions stdeb/command/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def initialize_options(self):
self.with_dh_virtualenv = False
self.with_dh_systemd = False
self.sign_results = False
self.sign_key = None
self.ignore_source_changes = False
self.compat = DH_DEFAULT_VERS

Expand Down
1 change: 1 addition & 0 deletions stdeb/command/sdist_dsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def run(self):
patch_posix=self.patch_posix,
remove_expanded_source_dir=self.remove_expanded_source_dir,
sign_dsc=self.sign_results,
sign_key=self.sign_key,
ignore_source_changes=self.ignore_source_changes,
)

Expand Down
5 changes: 5 additions & 0 deletions stdeb/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def check_call(*popenargs, **kwargs):
'dh_systemd_start helpers at the correct time during build.'),
('sign-results', None,
'Use gpg to sign the resulting .dsc and .changes file'),
('sign-key=', None,
'Specify signing key'),
('ignore-source-changes', None,
'Ignore all changes on source when building source package (add -i.* '
'option to dpkg-source)'),
Expand Down Expand Up @@ -1336,6 +1338,7 @@ def build_dsc(debinfo,
remove_expanded_source_dir=0,
debian_dir_only=False,
sign_dsc=False,
sign_key=None,
ignore_source_changes=False,
):
"""make debian source package"""
Expand Down Expand Up @@ -1562,6 +1565,8 @@ def build_dsc(debinfo,

if not sign_dsc:
args += ['-uc', '-us']
elif sign_key is not None:
args += ['--sign-key={}'.format(sign_key)]

if ignore_source_changes:
args.append('-i.*')
Expand Down