build: fix RPM builds

The rpmbuild tool requires certain directories to exist and will fail
rather than attempting to create them.  The 'clean' phase of maven will
remove these directories.

This patch adds support to ensure the directories exist.

NB. This patch changes the location of rpmbuild-related directories
from path/to/target/ (e.g. packages/fhs/target/RPMS) to
path/to/target/rpmbuild (e.g. packages/fhs/target/rpmbuild/RPMS).
There is an obvious knock-on effect to the location of resulting RPM
files.

Target: master
Request: 2.7 (as needed)
Request: 2.6 (as needed)
Request: 2.2 (as needed)
Patch: http://rb.dcache.org/r/6427/
Acked-by: Gerd Behrmann
cns: make unit tests less sensitive to speed of computer

A recent build failed because the CNS unit-tests rely on a test taking
no longer than 100 ms to complete.  Under normal circumstances, this
is reasonable; however, the build machine was suffering high IO load
and didn't managed to complete the unit test in the allotted time
window.

While the build machine shouldn't be suffering from this IO-load,
equally, our unit-tests shouldn't fail on slow machines.

This patch doesn't fix the dependency on system time; rather, it
increases the time window to 1 minute.

Target: master
Requires-notes: no
Requires-book: no
Patch: http://rb.dcache.org/r/6432/
Acked-by: Gerd Behrmann
dcache-chimera: Add interactive chimera shell

Adds an interactive shell for chimera. May also be used in non-interactive mode
with a command provided on the command line. In the latter form it supplants
the older chimera-cli utility.

Note that in some cases the argument order has changed compared to the
chimera-cli utility. The argument order now matches the order found in common
Posix utilities.

The chimera-cli utility should be documented as deprecated and eventually
removed from dCache.

The system-test populate script has been updated to use the new utility, which
avoids means the chimera skeleton can be created with a single invocation,
cutting down on the build time.

Target: trunk
Require-book: yes
Require-notes yes
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6423/
spacemanager: Retry on transient errors

Besides allowing the space manager to recover from various transient errors,
this change also enables us to use serializable transaction isolation.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6397/
Fix text width calculation for ANSI formatted help output

ANSI escape sequences have to be ignored to get the correct
width.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6412/
spacemanager: Fix capitalization bug in liquibase changeset

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6434/
pool: Do not save terminated jobs to setup file

Without this patch, cancelled permanent jobs will resurrect after a
pool restart. Also fixes the 'migration clear' command to remove
failed jobs too.

Target: trunk
Request: 2.7
Request: 2.6
Require-book: no
Require-notes: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6420/