[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Request for Review: APT manpages



Last in the list (before I start backtracking), sources.list.5.xml.
This is another one where I could do with some feedback, but I attach
a patch anyway.

[...]
>  <refnamediv>
>     <refname>sources.list</refname>
>     <refpurpose>Package resource list for APT</refpurpose>
>  </refnamediv>

"Package resource list" is a strange name for it; it sounds as if
it's talking about a catalogue of icons and so on used by the package
apt.  Eventually, reading between the lines, I deduce that the APT
developers think of each line in a sources.list file as a "resource",
and that they're "package resources" because you can get packages from
them (among other things).  But since this jargon is never explained
it doesn't belong in an apropos summary.

(It sounds like *useful* jargon, since it offers an alternative to the
ambiguous word "source", but realistically we're stuck with that - at
least until the day we rename this file "resources.conf".)

I would suggest:

      <refpurpose>Distribution definitions for APT</refpurpose>
 
>  <refsect1><title>Description</title>
>    <para>The package resource list is used to locate archives of the package
>    distribution system in use on the system.

Where does "in use on the system" fit in?  Is it trying to say "for
this machine's APT policy"?

>                                              At this time, this manual page
>    documents only the packaging system used by the Debian GNU/Linux system.

Lies!  It doesn't document the packaging system, and what it does
document applies to more than just the GNU/Linux ports.  I imagine it
means to say "only Debian, not derivatives".  But does the "at this
time" imply we're hoping for patches documenting Ubuntu?

>    This control file is <filename>/etc/apt/sources.list</filename>.</para>

*Which* control file is sources.list?

Tentative rewrite:

    APT uses the resource lines configured in
    <filename>/etc/apt/sources.list</filename> to locate software archives
    for use by the package management system. This manual page documents how
    it works (currently from a Debian-specific viewpoint only).
 
>    <para>The source list is designed to support any number of active sources and a
>    variety of source media. The file lists one source per line, with the
>    most preferred source listed first. The format of each line is:
>    <literal>type uri args</literal> The first item, <literal>type</literal>
                                     ^.                                     ^,
Punctuation shortage.  And while I don't 100% understand this XML
scheme, shouldn't these be replaceables rather than literals?  Or
since it would also be helpful if the format was separated out
into a line on its own, maybe the format should be a
<literallayout> (and then the quotes from it can be <literal>s).

>    determines the format for <literal>args</literal>. <literal>uri</literal> is
>    a Universal Resource Identifier 
>    (URI), which is a superset of the more specific and well-known Universal
>    Resource Locator, or URL. The rest of the line can be marked as a comment 
>    by using a #.</para>
>  </refsect1>

Now, that's a literal - <literal>#</literal>.  But do we need to
say this?  It's normally easier to put comments between the items,
and this text never mentions that blank lines and lines consisting
only of comments are legal.  I think we should eliminate this
sentence in favour of something like:

     <para>
      The source list is designed to support any number of active sources and
      a variety of source media. The file lists one source per line, with the
      most preferred source listed first. The format of each line is:
             <literallayout>type uri args</literallayout>
      The first item, <literal>type</literal>, determines the format for
      <literal>args</literal>. <literal>uri</literal> is a Universal Resource
      Identifier (URI), which is a superset of the more specific and well-known
      Universal Resource Locator, or URL.
     </para>
     <para>
      Individual entries cannot be continued onto a following line. Empty lines
      are ignored, and a <literal>#</literal> character anywhere on a line marks
      the remainder of that line as a comment.
     </para>
    </refsect1>

>  
>  <refsect1><title>sources.list.d</title>
>    <para>The <filename>/etc/apt/sources.list.d</filename> directory provides
>    a way to add sources.list entries in separate files.
>    The format is the same as for the regular <filename>sources.list</filename> file.
>    File names need to end with
>    <filename>.list</filename> and may only contain letters (a-z and A-Z),
>    digits (0-9), underscore (_), hyphen (-) and period (.) characters.
>    Otherwise APT will print a notice that it has ignored a file if the file
>    doesn't match a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
>    configuration list - in this case it will be silently ignored.</para>
>  </refsect1>

That's nicer than most of these filename format definitions, but I'd
still push for:

     Otherwise APT will print a notice that it has ignored a file, unless the
     file matches a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
     configuration list - in which case it will be silently ignored.</para>
 
>  <refsect1><title>The deb and deb-src types</title>
>    <para>The <literal>deb</literal> type describes a typical two-level Debian
>    archive, <filename>distribution/component</filename>. Typically,
>    <literal>distribution</literal> is generally an archivename like
                                        ~~~~~~~~~

The "deb" syntax doesn't *describe* repository structures, it just
points at them!  And "Typically" and "generally" are redundant; I'd
drop the former since we've just had a "typical".  Make it:

     <para>The <literal>deb</literal> type references a typical two-level Debian
     archive, <filename>distribution/component</filename>. The
     <literal>distribution</literal> is generally an archive name like

>    <literal>stable</literal> or <literal>testing</literal> or a codename like
>    <literal>&stable-codename;</literal> or <literal>&testing-codename;</literal>
>    while component is one of <literal>main</literal> <literal>contrib</literal> or
                                                     ^,
At least one extra comma required.

>    <literal>non-free</literal>. The
>    <literal>deb-src</literal> type describes a debian distribution's source
                                     references  D
>    code in the same form as the <literal>deb</literal> type.
>    A <literal>deb-src</literal> line is required to fetch source indexes.</para>
> 
> 
>    <para>The format for a <filename>sources.list</filename> entry using the
>    <literal>deb</literal> and <literal>deb-src</literal> types is:</para>
> 
>    <literallayout>deb [ options ] uri distribution [component1] [component2] [...]</literallayout>
> 
>    <para>The URI for the <literal>deb</literal> type must specify the base of the
>    Debian distribution, from which APT will find the information it needs. 
>    <literal>distribution</literal> can specify an exact path, in which case the 
>    components must be omitted and <literal>distribution</literal> must end with
>    a slash (/). This is useful for when the case only a particular sub-section of the 
>    archive denoted by the URI is of interest.

Degarble:
     a slash (<literal>/</literal>). This is useful for the case when only a
     particular sub-section of the archive denoted by the URI is of interest.

>    If <literal>distribution</literal> does not specify an exact path, at least
>    one <literal>component</literal> must be present.</para>
> 
>    <para><literal>distribution</literal> may also contain a variable, 
>    <literal>$(ARCH)</literal>
>    which expands to the Debian architecture (i386, m68k, powerpc, ...)

It's possible that native-anglophone C-coders use this ", ...)"
syntax, but I haven't seen it in any text written by non-techies.
And m68k is cobwebby.

     which expands to the Debian architecture (such as amd64 or mips)

>    used on the system. This permits architecture-independent
>    <filename>sources.list</filename> files to be used. In general this is only
>    of interest when specifying an exact path, <literal>APT</literal> will
>    automatically generate a URI with the current architecture otherwise.</para>
[...]
>    <para><literal>options</literal> is always optional and needs to be surounded by
>    square brackets. It can consist of multiple settings in the form

"Settings"... can we say "settings"?  "Configuration items" would be
a bit clunky...

>    <literal><replaceable>setting</replaceable>=<replaceable>value</replaceable></literal>.
>    Multiple settings are separated by spaces. The following settings are supported by APT,
>    note though that unsupported settings will be ignored silently:

     (note however that unsupported settings will be ignored silently):

>    <itemizedlist><listitem><para><literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
>    can be used to specify for which architectures packages information should

"Packages information" should be "package information", or even
better, just "information".

>    be downloaded. If this option is not set all architectures defined by the
>    <literal>APT::Architectures</literal> option will be downloaded.</para></listitem>
[...]
>  <refsect1><title>URI specification</title>
> 
>    <para>The currently recognized URI types are cdrom, file, http, ftp, copy,
>    ssh, rsh.

What no <literal> tags (anywhere in this section)?

[...]
>     <varlistentry><term>ftp</term>
>     <listitem><para>
>     The ftp scheme specifies an FTP server for the archive. APT's FTP behavior
>     is highly configurable; for more information see the
>     &apt-conf; manual page. Please note that a ftp proxy can be specified
>     by using the <envar>ftp_proxy</envar> environment variable. It is possible
>     to specify a http proxy (http proxy servers often understand ftp urls)
>     using this method and ONLY this method. ftp proxies using http specified in
>     the configuration file will be ignored.</para></listitem>
>     </varlistentry>

Where this is talking about the protocols rather than the keywords
they should be capitalised; and so should "URLs", and it's "an
{FTP,HTTP} proxy", and the shoutiness should be replaced by
<emphasis> tags.

But more importantly, I don't understand what this stuff about HTTP
proxies is trying to say (or what the ONLY is intended to restrict),
so I can't fix this bit.  Can anyone explain it more clearly, please?

>     <varlistentry><term>copy</term>
>     <listitem><para>
>     The copy scheme is identical to the file scheme except that packages are
>     copied into the cache directory instead of used directly at their location.
>     This is useful for people using a zip disk to copy files around with APT.</para></listitem>
>     </varlistentry>

That "zip disk" reference is looking really cobwebby.  Say "removable media".

>     <varlistentry><term>rsh</term><term>ssh</term>
>     <listitem><para>
>     The rsh/ssh method invokes rsh/ssh to connect to a remote host
> 	as a given user and access the files. It is a good idea to do prior
> 	arrangements with RSA keys or rhosts.
>     Access to files on the remote uses standard <command>find</command> and
>     <command>dd</command> 
>     commands to perform the file transfers from the remote.</para></listitem>
>     </varlistentry>

This needs a little reorganising:

      The rsh/ssh method invokes RSH/SSH to connect to a remote host and
      access the files as a given user. Priot configuration of rhosts or RSA keys
      is recommended. The standard <command>find</command> and <command>dd</command>
      commands are used to perform the file transfers from the remote host.

>     <varlistentry><term>more recognizable URI types</term>
>     <listitem><para>
>     APT can be extended with more methods shipped in other optional packages which should
>     follow the nameing scheme <literal>apt-transport-<replaceable>method</replaceable></literal>.
>     The APT team e.g. maintains also the <literal>apt-transport-https</literal> package which
>     provides access methods for https-URIs with features similar to the http method, but other
>     methods for using e.g. debtorrent are also available, see <citerefentry>
>     <refentrytitle><filename>apt-transport-debtorrent</filename></refentrytitle>
>     <manvolnum>1</manvolnum></citerefentry>.

A typo and some improvable phrasing.

      APT can be extended with more methods shipped in other optional
      packages, which should follow the naming scheme
      <literal>apt-transport-<replaceable>method</replaceable></literal>. For
      instance, the APT team also maintains the package
      <literal>apt-transport-https</literal>, which provides access methods for
      HTTPS URIs with features similar to the http method. Methods for using
      e.g. debtorrent are also available - see
      <citerefentry>
       <refentrytitle><filename>apt-transport-debtorrent</filename></refentrytitle>
       <manvolnum>1</manvolnum>
      </citerefentry>.

[...]
>    <para>Uses HTTP to access the archive at archive.debian.org, and uses only
>    the hamm/main area.</para>
>    <literallayout>deb http://archive.debian.org/debian-archive hamm main</literallayout>

Well, I suppose being cobwebby is the point.
-- 
JBR	with qualifications in linguistics, experience as a Debian
	sysadmin, and probably no clue about this particular package

Attachment: sources.list.5.xml
Description: XML document

--- old/sources.list.5.xml	2012-05-21 10:41:17.000000000 +0100
+++ new/sources.list.5.xml	2012-05-30 14:25:08.383392730 +0100
@@ -30,24 +30,31 @@
  <!-- Man page title -->
  <refnamediv>
     <refname>sources.list</refname>
-    <refpurpose>Package resource list for APT</refpurpose>
+    <refpurpose>Distribution definitions for APT</refpurpose>
  </refnamediv>
  
  <refsect1><title>Description</title>
-   <para>The package resource list is used to locate archives of the package
-   distribution system in use on the system. At this time, this manual page
-   documents only the packaging system used by the Debian GNU/Linux system.
-   This control file is <filename>/etc/apt/sources.list</filename>.</para>
-
-   <para>The source list is designed to support any number of active sources and a
-   variety of source media. The file lists one source per line, with the
-   most preferred source listed first. The format of each line is:
-   <literal>type uri args</literal> The first item, <literal>type</literal>
-   determines the format for <literal>args</literal>. <literal>uri</literal> is
-   a Universal Resource Identifier 
-   (URI), which is a superset of the more specific and well-known Universal
-   Resource Locator, or URL. The rest of the line can be marked as a comment 
-   by using a #.</para>
+  <para>
+   APT uses the resource lines configured in                                   
+   <filename>/etc/apt/sources.list</filename> to locate software archives      
+   for use by the package management system. This manual page documents how    
+   it works (currently from a Debian-specific viewpoint only).                 
+  </para>
+  <para>
+   The source list is designed to support any number of active sources and 
+   a variety of source media. The file lists one source per line, with the 
+   most preferred source listed first. The format of each line is: 
+           <literallayout>type uri args</literallayout>
+   The first item, <literal>type</literal>, determines the format for
+   <literal>args</literal>. <literal>uri</literal> is a Universal Resource
+   Identifier (URI), which is a superset of the more specific and well-known
+   Universal Resource Locator, or URL.
+  </para>
+  <para>
+   Individual entries cannot be continued onto a following line. Empty lines
+   are ignored, and a <literal>#</literal> character anywhere on a line marks
+   the remainder of that line as a comment.
+  </para>
  </refsect1>
  
  <refsect1><title>sources.list.d</title>
@@ -57,20 +64,20 @@
    File names need to end with
    <filename>.list</filename> and may only contain letters (a-z and A-Z),
    digits (0-9), underscore (_), hyphen (-) and period (.) characters.
-   Otherwise APT will print a notice that it has ignored a file if the file
-   doesn't match a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
+   Otherwise APT will print a notice that it has ignored a file, unless the
+   file matches a pattern in the <literal>Dir::Ignore-Files-Silently</literal>
    configuration list - in this case it will be silently ignored.</para>
  </refsect1>
 
  <refsect1><title>The deb and deb-src types</title>
-   <para>The <literal>deb</literal> type describes a typical two-level Debian
-   archive, <filename>distribution/component</filename>. Typically,
-   <literal>distribution</literal> is generally an archivename like
+   <para>The <literal>deb</literal> type references a typical two-level Debian
+   archive, <filename>distribution/component</filename>. The
+   <literal>distribution</literal> is generally an archive name like
    <literal>stable</literal> or <literal>testing</literal> or a codename like
    <literal>&stable-codename;</literal> or <literal>&testing-codename;</literal>
-   while component is one of <literal>main</literal> <literal>contrib</literal> or
+   while component is one of <literal>main</literal>, <literal>contrib</literal> or
    <literal>non-free</literal>. The
-   <literal>deb-src</literal> type describes a debian distribution's source
+   <literal>deb-src</literal> type referencs a Debian distribution's source
    code in the same form as the <literal>deb</literal> type.
    A <literal>deb-src</literal> line is required to fetch source indexes.</para>
 
@@ -84,14 +91,14 @@
    Debian distribution, from which APT will find the information it needs. 
    <literal>distribution</literal> can specify an exact path, in which case the 
    components must be omitted and <literal>distribution</literal> must end with
-   a slash (/). This is useful for when the case only a particular sub-section of the 
-   archive denoted by the URI is of interest.
+   a slash (<literal>/</literal>). This is useful for the case when only a
+   particular sub-section of the archive denoted by the URI is of interest.
    If <literal>distribution</literal> does not specify an exact path, at least
    one <literal>component</literal> must be present.</para>
 
    <para><literal>distribution</literal> may also contain a variable, 
    <literal>$(ARCH)</literal>
-   which expands to the Debian architecture (i386, m68k, powerpc, ...)
+   which expands to the Debian architecture (such as amd64 or mips)
    used on the system. This permits architecture-independent
    <filename>sources.list</filename> files to be used. In general this is only
    of interest when specifying an exact path, <literal>APT</literal> will
@@ -115,7 +122,7 @@
    Multiple settings are separated by spaces. The following settings are supported by APT,
    note though that unsupported settings will be ignored silently:
    <itemizedlist><listitem><para><literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
-   can be used to specify for which architectures packages information should
+   can be used to specify for which architectures information should
    be downloaded. If this option is not set all architectures defined by the
    <literal>APT::Architectures</literal> option will be downloaded.</para></listitem>
    <listitem><para><literal>trusted=yes</literal> can be set to indicate that packages
@@ -183,26 +190,27 @@
     <listitem><para>
     The copy scheme is identical to the file scheme except that packages are
     copied into the cache directory instead of used directly at their location.
-    This is useful for people using a zip disk to copy files around with APT.</para></listitem>
+    This is useful for people using removable media to copy files around with APT.</para></listitem>
     </varlistentry>
     
     <varlistentry><term>rsh</term><term>ssh</term>
     <listitem><para>
-    The rsh/ssh method invokes rsh/ssh to connect to a remote host
-	as a given user and access the files. It is a good idea to do prior
-	arrangements with RSA keys or rhosts.
-    Access to files on the remote uses standard <command>find</command> and
-    <command>dd</command> 
-    commands to perform the file transfers from the remote.</para></listitem>
+    The rsh/ssh method invokes rsh/SSH to connect to a remote host and
+    access the files as a given user. Priot configuration of rhosts or RSA keys
+    is recommended. The standard <command>find</command> and <command>dd</command>
+    commands are used to perform the file transfers from the remote host.
+    </para></listitem>
     </varlistentry>
 
     <varlistentry><term>more recognizable URI types</term>
     <listitem><para>
-    APT can be extended with more methods shipped in other optional packages which should
-    follow the nameing scheme <literal>apt-transport-<replaceable>method</replaceable></literal>.
-    The APT team e.g. maintains also the <literal>apt-transport-https</literal> package which
-    provides access methods for https-URIs with features similar to the http method, but other
-    methods for using e.g. debtorrent are also available, see <citerefentry>
+    APT can be extended with more methods shipped in other optional packages,
+    which should follow the nameing scheme
+    <literal>apt-transport-<replaceable>method</replaceable></literal>. For
+    instance, the APT team also maintains the package
+    <literal>apt-transport-https</literal>, which provides access methods for
+    HTTPS URIs with features similar to the http method. Methods for using
+    e.g. debtorrent are also available - see <citerefentry>
     <refentrytitle><filename>apt-transport-debtorrent</filename></refentrytitle>
     <manvolnum>1</manvolnum></citerefentry>.
     </para></listitem>

Reply to: