master.cfg:  remove 'buildsteps-script'; add 'copy-files' step

Adding a specfile to be copied for builds, so the 'buildsteps-script'
is replaced with a 'copy-files' config, where each file in a list is
copied in a step.
buildsteps:  Build RPM; fixes to init-git step

- Add RPM building steps:
  - build-tarball
  - build-source-package
  - build-binary-package
- Add linuxcnc.spec
- Convenience functions for computing RPM and tarball names

Fixes to init-git step:
- Replace $REPODIR with $repodir property from config
- Sanity checks on git repo directory
- Move git version checking ugliness into step
master.cfg:  'doStepIf' isn't required when 'selectors' present
post-receive.py:  get master host/portnum from config
post-receive.py:  fixup prev commit
post-receive.py:  log git clone cmd
master.cfg:  change sources:  fill in 'local-remote' with 'dir' if empty

Playing with git on NFS
post-receive.py:  fill out missing 'local-remote' from 'dir' config
buildsteps.sh:  'build' factory builds in chroot

So that the 'build' steps can run on a single machine with as many
CPUs as possible, build the source in a mock chroot environment.

Outside the chroot:
- Step names beginning with 'chroot-' are run in a chroot
Inside the chroot:
- Add '-r' option so we know we're in a chroot
- Avoid sections of script where missing variables would cause errors
- Hack to get 'make -j' argument

Steps:
- sourcetree:  check out an archive
- chroot-environment:  print out debugging info for chroot
- chroot-autogen/configure/make:  as usual, but in chroot
- chroot-result-tarball:  tar up built source tree
- move-tarball:  move tarball to common location
buildsteps.sh:  tweaks to tarball creation

- make tree writable by 'mockbuild' group during 'make' step
- 'result-tarball' taken out of chroot and combined with 'move-tarball'
buildsteps.sh:  disable 'lsmod' in chroot env

One of the Fedora buildroots doesn't include it by default, and it's
not necessary for a regular build.
buildsteps.sh:  noop:  rearrange functions and add section separators

Needs a little housekeeping....
buildsteps.sh:  dmesg step:  sudo -n; no-op comment
master.cfg:  name FileDownload steps; no non-strings in 'env'; other tweaks

- FileDownload steps are named after their file
- Time all script build steps
- MasterShellCommand steps don't like non-'str' args in 'env'
- Set 'SERVER_SIDE' variable to tell scripts where they are
buildsteps:  Use tarballs to pass source trees and results into/out of steps

Massage work flow to generate one initial tarball in 'ant' step that
following RIP and package builds use; RIP build result also packed
into tarball for use by 'test' factory; finally, build results copied
to /home/buildbot/results.

The hope is to de-duplicate some of this work.  However, the tar steps
take quite a bit of time.  Will experiment with not zipping.

- 'ant' factory:  create initial git archive tarball
  - 'sourcetree' step untars this tarball
  - tarball created with prefix 'linuxcnc-<version>' for use in SRPM
    - most 'build'/'test' steps first 'cd $BUILD_TEST_DIR/linuxcnc-<version>'
- 'bee' factory:  unused 'step-init'
- 'build' factory:  tar up RIP build tree
  - then untar in 'test' factory
  - pass $BUILD_TEST_DIR in to chroot
- 'test' factory:
  - fix test names ('*-posix' -> '*-pos-tst', etc.)
- 'packages' factory:
  - just copy archive tarball, don't create new
  - build-binary-package step:
    - extra options to mock cmd
    - put results in $BUILD_TEST_RESULT_DIR

- Put 'CONVENINCE ROUTINES' at top for use in variable sections
- New variables:
  - BUILD_TEST_DIR:  common directory for chroot build and (non-chroot) test
  - $changeset_result_dir: dir for all build results for a commit
  - $result_da_dir: dir for <distro>-<arch> build results
  - $git_archive_tarball: clean tarball for <distro>-<arch> builds
  - $build_source_tarball: tarball of <distro>-<arch> build for testing
- git-dir changed to original mirror for initial tarball creation

- disable bits when running on server side
linuxcnc.spec:  add BR:s for utilities looked for by configure.in
buildsteps:  remove 'step-init-git', unused step

This was used to create a slave-side git mirror.

The new build flow creates a tarball archive from the server mirror,
and slaves don't need to deal with git any more.
buildsteps:  customizes 'environment' steps for build and test factories

Split up and customize 'environment' step for build and test factories:
- 'environment' step only used in 'build' factory; customized for builds
  - no groups, xenomai-gid-ctl, ulimit, lsmod, uname data needed
- 'test-environment' step is customized from old 'environment' for testing
  - no rpm data needed
  - add flavor, hostname, realtime status data
  - if realtime loaded, stop it

New 'rtapi-init' function to set up RT environment:
- remove from 'runtests' step: source rip-environment and set FLAVOR
- set unique per flavor INSTANCE to minimize interference
- run from 'runtests' and 'test-environment' steps
test-environment step:  always run 'realtime stop' with debugging on
buildsteps:  clean up failed xeno-kernel test runs; debug test for hm2-idrom

Clean up after failed xenomai-kernel test run:

- RemoveModules function:
  - recursively remove modules that depend on hal_lib
- kill any lingering linuxcncrsh program (maybe not needed)

Debugging tests:

- Run DEBUG=5 abs.0 on xenomai flavor only (fix previous commit)
- Run DEBUG=5 hm2-idrom test on all flavors