GNU/Linux >> Linux Esercitazione >  >> Debian

Guida completa alla segnalazione di bug in Debian Linux

Segnalare i bug è uno dei tanti modi in cui puoi aiutare Linux a crescere. Tutte le distribuzioni di software libero, i progetti hanno diversi sistemi in cui i bug vengono raccolti, analizzati, etichettati e corretti a seconda del numero di persone che conoscono il codice sorgente.

Dato che amo Debian, ti mostrerò come inviare segnalazioni di bug in Debian.

Come segnalare bug in Debian Linux

Lo strumento goto in Debian per segnalare i bug è Reportbug. Avrei voluto saperlo quando ho iniziato a segnalare i bug, avrei evitato un bel po' di bruciore di stomaco a me stesso e al manutentore.

Vediamo come possiamo utilizzare Reportbug per la segnalazione di bug in Debian Linux.

Passaggio 1. Segnala un bug di installazione

Utilizzare il comando seguente per installare Reportbug:

sudo aptitude install reportbug

Fase 2. Segnala bug:la prima esecuzione

Dopo aver installato Reportbug, alla prima esecuzione, è necessario configurarlo in modo che possa essere utilizzato per inviare segnalazioni di bug.

Usa il comando seguente per eseguirlo.

reportbug

E poi un sacco di domande come si può vedere di seguito:

Benvenuto in reportbug! Poiché sembra che questa sia la prima volta che utilizzi reportbug, ne stiamo configurando il comportamento. Queste impostazioni verranno salvate nel file "/home/shirish/.reportbugrc", che sarai libero di modificare ulteriormente.
Scegli la modalità operativa predefinita per reportbug.
1 novizio Offri semplici suggerimenti, aggirando le domande tecniche.
2 standard Offri prompt più estesi, tra cui domande su cose moderatamente sofisticate l'utente dovrebbe conoscere Debian.
3 avanzato Come standard, ma presuppone che tu sappia qualcosa in più su Debian, compreso "in entrata".
4 esperti Ignora la maggior parte delle misure di handholding e le routine di triage preliminari. Questa modalità non dovrebbe essere utilizzata da persone che non hanno familiarità con le politiche e le procedure operative di Debian.
Seleziona modalità:[novizio] 2
Scegli l'interfaccia predefinita per reportbug.
1 testo Un'interfaccia utente della console orientata al testo
2 gtk2 Un'interfaccia utente grafica (GTK+).
Seleziona interfaccia:1
Reportbug avrà spesso un accesso diretto a Internet? (Dovresti rispondere sì a questa domanda a meno che tu non sappia cosa stai facendo e intendi controllare se le segnalazioni duplicate sono state archiviate tramite qualche altro canale.) [S|n|q|?]? n
Quale nome reale dovrebbe essere usato per inviare segnalazioni di bug?
[shirish]>:
>Quale dei tuoi indirizzi email dovrebbe essere usato per inviare segnalazioni di bug? (Tieni presente che questo indirizzo sarà visibile nel sistema di tracciamento dei bug, quindi potresti voler utilizzare un indirizzo webmail o un altro indirizzo con buone capacità di filtraggio dello spam.)
[[email protected]]>[email protected]
visualizza rawreportbug-first-run.txt ospitato con ❤ da GitHub

Note sulla prima esecuzione di Reportbug:

un. Dato che utilizzo Debian da un po' di tempo, posso alternare tra 2 e 3. Per le persone che sono estremamente nuove nella segnalazione di bug, possono attenersi a [1] che viene mostrato ai principianti e l'impostazione predefinita, basta premere Invio.

b. Tra l'interfaccia utente di testo e l'interfaccia gtk2/3, trovo che l'interfaccia gtk2/3 non sia attraente e richieda anche un po' di memoria, quindi scelgo sempre 1. Se hai scelto l'editor gtk2/3 le istruzioni qui sotto sono sempre le stesse per te, solo tu vedrai l'editor gtk mostrare la stessa cosa in un modo leggermente più bello.

c. La parte in cui Reportbug richiede l'accesso alla rete lo nego sempre per un punto di vista pratico, oltre che di sicurezza. Un po' più di spiegazione per i motivi per cui lo faccio sarebbe condivisa di seguito.

d. Infine, quando ti chiede il nome, se ti piace il nome esistente (prende dalla variabile [email protected]) premi Invio, se vuoi che sia qualcos'altro, indica il nome con cui vuoi che appaia.

Passaggio 3. Gestire le stranezze di Gmail

La prima volta che Reportbug veniva eseguito, richiedeva l'impostazione della posta:

Hai un "agente di trasporto della posta" (MTA ) come Exim, Postfix o SSMTP configurato su questo computer per inviare posta a Internet? [y|N|q|?]?n
Inserisci il nome del tuo host SMTP. Di solito è chiamato qualcosa come "mail.example.org" o "smtp.example.org". Se è necessario utilizzare una porta diversa da quella predefinita, utilizzare il formato alternativo :. Basta premere INVIO se non ne hai uno o non lo sai, e quindi verrà utilizzato un host SMTP Debian.
>
Inserisci il nome del tuo server proxy. Dovrebbe usare questo parametro solo se sei dietro un firewall. L'argomento PROXY deve essere formattato come un URL HTTP valido, incluso (se necessario) un numero di porta; ad esempio, http://192.168.1.1:3128/. Basta premere INVIO se non ne hai uno o non lo sai.
>
visualizza rawreportbug-first-run-webmail-quirks.txt ospitato con ❤ da GitHub

La prima domanda è se hai qualche software che gli consentirà di inviare e-mail automaticamente.

Se hai configurato un client di posta elettronica desktop come Evolution o Thunderbird, scegli sì. Altrimenti, scegli il n.

Una volta che il file delle preferenze predefinito è stato scritto, viene salvato in /home/shirish/.reportbugrc. Puoi modificare la configurazione in un secondo momento modificando questo file.

Sulla console puoi usare CTRL+C per uscire da Reportbug in qualsiasi momento.

Passaggio 5. Determinazione del nome di un pacchetto di applicazioni da un file binario

Prendo l'esempio di Aiselriot. È uno dei giochi di carte GTK a cui mia madre gioca molto. Ora, se c'è un problema con il gioco, come faccio a sapere con quale pacchetto dovrei presentare una segnalazione di bug?

Quindi la prima cosa che faccio quando provo a risolvere un'applicazione GUI è prendere la sua icona e metterla sul pannello e vedere le sue proprietà proprio come sto mostrando qui –

Ora so che il nome dell'app. non è Aiselriot ma sol e il percorso in cui è installata l'applicazione è in /usr/games/sol .

Ora proviamo a trovare come si chiama il pacchetto –

dpkg -S /usr/games/sol

L'output è:

aisleriot: /usr/games/sol

Siamo fortunati che il pacchetto si chiami anche aiselriot ma questo non succede sempre.

Andando avanti, riportiamo ora la nostra prima segnalazione di bug. Dato che sto usando Debian testing/stretch/presto per essere stabile in pochi mesi, pubblicherò un bug-report.

Passaggio 6. Utilizzo di Reportbug per effettuare una segnalazione di bug

Ora abbiamo bisogno di un pacchetto che abbia un problema/bug che dobbiamo segnalare alla comunità Debian.

Ho un pacchetto piuparts che mostrava i sintomi di un problema per il quale mi sono rivolto a Reportbug come mostrato nel succo:

[$] reportbug piuparts –severity=normal
*** Benvenuto in reportbug. Utilizzo ? per chiedere aiuto. ***
Nota:le segnalazioni di bug sono archiviate pubblicamente (incluso l'indirizzo email del mittente ).
Set di caratteri rilevato:UTF-8
Cambia la tua lingua se non è corretta.
Utilizzando 'shirish' come indirizzo di partenza.
Ottenere lo stato per piuparts...
Verifica dell'integrità del pacchetto...
Invierà il rapporto a Debian (per lsb_release).
Il gestore di piuparts è il 'team di sviluppatori piuparts'.
Ricerca delle dipendenze di piuparts...
Come ottenere i file di configurazione modificati...
Descrivi brevemente il problema (max. 100 caratteri consentiti). Questo sarà l'oggetto dell'email del bug, quindi mantieni il riepilogo il più conciso possibile, per
esempio:"non riesce a inviare e-mail" o "non inizia con - q opzione specificata" (inserisci Ctrl+c per uscire da reportbug senza segnalare un bug)
> Report adeguati obsolete-conffile per piuparts
Riscrittura soggetta a 'piuparts:rapporti adeguati obsolete-conffile per piuparts'?
Esegui una delle seguenti azioni si applica a questo rapporto
1 d-i Questo bug è rilevante per lo sviluppo di debian-installer.
2 ipv6 Questo bug interessa il supporto per Internet Protocol versione 6.
3 l10n Questo bug segnala un problema di localizzazione/internazionalizzazione.
4 lfs Questo bug interessa il supporto per file di grandi dimensioni (oltre 2 gigabyte).
5 nuovi arrivati ​​Questo bug ha una soluzione nota ma il manutentore richiede l'implementazione di qualcun altro esso.
6 patch Stai includendo una patch per risolvere questo problema.
7 upstream Questo bug si applica alla parte upstream del pacchetto.
8 nessuno
Seleziona i tag:(uno alla volta) [nessuno]
visualizza rawpiuparts reportbug bug-report ospitato con ❤ da GitHub

Ora lascia che ti spieghi come funzionano le cose. Uso uno strumento chiamato adeguato (che è uno strumento di controllo dei pacchetti Debian) durante l'installazione dei pacchetti. Parlerò adeguatamente in dettaglio in qualche futuro post sul blog.

Quello che fa Reportbug è ottenere e analizzare tutte le informazioni che ha sul pacchetto in modo che sappia se procedere o meno.

Ora, lo strumento adeguato viene eseguito sempre in background. Uno dei suoi lavori principali si verifica proprio alla fine dell'installazione di un pacchetto, ad es. per piuparts mi condivide/mi mostra questo –

adequate found packaging bugs
 -----------------------------
piuparts: obsolete-conffile /etc/piuparts/scripts/post_setup_experimental

il che mi ha detto che il pacchetto piuparts aveva un conffile obsoleto. Conffile sta per File di configurazione.

Quindi il primo comando che faccio ogni volta che trovo un bug che vale la pena segnalare è lo faccio –

reportbug piuparts --severity=normal

Fornisce/racconta il pacchetto che presenta il problema, in questo caso piuparts.

Dare severità a qualsiasi bug è un affare complicato. A meno che non abbia sentimenti piuttosto forti su un pacchetto e sappia oltre ogni dubbio che il bug è davvero grave, non alzo la gravità. Questa è la mia etica personale, anche un po' meno lavoro per un manutentore.

Detto questo, la maggior parte dei manutentori esaminerebbe un bug nonostante la gravità che gli dai. Ho avuto manutentori che mi hanno risposto rapidamente anche quando ho archiviato bug nella lista dei desideri e ho manutentori che non tornano. MIA (Missing-In-Action) anche dopo aver archiviato bug gravi. Archiviare e avere una sana conversazione con il manutentore è un'attività tecnica oltre che sociale.

Dopo aver chiesto al soggetto, reportbug chiede/fornisce varie opzioni se si applica una delle condizioni. Puoi usarne qualcuno se ritieni che il tuo bug sia interessato o influisca su una delle cose sopra nell'elenco. Ad esempio, se hai intenzione di condividere una patch per risolvere il problema, sceglierai 6 o una delle altre. Se nessuno di essi è necessario, è sufficiente accedere e andare avanti.

Una volta fatto quanto sopra, ci vogliono alcuni istanti e otteniamo qualcosa di simile a questo succo condiviso:

Oggetto:piuparts:rapporti adeguati conffile obsoleto per piuparts
Pacchetto:piuparts
Versione:0.75
Gravità:normale
Gentile manutentore,
*** Reporter, 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 template lines **
— System Information:
Debian Release:9.0
APT prefers testing
APT policy:(600, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (1, 'experimental-debug'), (1, 'experimental'), (1, 'unstable')
Architecture:amd64 (x86_64)
Foreign Architectures:i386
Kernel:Linux 4.9.0-1-amd64 (SMP w/2 CPU cores)
Locale:LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell:/bin/sh linked to /bin/dash
Init:systemd (via /run/systemd/system)
Versions of packages piuparts depends on:
ii debootstrap 1.0.87
ii debsums 2.2
ii dpkg 1.18.18
ii lsb-release 9.20161125
ii lsof 4.89+dfsg-0.1
ii piuparts-common 0.75
ii python-debian 0.1.30
pn python:any
Versions of packages piuparts recommends:
ii adequate 0.15.1
Versions of packages piuparts suggests:
ii schroot 1.6.10-3
— no debconf information
view rawdefault reportbug piuparts templatehosted with ❤ by GitHub

Now what this does is, it gives an idea to the maintainer of the state of your system. As you all know, almost all GNU/Linux distributions and the packages therein are based on a complex set of relationships with other packages. The maintainer needs to know what version of the package you were using, which other packages were there, what version were they at, apart from knowing that the integrity of the package hasn’t been tampered with in any way.

Now you need to fill in the banks –

I usually remove/delete cut the following, if you are a new user you could just answer the questions below and your bug report would be ready.

Step 7. The final changes made to spend the report

And in its place, I put the details as being shared right here:

Subject:piuparts:adequate reports obsolete conffile for piuparts
Package:piuparts
Version:0.75
Severity:normal
User:[email protected]
Usertags:obsolete-conffile adequate
Dear Maintainer,
Adequate reports broken obsolete-conffile –
[$] adequate piuparts
piuparts:obsolete-conffile /etc/piuparts/scripts/post_setup_experimental
Maybe you could use what pabs (Paul Wise) did in #815563, in that the
proper thing to do would be –
Use the dpkg-maintscript-helper support provided by dh_installdeb to remove such similar obsolete conffiles on upgrade
Also https://www.debian.org/doc/debian-policy/ch-files.html#s-config-files
You can also see manpage of dh_installdeb via debhelper package which is the same thing.
I ran the same command as he did –
[$] pkg=piuparts; adequate $pkg; dpkg-query -W -f='${Conffiles}\n' $pkg | grep obsolete
piuparts:obsolete-conffile /etc/piuparts/scripts/post_setup_experimental
/etc/piuparts/scripts/pre_remove_40_find_obsolete_conffiles
dce83ee504ba336d8a2930fb6053635c
/etc/piuparts/scripts/post_setup_experimental
f7a1f3d45dc43106d1cd9b124b7c1ca8 obsolete
Please fix the above.
— System Information:
Debian Release:9.0
APT prefers testing
APT policy:(600, 'testing'), (500, 'unstable-debug'), (500,
'testing-debug'), (1, 'experimental-debug'), (1, 'experimental'), (1,
'unstable')
Architecture:amd64 (x86_64)
Foreign Architectures:i386
Kernel:Linux 4.9.0-1-amd64 (SMP w/2 CPU cores)
Locale:LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell:/bin/sh linked to /bin/dash
Init:systemd (via /run/systemd/system)
Versions of packages piuparts depends on:
ii debootstrap 1.0.87
ii debsums 2.2
ii dpkg 1.18.18
ii lsb-release 9.20161125
ii lsof 4.89+dfsg-0.1
ii piuparts-common 0.75
ii python-debian 0.1.30
pn python:any
Versions of packages piuparts recommends:
ii adequate 0.15.1
Versions of packages piuparts suggests:
ii schroot 1.6.10-3
— no debconf information
view rawgistfile1.txthosted with ❤ by GitHub

Some more info. now – These two tags signal/tell the maintainers few things –

 User: [email protected]

The first tag is signaling that the bug being raised is part of debian-qa efforts.

Usertags: obsolete-conffile adequate

The second tag is telling the tool we have used and one of the common issues under which it has come -in this case obsolete-conffile.

There are few common and uncommon use-cases that adequate looks into. As shared before, will need another blog post to share about it in detail.

The other thing I’m telling/sharing the maintainer is s/he should be looking into debhelper (a toolkit for debian/rules) and to look for specific bits therein.

Tip – Paul Wise, better known as pabs in Debian community. He is a prolific contributor to Debian. As you can see from his wiki page and the secondary apps. He always has a never-ending list of applications, packages that would be interesting to package alongwith things that could be/need to be improved. I dunno if he has done any mentoring or not, do see signs of a good and goofy mentor in him. I sometimes ask, sometimes steal his ideas to help in Debian QA :)

Now, that the bug-report is complete, I have to send it via gmail.com . If you have enabled MTA (Mail Transfer Agent) and don’t have a gmail.com you can just send and it will be done. If on the other hand, you haven’t enabled MTA (like me) and like to do things yourself, log on to your gmail account, hit compose and then –

Step 8. The final step

To - [email protected]
 Subject - piuparts: adequate reports obsolete conffile for piuparts

Body of your mail should start with Package

something like this –

You might have noticed some labels, they are just to help me be somewhat organized as after you have reported some bugs it can become chaotic to know what’s going on. Gmail’s labels and filters make things somewhat sanish with the amount of mail I receive.

At that point, make sure to recheck the mail once more before clicking the send mail button. I usually click on save draft, review it once or twice before sending it over.

If you are satisfied click send and your bug-report will be sent to Debian BTS .

Step 9. Getting acknowledgment from Debian BTS server saying the bug has reached them.

Usually, within minutes I get a short acknowledgment mail from the Debian BTS, like in the gist being shared

Look at the time-stamp given, just 3 minutes apart from when the mail was sent. I sent the bug mail on 05:03 and got the automated reply saying everything went fine on 05:06 itself.

What I look for into the acknowledgment mail is the bug number as that is how I come to know how things are going with the bug. #854317

Post bug-reporting cycle.

Coincidentally, as can be seen, the package maintainer somehow was around the time when I filed the bug. I do know the importance of piuparts in the debian ecosystem but I didn’t think Andreas will act so quickly, so now probably the next point release or even bug-fix release will have the fix. As can be seen though, Andreas seems to be a busy bee seeing the number of packages he’s maintaining/co-maintaining, besides uploading Non-Maintainer Uploads (NMU) and QA uploads.

I hope I have given enough insight so you know what to do as and when things go wrong.

Tip – Nowadays, I usually follow couple of rules before filing a bug. First check the bts for existing list of bugs, for e.g. piuparts bugs page (as also shared by Simon Tatham above). If the bug is not listed there, more often than not, it the package has not too many dependencies, and I know there aren’t any configuration files that I might have to recreate then I usually purge the package and install the package afresh. If adequate still finds a fault, I usually report it. I don’t do that though for obsolete conffiles as they usually happen when you are upgrading from version x.1 to x.2 or something like that.

Using such simple tips I save time and energy for myself as well as the maintainer of a package.

At first, it may take sometime, after a while, the whole thing may take 10-15 minutes or even less, depending on the package in which the bug is found, the bug itself, replication of the bug etc.

That’s about it to make a bug-report in Debian using Reportbug.

Hopefully, you have gotten some idea the steps to finding bugs and reporting them. Please post any queries you have in the comments below and I’ll try my best to answer/share whatever little I know.



Debian
  1. Come installare Elasticsearch su Debian Linux

  2. Come installare Void Linux:una guida passo passo completa

  3. Guida completa per l'utilizzo di AsciiDoc in Linux

  4. La guida completa per principianti a LVM in Linux

  5. Installa Linux Mint 19 su VirtualBox:la guida completa

Guida completa per installare OxygenOS su OnePlus One in Linux

La guida completa per l'utilizzo di ffmpeg in Linux

Guida completa all'amministrazione degli utenti su Linux

Guida completa alla registrazione di Linux

Una guida completa per installare Tomcat su Linux

Comandi della directory Linux:una guida completa