Skip to main content

Utilities to parse Debian package, copyright and control files

The Python package debian_inspector is a collection of utilities to parse various Debian package manifests, machine readable copyright and control files collectively known as the Debian 822 format (based on the RFC822 email format).

It was originally named “debut” as a portmanteau of DEBian and UTilities.

Origin

This library is based on a heavily modified and remixed combination of original code with code from other origins:

  • python-deb-pkg-tools from @xolox for its handling of Debian packages and the parsing of versions, dependencies and other package-to-package relationship fields and for its ability to process the syntax of Debian versions and compare them. See https://github.com/xolox/python-deb-pkg-tools

  • dlt (Debian license tools) from @agustinhenze for its check of the coverage of a license file Files sections and a lot of inspiration. See https://github.com/agustinhenze/dlt/

  • PGPy from @SecurityInnovation and @Commod0re for its ability to remove a PGP signature from an email. dsc (Debian Source Control) files are typically PGP-signed and are email-like. See https://github.com/SecurityInnovation/PGPy

  • python-dpkg by @TheClimateCorporation and @memory for its ability to process the syntax of Debian versions and to compare them according to the spec. See https://github.com/TheClimateCorporation/python-dpkg

Why?

Why create this seemingly redundant library? The official python-debian tools and several other utilities already provide similar capabilities!

On the surface this is correct, but there are several reasons for a new utility:

  • Existing tools parse control files strictly. This library tries to be more flexible. For instance it can recognize and fix some almost correct copyright files that are not fully “machine readable” but close enough to the spec to be worthy of recovery.

  • Several of these tools have to deal with legacy compatibility. We do not have such a need. For instance, the Python standard library email module and one line of code is enough to parse a Debian 822 file fields. I doubt that this feature was available in the standard library when python-debian was started but it is here now and this vastly simplifies the code.

  • The focus of this library is to parse and inspect control files, not to emit and create them, so the code and tests can be much simpler. For instance, rather than using more complex case-insensitive dictionary keys while preserving case for Deb822-like objects, this library uses lower case keys throughout.

  • The official python-debian library is GPL-licensed making it it hard to combine with Apache-licensed libraries. I tried to work out a licensing change for python-debian with all its authors such that it could be integrated in permissive-licensed Python tools. Even though most current maintainers and contributors were OK with that relicensing to a permissive or an LGPL license, I could not get a reply and agreement from some important legacy authors: therefore the relicensing was not possible.

License

SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause AND MIT

This software combines software from several origins with different licenses. All of these licenses apply as all original files have been refactored and remixed significantly:

Copyright (c) nexB Inc. and others.
Copyright (c) Peter Odding.
Copyright (c) The Climate Corporation (https://climate.com)
Copyright (c) Security Innovation, Inc
Copyright (c) Agustin Henze <tin@sluc.org.ar>

Metadata

Release files for debian-inspector 31.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debian-inspector 31.1.1
File Size Uploaded
debian_inspector-31.1.1.tar.gz 191.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for debian-inspector 31.1.1
File Interpreter ABI Platform
debian_inspector-31.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 239.5 kB

Release files / debian_inspector-31.1.1.tar.gz

Download URL debian_inspector-31.1.1.tar.gz
Size 191.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bb216c62b6fb0fd70cd4e4339081115f4a15ef5d6e23f4c4285eadebbcfc7a05
BLAKE2b-256 checksum
How to use checksums
13f278d96c7e1a9162b0ba71a27e2767422421b1ce10336230c7568865e1b298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / debian_inspector-31.1.1-py3-none-any.whl

Download URL debian_inspector-31.1.1-py3-none-any.whl
Size 47.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32335cccccd194c8dc5ad900a1b078324c44bfc48f496a415af7b2346d834906
BLAKE2b-256 checksum
How to use checksums
ff749463a6c855bfd135c1dbcd8f5d3329a957a05e33c840ddf43eac841e940b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

31.1.1 This release

2 release files

31.1.0

2 release files

31.0.0

2 release files

30.0.0

2 release files

0.9.10

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page