package_state: use new repoquery option --installroot [BZ# 1029352 and 985681]

use the new (yum-utils >= 1.1.31) repoquery option --installroot
to avoid corrupting host yum cache when running mock.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
mockchain: Do not pass $ to repo id in mockchain [BZ# 1034805]

remove special characters when constructing the internal id for
a repo from the passed in parameter 'repoid'

Signed-off-by: Clark Williams <clark.williams@gmail.com>
Add 'extra_chroot_dirs' config option

Add the 'extra_chroot_dirs configuration option to allow creation
of directories other than the core set inside the chroot. This is
done by setting the variable in a config file:

   config_opts['extra_chroot_dirs'] = [ '/tmp/foo', '/tmp/bar' ]

This will result in the dirs /tmp/foo and /tmp/bar being created
in the chroot when it is initialized.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
configs: first cut at epel-7 configs for x86_64 and ppc64

Signed-off-by: Clark Williams <clark.williams@gmail.com>
fixups for epel-7 configs

Signed-off-by: Clark Williams <clark.williams@gmail.com>
implement autoreconf call in build phase of mock rpm [BZ# 926154]

Ensures the guess files is happy, and updated every
build no matter how far behind the bundled files become.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
rawhide and f19/f18 is hardware floating point only for arm, drop the unneeded configs

Signed-off-by: Clark Williams <clark.williams@gmail.com>
pass root environment to repoquery calls for proxy config [BZ# 974499]

pass in environment variables from root config to repoquery so that
proxy variables are used for configuration.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
fix --copyout by temporary drop and restore of privs [BZ# 1002142]

When doing copyout don't permanently drop privs, just temporarily
do so then restore them before tearing down the chroot.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
add releasever config option to configs [BZ# 1056039]

add config_opt['releasever'] to mock configs for use in copr

Signed-off-by: Clark Williams <clark.williams@gmail.com>
add rawhide aarch64 config
remove sparc rawhide configs, she be dead
versiom bump to 1.1.36

Signed-off-by: Clark Williams <clark.williams@gmail.com>
Merge remote-tracking branch 'origin/master'

Conflicts:
	etc/mock/fedora-rawhide-sparc.cfg
fixed buildreqs for mock by adding automake

Signed-off-by: Clark Williams <clark.williams@gmail.com>
quote --shell args like a shell [BZ# 966144]

Signed-off-by: Clark Williams <clark.williams@gmail.com>
Fix for race in directory creation [BZ# 1052045]

When starting several instances of mock at the same time and root_cache
plugin is used and /var/cache/mock is empty there is a race condition
and only first mock runs successful and other fails with:

ERROR: Could not create dir /var/cache/mock/fedora-20-i386/root_cache/. Error: [Errno 17] File exists: '/var/cache/mock/fedora-20-i386/root_cache/'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 69, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)

mkdirIfAbsent doesn't catch situation where directory is created by
other instance.

Add logic to the exception clause to catch directory existence.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
Add support for creating tarballs with scm data still inside

For some build systems the git information is required at build time
so we add an option to include the git data in the source tar
ball. Default is still to exclude vcs information if the tar
executable supports this option.

Signed-off-by: Peter Jönsson <peter.jonsson@klarna.com>
elevate privs when accessing the chroot rpmdb [BZ# 1051474]

raise privledges to root when accessing the rpm db inside the
chroot via the package_state plugin.

Signed-off-by: Clark Williams <clark.williams@gmail.com>
internal_dev_setup option used consistently

Move check for internal device setup into _setupDev() method so that
it's used everywhere, not just in chroot initialization

Signed-off-by: Clark Williams <williams@redhat.com>