Basic Hooks

Basic and core package hooks.

exception dput.hooks.basics.BadDistributionError

Subclass of the dput.exceptions.HookException.

Thrown if the allowed-distribution checker encounters an issue.

exception dput.hooks.basics.BinaryUploadError

Subclass of the dput.exceptions.HookException.

Thrown if the check-debs checker encounters an issue.

exception dput.hooks.basics.GPGCheckerError

Subclass of the dput.exceptions.HookException.

Thrown if the gpg checker encounters an issue.

exception dput.hooks.basics.HashValidationError

Subclass of the dput.exceptions.HookException.

Thrown if the checksum checker encounters an issue.

exception dput.hooks.basics.SourceMissingError

Subclass of the dput.exceptions.HookException.

Thrown if the source checker encounters an issue.

exception dput.hooks.basics.SuiteMismatchError

Subclass of the dput.exceptions.HookException.

Thrown if the suite-mismatch checker encounters an issue.

dput.hooks.basics.check_allowed_distribution(changes, profile, interface)

The allowed-distribution checker is a stock dput checker that checks packages intended for upload for a valid upload distribution.

Profile key: none

Example profile:

{
    ...
    "allowed_distributions": "(?!UNRELEASED)",
    "distributions": ["unstable", "testing"]
    ...
}

The allowed_distributions key is in Python re syntax.

dput.hooks.basics.check_debs_in_upload(changes, profile, interface)

The check-debs checker is a stock dput checker that checks packages intended for upload for .deb packages.

Profile key: foo

Example profile:

{
    "skip": false,
    "enforce": "debs"
}
skip controls if the checker should drop out without checking
for anything at all.
enforce This controls what we check for. Valid values are
“debs” or “source”. Nonsense values will cause an abort.
dput.hooks.basics.check_distribution_matches(changes, profile, interface)

The suite-mismatch checker is a stock dput checker that checks packages intended for upload for matching Distribution and last Changelog target.

Profile key: none

This checker simply verified that the Changes’ Distribution key matches the last changelog target. If the mixup is between experimental and unstable, it’ll remind you to pass -c unstable -d experimental to sbuild.

dput.hooks.basics.check_gpg_signature(changes, profile, interface)

The gpg checker is a stock dput checker that checks packages intended for upload for a GPG signature.

Profile key: gpg

Example profile:

{
    "allowed_keys": [
        "8F049AD82C92066C7352D28A7B585B30807C2A87",
        "B7982329"
    ]
}

allowed_keys is an optional entry which contains all the keys that may upload to this host. This can come in handy if you use more then one key to upload to more then one host. Use any length of the last N chars of the fingerprint.

dput.hooks.basics.check_protected_distributions(changes, profile, interface)

The protected distributions checker is a stock dput checker that makes sure, users intending an upload for a special care archive ( testing-proposed-updates, stable-security, etc.) did really follow the archive policies for that.

Profile key: none

dput.hooks.basics.validate_checksums(changes, profile, interface)

The checksum checker is a stock dput checker that checks packages intended for upload for correct checksums. This is actually the most simple checker that exists.

Profile key: none.

Example profile:

{
    ...
    "hash": "md5"
    ...
}

The hash may be one of md5, sha1, sha256.

Previous topic

Hook Implementations

Next topic

Lintian Checker Implementation

This Page