Status
Motivation
debsign is a command of devscripts that sign a Debian .changes and .dsc file pare using GPG, the command cannot use in environment witout TTY, for example invokeking by CI.
I had tried to use debsign from subprocess module of Python as follow, but entering passphrase prompt is always returned. It was the same in the case of using gnupg-agent and keyring.:
>>> import subprocess >>> import shlex >>> command0 = 'echo -e "%s\n%s\n"' % (`passphrase`, `passphrase`) >>> command1 = '/usr/bin/debsign -k %s %s' % (`keyid`, `.changes`) >>> process0 = subprocess.Popen(shlex.split(command0), ... stdin=subprocess.PIPE, ... stdout=subprocess.PIPE, ... stderr=subprocess.PIPE) >>> process1 = subprocess.Popen(shlex.split(command1), ... stdin=process0.stdout, ... stdout=subprocess.PIPE, ... stderr=subprocess.PIPE) >>> stdout, stderr = process.communicate()
So, I decided to make a Python library to do the same behavior debsign.
Goal
It is enable to sign .changes and .dsc files with GPG without the input of interactive passphrase.
It can also be used by a user can not login shell on the CI, such as Jenkins.
Requires
Debian system, or the system derived from Debian.
Debian GNU/Linux Wheezy
Debian GNU/Linux Jessie/Sid
Ubuntu 14.04 LTS
Debian package as follows;
gnupg
dput
lintian
python (= python2.7) or python3
Python packages as follows;
python_gnupg (as debian package is python-gnupg or python3-gnupg)
python_debian (as debian package is python-debian or python3-debian)
chardet (as debian package is python-chardet or python3-chardet)
Usage
Generic usage;:
>>> from pydebsign import debsign
>>> debsign.debsign_process('/path/to/some.changes', passphrase='secretkey')
When use another GPG Keyring instead of default GPG keyring;:
>>> from pydebsign import debsign
>>> debsign.debsign_process('/path/to/some.changes', passphrase='secretkey',
... keyid='keyid', gnupghome='/path/to/gpghome')
History
0.1.5 (2015-08-25)
Changes Sphinx theme to sphinx_rtd_theme.
Merge pull request #9 from mkouhei/travis-packages
Adds execute apt-get update.
Enabled sudo explicitly.
0.1.4 (2014-12-21)
Unsupported Python 3.2
Added Sphinx documents and applied Read the docs
Migrated pep8, pyflakes, pychecker, pylint to Tox
0.1.3 (2014-05-31)
Fixed #6 dput check local section is failed
Unsupported Python2.6
0.1.2 (2014-05-27)
Fixed #3 cannot decode umlaut.
0.1.1 (2014-05-26)
Resolved the backward compatibility for python_gnupg 0.3.0 (Wheezy version).
0.1.0 (2014-05-26)
Initial release
TODO
Adding command line interface.
Metadata
Release files for pydebsign 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydebsign-0.1.5.tar.gz | 33.9 kB | Without provenance | Details for pydebsign-0.1.5.tar.gz |
Release files / pydebsign-0.1.5.tar.gz
| Download URL | pydebsign-0.1.5.tar.gz |
|---|---|
| Size | 33.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
badcdd602c7065704bfd1076c5cfc8a37d2888af928ae70ea6474602c02ac42d
|
|
BLAKE2b-256 checksum How to use checksums |
c4b48f447bb7baa24c81ec8b3cd5583e9b2a602c5c11eb49f9e49f44fa4ce6e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pydebsign 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.