<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE article PUBLIC "-//Norman Walsh//DTD DocBook XML V3.1.7//EN"
                         "http://nwalsh.com/docbook/xml/3.1.7/db3xml.dtd">
<article>
  <artheader>
    <title>Scala Bazaars Reference Manual</title>
    <author>
      <firstname>Alexander</firstname>
      <surname>Spoon</surname>
    </author>
    <pubdate>March 2006</pubdate>
  </artheader>
  <sect1><title>Overview</title>

    <para>Scala Bazaars supports Scala enthusiasts in sharing the
    software they create with each other.  The community is
    strengthened when people can help each other out by sharing code.
    A programming language needs an archive of library code to be its
    most useful.</para>

    <para>Scala Bazaars has several features specialized for this kind
    of community:</para>

    <itemizedlist>

    <listitem><para>Since programming efforts in the community are
    distributed around the world, the system must allow loose,
    decoupled collaboration.  Participants are not required to wait
    for each other nor for any centralized
    authority.</para></listitem>

    <listitem><para>Since subgroups of the community have their own
    needs&mdash;just consider groups doing commercial
    development!&mdash;the system should support subgroup-specific
    access control policies.</para></listitem>

    <listitem><para>Since many open source projects are updated
    frequently, the system must allow conveniently updating components
    as new versions become available.</para></listitem>

    <listitem><para>Since, even in the common open-source group, there
    are different tolerances for stable versus new offerings, the
    system supports having multiple public servers with different
    update policies</para></listitem>

    </itemizedlist>


    <para>Scala Bazaars is most closely related to Debian's APT,
    though it shares spirit with systems including: YUM, FreeBSD
    ports, CPAN, CTAN, SqueakMap, and Fink.  The main difference from
    APT is that Bazaars tries to make it not only possible, but
    convenient, for subgroups to run their own servers with their own
    access policies.</para>


    <para>The present document is a reference manual for Scala
    Bazaars.  It is complete at the expense of readable.  It does
    include full specifications for all components of the system,
    including the command-line interface, all file formats, and the
    network protocol.  Those wanting to use the system should first
    check whether a tutorial exists for the specific need.  Those
    wanting a more philosophical look at the system, including
    comparisons to other systems and to the literature, should look at
    the Package Universes Architecture document.  It is available at
    the Scala Bazaars home page:</para>


    <blockquote><para><filename>http://lamp.epfl.ch/~spoon/sbaz/
    </filename></para></blockquote>

  </sect1>

  <sect1><title>Architectural Concepts</title>

    <para>This section describes the architecture as a whole.  Each
    component of the architecture is described in detail in a later
    section.</para>

    <para>Users of the system have a <emphasis>local managed
    directory</emphasis> that includes content supplied by the system.
    In general, users should not modify content in a managed directory
    except via a Scala Bazaars system tool.  The one exception is the
    <filename>config</filename> directory, which is explicitly
    intended for user modification and should not be modified by the
    Scala Bazaars tool.</para>

    <para>Sharable content is held by <emphasis>packages</emphasis>.
    A package can be installed into a local managed directory, in
    which case all of its included files are extracted into the
    managed directory.  A package can also be removed from a local
    managed directory, causing all of the files it installed to be
    removed.</para>


    <para>Each package has a name and a version.  Packages with the
    same name may be substituted for each other, but packages with
    larger version numbers are preferable in some sense.</para>

    <para>A <emphasis>bazaar</emphasis> is an evolving set of
    packages.  Each managed directory is associated with one bazaar.
    The system makes it convenient to choose and install packages from
    a managed directory's own bazaar, but not from other bazaars.  The
    set of available packages evolves as the community associated with
    the bazaar shares and retracts packages over time.</para>

    <para>Packages may depend on other packages.  All dependencies are
    resolved within a single bazaar.  The system does not allow
    installing or removing packages in a way that a managed
    directory's dependencies become unsatisfied.</para>


    <para>On the whole, this approach gives convenient upgrades
    (simply grab the newest version of everything), loose coupling
    (you can wait for a while to upgrade), and convenient dependency
    management (requesting the install of a package automatically
    installs the packages it depends on).  The cost of this approach
    is that packages must be posted separately to each bazaar they are
    useful in, but as argued in the architecture document, that cost
    appears to be ephemeral.</para>


    <para>Bazaars may be combined in a variety of ways.  Each bazaar
    has its own access policy, and thus combinations of bazaars with
    different access policies can yield a wide variety of useful
    configurations.</para>


    <para>Bazaars do not hold the packages themselves.  Instead, a
    bazaar holds package advertisements, and the packages themselves
    must be posted separately.  Each package advertisement includes a
    URL referencing the associated package.</para>

  </sect1>

  <sect1><title>Bazaar Definitions</title>

    <para>There are a number of kinds of bazaars.  They are each
    described here along with the XML used to formally describe each
    kind.</para>

 
    <sect2><title>Simple Bazaar</title>

    <para>A simple bazaar includes the packages advertised on a single
    bazaar server.  An example XML description of a simple bazaar is:</para>

<blockquote><programlisting><![CDATA[<simpleuniverse>
  <name>scala-dev</name>
  <location>http://scbaztmp.lexspoon.org:8006/scala-dev</location>
</simpleuniverse>]]></programlisting></blockquote>

    <para>The location tag specifies which Bazaars server supplies
    packages for this universe.  The name is used by the command-line
    interface to Scala Bazaars whenever it is necessary to specify a
    specific simple bazaar within a compound bazaar.</para>


    </sect2>

    <sect2><title>Empty Bazaar</title>

    <para>The empty bazaar holds no packages at all.  Its XML description
    is simply:</para>

    <blockquote><programlisting>&lt;emptyuniverse/></programlisting></blockquote>

    </sect2>

    <sect2><title>Override Bazaar</title>

    <para>An override bazaar combines the packages from multiple other
    bazaars, with packages in later bazaars overriding packages in
    earlier ones.  The overriding is name-based: a package in a later
    bazaar causes <emphasis>any</emphasis> same-named package in an
    earlier bazaar to disappear from the combined override bazaar.</para>

    <para>An example XML description is as follows:</para>

<blockquote><programlisting><![CDATA[<overrideuniverse>
<components>
  <simpleuniverse>
    <name>scala-dev</name>
    <location>http://scbaztmp.lexspoon.org:8006/scala-dev</location>
  </simpleuniverse>
  <simpleuniverse>
    <name>local-hacks</name>
    <location>http://localhost/sbaz/local-hacks</location>
  </simpleuniverse>
</components>
</overrideuniverse>]]></programlisting></blockquote>


    </sect2>

    <sect2><title>Filter Bazaar (not yet implemented)</title>

    <para>A filter bazaar includes those packages from some other
    bazaar whose name matches a designated regular expression.  Filter
    bazaars are thus useful for taking just a few packages from an
    existing server.</para>

    </sect2>

    <sect2><title>Literal Bazaar (not yet implemented)</title>

    <para>A literal bazaar includes a fixed set of packages.  Literal
    bazaars are mainly useful for testing.</para> 

    </sect2>

  </sect1>


  <sect1><title>Access Control</title>

    <para>Many organizations that use Scala Bazaars do not want to
    allow arbitrary accesses from unknown users.  Scala Bazaars
    includes a simple access control system to limit usage as
    appropriate for the organization.</para>

    <para>The approach is based on <emphasis>keys</emphasis>.  A
    bazaar server has a list of keys that it considers valid.  Each
    request to a server must either include a valid and sufficient
    key, or it must be in the subset of requests configured as
    <emphasis>open access</emphasis> for the particular server.</para>

    <para>Each key is associated with a <emphasis>message pattern</emphasis>
    denoting the subset of requests it can authorize.  The following
    message patterns are supported:</para>

    <formalpara><title>Read</title> <para>Requests that ask for the
    list of available packages recorded on a bazaar server.  In XML,
    it looks like:</para></formalpara>
    
    <blockquote><programlisting><![CDATA[<read/>]]>
    </programlisting></blockquote>
 

    <formalpara><title>Edit</title><para>Requests that modify the list
    of available packages recorded on the server, including posting
    new advertisements, removing advertisements, and updating an
    advertisement in place.  Edit request patterns include a regular
    expression that limits the request pattern to those requests
    involving a package whose name matches the regular expression.
    The semantics of the supplied regular expression are as for Java's
    regular-expression library.  In XML, it looks
    like:</para></formalpara>

    <blockquote><programlisting><![CDATA[<edit nameregex="sbaz.*">]]>
    </programlisting></blockquote>


    <formalpara><title>Key Edit</title> <para>Requests that modify the
    list of valid keys known to a server.  There is only one
    request-pattern for key editing.  Any client that knows a valid
    key-edit key can perform arbitrary manipulations on the set of keys
    known to a server (and thus transitively has full access to
    the server).  In XML, a key edit pattern looks like:</para></formalpara>

    <blockquote><programlisting><![CDATA[<keyedit/>]]>
    </programlisting></blockquote>

    <para>A key includes three pieces of information: a request pattern, a
    short, descriptive text, and a string of decimal digits.  The
    descriptive text is human-readable and allows keys to be
    associated with principles in an external access control system.
    Typical uses are names, email addresses, usernames, and employee
    ID's.  The string of decimal digits is typically randomly
    generated and must be unguessable in order for the server to
    remain protected.</para>

    <para>In XML, a key looks like:</para>
<blockquote><programlisting>
<![CDATA[<key>
  <messages>
    <edit nameregex="lex-.*"></edit>
  </messages>
  <description>lex@lexspoon.org</description>
  <data>26405971450520721508638067086623258803</data>
</key>]]>
</programlisting></blockquote>

    <para>The keys-based access control system of Scala Bazaars is both
    usable directly and supports, it is hoped, a variety of useful
    access policies.  For simple access policies, the server
    administrator (or someone to whom they delegate) can manually
    manage and distribute keys.  Note that key data can be transmitted
    via email and web sites, thus allowing distribution of keys to
    piggyback on existing secured infrastructure.</para>
  
    <para>For organizations that have too many users for manual management
    of access, the keys approach supports writing a simple web server
    that can manage and distribute keys in an arbitrary fashion.  For
    example, one could write a web server that gives out keys to
    people who have a valid login according to an LDAP server;
    nightly, the server could revoke keys for any users whose LDAP
    entry has disappeared.</para>

  </sect1>


  <sect1><title>Common Configurations</title>


    <para>The available bazaar types and access-control policies
    described above can be combined to form a number of useful
    configurations.  This section outlines several of them.</para>


    <formalpara><title>No restrictions</title> <para>Wikis have proven
    that effective and useful communities can be built even with no
    security restrictions at all.  This policy can be implemented by
    configuring the server with all requests as open
    access.</para></formalpara>

    <formalpara><title>Full access, but only to community
    members</title> <para>Many open-source projects have an
    organization of this form, including Debian's <quote>Debian
    Developers</quote> and FreeBSD's <quote>committers.</quote> This
    policy can be implemented by giving a key-editing key to the
    membership gatekeepers.  The last step of admitting a new member
    to the community is to give them their own keys to
    manipulate the community bazaar servers. </para></formalpara>

    <formalpara><title>Single provider, multiple users</title>
    <para>An individual developer wants to provide a suite of packages
    to be used by a larger community&mdash;possibly the world, or
    possibly a limited base of subscribers.  To implement this policy,
    the developer can keep editing keys for personal use but publish
    the read key  to the desired user
    base. </para></formalpara>

    <formalpara><title>Moderation queues</title> <para>Sometimes it is
    desirable to have a large community contribute suggested packages,
    but a smaller group to decide on what is actually included.  A
    moderation queue can be implemented as a separate bazaar where a
    full edit key (with regular expression <quote>.*</quote>)
    is made available to whichever community is allowed to contribute
    suggestions (perhaps the entire world).  Moderators would have
    both a read key for the moderation queue and a full edit
    key for the main bazaar, and could copy packages from the
    queue to the main bazaar whenever they are deemed
    appropriate. </para></formalpara>


    <formalpara><title>Private local development</title>
    <para>Individual groups can form their own bazaar for private
    development without needing to coordinate with any central
    organization.  They simply create the bazaar and share keys with
    members of the group according to their own local security
    policy. </para></formalpara>

    <formalpara><title>Public libraries plus local development</title>
    <para>The above organization can be refined by allowing developers
    to use publicly available packages even as they develop packages
    for private use.  This policy can be implemented with an override
    bazaar combining the local bazaar with one or more public
    bazaars. </para></formalpara>


    <formalpara><title>Localized versions of packages</title>
    <para>Local groups may want to use something similar to a
    widely scoped bazaar, but override specific packages with
    localized versions.  For example, they might prefer a different
    default language settings of the packages than is used on
    the widely scoped bazaar.  Users want to use the
    localized version of a package whenever one is available, but the
    global version otherwise.  This policy can be implemented by creating
    a bazaar server holding the localized packages, and then having
    users operate in an override bazaar combining this localized
    bazaar with the public one. </para></formalpara>

    <formalpara><title>Stable versus unstable streams</title>
    <para>Projects frequently distinguish between stable and unstable
    streams of development.  The stable streams include packages that
    are heavily tested and deemed to be reliable, while the unstable
    streams include packages that are more current and featureful but
    are not as reliable.  A project can implement this policy by
    having separate bazaar servers for each development stream.  Users
    point their managed directories to the bazaar server appropriate
    to their needs.</para> </formalpara>



    <formalpara><title>Freezing new stable distribution</title>
    <para>A common process for generating stable distributions of code
    is to take an unstable stream, start testing it, and disallow any
    patches except for bug fixes.  After some point, the distribution
    is <emphasis>frozen</emphasis> and considered a stable release.
    Such processes can be implemented by manipulating the outstanding
    keys as time passes.  The testing phase can be implemented
    by revoking all outstanding edit keys and switching
    to a moderation queue process.  The final, complete freeze can be
    implemented by destroying the moderation queue and revoking the
    remaining edit keys.  The frozen bazaar can then
    be duplicated, with one fork hosting a new development stream
    while the other becomes is designated a stable
    release. </para></formalpara>


  </sect1>


  <sect1><title>Packages and Package Advertisements</title>
    <sect2><title>Overview</title>

    <para>A Scala Bazaars package is stored in a file with file-ending
    <filename>.sbp</filename> (Scala Bazaars Package).  The file is in
    zip format.  It should include all of the files that are to be
    extracted into a managed directory when the package is installed.</para>

    <para>The <filename>meta/</filename> directory within a .sbp file
    does not include files to be extracted, but instead contains
    meta-information about the package itself.  The only defined
    element of that directory is
    <filename>meta/description</filename>, which should include an XML
    document describing the package's contents.  All other names
    within the <filename>meta</filename> subdirectory are reserved for
    future use.</para>

    </sect2>

    <sect2><title>Package Description Files</title>

    <para>An example description file is as follows:</para>

<blockquote><programlisting><![CDATA[<package>
  <name>sbaz</name>
  <version>1.10</version>
  <depends> </depends>
  <description>The command-line interface to Scala Bazaars.  Scala
Bazaars let you share Scala packages and other goodies with other
Scala users.</description>
</package>]]></programlisting></blockquote>

    <para>The elements of this description are hopefully
    self-explanatory.  This package is named <quote>sbaz</quote>, its
    version is 1.10, it has no dependencies, and it has the given
    human-readable description.</para>

    </sect2>

    <sect2><title>Package Advertisements</title>

    <para>A package advertisement is simply a package description plus
    a URL where the package file can be downloaded from.  An example
    of the XML format for a package advertisement is:</para>

<blockquote><programlisting><![CDATA[<availablePackage>
  <package>
    <name>sbaz</name>
    <version>1.10</version>
    <depends> </depends>
    <description>The command-line interface to Scala Bazaars.  Scala
Bazaars let you share Scala packages and other goodies with other
Scala users.</description>
  </package>
  <link>http://lamp.epfl.ch/~spoon/scbaztmp/sbaz-1.10.sbp</link>
</availablePackage>]]></programlisting></blockquote>

    </sect2>

  </sect1>

  <sect1><title>Versions and Dependencies</title>

  <para>Every package has a version.  A version is a string that
  may contain ASCII numbers, digits, and the following symbolic
  characters:</para>

  <blockquote><para><userinput>.-+/?,&!@#$%^&*</userinput></para></blockquote>

  <para>Versions are totally ordered by the following algorithm.  To
  compare two versions, first break them into a number of
  subsequences, each maximally long, where each subsequence only
  contains decimal digits, only contains alphabetic characters, or
  only contains symbolic characters.  Compare the two sequences
  lexicographically.  Two numeric subsequences are compared numerically,
  two alphabetic subsequences are compared in ASCII order, and two
  symbolic subsequences are compared in ASCII order as well.  For two
  subsequences with different kinds of characters, the order is:
  alphabetic, then numeric, then symbolic.  For some examples, the
  following versions are sorted in order:</para>

  <orderedlist>
  <listitem><para>(empty string)</para></listitem>
  <listitem><para>abc</para></listitem>
  <listitem><para>abcd</para></listitem>
  <listitem><para>abd</para></listitem>
  <listitem><para>1</para></listitem>
  <listitem><para>1.1</para></listitem>
  <listitem><para>1.1a</para></listitem>
  <listitem><para>1.1a2</para></listitem>
  <listitem><para>1.1a100</para></listitem>
  <listitem><para>1.1.5</para></listitem>
  <listitem><para>1.2</para></listitem>
  <listitem><para>1.2.</para></listitem>
  <listitem><para>2</para></listitem>
  <listitem><para>12</para></listitem>
  </orderedlist>

  <para>A package dependencies can currently only have hard dependencies
  to specific other package names.  For those dependencies to be
  satisfied, a package must be installed for each of the package names
  specified. Here is package description for a package that
  depends on package <quote>scala2-library</quote> and
  <quote>sbaz</quote>:</para>

<blockquote><programlisting><![CDATA[<availablePackage>
  <package>
    <name>base</name>
    <version>1.7</version>
    <depends>
       <name>scala2-library</name>
       <name>sbaz</name>
    </depends>
    <description>This package depends on the basic packages that all
managed directories must include.  Each of these packages is either
essential or is very commonly used.  </description>
  </package>
  <link>http://lamp.epfl.ch/~spoon/scbaztmp/base-1.7.sbp</link>
</availablePackage>]]></programlisting></blockquote>

    <para>A somewhat richer set of dependencies is planned, including
    provides, suggests, alternative dependencies, and minimum version
    numbers.</para>
  </sect1>

  <sect1><title>Command-Line Interface</title>
    <sect2><title>Overview</title>

    <para>The command-line interface to Scala Bazaars is the
    <command>sbaz</command> tool.  It is run as follows:</para>

    <blockquote>
        <cmdsynopsis>
          <command>sbaz</command>
          <arg>-n</arg>
          <arg>-d <replaceable>dir</replaceable></arg>
          <arg choice='plain'><replaceable>command</replaceable></arg>
          <arg rep='repeat' choice='plain'>
               <replaceable>arguments</replaceable>
          </arg>
        </cmdsynopsis>
    </blockquote>

    <para>It always operates on one managed directory.  That directory
    can be specified explicitly with the -d option.  If it is not
    specified, and the <command>sbaz</command> binary is located
    within a managed directory, then <command>sbaz</command> operates
    on the managed directory the binary is in.  If neither of these
    cases hold, then <command>sbaz</command> will as a last resort
    operate on the current directory.  In all cases, the tool checks
    whether the specified directory appears in fact to be a managed
    directory; if it does not, then it aborts.</para>

    <para>If -n is specified, then the tool does not perform any work.
    Instead, it only prints out what it would have done without the
    -n option.</para>

    <para>If no <emphasis>command</emphasis> is specified, then
    the tool prints out a help message.  Otherwise, it runs
    the specified command with the specified arguments.</para>

    </sect2>

    <sect2><title>Command Reference</title>

    <para>This section will eventually include the entire command
    reference of the command-line tool.  It does not yet.  Refer
    to <quote><userinput>sbaz help</userinput></quote> to see the
    tool's built-in documentation.</para>

    </sect2>

  </sect1>


  <sect1><title>Suggested Directory Layout</title>

    <para>Each sbaz repository has its own informal standards for the
    directory layout within a managed directory.  This section
    documents the emerging layout used in the main Scala bazaar.
    It is the standard for that repository, and it might serve
    as a guideline for other repositories.</para>

    <itemizedlist>
    <listitem><para><filename>lib</filename> &mdash; Any jar file(s)
    associated with the package, especially those that are meant as
    libraries to be usable by other programs in the bazaar.  Jars
    placed in this directory are particularly easy to access, because
    both the generic <command>scala</command> script and most of the
    tool-running scripts in <filename>bin</filename> will
    automatically load classes from any jars in
    <filename>lib</filename>.  Normally, jar filenames in this
    directory do not include any version number.  A typical filename
    is <filename>sbaz.jar</filename>.</para></listitem>

    <listitem><para><filename>src</filename> &mdash; Source code for the
    package.  This source code should be presented in a way that IDE's
    can find the code easily.  Thus far, packages install directories
    under <filename>src</filename> that parallel the dotted package
    paths from the Scala code.  For example, class
    <filename>sbaz.clui.CommandLine</filename> is found in a file
    named
    <filename>src/sbaz/clui/CommandLine.scala</filename>.</para></listitem>

    <listitem><para><filename>bin</filename> &mdash; Command-line runnable
    scripts.  These are most easily created via the Scala ant tasks.
    As a special case, the <command>sbaz</command> tool will make
    files within <filename>bin</filename> be executable on platforms
    where that makes sense.</para></listitem>

    <listitem><para><filename>config</filename> &mdash; Configuration
    files.  Packages should not include any files in this directory!
    They should look in this directory for optional user
    configuration.  If there is a single configuration file, it can be
    included directly in the <filename>config</filename> directory,
    e.g. with a name like <filename>config/sbaz.properties</filename>.
    If there is more than one configuration file for a package, then
    the files should be located in a subdirectory of
    <filename>config</filename> named after the package name.  For
    example, the <command>sbaz</command> package could include its
    configuration files in a directory named
    <filename>config/sbaz/</filename>.</para></listitem>

    <listitem><para><filename>misc</filename> &mdash; Arbitrary files not
    included in any of the above.  All such files for a package should
    be included in a directory named after the package.  For example,
    the <command>sbaz</command> package includes miscellaneous files
    in the directory <filename>misc/sbaz/</filename>.
    </para></listitem> </itemizedlist>

    

  </sect1>

  <sect1><title>The scala.home property</title>

  <para>By convention, the <envar>scala.home</envar> system property
  is used to point at the root of the current managed directory.
  Command-line scripts installed in <filename>bin</filename>
  directories should normally set this variable.  The conventional
  choice is to set <envar>scala.home</envar> to the
  <envar>SCALA_HOME</envar> environment variable if it set, or
  otherwise to the parent directory of the <filename>bin</filename>
  directory the script is located in.</para>

  <para>Programs intended to run within a sbaz directory can use
  this property to locate any files they may need.  For example,
  <command>sbaz</command> itself uses the following code to find
  a user-specified settings file:</para>


<blockquote><programlisting><![CDATA[val home = System.getProperty("scala.home", ".")
val propFile = new File(new File(new File(home),
                        "config"), "sbaz.properties")]]></programlisting></blockquote>



  </sect1>

  <sect1><title>Managed Directory Layout</title>
  <para>Most of a managed directory is populated by the contents
  of packages.  The single directory <filename>meta</filename>
  is reserved for the system to track information about
  the managed directory.  The <filename>meta</filename> directory
  has the following contents:</para>

  <itemizedlist>

  <listitem><para><filename>universe</filename> &mdash; a file holding
  the XML description of the bazaar.</para></listitem>

  <listitem><para><filename>available</filename> &mdash; a list of
  package advertisements available within the bazaar.  The file is an
  XML document whose top level node is
  <userinput>&lt;availableList></userinput> and whose subnodes are
  package advertisements.</para></listitem>

  <listitem><para><filename>cached</filename> &mdash; a subdirectory
  holding a cache of package files that the tool has
  downloaded.</para></listitem>

  <listitem><para><filename>installed</filename> &mdash; information
  about installed files.  The format is described
  below.</para></listitem>

  </itemizedlist>

  <para>The <filename>installed</filename> file holds information
  about the packages that are currently installed in the managed
  directory.  Its format is mostly straightforward:</para>

  <blockquote><programlisting><![CDATA[<installedlist>
  <installedpackage>
    <package>
      <name>base</name>
      <version>1.7</version>
      <depends>
        <name>sbaz</name>
        <name>scala2-library</name>
      </depends>
      <description>A package that depends on the basic, necessary packages</description>
    </package>
    <files>
      <filename isAbsolute="true" isFile="true">
        <pathcomp>lib</pathcomp>
      </filename>
    </files>
  </installedpackage>

  <installedpackage>
    <package>
      <name>sbaz</name>
      <version>1.10</version>
      <depends></depends>
      <description>The command-line interface to Scala Bazaars.</description>
    </package>
    <files>
      <filename isAbsolute="true" isFile="true">
        <pathcomp>bin</pathcomp> 
        <pathcomp>sbaz</pathcomp>
      </filename>

      <filename isAbsolute="true" isFile="true">
        <pathcomp>bin</pathcomp>
        <pathcomp>sbaz.bat</pathcomp>
      </filename>

      <filename isAbsolute="true" isFile="true">
        <pathcomp>misc</pathcomp> 
        <pathcomp>sbaz</pathcomp>
        <pathcomp>scala2-library.jar</pathcomp>
      </filename>

      <filename isAbsolute="true" isFile="true">
        <pathcomp>misc</pathcomp> 
        <pathcomp>sbaz</pathcomp> 
        <pathcomp>smartrun.mswin.template</pathcomp>
      </filename> 

      <filename isAbsolute="true" isFile="true">
        <pathcomp>misc</pathcomp> 
        <pathcomp>sbaz</pathcomp> 
        <pathcomp>smartrun.unix.template</pathcomp>
      </filename> 

      <filename isAbsolute="true" isFile="true">
        <pathcomp>lib</pathcomp>  
        <pathcomp>sbaz.jar</pathcomp>
      </filename></files>
    </installedpackage>
  <installedpackage>
</installedist>]]></programlisting></blockquote> 

  <para>Notice that an installed package is the combination of
  a package plus a list of files.  Each file in the list of files
  is represented with a <userinput>filename</userinput> whose
  attributes determine whether it is an absolute file (never)
  and whether it is a file (versus a directory).  The contents
  of the <userinput>filename</userinput> are the sequence of path
  components of the file, relative to the managed directory's root.</para>

  </sect1>

  <sect1><title>Common Problems</title>
    <sect2><title>Firewalls and HTTP Proxies</title>

      <para>Scala Bazaars uses HTTP to communicate with universe
      servers.  If your network blocks HTTP access, then, you need to
      configure sbaz to use an HTTP proxy.  To do this, create a file
      named <filename>config/sbaz.properties</filename> in your
      managed directory and give it the appropriate proxy settings,
      something like:</para>

      <blockquote><programlisting><![CDATA[http.proxySet=true
http.proxyHost=localhost
http.proxyPort=3128
]]></programlisting></blockquote>

    </sect2>
  </sect1>

</article>

<!--  LocalWords:  CPAN SqueakMap scala dev emptyuniverse proven FreeBSD's sbp
 -->
<!--  LocalWords:  committers featureful subdirectory subsequences subsequence
 -->
<!--  LocalWords:  abc abcd abd dir filenames filename src IDE's availableList
 -->
<!--  LocalWords:  subnodes Yellowdog usernames ID's lex LDAP
 -->
