any-howto – examples of commands to work with any system.

Description

All examples are demonstrated with id and amd64 configuration, the name hello-world-1.0 is taken for a single package.

Working directory

The creation of working directory:

        tar xzf any-<version>.tgz
        mv any-<version> my_dir
        cd my_dir

Build

List all available packages:

        lspkg id

List the contents of somelist.src:

        lspkg id somelist.src

Build the single package:

        any do id hello-world-1.0

See all output on terminal, no logs are created:

        any do id,output hello-world-1.0

Build the single package inside chroot:

        anch do id hello-world-1.0

Build the list of packages somelist.src:

        any do id somelist.src

View default available lists:

        cat ports/list/all.src

Work with entire project

The example of the build of entire project:

-
deploy binary packages, whose sources are not shipped with the distro. They are listed in ports/list/deploy.src. The path to binary packages is given in the option any_pkg.
            any deploy id deploy.src any_pkg=packs/amd64/
-
launch distro building. The distro set is listed in ports/list/build.src.
            any do id build.src

Configuration

Add any_parameter to the build:

        any do id hello-world-1.0 any_parameter=value

Store any_parameter permanently:

        echo '
[id]
any_parameter = value' >> $(rootrdd)/rdd.def

Store any_parameter for amd64 only:

        echo '
[amd64]
any_parameter = value' >> $(rootrdd)/rdd.def

Paths

build/image/amd64/hello-world-1.0/
binary files of hello-world-1.0, installed after successfull build.

build/pack/amd64/
directory with installable binary packages.

ports/srcstatic/
directory for static archives with package sources.
By default the build of hello-world-1.0 will search for the archive ports/srcstatic/hello-world-1.0.tgz.

build/work/amd64/hello-world-1.0/
directory where build is performed.

ports/packages/hello-world-1.0/
directory with anybuild and other dev resources.

ports/list/
lists with available packages and sets for current distro project.

ports/patch/hello-world-1.0/
directory for patches of hello-world-1.0 package.
These patches are applied on top of sources from ports/srcstatic/.

New package new-1.2.3

Brief explanation on adding of the new package new-1.2.3 to a project.

Create anybuild ports/packages/new-1.2.3/new.build
Store main sources new-1.2.3.tar.gz in ports/srcstatic/
Store patches (if there are some) in ports/patch/new-1.2.3/
Add new-1.2.3 name to all.src

Dependencies

If any_pkg is not set, its default value is build/pack/amd64/.

Install the dependencies of hello-world-1.0 from /path/to/pkg, build missing dependencies and build hello-world-1.0 itself:

        any unit id hello-world-1.0 any_pkg=/path/to/pkg

Handle the dependencies for a package hello-world-1.0, which is absent in all.src:

        any unit id hello-world-1.0 any_pkg=/path/to/pkg \
            any_list_all=all.src,hello-world-1.0

Install the dependencies for a package hello-world-1.0.

        any tree id hello-world-1.0 any_pkg=/path/to/pkg

Install the dependencies, listed in needed-packs.src.

        any deploy id needed-packs.src any_pkg=/path/to/pkg

Calculate entire tree of dependencies for hello-world-1.0 and build everything:

        any buildtreenew id hello-world-1.0

Host isolation

Enter the isolated environment manually:

        sudo chroot `pwd` /bin/sh -l

The second way:

        sudo chroot `pwd`
        . /etc/profile

Build extensions

Turn off individual build context, use shared one:

        any do id,staticdeproot hello-world-1.0

Add packages to shared context:

        any deploy id,staticdeproot needed-packs.src any_pkg=/path/to/pkg

Check the sanity of binary files from build/image/amd64/hello-world-1.0/:

        any do id,sane hello-world-1.0

See also