BazAutoRegistration

BazAutoRegistration

Status

Introduction

This specification discusses the automatic identification and registration of archives. By implementing this specification, users will be able to use archives without specifying the location of archives.

Rationale

Though Bazaar continues to improve in usability, more work remains to be done for reducing the amount of user input that is necessary to perform "obvious" operations. One of these common, obvious operations is looking up the location of an archive.

Scope and Use Cases

Use Case 1 : A user, which has not identified a location for the bazaar sources, wishes to grab the latest bazaar code to review changes. By running baz get thelove@canonical.com/bazaar--devo--1.1 the archive will be automatically registered and used.

Use Case 2 : A user already has an archive registered and has decided to merge from another branch. The merge operation realizes that it needs to use a third party branch that the user has not registered. Bazaar, rather than terminating because of missing information, would attempt to register the archive by checking an archive registry.

This reduces, but does not eliminate, the need for register-archive. There is no need to register locations that are publicly-listed at the supermiror, but it is still needed if the user wants to specify a particular location.

Implementation Plan

Implementation is simple. Automatic registration can be achieved in the following way: attempt to use given branch. In those cases that an unknown namespace object (of the form archivename/branch) is given to arch_archive_connect_branch, then the following will occur:

  • arch_archive_connect_branch will call a function named arch_auto_register_archive with the wanted namespace object.

  • arch_auto_register_archive will load a list of mirror aggregators (such as the Canonical Supermirror) from the default configuration file via inilib. The ini lines for ~/.arch-params/default will be as follows:

    • multi_mirror_url=URL|NONE [priority=n]

ReviewerComments: There is no default configuration ini file at this point - the defaults ini file is only for archive parameters, and is not suitable for this.

AaronBentley: I think ~/.arch-params/archives/default is a perfectly suitable file. Where else would you look for options related to archives?

  • If any multi_mirror_url is set to NONE, then auto-registration will not occur. Otherwise, arch_auto_register_archive in the order of priority/listing order in the ini defaults, arch_auto_register_archive will attempt to connect and register the archive's name and location with a location of A_SUPER_MIRROR_URL/archivename. For example, if baz were to attempt to register jblack@gnuarch.org--2005, and http://mirrors.sourcecontrol.net/ were listed as a super_mirror_url, then baz would attempt to register http://mirrors.sourcecontrol.net/jblack@gnuarch.org--2005.

  • If successful, arch_archive_connect_branch will return a valid archive object.

  • If unsuccessful, standard error handling will apply

Data Preservation and Migration

No existing data needs modification or migration.

For new users of bazaar, the following line will be added to the default ini :

  • multi_mirror_url=http://mirrors.sourcecontrol.net/ priority=100

For existing users of bazaar, if no multi_mirror_url option is listed, the following line will be added to the default ini :

  • multi_mirror_url=http://mirrors.sourcecontrol.net/ priority=100

As long as we emit messages when auto-registering archives, and as long as we emit a message when we set the default to use sourcecontrol, and as long as signing can be used to deterermine trustability, there should be no tinfoil hat issues.

Packages Affected

  • Bazaar

User Interface Requirements

No immediate user interface requirements are necessary. However, long term user interface changes are optional, including the following:

  • A command to add/remove aggregated archive locations
  • A command to look up an archive location

Outstanding Issues

UDU BOF Agenda

  • (For the next conference) Rather than have the ini file define a list of "root urls", that ini file should list the location of a specific file which lists archive names and locations. (Note: This would require modifications to core parts of baz that have subtle problems.

UDU Pre-Work


CategoryUdu CategorySpec

UbuntuDownUnder/BOFs/BazAutoRegistration (last edited 2008-08-06 16:20:10 by localhost)