Experiences in the community

Just another WordPress.com weblog

Reportbug and gmail

Hi all,
Happy New Year. This would be a slightly longish post about reportbug and how nowadays Gmail fails to do the right thing.

First of all I cannot believe I never shared about reportbug. I have known and used this tool for quite sometime. Now my personal history was backwards as I first came to Ubuntu and then came to Debian when it became more simpler, easier to install. If I had kept my eye out it would have been a bit more sooner I guess.

Now one of the things which I like about FOSS is you can share your issues unlike in closed-source software or at least that was the motivation then. If you use any software to any extent you do realize that softwares do mistakes or shows some constraints while doing whatever we want it to do, add to that the various hardware architectures its possible for user to experience an issue which the programmer does not get. Also sometimes the software and hardware mix is so that you would have crashes. All of this needs to be reported to the developers so it could be vetted and then fixed. For this we need bug-reporting tools.

In Ubuntu I was introduced to the tool Apport. Much later I came to know that this tool is inspired and derived from Debian’s ‘Reportbug‘.

So when I started with Debian, one of the first utilities I installed was ‘Reportbug’ as it’s not installed by default. Reporting bugs is a voluntary act and some people might not want to take the effort of reporting bugs or may have privacy issues while reporting bugs with software. Sometimes the developers can also say/reply something nasty so that could also turn off people.

Anyways, installing reportbug is very easy. Use your favorite package manager, make sure that net connectivity is there and then install it. Here’s how you could install it on the CLI. I’m using aptitude as that’s what I have installed.

$ sudo aptitude install reportbug .

The package manager should fetch the package from the repository, download it, extract it. You can see whether it is installed or not by running the following command :-

$ dpkg -l reportbug
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=======================-=======================-==============================================================
ii reportbug 6.3.1 reports bugs in the Debian distribution

You can see whether reportbug is installed or not. If you see the ii in the first column that means it has installed correctly. As can be seen I have the latest unstable snapshot, 6.3.1 atm.

Now once its installed, the first time you run reportbug it asks you to configure it and makes a files called .reportbugrc in your $HOME directory. See :-

$ echo $HOME/.reportbugrc
/home/shirish/.reportbugrc

.reporbugrc tells reportbug how you want to report bugs and how much interaction you want with the system. If you ever want to change anything within your reportbug environment the best way to do that is :-

$ reportbug --configure

This would ask the same set of questions that it had asked the first time around, depending on your choices it will write the answer as needed.

Here is what my .reportbugrc looks like :-

$ cat $HOME/.reportbugrc
# reportbug preferences file
# character encoding: UTF-8
# Version of reportbug this preferences file was written by
reportbug_version "6.3.1"
# default operating mode: one of: novice, standard, advanced, expert
mode standard
# default user interface
ui text
# offline setting - comment out to be online
#offline
# name and email setting (if non-default)
# realname "shirish"
# Disable fallback mode by commenting out the following:
no-cc
header "X-Debbugs-CC: shirishag75@xxxx.xxx"
smtphost reportbug.debian.org
# You can add other settings after this line. See
# /etc/reportbug.conf for a full listing of options.

# Editor
editor "leafpad"

The only manual change I have done is the editor bit, everything else is written by the choices I made by my configuration choices on reportbug. Also blanked out my e-mail address.

While I could share each option and how it works, its aptly described in /etc/reportbug.conf which I guess are most of the common options.

Running reportbug is simple, just fire it up on the command-line and enter the package name and the problem statement.

$ reportbug
Please enter the name of the package in which you have found a problem, or type 'other' to report a more general
problem.
> bash-completion
*** Welcome to reportbug. Use ? for help at prompts. ***
Note: bug reports are publicly archived (including the email address of the submitter).
Detected character set: UTF-8
Please change your locale if this is incorrect.

Using 'shirish ' as your from address.
Getting status for bash-completion...
Checking for newer versions at madison...
D000001: cmpversions a=`1:1.99-2' b=`0:20080705' r=1
D000001: cmpversions a=`1:1.99-2' b=`0:20080705' r=1
D000001: cmpversions a=`1:1.99-2' b=`1:1.99-3' r=-1
D000001: cmpversions a=`1:1.99-2' b=`1:1.99-3' r=-1
D000001: cmpversions a=`1:1.99-2' b=`1:1.3-1' r=1
D000001: cmpversions a=`1:1.99-2' b=`1:1.3-1' r=1
D000001: cmpversions a=`1:1.99-2' b=`1:1.2-3' r=1
D000001: cmpversions a=`1:1.99-2' b=`1:1.2-3' r=1

Your version (1:1.99-2) of bash-completion appears to be out of date.
The following newer release(s) are available in the Debian archive:
unstable: 1:1.99-3
Do you still want to file a report [y|N|q|?]? q

Now my aptitude installation I have made a bit verbose so that’s why you see some more info. For this demonstration I chose a package called bash-completion as this package has been having few issues in the recent days due to changes of location from /etc/bash_completion.d/ to /usr/share/bash-completion which I guess is part of the larger move to move stuff out of /etc and into /usr/share. At least that’s what has been happening in Redhat .

Anyways as can be seen it loads my locale, it tries to also see if the network is up and if it is then tries to see if my package is the latest, if not it would tell me and ask me to upgrade as it did.This is due to the commenting of offline nature of reportbug if you remember in .reporbugrc (that is the default setting).

Hence as I had to update the package version, updated it.

$ dpkg -l bash-completion
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=======================-=======================-==============================================================
ii bash-completion 1:1.99-3 programmable completion for the bash shell

Now trying again :-

$ reportbug
Please enter the name of the package in which you have found a problem, or type 'other' to report a more general
problem.
> bash-completion
*** Welcome to reportbug. Use ? for help at prompts. ***
Note: bug reports are publicly archived (including the email address of the submitter).
Detected character set: UTF-8
Please change your locale if this is incorrect.

Using 'shirish' as your from address.
Getting status for bash-completion...
Checking for newer versions at madison...
D000001: cmpversions a=`1:1.99-3' b=`0:20080705' r=1
D000001: cmpversions a=`1:1.99-3' b=`0:20080705' r=1
D000001: cmpversions a=`1:1.99-3' b=`1:1.99-3' r=0
D000001: cmpversions a=`1:1.99-3' b=`1:1.99-3' r=0
D000001: cmpversions a=`1:1.99-3' b=`1:1.3-1' r=1
D000001: cmpversions a=`1:1.99-3' b=`1:1.3-1' r=1
D000001: cmpversions a=`1:1.99-3' b=`1:1.2-3' r=1
D000001: cmpversions a=`1:1.99-3' b=`1:1.2-3' r=1
Will send report to Debian (per lsb_release).
Querying Debian BTS for reports on bash-completion (source)...
124 bug reports found:

Bugs with severity grave
1) #648319 bash-completion: /etc/bash_completion script doesn't do the job. [RESOLVED]
2) #655286 bash-completion: Doesn't install any completions based on triggers [RESOLVED]

Bugs with severity important
3) #549550 [PATCH] bash-completion: Defined functions clash with user environment
4) #616018 acroread.sh completion breaks bash_completion
5) #630521 files starting with '!' break editors file-based completion
(1-5/124) Is the bug you found listed above [y|N|b|m|r|q|s|f|e|?]?

Now we move ahead a bit. This time, it looks at the Debian BTS and sees if there is/are any other bugs which are marked grave and important and tells/shares those bugs in case it is one of those bugs. We say no to this and press ahead.

(1-5/124) Is the bug you found listed above [y|N|b|m|r|q|s|f|e|?]? n
Bugs with severity normal: 49 remain
6) #282799 bash: Completion of fd redirect after find command limited to directories [RESOLVED]
7) #299229 /etc/bash_completion: 'ci -u prefix' hit on RCS/prefix shadows ./prefix
8) #323613 bash: [COMPLETION] fail to complete commands when prefixed with variable assignment
9) #336987 shell variables should always be a valid completion when syntactically valid [RESOLVED]
10) #350232 shopt -s no_empty_cmd_completion not quite durable enough
11) #366899 bash completion acts weird on dpkg-source
12) #377935 bash: [COMPLETION] completion of ':' mangles filename
13) #399903 bash-completion: does not work with vim view files as ~ is expanded
14) #412944 set command lists contents of /etc/bash_completion
15) #427758 [COMPLETION] filenames starting with =
16) #466067 bash: complete-into-brace should use programmable completion
17) #471266 bash-completion: lvm completion does not work properly
18) #489258 ssh completion only looks for executables
19) #501836 check for conflicts with killall5 (killall on SysV) for killall, pkill and pgrep completions
20) #503691 bash-completion: does not complete files and directories as arguments [RESOLVED]
21) #521407 bash-completion: no completion for ls with variables [RESOLVED]
22) #524869 bash-completion: bash completion does not work on commands prefixed with environment variables
23) #525082 bash default differs from manpage description
(6-23/124) Is the bug you found listed above [y|N|b|m|r|q|s|f|e|?]? n

As can be seen it starts listing all the bugs, even showing some of the resolved bugs which imho is a bug in itself but that is for another day. Assume that I said no to the whole list and we move ahead.

(115-124/124) Is the bug you found listed above [y|N|b|m|r|q|s|f|e|?]? n
Maintainer for bash-completion is 'Bash Completion Maintainers '.
Looking up dependencies of bash-completion...
Getting changed configuration files...

Briefly describe the problem (max. 100 characters allowed). This will be the bug email subject, so keep the summary as
concise as possible, for example: "fails to send email" or "does not start with -q option specified" (enter Ctrl+c to
exit reportbug without reporting a bug).
> bash-completions does not work as expected
How would you rate the severity of this problem or report?

1 critical makes unrelated software on the system (or the whole system) break, or causes serious data loss, or introduces a security hole on systems where you install the package.
2 grave makes the package in question unusable by most or all users, or causes data loss, or introduces a
security hole allowing access to the accounts of users who use the package.
3 serious is a severe violation of Debian policy (that is, the problem is a violation of a 'must' or
'required' directive); may or may not affect the usability of the package. Note that non-severe
policy violations may be 'normal,' 'minor,' or 'wishlist' bugs. (Package maintainers may also
designate other bugs as 'serious' and thus release-critical; however, end users should not do so.).
For the canonical list of issues worthing a serious severity you can refer to this webpage:
http://release.debian.org/wheezy/rc_policy.txt .
4 important a bug which has a major effect on the usability of a package, without rendering it completely
unusable to everyone.
5 does-not-build a bug that stops the package from being built from source. (This is a 'virtual severity'.)
6 normal a bug that does not undermine the usability of the whole package; for example, a problem with a
particular option or menu item.
7 minor things like spelling mistakes and other minor cosmetic errors that do not affect the core
functionality of the package.
8 wishlist suggestions and requests for new features.

Please select a severity level: [normal]

As can be seen you have to describe the issue/problem in 100 characters. This is the heading that each bug asks. For our demonstration purposes I have put up a generic statement ‘bash-completions does not work as expected’ . A good bug-report would have been more precise, something on the lines of this webpage .After this it asks the user to rate the severity of the bug depending on our view-point with normal being the default. Taking that as go-ahead we move and see another choice to be made :-


Please select a severity level: [normal]

Do any of the following apply to this report?

1 d-i This bug is relevant to the development of debian-installer.
2 ipv6 This bug affects support for Internet Protocol version 6.
3 l10n This bug reports a localization/internationalization issue.
4 lfs This bug affects support for large files (over 2 gigabytes).
5 patch You are including a patch to fix this problem.
6 upstream This bug applies to the upstream part of the package.
7 none

Please select tags: (one at a time) [none]

As can be seen there are various tags that could be added to the bug-report. While this is just some of the obvious ones, there are indeed quite a few more. As can be seen the default is ‘none’. We choose that and go ahead.


Spawning leafpad...

Subject: bash-completions are not complete
Package: bash-completion
Version: 1:1.99-3
Severity: normal

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?

*** End of the template - remove these lines ***

-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii bash 4.2-1

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information

It asks you to fill in the issue in detail. You can enter in number of steps how something happened and became an issue. This helps the developer in understanding about your experience. Maybe the developer/maintainer did not use it in that way or whatever.

After you have filled it in it asks :-


Report will be sent to "Debian Bug Tracking System"
Submit this report on bash-completion (e to edit) [y|n|a|c|E|i|l|m|p|q|d|t|s|?]? q
Bug report written as /tmp/reportbug-bash-completion-20120112-24109-NF68HJ

If you want to provide additional information, please wait to receive the bug tracking number via email; you may then
send any extra information to n@bugs.debian.org (e.g. 999999@bugs.debian.org), where n is the bug number. Normally you
will receive an acknowledgement via email including the bug report number within an hour; if you haven’t received a confirmation, then the bug reporting process failed at some point (reportbug or MTA failure, BTS maintenance, etc.).

Now it is asking whether the bug-report should be sent to the Debian BTS. Because I quitted there,the bug-report is saved at /tmp with the filename being ‘reportbug-bash-completion-20120112-24109-NF68HJ’ . The way the bug-reports are kept as ‘reportbug-packagename-dateofsubmission-some random characters’

One thing which I might add here is that the bug-report has some more things which are not seen when the editor is in place.


$ head --lines=7 /tmp/reportbug-bash-completion-20120112-24109-NF68HJ
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: shirish
To: Debian Bug Tracking System
Subject: bash-completions are not complete
X-Debbugs-Cc: shirishag75@gmail.com

Now I did not want to install and configure Mail Transfer Agents and Mail User Agents and instead used GMail for a long time just copying the subject to the subject line and the rest of the matter. But for sometime now (around a month) the bug-reports that are being churned out are not formatted correctly. While the formatting looks good in leafpad or in the console, lot of time the formatting is lost in GMail. See for example #655060 . As can be seen it does not format the way it should. In fact it needed a maintainer as the package information tag was not shown properly to the BTS.

Now apparently it seems that either leafpad, or the webmail (in this case GMail) turns newlines into something weird (perhaps \r, without the \n? I don’t know.) I have been using plain text (no formatting) since a long time.

If anybody has any clues feel free to share.

Single Post Navigation

2 thoughts on “Reportbug and gmail

  1. Pingback: Debutsav 2014 Experiences – Day 2 | Experiences in the community

  2. Why are you copy pasting in gmail? Why not use gmail SMTP server directly in reportbug configuration? I have done the same. Let me know in case you need my configuration file.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: