bts
command-line interface for Debian's Bug Tracking System (BTS)
- Provided by: devscripts (Version: 2.26.10)
- Report a bug
command-line interface for Debian's Bug Tracking System (BTS)
bts [options] command [#comment] [, command [#comment]] ...
bts reply bug-no[#msg-no] , command [#comment] [command [#comment]]...
bts context , commands ... < bug-message.eml
bts show|bugs bug-selection...
bts cache|cleancache bug-selection...
bts subscribe|unsubscribe bug-number
bts reportspam|spamreport bug-number...
bts version|help
$ bts severity 69042 normal $ bts merge 69042 43233 $ bts retitle 69042 This is a better bug description
$ bts severity 69042 normal , merge with 43233 , retitle Another title
$ bts severity 69042 normal , merge it 43233 , retitle it Another title $ bts severity 69042 normal , merge -1 43233 , retitle -1 Another title
$ bts show 69042 # in a browser $ bts show --mbox 69042 # in a mailreader - all messages
$ bts show wget # all bugs in a package $ bts show from:$EMAIL # reported by you
$ bts show --mbox # in packages maintained by you $ bts show --mbox deb@e.mail # .. or someone else's $ bts show --mbox src:wget # in a source package
$ bts reply 43233 # reply to bug no. 43233 $ bts reply 43233 , done # .. and add pseudoheader to close $ bts done 43233 , reply # .. other way around also works # Quote a message $ bts reply 43233#15 # reply to bug no. 43233 quoting message 15 $ bts reply 43233#15 , done # .. and add Control: pseudoheader to close
| bts reply - # reply and quote piped bug message | bts reply - , close #.. and close bug | bts severity normal , close #.. 'reply -' is implied inside supported MUA
Hint: "|" indicates to run from (neo)mutt <pipe-entry> command ("|" key).
| bts context , retitle 'flub: Does not nub!' , reassign flub
| bts context , status | bts context , show | bts show # 'context' is implied in supported MUA | bts subscribe
Hint: selecting several bugs/messages (<tag-prefix><pipe-message> in (neo)mutt) is supported for (only) some commands. See "COMMANDS".
$ bts subscribe 69042
$ bugs=$(bts select src:libc6) $ for bug in $bugs; do echo $bug needs fixing; done
bts is the command-line interface for Debian's Bug Tracking System (BTS). It is intended for use by Debian contributors and if you're reading this that means *you*.
bts helps make the many common tasks involving bugs in Debian more convenien and enhances your workflow with offline capabilities through local caching.
Debian invites everyone to contribute by reporting, analyzing, replying to and triaging bugs -- without the need for permission or so much as an account.
A standard e-mail address (see $EMAIL) and a willingness to learn and collaborate is all that's needed to participate.
That being said we ask you to use bts and the BTS in general responsibly. Start by subscribing to packages (pts-subscribe(1)) or particular bugs of interest to you ("bts subscribe 69042"). Try to observe other Debian contributors' working conventions. The Debian Mentors community <https://wiki.debian.org/DebianMentors> is happy to help if you have questions.
You can find more on how we work at <https://wiki.debian.org/BugTriage> and <https://wiki.debian.org/BugReport/WorkingOn>.
Mistakes happen, but consider that other busy volunteers may have to use time they could otherwise spend fixing bugs to help you clean them up.
To learn from other people in an in-person setting you may find a Bug Squashing Party or more general Debian Event to attend near you: <https://wiki.debian.org/BSP>, <https://wiki.debian.org/DebianEvents>.
bts supports reading bugs in a web- or e-mail-based worflow, but to make changes bts will always send e-mail to a BTS service e-mail address (service@bugs.debian.org).
The web-based workflow supports both graphical and command-line browsers. While graphical browsers such as firefox or chromium may be familiar, you should consider traditional command-line browsers such as w3m(1) or lynx(1) for allowing a more focused workflow without context switches out of your terminal.
The software running the Debian BTS, "Debbugs", has first-class support for these browsers being from the same era of computing.
To make reading and changing bugs enjoyable a highly configurable command-line e-mail client (MUA) such as mutt(1), neomutt(1) or aerc(1) is recommended. By using bts reply and bts context together with your MUA's pipe command you can make full use of bts without so much as leaving your MUA. WARNING: Terminal mailing can be *highly* addictive.
Being E-Mail BTS change requests are asynchrounous and may take considerable time to get through anti-spam measures. You should expect up to half an hour of delay when making your first change.
You will receive an acknowledgment mail from the BTS when the changes are accepted. You can file ACK messages into a folder for mail delivery troubleshooting purposes (check the X-Debian-PR-Message: header for automated filtering) or suppress them using --no-ack or BTS_SUPPRESS_ACKS=yes.
To get started with bts right now use --smtp-reportbug to send emails exclusively to BTS addresses without having to worry about configuration until you need more.
Once you want to send mail directly to wider internet destinations outside BTS mail addresses (for CC'ing people) bts supports the following:
The commands used by bts mirror Debbugs control commands but with support for abbreviations, more relaxed syntax and helpful local validation and cross-checking of the current bug state on the BTS server.
Debbugs control reference: <https://www.debian.org/Bugs/server-control>
bts is also less strict about what constitutes a valid bug number. For example the following are understood:
$ bts severity Bug#85942 normal $ bts severity \#85942 normal
In the latter command a POSIX shell will interpret the hash ("#") as starting a a comment since it's not in the middle of a shellword, so you need to quote or escape it it as we've done here.
bts allows you to abbreviate commands to the shortest unique substring. It understands "bts cl 85942" as an alias for the "close" command.
It is possible to add comments to BTS control commands to explain why the changes were made:
$ bts severity 30321 normal \#Not as severe as claimed
Note that POSIX shells will remove these comments unless the hash "#" comment character is escaped with a backslash as we've done above or quoted with single '' or double quotes "" as below.
$ bts severity 30321 normal '# Still not all that severe'
Generally speaking it's preferred to use the reply command to include "Control" pseudoheaders in your response to the bug report instead. However including comments can still be useful in that context to document what you want to achieve to other contributors in complex cases.
You can send multiple commands in a single e-mail by separating them with a period or comma, like so:
$ bts severity 95672 normal , done 96642 0.38-7 \#Fixed by fix-it.patch
It is important the commas are surrounded by whitespace so your shell passes them to bts as distinct arguments.
$ bts severity 95672 normal , merge 95672 95673 \#they are the same!
Many commands support internal and online consistency checks. For example:
When multiple commands all checks must succeed before any email is sent so you may fearlessly iterate on bts commands.
Many of the checks involve fetching online information from the BTS. Use --offline to disable these. Purely bts internal consistency checks such as marking the same bug as done twice cannot be bypassed this way.
To refer to the last mentioned bug number minus one "-1" may be used. The deprecated alias "it" is also allowed. For example you could write:
$ bts severity 95672 wishlist , retitle -1 bts: please add a foo option
Alternatively you can also omit the bug number entirely as long as the resulting usage is unambigous, i.e. the argument(s) don't look like bug-numbers.
$ bts done 95672 , fixed 0.1-3
Every command allows at least one keyword of to/by/from/with/since/email/+/-/= (see COMMANDS) to disambiguate the meaning.
Commands that take multiple bug numbers (assign/merge/blocked) require the use of a keyword to omit the implicit bug argument, but it is optional for other commands.
$ bts reopen 95672 , merge with 123456 # is equivalent to: $ bts reopen 95672 , merge -1 123456 $ bts reopen 95672 , blocked by 123456 # is equivalent to: $ bts reopen 95672 , blocked -1 123456
When the clone command is involved the meaning of -1 can become confusing. Below we allocate -1 as a "new ID" instead of using it to refer to the previously mentioned bug number 95672. Consequently:
$ bts done 95672 , clone to -1 -2 # is equivalent to: $ bts done 95672 , clone 95672 to -1 -2
and similarly
$ bts done 95672 , clone -1 -1 -2 # expands to: $ bts done 95672 , clone 95672 -1 -2
Further, after the clone -1 command '-1' no longer refers to the implicit bug number, but rather the number newly allocated by the BTS server. You can use 'it' or the keyword syntax to disambiguate.
$ bts clone 95672 to -1 -2 , done # expands to: $ bts clone 95672 to -1 -2 , done 95672
whereas
$ bts clone 95672 to -1 -2 , done -1 # is already fully expanded.
bts examines the devscripts configuration files as described below. Command-line options override the configuration file settings as you'd expect.
The COMMAND must contain the replacement marker "%s" which is expanded to path to an mbox file.
Default depends on mailreaders available on the system. See BTS_MAIL_READER config option.
The command will be split on white space and will not be passed to a shell. Default is /usr/sbin/sendmail. The -t option will be automatically added if the command is /usr/sbin/sendmail or /usr/sbin/exim*. For other mailers, if they require a -t option, this must be included in the SENDMAILCMD, for example: --sendmail="/usr/sbin/mymailer -t".
Conflicts with explicit --mutt, --smtp-hots and --smtp-reportbug. Overrides implicit --mutt and BTS_SMTP_HOST.
Note that one of $DEBEMAIL or $EMAIL must be set in the environment in order to use mutt to send emails.
If --mutt is given --interactive and --force-interactive are ineffective.
--mutt is implied when bts is invoked from inside a command-line mail client as determined by $_ (see BTS_MUTT_COMMAND for detailed logic) and e-mail workflow is active (--mail, BTS_WORKFLOW=mail).
Defaults to 5 seconds when --interactive or --mutt are active; 30 seconds otherwise (--no-interactive).
The host name may be followed by a colon (":") and a port number in order to use a port other than the default. It may also begin with "ssmtp://" or "smtps://" to indicate that SMTPS should be used.
If SMTPS not specified, bts will still try to use STARTTLS if it's advertised by the SMTP host.
Note that one of $DEBEMAIL or $EMAIL must be set in the environment in order to use direct SMTP connections to send emails.
Conflicts with --mutt and --sendmail. Overridden by --smtp-reportbug.
Equivalent to --smtp-host=reportbug.debian.org:587 --interactive.
Note that reportbug.debian.org is rate limited to a small number of mails per hour and only email destined for bugs.debian.org is accepted. Consequently using --cc-addr, BTS_DEFAULT_CC, reply or reassign commands will likeley cause mails to be rejected while sending.
If a username is specified but not a password, bts will prompt for the password before sending the mail.
Note that some SMTP servers may reject the use of a HELO which either does not resolve or does not appear to belong to the host using it.
This is the default behaviour except if --mutt is implicitly active and for some commands which require composing a written reply (done, reply).
For full details about the commands, see the BTS documentation. <https://www.debian.org/Bugs/server-control>
Options that may be specified after the bugs sub-command in addition to or instead of options at the start of the command-line are: -o/--offline/--online, -m/--mbox, --mailreader and --[no-]cache. These are described earlier in this manpage. If either the -o or --offline option is used, or there is already an up-to-date copy in the local cache, the cached version will be used.
When using --mbox reading more than one bug report's mails at once using the argument syntax described below is possible.
The meanings of the possible arguments are as follows:
After the argument specifying what to display, you can optionally specify options to use to format the page or change what it displayed. These are passed to the BTS in the URL downloaded. For example, pass dist=stable to see bugs affecting the stable version of a package, version=1.0 to see bugs affecting that version of a package, or reverse=yes to display newest messages first in a bug log.
If caching has been enabled (that is, --no-cache has not been used, and BTS_CACHE has not been set to no), then any page requested by bts show will automatically be cached, and be available offline thereafter. Pages which are automatically cached in this way will be deleted on subsequent "bts show|bugs|cache" invocations if they have not been accessed in 30 days. Warning: on a filesystem mounted with the "noatime" option, running "bts show|bugs" does not update the cache files' access times; a cached bug will then be subject to auto-cleaning 30 days after its initial download, even if it has been accessed in the meantime.
Other bts commands following on the command-line will be executed after sensible-browser has quit. With most post modern graphical browsers (firefox, chromium) will exit immediately, but when using a terminal browser bts wait for you to quit it before continuing command execution.
The desired browser can be specified and configured by setting the BROWSER environment variable. See sensible-browser(1).
The value of BROWSER may consist of a colon-separated series of browser command parts. These should be tried in order until one succeeds. Each command part may optionally contain the string %s; if it does, the URL to be viewed is substituted there. If a command part does not contain %s, the browser is to be launched as if the URL had been supplied as its first argument. The string %% must be substituted as a single %.
Rationale: We need to be able to specify multiple browser commands so programs obeying this convention can do the right thing in either X or console environments, trying X first. Specifying multiple commands may also be useful for people who share files like .profile across multiple systems. We need %s because some popular browsers have remote-invocation syntax that requires it. Unless %% reduces to %, it won't be possible to have a literal %s in the string.
The following keys are allowed, and may be given multiple times.
For example, to select the set of bugs submitted by jrandomdeveloper@example.com and tagged wontfix, one would use
bts select submitter:jrandomdeveloper@example.com tag:wontfix
If a key is used multiple times then the set of bugs selected includes those matching any of the supplied values; for example
bts select package:foo severity:wishlist severity:minor
returns all bugs of package foo with either wishlist or minor severity.
By default, all populated fields for a bug are displayed.
If verbose is given, empty fields will also be displayed.
If fields is given, only those fields will be displayed. No validity checking is performed on any specified fields.
A draft is prepared, quoting message-no or the latest non-automated message taken from either 1) the bug-number's online MBOX message archive or 2) the MBOX or single raw email message written to standard input (-).
All other bug change commands given are included in the mail as pseudoheader lines -- mostly 'Control:' but more idiomatic headers bts knows about may be used instead.
A reply command reading from STDIN is executed implicitly before other commands when bts is invoked from a supported MUA (see --mutt). The implicit command is cancelled when an explicit reply, context, show|bugs or status command is present.
Similar to reply but for sending plain control@ messages without including a written rationale.
It is useful in the case where a single report actually indicates that multiple distinct bugs have occurred. "New IDs" are negative numbers, separated by spaces, which may be used in subsequent control commands to refer to the newly duplicated bugs. A new report is generated for each new ID.
Changes bug's completion state to "done", closing it for now. Optionally add a version tracking record that it was fixed in version.
The BTS will record who completed a bug. You can see this in the bug status 'done' field:
$ bts status 123456 fields:done
The done command always asks you to compose a mail interactively. Please document why the bug is being closed in your message.
While you should specify which version of the package fixed the bug if possible you can also do this later with the fixed command.
Bugs which remain closed for about a month without email activity are archived (made read-only). Use unarchive to undo this.
Closed, but non-archived bugs can be reopened with the found command.
Clears all fixed version tracking records only if bug is currently closed -- not very predictable behaviour and it is somewhat rude.
Instead prefer the more predictable found command (without arguments) if you really want to do this, but also consider the more respectful approach documented there.
If no message number is given, the summary is cleared.
Clears all existing version tracking records (found and fixed) for each bug. If the optional version is given a 'found' record for the new packages is added. If the affected version is is not yet known use the found command once an analysis is available.
If other packages are merely receiving unactionable reports use the affects command to make the bug show up in their bug listings.
If the bug is likeley to need individual fixes across several packages you should instead clone the bug and reassign the clone to the other package(s). For example:
$ bts clone 69042 to -1 , assign -1 to other-package
The command adds the maintainers of the new package to CC if --mutt or --force-interactive are active.
This implicitly changes bug's completion state to not done indicating it should be acted upon by the maintainer unless version is less than the current highest fixed version on record, see:
$ bts status 123456 fields:fixed_versions
To be respectful consider using the reply command and appeal to the maintainer for why they should still act on the bug. You can simultaniously use additional found commands to record which versions you can demonstrate to be affected in the BTS.
Do not use this if changes were actively made in Debian to address bug. Use done or fixed instead as appropriate.
Version tracking records for a bug are cleared entirely by the reassign command.
This does not affect bug's completion state. Use the done command to indicate no further action is expected on a bug instead.
This does not affect bug's completion state. Use the found command to reopen a bug that was erroniously marked done and fixed in version.
If the bug is not assigned to the correct package use the reassign command instead which also removes all version tracking records.
Note: notfixed is equivalent to the sequence of commands "found bug version", "notfound bug version".
At least one tag must be specified, unless the = flag is used. The command below will remove all tags from the specified bug.
$ bts tags <bug> =
patch, wontfix, moreinfo, unreproducible, fixed, help, security, upstream, pending, d-i, confirmed, ipv6, lfs, fixed-upstream, l10n, newcomer, a11y, ftbfs
There is also a tag for each release of Debian since "potato". Note that this list may be out of date, see the website for the most up to date source.
# Add moreinfo tag
$ bts tag 123456 moreinfo
$ bts tag 123456 +moreinfo
$ bts tag 123456 + moreinfo
# Add fixed, remove wontfix and unreproducible tags
$ bts tag 123456 +fixed -wontfix -unreproducible
$ bts tag 123456 +fixed -wontfix unreproducible
# Clear tag list
$ bts tags 123456 =
The given bug will be listed in the affected package's bug list. This should generally be used where the bug is severe enough to cause multiple reports from users to be assigned to the wrong package. At least one package must be specified, unless the = flag is used. The command
$ bts affects <bug> =
will remove all indications that bug affects other packages.
Add or remove freeform "usertags" on a bug. The name of freeform-tags must be exact, there is no pre-defined list of valid tag names unlike with the tags command.
See tags command for detailed usage. TODO: check usage is exactly the same regarding '+moreinfo' vs '+ moreinfo'.
If no claim is specified, the environment variable DEBEMAIL or EMAIL (checked in that order) is used.
See <https://lists.debian.org/msgid-search/20050908170731.GA20584@cyan.localnet>.
If no claim is specified, the environment variable DEBEMAIL or EMAIL (checked in that order) is used.
For example, to limit the set of bugs affected by the subsequent control commands to those submitted by jrandomdeveloper@example.com and tagged wontfix, one would use
bts limit submitter:jrandomdeveloper@example.com tag:wontfix
If a key is used multiple times then the set of bugs selected includes those matching any of the supplied values; for example
bts limit package:foo severity:wishlist severity:minor
only applies the subsequent control commands to bugs of package foo with either wishlist or minor severity.
The owner of a bug accepts responsibility for dealing with it.
If no email address is specified, the environment variable DEBEMAIL or EMAIL (in that order) is used. If those are not set, or ! is given as email address, your mail system will determine the address used.
After executing this command, you will be sent a subscription confirmation to which you have to reply. When subscribed to a bug report, you receive all relevant emails and notifications.
Use the unsubscribe command to undo the subscription.
As with subscribe above, if no email address is specified, the environment variables DEBEMAIL or EMAIL (in that order) is used. If those are not set, or ! is given as email address, your mail system will determine the address used.
You will receive an unsubscription confirmation to which you need to reply for the unsubscription to be effectiv.
Currently there is no self-service mechanism to list all your subscriptions or to unsubscribe from all bugs. Contact the Debian Listmaster Team <https://wiki.debian.org/Teams/ListMaster> who are responsible for the bug subscription infrastructure.
You can use the cached bugs with the -o switch. For example:
bts -o bugs
bts -o show 12345
Also, bts will update the files in it in a piecemeal fashion as it downloads information from the BTS using the show command. You might thus set up the cache, and update the whole thing once a week, while letting the automatic cache updates update the bugs you frequently refer to during the week.
Some options affect the behaviour of the cache command. The first is the setting of --cache-mode, which controls how much bts downloads of the referenced links from the bug page, including boring bits such as the acknowledgement emails, emails to the control bot, and the mbox version of the bug report. It can take three values: min (the minimum), mbox (download the minimum plus the mbox version of the bug report) or full (the whole works). The second is --force-refresh or -f, which forces the download, even if the cached bug report is up-to-date. The --include-resolved option indicates whether bug reports marked as resolved should be downloaded during caching.
Each of these is configurable from the configuration file, as described below. They may also be specified after the cache command as well as at the start of the command-line.
Finally, -q or --quiet will suppress messages about caches being up-to-date, and giving the option twice will suppress all cache messages (except for error messages).
Beware of caching RC, though: it will take a LONG time! (With 1000+ RC bugs and a delay of 5 seconds between bugs, you're looking at a minimum of 1.5 hours, and probably significantly more than that.)
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced by a shell in that order to set configuration variables. Command-line options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The currently recognised variables are:
When set to mail unlocks implicit enablement of --mutt.
Default depends on mailreaders available on the system. The following are tried in order (first match wins):
Can be overridden by --mailreader command-line option.
The '%s' is replaced by the path to an MBOX file.
Default depends on mail clients available on the system. The following are tried in order:
The '%s' is replaced by the path to a raw draft email message file including headers.
Note that this option takes priority over BTS_SENDMAIL_COMMAND if both are set, unless the --sendmail option is used.
If set to yes it is equivalent to setting both BTS_SMTP_HOST=reportbug.debian.org:587 and BTS_INTERACTIVE=yes.
Please see <https://www.debian.org/Bugs/server-control> for more details on how to control the BTS using emails and <https://www.debian.org/Bugs/> for more information about the BTS.
querybts(1), reportbug(1), pts-subscribe(1), devscripts.conf(5)
This program is Copyright (C) 2001-2003 by Joey Hess <joeyh@debian.org>. Many modifications have been made, Copyright (C) 2002-2005 Julian Gilbey <jdg@debian.org> and Copyright (C) 2007 Josh Triplett <josh@freedesktop.org>.
It is licensed under the terms of the GPL, either version 2 of the License, or (at your option) any later version.