SPECS: Add dependencies from devel packages to base packages

First step in cleaning up the inter-package dependencies.   This also
allows us to split files correctly between base and devel packages.
A devel package should require its base package, so that when the
devel package is installed as a build requirement the base files
are also pulled in.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
SPECS: Remove runtime dependencies which RPM can infer

RPM can infer runtime dependencies by scanning package binaries,
so we do not need to declare these dependencies explicitly.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
biniou: Move files to devel package, add empty base package

This split between base and devel packages is not correct.   It is
stopgap to let us fix other packages build requirements.   We will
fix the package properly in a future commit.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
easy-format: Move files to devel package, add empty base package

This split between base and devel packages is not correct.   It is
stopgap to let us fix other packages build requirements.   We will
fix the package properly in a future commit.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
ocaml-sexplib: Move files to devel package, add empty base package

This split between base and devel packages is not correct.   It is
stopgap to let us fix other packages build requirements.   We will
fix the package properly in a future commit.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
SPECS: Fix build dependencies on non-devel packages

In general, a package should BuildRequire a -devel package,
not a base package.  Tools, such as ocaml and ocamlfind, are
exceptions to this general rule.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
biniou: Rename to ocaml-biniou

Signed-off-by: Euan Harris <euan.harris@citrix.com>
easy-format: Rename to ocaml-easy-format

Signed-off-by: Euan Harris <euan.harris@citrix.com>
cmdliner: Rename to ocaml-cmdliner

Signed-off-by: Euan Harris <euan.harris@citrix.com>
mappkgname: Update RPM names for biniou, easy-format and cmdliner

Signed-off-by: Euan Harris <euan.harris@citrix.com>
mappkgname: libsexplib-camlp4 now defines a proper -dev package

Previously we artificially renamed ocaml-sexplib to be a -dev
package on Debian because the package naming rules required it.
Now that ocaml-sexplib defines a proper devel package this is not
needed.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
ocaml-tapctl: Add devel package dependency needed by Debian build

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Mock: Don't store cache and chroot in workspace

This was originally done to make it possible to run builds from
different workspaces simultaneously on the same build machine.
However storing the chroot in the workspace has its own problems
(several hundred megabytes of root-owned files in the workspace).
Container techniques such as Docker or Vagrant are better solutions
to this problem.

Reverts 18c6b64720beaa25dfd991f9d56da3ea70f58d5c

Signed-off-by: Euan Harris <euan.harris@citrix.com>
specdep: Only generate rules for the first binary RPM defined by each spec file

We only generate a rule for the first binary RPM produced by the
specfile.  If we generate multiple rules (one for the base package,
one for -devel and so on), make will interpret these as completely
separate targets which must be built separately.   At best, this means
that the same package will be built more than once; at worst, in a
concurrent build, there is a risk that the targets might not be rebuilt
correctly.

Make does understand the concept of multiple targets being built by
a single rule invocation, but only for pattern rules (e.g. %.h %.c: %.y).
It is tricky to generate correct pattern rules for RPM builds.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Makefile: Enable concurrent RPM builds

Two problems prevent us from building RPMs concurrently:

 * By default, mock can only run one instance of a given
   chroot environment at a time.   This is easily fixed
   by using the --uniqueext option to name instances
   uniquely.

 * Createrepo needs to update the repository database
   files in SRPMS and RPMS after each package is built.
   It's not clear whether it's safe to run two instances
   of createrepo against the same database concurrently.
   To prevent this, we wrap the call to createrepo with
   flock.

Copying build products back to the RPMS and SRPMS directories
concurrently should be safe because each job builds a different
package with a different filename.  An exception to this is
the build log file, which is common to all jobs.   We should
switch to separate logging for each package.

Signed-off-by: Euan Harris <euan.harris@citrix.com>