What's in a name? That which we call an Authority...

The pkg(5) team is always looking for ways to improve the user experience for those using the pkg(5) system and to promote a better understanding of it.  One of the ways to do that is to ensure that clear, consistent terminology is used to describe ideas and concepts.  That is why it was recently decided that a name change was in order for one of the core concepts in the pkg(5) system: authorities.

An authority is a forward or reverse domain name that identifies an organization (or group of individuals) responsible for providing one or more packages.  However, the name that was chosen for that concept caused some confusion among our users.  This was also further exacerbated by the interchangeable usage of the words "Authority" and "Repository" which are decidedly different in meaning.  As a result, starting with revision 926 of the pkg gate code,  an "Authority" is now called a "Publisher".

Before I move on to the details of the changes involved, I felt it was important to summarise what the current overall vision is for the structure of publishers and repositories and how the client is intended to use them:

  • Publisher - a forward or reverse domain name (e.g. "opensolaris.org" or "org.opensolaris") that can be used to identify an organization that is responsible for one or more packaging repositories.  While a publisher may have (publish to) one or more repositories, pkg(5) clients are only intended to access one of them at a time (such as the "development" or "release" repositories for OpenSolaris).  Please note that for compatibility reasons, the client is currently restricted to a single repository per publisher; this will change after the 2009.06 release of OpenSolaris.
  • Repository - a location where clients can publish and retrieve package content (files contained within the package such as programs, documents, etc.) and / or metadata (information about the package such as its name, description, etc.).  It has the following characteristics:
    • may have one or more origins (URIs) used for publication and retrieval of package metadata and content (the client currently only supports one of these)
    • may have zero or more mirrors (URIs) for retrieval of package content
    • can only contain packages from a single publisher

Now that you know what a publisher and a repository is, here is a high-level summary of the changes that were needed to make this happen:

  • All references to "authority" were replaced with "publisher".
  • A publisher management and client history logging interface was added to pkg.client.api so that all pkg(5) clients can consistently and easily manage publisher and repository information.
  • The output of the "pkg publisher" subcommand (aka "pkg authority") was changed to include mirrors in the default listing.
  • The cli and gui clients included with the pkg(5) system were updated to use the new publisher management interfaces.
  • Support for generating and parsing .p5i data (pkg(5) publisher and package information files) was added to the api and to the gui client.  This functionality will eventually allow users to trigger installation of new software just by clicking a link in their web browser.
  • Fixed SSL Certificate handling to be more robust so that the client won't fail with a Python traceback when performing network operations (such as downloading package data from a repository) and so that the user will know why the failure occurred (expired certificate, etc.).
  • Fixed "pkg publisher" command to return a partial failure code of 3 if the information for one of the publishers or repositories couldn't be read (such as the SSL Certificate).

As a result of these changes the following commands have been renamed and altered as follows:

  • pkg authority -> pkg publisher
    • The output of this command also changed.  Before, executing "pkg authority" would have given you a list of authorities and the origin URIs for each repository.  Now it shows repository mirrors as well and indicates their status and type and ensures that the preferred publisher is always listed first and the rest in alphabetical order by name.  Here is a before and after comparison from my own system:
      $ pkg authority
      AUTHORITY                           URL
      opensolaris.org                     http://pkg.opensolaris.org/dev/
      ipkg (preferred)                    http://ipkg.sfbay/dev/
      extra                               https://pkg.sun.com/opensolaris/extra/
      $ pkg publisher
      PUBLISHER                             TYPE     STATUS   URI
      ipkg                     (preferred)  origin   online   http://ipkg.sfbay/dev/
      extra                                 origin   online   https://pkg.sun.com/opensolaris/extra/
      opensolaris.org                       origin   online   http://pkg.opensolaris.org/dev/
  • pkg set-authority -> pkg set-publisher
  • pkg unset-authority -> pkg unset-publisher

All of the man pages and other technical documentation provided with the packaging system has been updated, and the IPS User Guide is in the process of being updated.  Please note that the old commands are still recognised for the purposes of backwards compatibility, but they will be removed after the 2009.06 release of OpenSolaris.

For those that are interested, the technical details are listed below:

Revision 926 / 6ee411c9026a

  • 5871 publisher apis desired
  • 3682 pkg publisher should show mirrors in default listing
  • 5071 provide direct way to change publisher to not use certificate
  • 5373 pkg commands shouldn't traceback when client can't read a key/cert file
  • 6843 problems with empty string for ssl_cert, ssl_key
  • 6897 "authority" should be "publisher"
  • 7046 client intent is not sent if same api object used for multiple operations / reasons


Post a Comment:
Comments are closed for this entry.



« July 2016