UPKG(1)

NAME
upkg - compile upkg XML specifications into BASH scripts

SYNOPSIS

upkg [[--install] | [--remove] | [--bootstrap]] [--arch=<arch>] [--branch=<branch>] [--tag=<tag>] [[--enable-source] | [--disable-source]] [[--enable-binary] | [--disable-binary]] [--repos=<repo1,...,repon>] [--test] [package] {output filename}

DESCRIPTION

Upkg is a complete automated source building system. It compiles Upkg-XML specifications into bash(1) scripts which will then run for themselves. It has a lot of powerful features making building of different source entities much easier.

upkg(1) is the core part of the whole Upkg suite. It's all written in C# and is meant to be run by the mono(1) runtime. It does most of the work needed for the whole process. Its result is an autonom bash(1) script. To use upkg you need a repository with at least specifications configured in upkg.conf. Switch to REPOSITORY or CONFIGURATION for more information.

OPTIONS

If neither --install, --remove, nor --bootstrap is given, no package may be specified. By default, Upkg will upgrade all selected packages in the system and remove not selected but installed packages.

--install
    Install mode: the specified package and all dependencies will be built in place (in 'builddir') and installed into the running system. Packages tagged with 'staging=no' won't be built since these packages are generally here to construct a valid chroot enviroment.

--remove
    Remove mode: the specified package and all now unneeded dependencies will be removed.

--bootstrap
    Bootstrap mode: the specified package and all dependencies except those tagged with 'staging=no' will be built and installed in chroot, relatively to 'chrootdir'. This is mainly only useful when building a larger autonom system (e.g. a GNU/Linux distribution) since all tools and programs needed for the build have to be available in chroot. If this option is not given, all packages will be installed in the running system.

--arch=<arch>
    Specify the target architecture for this build/install like 'x84' or 'x86_64'

--branch=<branch>
    Specify the branch to use for the build/install. Valid branches are 'stable', 'testing', 'unstable' and 'experimental'.

--tag=<tag>
    Specify a special tag to use in {package}.

--{enable,disable}-source
    Allows or disallows the use of sources during the build.

--{enable,disable}-binary
    Allows or disallows the use of binaries during the build.

--repos=<repo1,...,repon>
    Specify additional repositories to the ones specified in upkg.conf.

--test
    Usable in build and install mode: does only parse the needed specs but does not write anything (i.e. a bash script).

--verbose
    Be verbose.

--quiet
    Be quiet. default

--help
    Prints a short abstact of the arguments to STDOUT.

REPOSITORY

A Upkg repository consists of a directory hierarchy, either on a local filesystem or accessible via HTTP, layed out as follows:

REPOSITORY/specs
    The specs directory contains package specifications, named PACKAGE.xml, tag specifications, named tag-TAG.xml and global.xml. You can find the description of the specification file format further down this document.

REPOSITORY/sources
    The sources directory only contains subdirectories, one for each package requiring source files.

REPOSITORY/sources/PACKAGE
    The package source directory contains the required source files as specified in the corresponding package specification.

REPOSITORY/binaries
    The binaries directory contains the built packages, named with the full versioned release name. upkg-bootstrap(1) will automatically copy built binaries to this directory if the repository resides on a local filesystem.

SPECIFICATION

Upkg package and tag specifications are XML documents containing build commands and meta informations guiding Upkg how to build, install and remove packages.

<package name="PACKAGE">
    The document root of package specifications. The 'name' attribute is mandatory and must match the filename of the specification less the .xml extension. The child elements 'description' and 'releases' are mandatory.

<description>
    Mandatory one-line description for packages.

<releases>
    Each package may consist of one or more releases which must differ in branch and/or tag.

<release version="VERSION" revision="REVISION" tag="TAG" branch="BRANCH">
    A release is the smallest distinguishable unit of a package and can be identified by the combination of its version, revision, tag and branch. The 'version' attribute is mandatory and may contain an arbitrary string identifying the source version of the package. The 'revision' attribute is mandatory and is used to distinguish different builds of the same source version, it must be integer and is typically incremented on each change. The 'tag' attribute is optional and is used to separate different releases within the same branch. The 'branch' attribute is mandatory and may be one of 'stable', 'testing', 'unstable', 'experimental', or a custom identifier. Upkg will consider releases for installation if they are in the same branch as the system or in a branch considered even more stable.

    The child elements 'settings', 'deps', 'preinst', 'build', 'postinst', 'prerm', 'postrm', 'config', and 'postbuild' are all optional but may only occur once and only in the specified order.

<build strip="yes|no">
    Encloses all build-relevant commands of the release. The 'strip' argument is optional and defaults to 'yes'. It specifies whether debug symbols should be stripped from the built package. The build tag may contain the child elements 'sources', 'script', 'add', and 'ignore' whereof 'script' is mandatory.

<script>
    Contains shell commands and wrappers around them. It may contain any amount of 'cmd', 'archive', 'patch', and 'install' elements in arbitrary order.

<cmd check="yes|no">
    Contains a single shell command. The optional 'check' argument specifies whether non-zero error codes stop the build and defaults to 'yes'.

CONFIGURATION