Table of Contents

Portscout::DataSrc::XML

NAME

Portscout::DataSrc::XML

XML file DataSrc backend for Portscout.

DESCRIPTION

This module provides a simple means of describing software you want to monitor to Portscout. Instead of checking the FreeBSD ports tree, Portscout will read the required data from an XML file.

The XML module is also intended as a demonstration for developers wishing to extend Portscout to support other repositories.

CONFIGURATION

Update portscout.conf to enable XML as the DataSrc backend:

    datasrc = Portscout::DataSrc::XML
    datasrc_opts = file:/path/to/file.xml

FILE FORMAT

The file should be in the following format. It must contain well-formed XML and be in the location specified in portscout.conf.

    <items>
        <item>
            <category>software</category>
            <name>foo</name>
            <desc>Foomatic Professional</desc>
            <version>0.4.3</version>
            <suffix>.tar.gz</suffix>
            <distname>%(name)-%(version)</distname>
            <distfiles>
                <file>%(distname)%(suffix)</file>
            </distfiles>
            <sites>
                <site>http://foo.example.net/releases/</site>
                <site>ftp://mirror.local/pub/foo/</site>
            </sites>
            <options>
                <option name="limit" value="1,even" />
            </options>
        </item>
        <item>
            <category>software</category>
            <name>bar</name>
            <desc>Barware</desc>
            <version>1.8</version>
            <sites>
                <site>http://example.org/software/bar/</site>
            </sites>
        </item>
    </items>

TIPS

You can refer to other values within each <item> element as shown above, using the %(variable) notation.

Note that the values for <category>, <suffix>, <distname> and <distfiles> in the ``Foo'' entry above are the defaults and can be omitted.

USING THE BACKEND

Once you have your file ready, you can use the standard build and rebuild commands to update Portscout's internal database with any changes.