Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 May 2003 13:17:33 -0500
From:      Mark Linimon <linimon@lonesome.com>
To:        freebsd-bugbusters@freebsd.org
Cc:        Marc Fonvieille <blackend@freebsd.org>
Subject:   Re: RFC: additions to the article "problem-reports"
Message-ID:  <200305091317.33765.linimon@lonesome.com>
In-Reply-To: <xzpn0hwbhun.fsf@flood.ping.uio.no>
References:  <200305081851.41118.linimon@lonesome.com> <20030509091007.A15769@abigail.blackend.org> <xzpn0hwbhun.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Earlier I posted a suggested patch to
/usr/doc/en_US.ISO8859-1/articles/problem-reports/article.sgml
to the freebsd-doc newsgroup.  DES suggested that -bugbusters
would be a more appropriate place for the discussion, so I've
moved it here.

For those that didn't see the initial posting, here's the executive
summary: I'm working on a tool to allow querying of a database
populated with (portname X build environment X build error X Problem
Report X CVS status).  In doing this I've wound up looking at a
_lot_ of badly-written PRs, and have tried to come up with
suggestions on upgrading the howto.

Several people have already sent suggestions, almost all of
which I've adopted.  In this, version 0.2 of my suggested changes,
I've also added more text and links, and better-integrated my own
suggestions with the existing text by removing redundancies.
I've also tried to minimize the size of the diff by fixing whitespace,
although there are significant whitespace problems in the original
that I've left alone.

I'm not too married to the exact text and format of any of these
changes, but think some expansion along this order is needed.

The one thing I noticed that isn't really touched on is the diff -u
thing.  Is it true that -u is the _only_ preferred way?  Should I
also include the trick of diff -ruN as the "preferred" way of
dealing with creating diffs that include new files?  How about,
do people have a preference in the root directory that diff
files are created in?

Well in any case here's the current diff for people to take
a whack at.

Mark Linimon

--- article.sgml.dist	Thu May  8 17:16:29 2003
+++ article.sgml	Fri May  9 12:56:50 2003
@@ -63,10 +63,11 @@
       engender a problem report.  Of course, nobody is perfect, and
       there will be times when you are convinced you have found a bug
       in a program when in fact you have misunderstood the syntax for
-      a command or made a typo in a configuration file (though that in
-      itself may sometimes be indicative of poor documentation or poor
-      error handling in the application).  There are still many cases
-      where submitting a problem report is clearly not the right
+      a command or made a typographical error in a configuration file
+      (though that in itself may sometimes be indicative of poor
+      documentation or poor error handling in the application).  There
+      are still many cases where submitting a problem report is clearly
+      <emphasis>not</emphasis> the right
       course of action, and will only serve to frustrate you and the
       developers.  Conversely, there are cases where it might be
       appropriate to submit a problem report about something else than
@@ -130,7 +131,15 @@
 
     <itemizedlist>
       <listitem>
-	<para>The FAQ.</para>
+	<para>The FreeBSD <ulink URL="../../books/faq/index.html">
+	  Frequently Asked Questions</ulink> (FAQ) list.  This document
+	  attempts to provide answers for a wide range of questions, such
+	  as those concerning <ulink URL="../../books/faq/hardware.html">
+	  hardware compatibility</ulink>,
+	  <ulink URL="../../books/faq/applications.html">
+	  user applications</ulink>, and
+	  <ulink URL="../../books/faq/kernelconfig.html">
+	  kernel configuration</ulink>.</para>
       </listitem>
 
       <listitem>
@@ -155,10 +164,22 @@
       </listitem>
 
       <listitem>
-	<para>Finally, the FreeBSD PR database.  Unless your problem
+	<para>Next, the searchable
+	  <ulink URL="http://www.FreeBSD.org/cgi/query-pr-summary.cgi?query">;
+	  FreeBSD PR database</ulink> (GNATS).  Unless your problem
 	  is recent or obscure, there is a fair chance it has already
 	  been reported.</para>
       </listitem>
+
+      <listitem>
+	<para>Finally, if you are upgrading from one version to
+	  another&mdash;especially if you are upgrading to the
+	  <literal>-current</literal> branch&mdash;you should
+	  carefully study the contents of
+	  <ulink URL="http://www.FreeBSD.org/cgi/cvsweb.cgi/src/UPDATING">;
+	  /usr/src/UPDATING</ulink> which contains many pieces of
+	  vital information.</para>
+      </listitem>
     </itemizedlist>
 
     <para>Next, you need to make sure your problem report goes to the
@@ -187,10 +208,134 @@
 
     <para>Now that you have decided that your issue merits a problem
       report, and that it is a FreeBSD problem, it is time to write
-      the actual problem report.  Make sure your <envar>VISUAL</envar>
+      the actual problem report.  Before we get into the mechanics
+      of the program used to generate and submit PRs, here are some
+      tips and tricks to help make sure that your PR will be most
+      effective.</para>
+
+    <section>
+      <title>Tips and tricks for writing a good Problem Report</title>
+
+      <itemizedlist>
+	<listitem>
+	  <para><emphasis>Do not leave the Synopsis line empty.</emphasis>
+	    The PRs go both onto a mailing list that goes all over
+	    the world (where the Synopsis is used for the
+	    <literal>Subject:</literal> line), but also into a database.
+	    Anyone who comes along later and browses the database by
+	    synopsis, and finds a PR with a blank subject line, tends just
+	    to skip over it.  Remember that PRs stay in this database
+	    until they are closed by someone; an anonymous one will
+	    usually just disappear in the noise.</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>Avoid using a weak Synopsis line.</emphasis>
+	    You should not assume that anyone reading your PR has
+	    any context for your submission, so the more you provide,
+	    the better.  For instance, what part of the system
+	    does the problem apply to?  Do you only see the problem
+	    while installing, or while running?  To illustrate,
+	    instead of <literal>Synopsis: portupgrade is
+	    broken</literal>, see how much more informative this seems:
+	    <literal>Synopsis: port sysutils/portupgrade coredumps on
+	    -current</literal>.  (In the case of ports, it is especially
+	    helpful to have both the category and portname in
+	    the Synopsis line.)</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>If you have a patch, say so.</emphasis>
+	    A PR with a patch included is much more likely to be
+	    looked at than one without.  If you are including one,
+	    put the string <literal>[patch]</literal> at the
+	    beginning of the Synopsis.  (Although it is not mandatory
+	    to use that exact string, by convention, that is the one
+	    that is used.)</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>If you are a maintainer, say so.</emphasis>
+	    If you are maintaining a part of the source code (for instance,
+	    a port), you might consider adding the string
+	    <literal>[maintainer update]</literal> at the beginning
+	    of your synopsis line.</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>Be specific.</emphasis>
+	    The more information you supply about what problem you
+	    are having, the better your chance of getting a response.
+	    You should include such things as what version you are
+	    running (there is a place to put that, see below);
+	    which architecture you are running on;
+	    whether you are running from a release CDROM, or from
+	    a system maintained by &man.cvsup.1; (and, if so, how
+	    recently you updated); and, if a kernel problem,
+	    if you have read <literal>src/UPDATING</literal>
+	    (someone is guaranteed to ask).  You do not necessarily
+	    have to provide your kernel configuration, which ports
+	    you have available, and a core dump (including these
+	    by default only tends to fill up the database), but you
+	    should be prepared to make them available, either
+	    privately or publicly, if so asked.</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>Avoid vague requests for features.</emphasis>
+	    PRs of the form "someone should really implement something
+	    that does so-and-so" are less likely to get results than
+	    very specific requests.  Remember, the source is available
+	    to everyone, so if you want a feature, the best way to
+	    ensure it being included is to get to work!  Also consider
+	    the fact that many things like this would make a better
+	    topic for discussion on <literal>freebsd-questions</literal>
+	    than an entry in the PR database, as discussed above.</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>Make sure no one else has already submitted
+	    a similar PR.</emphasis>
+	    Although this has already been mentioned above, it bears
+	    repeating here.  It only take a minute or two to use the
+	    <ulink URL="http://www.FreeBSD.org/cgi/query-pr-summary.cgi?query">;
+	    web-based search engine</ulink>.  (Of course, everyone is
+	    guilty of forgetting to do this now and then.)</para>
+	</listitem>
+      
+	<listitem>
+	  <para><emphasis>Avoid controversial requests.</emphasis>
+	    If your PR addresses an area that has been controversial
+	    in the past, you should probably be prepared to not only
+	    offer patches, but also justification for why the patches
+	    are "The Right Thing To Do".  As noted above, a careful
+	    <ulink
+	    URL="http://www.FreeBSD.org/search/search.html#mailinglists">;
+	    search</ulink> of the mailing lists is always good preparation.
+	    </para>
+	</listitem>
+
+	<listitem>
+	  <para><emphasis>Be polite.</emphasis>
+	    Almost anyone who would potentially work on your PR is
+	    a volunteer.  No one likes to be told that they have to
+	    do something when they are already doing it for some
+	    motivation other than monetary gain.  This is a good
+	    thing to keep in mind at all times on Open Source
+	    projects.</para>
+	</listitem>
+      
+      </itemizedlist>
+    </section>
+
+    <section>
+      <title>Before you begin</title>
+
+      <para>Before running the &man.send-pr.1; program,
+      make sure your <envar>VISUAL</envar>
       (or <envar>EDITOR</envar> if <envar>VISUAL</envar> is not set)
-      environment variable is set to something sensible, and run
-      &man.send-pr.1;.</para>
+      environment variable is set to something sensible.</para>
+    </section>
 
     <section>
       <title>Attaching patches or files</title>
@@ -209,18 +354,24 @@
 
       <para>If you attach a patch, make sure you use the
 	<option>-c</option> or <option>-u</option> option to
-	&man.diff.1; to create a context or unified diff, and make
+	&man.diff.1; to create a context or unified diff (unified is
+	preferred), and make
 	sure to specify the exact CVS revision numbers of the files
 	you modified so the developers who read your report will be
 	able to apply them easily.</para>
 
-      <para>Note that while including small patches in a PR is
-        generally all right, particularly when they fix the problem
-        described in the PR, large patches and especially new code
+      <para>If you attach a patch inline, instead of as an attachment,
+	note that the most common problem by far is the tendency of some
+	email programs to render tabs as spaces, which will completely
+	ruin anything intended to be part of a Makefile.</para>
+
+      <para>Also note that while including small patches in a PR is
+	generally all right&mdash;particularly when they fix the problem
+	described in the PR&mdash;large patches and especially new code
         which may require substantial review before committing should
         be placed on a web or ftp server, and the URL should be
         included in the PR instead of the patch.  Patches in email
-        tend to get mangled, especially when Gnats is involved, and
+        tend to get mangled, especially when GNATS is involved, and
         the larger the patch, the harder it will be for interested
         parties to unmangle it.  Also, posting a patch on the web
         allows you to modify it without having to resubmit the entire
@@ -235,8 +386,9 @@
     <section>
       <title>Filling out the template</title>
 
-      <para>The template consists of a list of fields, some of which
-	are pre-filled, and some of which have comments explaining
+      <para>When you run &man.send-pr.1;, you are presented with a
+	template.  The template consists of a list of fields, some of
+	which are pre-filled, and some of which have comments explaining
 	their purpose or listing acceptable values.  Do not worry
 	about the comments; they will be removed automatically if you
 	do not modify them or remove them yourself.</para>
@@ -263,7 +415,8 @@
 
 	<listitem>
 	  <para><emphasis>Originator:</emphasis> This is normally
-	    prefilled with the gecos field of the currently logged-in
+	    prefilled with the <literal>gecos</literal> field of the
+	    currently logged-in
 	    user.  Please specify your real name, optionally followed
 	    by your email address in angle brackets.</para>
 	</listitem>
@@ -276,7 +429,7 @@
 
 	<listitem>
 	  <para><emphasis>Confidential:</emphasis> This is prefilled
-	    to <literal>no</literal>, changing it makes no sense as
+	    to <literal>no</literal>, and changing it makes no sense as
 	    there is no such thing as a confidential FreeBSD problem
 	    report&mdash;the PR database is distributed worldwide by
 	    <application>CVSup</application>.</para>
@@ -287,11 +440,12 @@
 	    short and accurate description of the problem.  The
 	    synopsis is used as the subject of the problem report
 	    email, and is used in problem report listings and
-	    summaries; problem reports with obscure synopses tend to
-	    get ignored.</para>
+	    summaries.</para>
 
-	  <para>If your problem report includes a patch, please have
-	    the synopsis start with <literal>[PATCH]</literal>.</para>
+	  <para>As noted above, if your problem report includes a patch,
+	    please have the synopsis start with <literal>[patch]</literal>;
+	    if you are a maintainer, you may consider adding
+	    <literal>[maintainer update]</literal>.</para>
 	</listitem>
 
 	<listitem>
@@ -368,7 +522,8 @@
 
 	    <listitem>
 	      <para><literal>misc:</literal> anything that does not fit
-		in any of the other categories.</para>
+		in any of the other categories.  (Note that it is
+		easy for things to get lost in this category).</para>
 	    </listitem>
 
 	    <listitem>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305091317.33765.linimon>