mini_buildd.api package¶
Submodules¶
mini_buildd.api.client_1_0 module¶
-
class
mini_buildd.api.client_1_0.
Daemon
(host, port='8066', proto='http', auto_confirm=False, dry_run=False, batch_mode=False, django_mode=True)¶ Bases:
object
-
bulk_migrate
(packages, repositories=None, codenames=None, suites=None)¶ Bulk-migrate a package over repositories, base distributions and suites.
-
call
(command, args=None, output='python', raise_on_error=True)¶
-
get_codenames
(repo)¶
-
get_package_versions
(src_package, dist_regex='.*')¶ Produce a dict with all (except rollback) available versions of this package (key=distribution, value=info dict: version, dsc_url, log_url, changes_url*).
-
has_package
(distribution, src_package, version=None, or_greater=False)¶ Check if a specific package is in repository.
-
identity
¶ The Archive’s Identity.
-
login
(user=None)¶ Login. Use the user’s mini-buildd keyring for auth, like mini-buildd-tool.
-
repositories
¶
-
status
¶
-
wait_for_package
(distribution, src_package, version=None, or_greater=False, max_tries=-1, sleep=60, initial_sleep=0, raise_on_error=True)¶ Block until a specific package is in repository.
-
Module contents¶
-
class
mini_buildd.api.
Command
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
object
-
ADMIN
= 3¶
-
ARGUMENTS
= []¶
-
AUTH
= 0¶
-
COMMAND
= None¶
-
COMMON_ARG_OPTIONS
= (['--options', '-O'], {'default': 'ignore-lintian=true', 'metavar': 'OPTIONS', 'action': 'store', 'help': "upload options (see user manual); separate multiple options by '|'"})¶
-
COMMON_ARG_VERSION
= (['--version', '-V'], {'default': '', 'metavar': 'VERSION', 'action': 'store', 'help': '\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'})¶
-
CONFIRM
= False¶
-
LOGIN
= 1¶
-
NEEDS_RUNNING_DAEMON
= False¶
-
NONE
= 0¶
-
STAFF
= 2¶
-
arg_false2none
(key)¶
-
classmethod
docstring
()¶
-
classmethod
get_default_args
()¶
-
has_flag
(flag)¶
-
-
class
mini_buildd.api.
GetDputConf
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Get recommended dput config snippet.
Usually, this is for integration in your personal ~/.dput.cf.
-
COMMAND
= 'getdputconf'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
GetKey
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Get GnuPG public key.
-
COMMAND
= 'getkey'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
GetSourcesList
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Get sources.list (apt lines).
Usually, this output is put to a file like ‘/etc/sources.list.d/mini-buildd-xyz.list’.
-
ARGUMENTS
= [(['codename'], {'help': 'codename (base distribution) to get apt lines for'}), (['--repository', '-R'], {'default': '.*', 'metavar': 'REPO', 'action': 'store', 'help': 'repository name regex.'}), (['--suite', '-S'], {'default': '.*', 'metavar': 'SUITE', 'action': 'store', 'help': 'suite name regex.'}), (['--with-deb-src', '-s'], {'default': False, 'action': 'store_true', 'help': 'also list deb-src apt lines.'}), (['--with-extra-sources', '-x'], {'default': False, 'action': 'store_true', 'help': 'also list extra sources needed.'})]¶
-
COMMAND
= 'getsourceslist'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
List
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
List packages matching a shell-like glob pattern; matches both source and binary package names.
-
ARGUMENTS
= [(['pattern'], {'help': 'limit packages by name (glob pattern)'}), (['--with-rollbacks', '-r'], {'default': False, 'action': 'store_true', 'help': 'also list packages on rollback distributions'}), (['--distribution', '-D'], {'default': '', 'metavar': 'DIST', 'action': 'store', 'help': 'limit distributions by name (regex)'}), (['--type', '-T'], {'default': '', 'metavar': 'TYPE', 'action': 'store', 'help': 'package type: dsc, deb or udeb (like reprepo --type)'})]¶
-
AUTH
= 1¶
-
COMMAND
= 'list'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
LogCat
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Cat last n lines of the mini-buildd’s log.
-
ARGUMENTS
= [(['--lines', '-n'], {'default': 500, 'metavar': 'N', 'action': 'store', 'help': 'cat (approx.) the last N lines', 'type': <class 'int'>})]¶
-
AUTH
= 2¶
-
COMMAND
= 'logcat'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Meta
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Call arbitrary meta functions for models; usually for internal use only.
-
ARGUMENTS
= [(['model'], {'help': "Model path, for example 'source.Archive'"}), (['function'], {'help': "Meta function to call, for example 'add_from_sources_list'"})]¶
-
AUTH
= 3¶
-
COMMAND
= 'meta'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Migrate
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Migrate a source package (along with all binary packages).
-
ARGUMENTS
= [(['package'], {'help': 'source package name'}), (['distribution'], {'help': "distribution to migrate from (if this is a '-rollbackN' distribution, this will perform a rollback restore)"}), (['--version', '-V'], {'default': '', 'metavar': 'VERSION', 'action': 'store', 'help': '\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'})]¶
-
AUTH
= 2¶
-
COMMAND
= 'migrate'¶
-
CONFIRM
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Port
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Port an internal package.
An internal ‘port’ is a no-changes (i.e., only the changelog will be adapted) rebuild of the given locally-installed package.
-
ARGUMENTS
= [(['package'], {'help': 'source package name'}), (['from_distribution'], {'help': 'distribution to port from'}), (['to_distributions'], {'help': 'comma-separated list of distributions to port to (when this equals the from-distribution, a rebuild will be done)'}), (['--version', '-V'], {'default': '', 'metavar': 'VERSION', 'action': 'store', 'help': '\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'}), (['--options', '-O'], {'default': 'ignore-lintian=true', 'metavar': 'OPTIONS', 'action': 'store', 'help': "upload options (see user manual); separate multiple options by '|'"})]¶
-
AUTH
= 2¶
-
COMMAND
= 'port'¶
-
CONFIRM
= True¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
PortExt
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Port an external package.
An external ‘port’ is a no-changes (i.e., only the changelog will be adapted) rebuild of any given source package.
-
ARGUMENTS
= [(['dsc'], {'help': 'URL of any Debian source package (dsc) to port'}), (['distributions'], {'help': 'comma-separated list of distributions to port to'}), (['--options', '-O'], {'default': 'ignore-lintian=true', 'metavar': 'OPTIONS', 'action': 'store', 'help': "upload options (see user manual); separate multiple options by '|'"})]¶
-
AUTH
= 2¶
-
COMMAND
= 'portext'¶
-
CONFIRM
= True¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
PrintUploaders
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Print all GPG ids allowed to upload to repositories.
-
ARGUMENTS
= [(['--repository', '-R'], {'default': '.*', 'metavar': 'REPO', 'action': 'store', 'help': 'repository name regex.'})]¶
-
AUTH
= 3¶
-
COMMAND
= 'printuploaders'¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Remove
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Remove a source package (along with all binary packages).
-
ARGUMENTS
= [(['package'], {'help': 'source package name'}), (['distribution'], {'help': 'distribution to remove from'}), (['--version', '-V'], {'default': '', 'metavar': 'VERSION', 'action': 'store', 'help': '\nlimit command to that version. Use it for the rare case of\nmultiple version of the same package in one distribution (in\ndifferent components), or just as safeguard\n'})]¶
-
AUTH
= 3¶
-
COMMAND
= 'remove'¶
-
CONFIRM
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Retry
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Retry a previously failed package.
-
ARGUMENTS
= [(['package'], {'help': 'source package name'}), (['version'], {'help': "source package's version"}), (['--repository', '-R'], {'default': '*', 'metavar': 'REPO', 'action': 'store', 'help': 'Repository name -- use only in case of multiple matches.'})]¶
-
AUTH
= 2¶
-
COMMAND
= 'retry'¶
-
CONFIRM
= True¶
-
NEEDS_RUNNING_DAEMON
= True¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
SetUserKey
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Set a user’s GnuPG public key.
-
ARGUMENTS
= [(['key'], {'help': 'GnuPG public key; multiline inputs will be handled as ascii armored full key, one-liners as key ids'})]¶
-
AUTH
= 1¶
-
COMMAND
= 'setuserkey'¶
-
CONFIRM
= True¶
-
run
(_daemon)¶
-
-
class
mini_buildd.api.
Show
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Show a source package.
-
ARGUMENTS
= [(['package'], {'help': 'source package name'}), (['--verbose', '-v'], {'default': False, 'action': 'store_true', 'help': 'verbose output'})]¶
-
COMMAND
= 'show'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Start
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Start the Daemon (engine).
-
ARGUMENTS
= [(['--force-check', '-C'], {'default': False, 'action': 'store_true', 'help': 'run checks on instances even if already checked.'})]¶
-
AUTH
= 3¶
-
COMMAND
= 'start'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Status
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Show the status of the mini-buildd instance.
-
COMMAND
= 'status'¶
-
chroots_str
()¶
-
has_chroot
(codename, arch)¶
-
repositories_str
()¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Stop
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Stop the Daemon (engine).
-
ARGUMENTS
= []¶
-
AUTH
= 3¶
-
COMMAND
= 'stop'¶
-
run
(daemon)¶
-
-
class
mini_buildd.api.
Subscription
(args, request=None, msglog=<logging.Logger object>)¶ Bases:
mini_buildd.api.Command
Manage subscriptions to package notifications.
A package subscription is a tuple ‘PACKAGE:DISTRIBUTION’, where both PACKAGE or DISTRIBUTION may be empty to denote all resp. items.
-
ARGUMENTS
= [(['action'], {'help': 'action to run', 'choices': ['list', 'add', 'remove']}), (['subscription'], {'help': 'subscription pattern'})]¶
-
AUTH
= 1¶
-
COMMAND
= 'subscription'¶
-
run
(daemon)¶
-
-
mini_buildd.api.
django_pseudo_configure
()¶