The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Test::AutoBuild::Stage::Apt - Create index for APT package management tool

SYNOPSIS

  use Test::AutoBuild::Stage::Apt

  # Create an index of RPMs, structured by module, restricted
  # to only include the module 'autobuild-dev'
  my $stage = Test::AutoBuild::Stage::Apt->new(name => "apt",
                                               label => "Create apt index",
                                               options => {
                                                 directory => "/var/lib/builder/public_html/dist",
                                                 format => "rpm",
                                                 type => "modules",
                                                 components => ["autobuild-dev"],
                                               });


  # Create an index of RPMs, structured by module, for all
  # configured modules
  my $stage = Test::AutoBuild::Stage::Apt->new(name => "apt",
                                               label => "Create apt index",
                                               options => {
                                                 directory => "/var/lib/builder/public_html/dist",
                                                 format => "rpm",
                                                 type => "modules",
                                               });

  # Create an index of RPMs, structured by group, for all
  # configured groups
  my $stage = Test::AutoBuild::Stage::Apt->new(name => "apt",
                                               label => "Create apt index",
                                               options => {
                                                 directory => "/var/lib/builder/public_html/dist",
                                                 format => "rpm",
                                                 type => "groups",
                                               });


  $stage->run($runtime);

DESCRIPTION

This module invokes the genbasedir command to generate a package index, enabling the apt-get(8) command to install RPMs directly off the build status pages. The components in the index can either be groups or modules. By default this stage will create an index for all groups or modules defined in the runtime object, but this can be restricted to a subset. At a future date this will be tweaked to also support indexing Debian packages. The packages are hard linked into the distribute directories, so no significant additional disk space is consumed over that already used by the builder distribution site.

CONFIGURATION

In addition to the standard parameters defined by the Test::AutoBuild::Stage module, this module accepts four entries in the options parameter:

directory

The full path to the directory containing RPMs to be indexed.

format

The format of the packages to index, either rpm or debian, although the latter is not yet functional, defaults to rpm.

type

How to structure the package indexes, either by group, or by module, defaults to module.

components

Optionally restrict the index to a subset of the groups / modules, by specifying an array of group / module names.

METHODS

$stage->process($runtime);

This method will link in the generated packages to directory named in the directory option, and then run the genbasedir command to index them.

AUTHORS

Daniel Berrange <dan@berrange.com>

COPYRIGHT

Copyright (C) 2005 Daniel Berrange <dan@berrange.com>

SEE ALSO

perl(1), Test::AutoBuild::Stage, apt-get(8)