summaryrefslogtreecommitdiffstats
path: root/py/mock/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Update packages after unpacking root cachePaul Howarth2010-08-121-2/+2
| | | | | | | | | 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>
* Exclude bind-mounted cache dirs from root cachePaul Howarth2010-08-121-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>
* 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>
* add selinux pluginJan Vcelak2010-07-301-0/+97
| | | | | | | | | | | | | | | | | | | | | 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-301-2/+7
| | | | | | | 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>
* fix cachefile generation filtering logicClark Williams2010-07-271-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-271-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-271-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>
* yum made/makes an rpmdb cache dir in $cachedir/installed for a whileSeth Vidal2010-05-091-0/+9
| | | | | 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.
* 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>
* Clean up unused imports.Ville Skyttä2010-03-202-3/+1
|
* fix intermittent problems generating root cache tarball (BZ# 540997)Clark Williams2009-11-251-5/+12
| | | | | | | | | Patch submitted by Paul Howarth <paul@city-fan.org> to prevent race condition when creating root cache tarballs and to remove partial tarballs on error. Signed-off-by: Clark Williams <williams@redhat.com> CC: Paul Howarth <paul@city-fan.org>
* Support configurable root cache compressionLubomir Rintel2009-03-271-3/+9
| | | | | | | | | | | | | This patch adds configuration options that influence how is the root cache compressed: config_opts['plugin_conf']['root_cache_opts']['compress_program'] = "gzip" config_opts['plugin_conf']['root_cache_opts']['extension'] = ".gz" Motivation to do this was to be able to use lzma compression. While it takes a long time to compress, for me it was more than two times faster than gzip when decompressing. Since I only seldom regenerate the root cache while doing a lot of builds, I was able to gain a considerable speed up.
* added panu's fix for strange rpm behaviorClark Williams2008-10-151-2/+4
|
* workaround new rpm issues by deleting rpmdb temp files after unpacking root ↵Clark Williams2008-08-291-7/+13
| | | | cache
* modify rootcache logic to rebuild cache if config files have newer timestampClark Williams2008-02-291-1/+10
|
* Merge branch 'master' of /var/ftp/pub/Applications/git/mockMichael E Brown2008-01-224-11/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of /var/ftp/pub/Applications/git/mock: get rid of one level of shell indirection where possible. revert accidental comment-out of test cleanup that I was using to debug tar problem. add back in dropped '.' to tar cvf command that is causing root cache creation to fail. Add debug logging for running commands. convert mock.util.do() to use subprocess.Popen() rather than raw fork/exec.\nThis cleans up the code considerably. Also, start reducing the places where we use a shell in the subcommand. better unit test error message. mount everything when running chroot command. updated change log added compat symlinks version bump update manpage with new site-defaults ref. the great config file rename. some manpage clarifications and arrangements. clarify info message to make it obvious that root cache is being unpacked. cleanup trailing whitespace. cleanup trailing whitespace. add ability to conditionally enable tmpfs based on minimum ram availability. add initfailed hook so tmpfs plugin can properly unmount tmpfs on failure. make sure we call postbuild hooks even on failure.
| * get rid of one level of shell indirection where possible.Michael E Brown2008-01-201-1/+1
| |
| * add back in dropped '.' to tar cvf command that is causing root cache ↵Michael E Brown2008-01-201-1/+1
| | | | | | | | creation to fail. Add debug logging for running commands.
| * convert mock.util.do() to use subprocess.Popen() rather than raw ↵Michael E Brown2008-01-202-6/+13
| | | | | | | | fork/exec.\nThis cleans up the code considerably. Also, start reducing the places where we use a shell in the subcommand.
| * clarify info message to make it obvious that root cache is being unpacked.Michael E Brown2008-01-091-1/+1
| |
| * cleanup trailing whitespace.Michael E Brown2008-01-082-4/+4
| |
| * add ability to conditionally enable tmpfs based on minimum ram availability.Michael E Brown2008-01-081-1/+10
| |
| * add initfailed hook so tmpfs plugin can properly unmount tmpfs on failure. ↵Michael E Brown2008-01-081-0/+2
| | | | | | | | make sure we call postbuild hooks even on failure.
* | we now run /etc/profile, so no need to manually do ccache stuff.Michael E Brown2008-01-221-16/+1
|/
* unmount tmpfs when done or we run into problems with clean.Michael E Brown2007-12-181-0/+7
|
* fixup typo: makeChrootPath is a method on self.rootObj.Michael E Brown2007-12-181-1/+2
|
* add initial tmpfs plugin and default options.Michael E Brown2007-12-181-0/+33
|
* remove uses of chroot rootdir attribute and use accessor.Michael E Brown2007-12-142-4/+2
|
* changed more uses of .rootdir to makeChrootPath(); updated man page for ↵Clark Williams2007-12-133-11/+9
| | | | --copyin and --copyout; updated plugins to use makeChrootPath(); updated releasetests.sh so that daemon tests uses --copyin
* separate out function tracing from verbosityMichael E Brown2007-12-064-31/+26
|
* fixup error where var/cache/yum in buildroot disappears due to clean.Michael E Brown2007-12-051-1/+1
|
* make sure dir exists before opening yum lock.Michael E Brown2007-12-041-2/+2
|
* init yumCacheLock file object in __init__. No need to wait until tryLock to ↵Michael E Brown2007-12-031-1/+1
| | | | open it.
* few changes to make pychecker happy.Michael E Brown2007-12-014-4/+4
|
* move things around so that we can run mock.py from the build tree instead of ↵Michael E Brown2007-11-304-0/+299
having to install it.