Reportbug

Da Guide@Debianizzati.Org.
Vai alla navigazione Vai alla ricerca
Debian-swirl.png Versioni Compatibili

Tutte le versioni supportate di Debian

Introduzione

La segnalazione dei bug è un'attività importantissima perché facilita la risoluzione rapida dei problemi che affliggono il software e quindi contribuisce a migliorare la qualità generale della distribuzione che si utilizza. È qualcosa su cui tutti gli utenti dovrebbero prestare attenzione perché è un eccellente modo di contribuire visto, tra l'altro, che per poterlo fare non è assolutamente necessario essere degli sviluppatori o avere delle competenze specifiche.

Reportbug è un software (presente nei repository di tutti e tre i rami di Debian) pensato per facilitare la compilazione e l'invio dei report relativi a "difetti" e malfunzionamenti.
Aiuta a produrre dei report dettagliati, aderenti agli standard e "leggibili".

In questa sede si esplorerà la configurazione e l'utilizzo di questo strumento in modo tale da poter fornire delle linee guida alle quali attenersi in quelle situazioni in cui ci si dovesse ritrovare davanti ad un malfunzionamento.
In quel caso, invece di ignorare subito il problema e prima di tuffarsi alla ricerca di una soluzione o workaround, si potrà provvedere ad inviare una segnalazione di bug.
Prima di far questo, però, sarà doveroso accertarsi che si tratti proprio di un malfunzionamento e non di una caratteristica... e che qualcuno non abbia già segnalato la cosa prima di noi.

Installazione

Come detto, reportbug è presente nei repository, quindi per installarlo basterà:

# apt-get install reportbug

Conterrà sia l'eseguibile reportbug, sia querybts che può essere utilizzato per controllare eventuali bug presenti in un pacchetto prima di inviare la propria segnalazione.

Configurazione

Al primo avvio il sistema porrà delle domande riguardanti l'utente e le impostazioni della macchina host.
Queste informazioni verranno scritte nel file .reportbugrc all'interno della home directory di chi lo lancia (non è consigliabile eseguirlo da root).

$ reportbug

Welcome to reportbug! Since it looks like this is the first time you have used reportbug, we are configuring its behavior. These settings will be saved to the file "/home/nome-utente/.reportbugrc", 
which you will be free to edit further.
Please choose the default operating mode for reportbug.

1 novice    Offer simple prompts, bypassing technical questions.

2 standard  Offer more extensive prompts, including asking about things that a moderately  sophisticated user would be expected to know about Debian.

3 advanced Like standard, but assumes you know a bit more about Debian, including "incoming".

4 expert     Bypass most handholding measures and preliminary triage routines. This mode should not be used by people unfamiliar with Debian's policies and operating procedures.

Select mode: [novice] 

Questa prima domanda riguarda il nostro "livello" di abilità. Si va da novice (domande semplici evitando complicate questioni tecniche) fino, gradualmente, a expert.
Si risponderà secondo il proprio grado di preparazione tecnica.

Please choose the default interface for reportbug.

1 text  A text-oriented console user interface

2 gtk2  A graphical (GTK+) user interface.

Select interface: 

È il momento di scegliere l'interfaccia che si vuole utilizzare: testuale oppure grafica.

Will reportbug often have direct Internet access? (You should answer yes to this question unless you know what you are doing and plan to check whether duplicate reports have been filed via some other channel.) [Y|n|q|?]?

Si risponderà Y se c'è un accesso diretto ad Internet (facendo attenzione, prima di ciascun invio, di evitare duplicati di segnalazioni già presenti).

What real name should be used for sending bug reports?
[pmate]> 

Which of your email addresses should be used when sending bug reports? (Note that this address will be visible in the bug tracking system, so you may want to use a webmail address or another address
with good spam filtering capabilities.)
[pmate@debian.mine]>

Si forniranno le informazioni relative al nome di chi invierà le segnalazioni e al suo indirizzo email.

Do you have a "mail transport agent" (MTA) like Exim, Postfix or SSMTP configured on this computer to send mail to the Internet? [Y|n|q|?]? 

Si risponderà Y se c'è un MTA configurato nel sistema in uso: penserà lui ad inviare in automatico le segnalazioni.

Please enter the name of your SMTP host.  Usually it's called something like "mail.example.org" or "smtp.example.org". If you need to use a different port than default, use the <host>:<port> alternative format.

Just press ENTER if you don't have one or don't know.
> 

Nel caso in cui esista, si inserirà il nome dell'host SMTP o si presserà semplicemente ENTER per continuare.

Please enter the name of your proxy server. It should only use this parameter if you are behind a firewall. The PROXY argument should be formatted as a valid HTTP URL, including (if necessary) a port number; 
for example, http://192.168.1.1:3128/.
Just press ENTER if you don't have one or don't know.

Stessa cosa per quanto riguarda un eventuale server proxy.

Default preferences file written. To reconfigure, re-run reportbug with the "--configure" option.
Info.png Nota
Se sul nostro sistema non c'è un MTA configurato per mandare email e non abbiamo inserito il nome di un host smtp è comunque possibile inviare le segnalazioni di bug dato che reportbug verrà configurato per utilizzare l'host smtp di Debian


A questo punto le impostazioni sono state scritte nel file .reportbugrc.

/home/pmate/.reportbugrc:

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

Sarà sempre possibile riavviare la medesima procedura di configurazione passando a reportbug il parametro "--configure":

$ reportbug --configure

Integrazione con Gmail

Potete usare il vostro account Gmail per inviare la vosta segnalazione del bug usando direttamente reportbug; dovrete aggiungere al file di configurazione .reportbugrc le seguenti linee:

smtpuser <ilvostroutente>@gmail.com
smtppasswd <lavostrapassword>
smtptls

Firma GPG/Mime

Se avete una chiave GPG potete firmare la vostra email aggiungendo le linee:

sign gpg
keyid <vostraGPG/PGPkeyid>

La segnalazione

Si simulerà la simulazione di un bug riscontrato in xterm e i passaggi necessari per inviarlo correttamente al bug tracking system.

Per prima cosa dobbiamo individuare il pacchetto responsabile, con dpkg per esempio:

$ dpkg --search $(which xterm)
xterm: /usr/bin/xterm

In questo caso si tratta dell'omonimo xterm. Si fosse trattato di un file di configurazione, sarebbe bastato riportare il percorso assoluto per individuare il pacchetto, per esempio:

$ dpkg --search /etc/...

Controlliamo con querybts i bug già individuati nel pacchetto xterm:

$ querybts xterm

È possibile premere ? per informazioni sulle opzioni disponibili (come filtrare i bug con una ricerca o mostrare la pagina successiva), o digitare il numero del bug (sia la forma progressiva #NNNN che la posizione occupata nella lista dei risultati attuali) per visualizzare direttamente quello.

Una volta controllato che si tratta di un nuovo bug, avviamo reportbug:

$ reportbug
Please enter the name of the package in which you have found a problem, or type 'other' to report a
more general problem.
> xterm

La prima domanda che ci verrà posta è assolutamente scontata: il nome del pacchetto nel quale è stato riscontrato il problema.

*** Welcome to reportbug.  Use ? for help at prompts. ***
Detected character set: UTF-8
Please change your locale if this is incorrect.

Using 'pmate <pmate@debian.mine>' as your from address.
Getting status for xterm...
Maintainer for xterm is 'Debian X Strike Force <debian-x@lists.debian.org>'.
Looking up dependencies of xterm...

Please briefly describe your problem (max. 100 characters allowed; you can elaborate in a moment; an
empty response will stop reportbug). This will be the bug email subject, so write a concise summary of
what is wrong with the package, for example, "fails to send email" or "does not start with -q option
specified" (enter Ctrl+c to exit).
> xterm CPU usage >50%

Si dovrà poi inserire una breve descrizione del problema riscontrato. Si raccomanda di scriverlo in forma concisa visto che costituirà il subject del messaggio che verrà inviato al Bug Tracking System.

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.)
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] 4
Spawning sensible-editor...

Ora viene il momento di assegnare un "voto" alla gravità del problema, ossia di decidere quale livello di severità assegnare al bug.

Fatto questo, in automatico si aprirà l'editor di testo predefinito e verrà visualizzata la bozza del messaggio che si invierà al BTS. Si dovrà editare sotto la riga che recita:

*** Please type your report below this line ***

inserendo una descrizione dettagliata del problema riscontrato. Ad esempio:

*** Please type your report below this line ***
when starting up xterm is using >50% of CPU whilst idling causes slow performance and responsiveness in system.

I have an Intel i915 graphics card.

Thanks

pmate

Inserita la descrizione, si dovrà salvare ed uscire dall'editor.

Reportbug porrà l'ultima domanda:

Report will be sent to "Debian Bug Tracking System" <submit@bugs.debian.org>
Submit this report on xterm (e to edit) [Y|n|a|c|e|i|l|m|p|q|d|t|s|?]? n

Rispondendo Y il report del bug verrà inviato. Stoppando invece l'operazione:

reportbug stopped; your incomplete report is stored as "/tmp/reportbug-xterm-20100220-25271-NPlCvG".
This file may be located in a temporary directory; if so, it might disappear without any further
notice. To recover this file to use it as bug report body, please take a look at the "-i FILE,
--include=FILE" option. Alternatively, you can copy the content of the temporary file (both headers and
body) and copy it into your MUA and send the mail to submit@bugs.debian.org, editing the subject and
bug text as needed (but not altering the other information).

verremo informati che il report è stato creato e conservato nel file temporaneo /tmp/reportbug-xterm-20100220-25271-NPlCvG. Sarà possibile allora copiarne il contenuto ed incollarlo nel gestore di posta preferito e inviare la segnalazione all'indirizzo: submit@bugs.debian.org.

Questo il contenuto del file temporaneo generato dall'esempio su proposto:

Subject: xterm CPU usage >50%
Package: xterm
Version: 253-1
Severity: important

*** Please type your report below this line ***
when starting up xterm is using >50% of CPU whilst idling causes slow performance and responsiveness in system.

I have an Intel i915 graphics card.

Thanks

pmate

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-1-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xterm depends on:
ii  libc6                     2.10.2-5       Embedded GNU C Library: Shared lib
ii  libfontconfig1            2.8.0-2        generic font configuration library
ii  libice6                   2:1.0.6-1      X11 Inter-Client Exchange library
ii  libncurses5               5.7+20090803-2 shared libraries for terminal hand
ii  libutempter0              1.1.5-2        A privileged helper for utmp/wtmp 
ii  libx11-6                  2:1.3.3-1      X11 client-side library
ii  libxaw7                   2:1.0.7-1      X11 Athena Widget library
ii  libxft2                   2.1.14-1       FreeType-based font drawing librar
ii  libxmu6                   2:1.0.5-1      X11 miscellaneous utility library
ii  libxt6                    1:1.0.7-1      X11 toolkit intrinsics library
ii  xbitmaps                  1.1.0-1        Base X bitmaps

Versions of packages xterm recommends:
ii  x11-utils                     7.5+2      X11 utilities
ii  xutils                        1:7.5+3    X Window System utility programs m

Versions of packages xterm suggests:
pn  xfonts-cyrillic               <none>     (no description available)

-- no debconf information

Nel caso sia necessario inserire l'output di uno o più comandi per una dettagliata descrizione del bug, tener presente che i messaggi devono essere inseriti in lingua inglese; questo consentirà a chiunque di poterli comprendere e, quindi, di essere maggiormente utile alla risoluzione del problema. Per poter visualizzare i messaggi in inglese si può impostare temporaneamente la variabile "LANG":

$ LANG=C nomecomando

oppure:

$ LANG=C.UTF-8 nomecomando

dopo essersi accertati, con il comando "locale -a", che il locale scelto sia disponibile.

Conclusioni

Come si è visto la segnalazione di un bug non è un'operazione particolarmente complessa ed è alla portata di tutti.
Basta solo cercare di compierla in maniera corretta avendo cura di:

  • accertarsi che si tratti di un vero problema e non di una feature prevista;
  • verificare che non esista una segnalazione identica (si duplicherebbe inutilmente il lavoro di chi riceve i report);
  • scrivere oggetto e descrizione in maniera chiara e... in inglese...!

Questo piccolo sforzo, come detto all'inizio, permette a chi sviluppa di ricevere feedback concreti sul funzionamento del software, di fixare i problemi in tempi rapidi e quindi di far sì che la nostra distribuzione diventi più stabile, sicura e performante.

Happy bug reporting!

Collegamenti esterni




Guida scritta da: pmate 20:59, 20 feb 2010 (CET) Swirl-auth100.png Guida Debianized
Estesa da:
HAL 9000
Verificata da:
Stemby
S3v 20:42, 19 ott 2013 (CEST)
HAL 9000 14:23, 20 apr 2015 (CEST)
Ombra 20:23, 16 mag 2015 (CEST)

Verificare ed estendere la guida | Cos'è una guida Debianized