summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix up sparc arch handlingmock-1.0Dennis Gilmore2010-09-101-2/+3
|
* version bump to 1.0.11Clark Williams2010-08-162-2/+12
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* removed trap of EXIT in unit tests driverClark Williams2010-08-161-1/+1
| | | | | | This cause the test to always report failure Signed-off-by: Clark Williams <williams@redhat.com>
* fix typo in exception.pyClark Williams2010-08-161-1/+1
| | | | | | Changed __init to __init__ (thanks Jan!) Signed-off-by: Clark Williams <williams@redhat.com>
* Update packages after unpacking root cachePaul Howarth2010-08-142-2/+5
| | | | | | | | | Fix problem introduced in commit 3bc5fb958deb809fc04d6a74ce6688e093f5831a where the buildroot is no longer updated after unpacking the root cache. http://bugzilla.redhat.com/557526 Signed-off-by: Clark Williams <williams@redhat.com>
* noarch is always a legal archPaul Howarth2010-08-141-1/+1
| | | | | | Allow "--target noarch" to be specified. Signed-off-by: Clark Williams <williams@redhat.com>
* Exclude bind-mounted cache dirs from root cachePaul Howarth2010-08-141-0/+2
| | | | | | | | | Including the ccache directory /tmp/ccache and the yum cache directory /var/cache/yum in the root cache is unnecessary and can lead to the root cache tarball being an order of magnitude larger and taking 10 minutes or more to tar and compress even on a fast PC. Signed-off-by: Clark Williams <williams@redhat.com>
* Retain order of umountCmdsPaul Howarth2010-08-141-0/+2
| | | | | | | | | | | | | | The order of execution of umounts is the reverse of the order of the mounts, so as to deal with a hierarchy of mounts correctly. The ordering is reversed by _umountall but was being left in the reversed state so that the next time _umountall was called, it attempted to unmount filesystems in the wrong order, leading to build failures due to being unable to unmount for example /proc whilst /proc/filesystems was still mounted. This change reverses the order of umount commands back again before _umountall exits so as to maintain the ordering. Signed-off-by: Clark Williams <williams@redhat.com>
* Add i586 as a legal target archPaul Howarth2010-08-141-8/+8
| | | | | | | This is needed not only to target the legacy Fedora 11 32-bit release but also the still-current SLES-11 32-bit and possibly others too. Signed-off-by: Clark Williams <williams@redhat.com>
* pass selinux status to mock.util.rmtree() functionClark Williams2010-08-092-11/+15
| | | | | | | Pass in boolean 'selinux' via keyword arguments that tells rmtree whether to do retry logic with selinux attributes Signed-off-by: Clark Williams <williams@redhat.com>
* change integer constants to symbolic errno constants in util.pyClark Williams2010-08-091-2/+3
| | | | | | | import the errno package and use symbolic variants of errno constants EPERM, EACCES and ENOENT. Signed-off-by: Clark Williams <williams@redhat.com>
* add i586 as valid archClark Williams2010-08-091-3/+3
| | | | | | Added i586 as valid arch for i386/i686/x86_64. Signed-off-by: Clark Williams <williams@redhat.com>
* add noarch as legal architecture for any host arch (BZ# 622170)Clark Williams2010-08-091-8/+8
| | | | | | | Added 'noarch' as a legal architecture to build from any host architecture Signed-off-by: Clark Williams <williams@redhat.com>
* version bump to 1.0.10Clark Williams2010-08-032-2/+7
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* turn off updates-released repository for fedora-14 configsClark Williams2010-08-037-0/+89
| | | | | | f14 is prerelease so turn off the updates-released repository Signed-off-by: Clark Williams <williams@redhat.com>
* updated release instructions for new git-based package treesClark Williams2010-08-031-119/+103
| | | | | | | Modified the release instructions to deal with needing the fedora-packager package and how to use fedpkg. Signed-off-by: Clark Williams <williams@redhat.com>
* set state correctly for SELinux (BZ# 620143)Clark Williams2010-08-031-2/+8
| | | | | | | | | The new selinux plugin fakes SELinux being turned *off* in the chroot by bind-mounting a fake /proc/filesystems in the chroot. If this plugin is enabled, we should *not* do any SELinux attribute operations in the chroot. Setup this state correctly at init time. Signed-off-by: Clark Williams <williams@redhat.com>
* append rather than insert umount of /proc/filesystems (BZ# 620825)Clark Williams2010-08-031-1/+1
| | | | | | | | since the umount commands are reversed before being executed, just append the umount of /proc/filesystems in the selinux plugin so that it will happen in the correct order. Signed-off-by: Clark Williams <williams@redhat.com>
* Modified Makefile.am to conditionally set RPMBUILD macroClark Williams2010-08-031-5/+1
| | | | | | | | If /usr/bin/rpmbuild-md5 exists, then use it, otherwise use rpmbuild. This helps when testing older distro configs such as for el4 and el5 Signed-off-by: Clark Williams <williams@redhat.com>
* version bump to v1.0.9Clark Williams2010-07-312-2/+25
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* deleted testing files from docs dir (moved to tests dir)Clark Williams2010-07-313-289/+0
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* added secondary arch config filesClark Williams2010-07-315-0/+190
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* add selinux pluginJan Vcelak2010-07-313-2/+103
| | | | | | | | | | | | | | | | | | | | | This patch adds an selinux plugin that sets up an environment with selinux turned *off* in the build chroot. How does this work? From the author's description: It is done the same as the patch sent by Thomas Liu in bz 614440 does. Actually, this proceeding was suggested by Dan Walsh in bz 573111. 1.) Fake /proc/filesystems is created in conf["cachedir"]. It includes the same content as the same file in host environment, except line with selinuxfs. This file is bind mounted into build environment. 2.) Option '--setopt=tsflags=nocontext' is added to yum commands. This is done by wrapping mock.util.do with _selinuxDoYum in "preyum" hook. This function just adds the option and passes the command to original mock.util.do function. The wrapping is removed in "postyum" hook. I didn't find cleaner method, without modifying main code. Signed-off-by: Clark Williams <williams@redhat.com>
* patch that allows specifying max tmpfs size to tmpfs pluginKalev Lember2010-07-313-4/+12
| | | | | | | Add a 'max_fs_size' parameter to the tmpfs plugin that allows specification of sizes greater than default (50% of RAM). Signed-off-by: Clark Williams <williams@redhat.com>
* fixed indentation typo in py/mock/backend.pyClark Williams2010-07-311-3/+3
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* allow --sources to specify either single file or directory (BZ# 510409)Ricky Zhou2010-07-312-5/+16
| | | | | | | Mock originally takes just a directory for the argument to --sources; expand this to allow for a single file or a directory. Signed-off-by: Clark Williams <williams@redhat.com>
* modified tests/runtests.sh to exit properly on ^cClark Williams2010-07-311-1/+1
| | | | | | Modified trap logic in runtests.sh to exit on SIGINT Signed-off-by: Clark Williams <williams@redhat.com>
* added symlink from /proc/self/fd to /dev/fd in the chroot (BZ# 526414)Clark Williams2010-07-311-0/+4
| | | | | | | | Added a symlink in the chroot from /proc/self/fd to /dev/fd. Only do this for EPEL5+ and FC hosts since the 2.6.9 kernel for EPEL4 does not support this. Signed-off-by: Clark Williams <williams@redhat.com>
* changed from referencing defaults.cfs to site-defaults.cfg (BZ# 600487)Clark Williams2010-07-311-3/+3
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* moved test suite to 'tests' directoryClark Williams2010-07-3113-2/+368
| | | | | | | Moved test infrastructure into the tests directory and broke component tests out into individual scripts. Signed-off-by: Clark Williams <williams@redhat.com>
* update the epel-6 mock configs to point at the beta2 mirrorlist urlsDennis Gilmore2010-07-313-0/+177
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* added i686 architectureClark Williams2010-07-311-3/+4
| | | | | | Added i686 architecture to arch checking logic in py/mock.py Signed-off-by: Clark Williams <williams@redhat.com>
* deleted fedora-10 and fedora-11 configsClark Williams2010-07-3114-534/+0
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* fix cachefile generation filtering logicClark Williams2010-07-311-3/+3
| | | | | | | | | The original fix to generating a cache file without /proc, /sys, and /dev entries failed due to the --exclude=sys filtering out /usr/include/sys (a bad thing). Changed the filtering excludes to include a './' prefix to avoid that little problem. Signed-off-by: Clark Williams <williams@redhat.com>
* moved rpmdb clean block so that it works with --offlineClark Williams2010-07-311-7/+7
| | | | | | | previous fix for rpmdb issues was under a "if online:" block. Move it out so rpmdb cleanup occurs in both cases. Signed-off-by: Clark Williams <williams@redhat.com>
* filter out proc,sys,and dev from cache file creationClark Williams2010-07-311-0/+3
| | | | | | | Added --excludes to tar comand line to exclude proc, sys and dev files when creating root cache. Signed-off-by: Clark Williams <williams@redhat.com>
* added logic to detect invalid architecture combinations (BZ# 607144)Clark Williams2010-07-312-0/+31
| | | | | | | | | Modified py/mock.py to dectect invalid build combinations (e.g. trying to build x86_64 packages on an i386 host) and to throw an InvalidArchitecture exception when detected. Added the above exception to py/mock/execption.py Signed-off-by: Clark Williams <williams@redhat.com>
* Added description of how to add user to the mock group (BZ# 570434)Clark Williams2010-07-311-0/+8
| | | | | | | added description of how a user may add themselves to the mock group to the mock man page. Signed-off-by: Clark Williams <williams@redhat.com>
* add the --scrub option for cleaning up cache (BZ# 450726)Paul B. Schroeder2010-07-312-17/+56
| | | | | | | | | | | Added the command line option: --scrub=[all,chroot,cache,root-cache,c-cache,yum-cache] which allows selective cleanup of the various cache's maintained by mock (on on mock's behalf). Also added logic to umountall() to umount in reverse order of mount. Signed-off-by: Clark Williams <williams@redhat.com>
* fix yum cache synchronization problem in yum_cache.py pluginSeth Vidal2010-05-061-0/+9
| | | | | | | | | yum made/makes an rpmdb cache dir in $cachedir/installed for a while; things can go wrong in a specific mock case if this happened. So just nuke the installed dir and the files in it. Problem solved. Signed-off-by: Clark Williams <williams@redhat.com> (cherry picked from commit 826ab6d6e04fe4e90a5700acd608c7293bdbbec9)
* Create missing directories for config_opts['files'] elementsPaul Howarth2010-05-051-1/+3
| | | | | | | | | Without this fix, only files within directories pre-created as part of the chroot "skeleton" can be created using config_opts['files'], as the attempt to create the file fails with "No such file or directory". This patch allows for creation of files in arbitrary directories. Signed-off-by: Clark Williams <williams@redhat.com>
* correct mispelling of sqlite extension in yum_cache.pyClark Williams2010-05-051-1/+1
| | | | | | | | | Yum uses .sqlite files, but the plugin was looking for .sqllite. Remove one 'l'. Reported-by: Seth Vidal <skvidal@fedoraproject.org> Signed-off-by: Clark Williams <williams@redhat.com> (cherry picked from commit 78cce7c8b9d299367c7f8d8e23a63ca777a90c26)
* Prep for releasemock-1.0.7Jesse Keating2010-03-112-2/+6
|
* Revert "add configuration option to run createrepo on result rpms"Jesse Keating2010-03-113-12/+0
| | | | | | | This reverts commit 716d41a0090047c3e943d102537b87d86fdcbe88. We've decided to revert this feature on the 1.0.x series. We'll add it back for 1.1
* Revert "Use -N flag with useradd, but not in EPEL #495734"Jesse Keating2010-03-118-8/+2
| | | | | | | | This reverts commit e99adc9492ab1087018c630f68f75ebe79f56a76. -n still works on Fedora, and trying to override -N with -n in epel configs fails for things like koji generated configs. Falling back to -n until that stops working for us.
* version bump to 1.0.6mock-1.0.6Clark Williams2010-02-192-5/+11
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* add utility function to detect SELinux status and use itClark Williams2010-02-192-3/+18
| | | | | | | | | Add a utility function selinuxEnabled() that returns true if SELinux is enabled on the host and false otherwise. Use this in _setupDev() method of the Root object to avoid shelling out unnecessarily to 'chcon'. Signed-off-by: Clark Williams <williams@redhat.com>
* add conditional require of python-hashlib for EL5Clark Williams2010-02-191-1/+4
| | | | | | | New Fedora repositories require code from python-hashlib so require that if the disto being built is EL5 Signed-off-by: Clark Williams <williams@redhat.com>
* version bump to 1.0.5mock-1.0.5Clark Williams2010-02-182-2/+7
| | | | Signed-off-by: Clark Williams <williams@redhat.com>
* Add Fedora 13 configsJesse Keating2010-02-177-0/+267
|