=head1 NAME

nbdkit-iso-plugin - create virtual ISO (CD-ROM) from directory

=head1 SYNOPSIS

 nbdkit iso [dir=]DIRECTORY [[dir=]DIRECTORY ...]
            [prog=mkisofs] [params='-JrT']

=for paragraph

 nbdkit iso --dump-plugin

=head1 DESCRIPTION

C<nbdkit-iso-plugin> is a plugin for L<nbdkit(1)> which creates a
virtual ISO (CD-ROM) image from a directory on the fly.  The files
from F<DIRECTORY> are added to a virtual ISO image which is served
read-only over the NBD protocol.

This plugin uses L<xorriso(1)>, L<genisoimage(1)> or L<mkisofs(1)> to
create the ISO content.  See also L</DUMP PLUGIN OUTPUT> below.

To create a FAT-formatted virtual floppy disk instead of a CD, see
L<nbdkit-floppy-plugin(1)>.  To create a Linux compatible virtual
disk, see L<nbdkit-linuxdisk-plugin(1)>.

=head1 EXAMPLE

Create a virtual ISO which supports Joliet, Rock Ridge and TRANS.TBL
extensions, from files in a directory:

 nbdkit iso /path/to/directory params='-JrT'

C<params> adds I<-JrT> to the L<xorriso(1)>, L<genisoimage(1)> or
L<mkisofs(1)> command line, specifying the required extensions.  Note
that unless you use at least one of these extensions, filenames inside
the ISO will be truncated because of limitations of the basic S<ISO
9660> format.

=head1 PARAMETERS

=over 4

=item [B<dir=>]DIRECTORY

Specify the directory containing files and subdirectories which will
be added to the virtual ISO.  Files inside this directory will appear
in the root directory of the ISO.

This parameter is required and may be specified one or more times.  If
multiple directories are specified, they are merged together.

C<dir=> is a magic config key and may be omitted in most cases.
See L<nbdkit(1)/Magic parameters>.

=item B<params=>'parameters ...'

Any other parameters may be passed through to L<xorriso(1)>,
L<genisoimage(1)> or L<mkisofs(1)> by specifying this option.

For example:

 params='-JrT -V "My Disk Image"'

would specify Joliet (I<-J>), Rock Ridge (I<-r>) and TRANS.TBL (I<-T>)
extensions, and specify the volume ID (I<-V>) as C<My Disk Image>.

Take care when quoting this parameter; nbdkit passes the resulting
string through another layer of shell interpretation without any
sanity checks for unquoted shell metacharacters.

=item B<prog=>mkisofs

Choose which program to use to create the ISO content.  The default is
L<xorriso(1)>, L<genisoimage(1)> or L<mkisofs(1)> and is picked when
nbdkit is compiled.  You only need to use this parameter if you want
to override it at run time.

=back

=head1 DUMP PLUGIN OUTPUT

Use:

 nbdkit iso --dump-plugin

to find out which mkisofs-like program was used when the plugin was
compiled.  For example:

 $ nbdkit iso --dump-plugin | grep ^iso_prog=
 iso_prog=xorriso

=head1 ENVIRONMENT VARIABLES

=over 4

=item C<PATH>

L<xorriso(1)>, L<genisoimage(1)>, L<mkisofs(1)> or whatever you supply
to the optional C<prog> parameter must be available on the C<$PATH>.

=item C<TMPDIR>

A temporary copy of the ISO is created in C<TMPDIR>.  If this
environment variable is not set then F</var/tmp> is used instead.
There must be enough free space here to store the ISO, which might be
quite large.

=back

=head1 FILES

=over 4

=item F<$plugindir/nbdkit-iso-plugin.so>

The plugin.

Use C<nbdkit --dump-config> to find the location of C<$plugindir>.

=back

=head1 VERSION

C<nbdkit-iso-plugin> first appeared in nbdkit 1.8.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit-plugin(3)>,
L<nbdkit-file-plugin(1)>,
L<nbdkit-floppy-plugin(1)>,
L<nbdkit-linuxdisk-plugin(1)>,
L<nbdkit-torrent-plugin(1)>,
L<genisoimage(1)>,
L<mkisofs(1)>,
L<xorriso(1)>.

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
