NAME

App::FuguVM::Miniroot - the OpenBSD miniroot image

SYNOPSIS

use App::FuguVM::Miniroot;

my $image = App::FuguVM::Miniroot->new($cache_dir, $proxy);
my $path  = $image->ensure('7.8')
    or die "cannot get the miniroot for 7.8\n";

DESCRIPTION

An installation boots the miniroot image of its OpenBSD release. The module finds that image in the proxy cache, and downloads it through the proxy when it is absent.

The module does not hold a copy of the cache layout. It asks the cache where a URL lands. A cache that changed that answer would otherwise leave this module looking in the old place, and every run would download the image again.

METHODS

new

App::FuguVM::Miniroot->new($cache_dir, $proxy)

The proxy is optional. Without one the module can find a cached image but cannot download a missing one.

path, ensure, download

path returns the cached image, or undef. ensure returns it and downloads it first when it is absent. download always downloads.

The download runs the scripts/ftp helper, which falls back through curl, wget and ftp. It is a passthrough, because an image is a hundred megabytes and an operator who waits needs to see it move.

url

url is the mirror URL of a version.

SEE ALSO

App::FuguVM::Proxy, App::FuguVM::Guest

AUTHOR

Dick Olsson <hi@senzilla.io>