summaryrefslogtreecommitdiffstats
path: root/py/mock/util.py
Commit message (Collapse)AuthorAgeFilesLines
* pass selinux status to mock.util.rmtree() function (BZ# 614440)Clark Williams2010-08-121-2/+7
| | | | | | | 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>
* Check SELinux state from /selinux/enforce instead of /usr/sbin/getenforce.Ville Skyttä2010-04-261-8/+7
| | | | | Cleans up an error message when getenforce is not installed, and fixes wrong outcome from selinuxEnabled() when SELinux is additionally disabled.
* Clean up unused imports.Ville Skyttä2010-03-201-1/+0
|
* add utility function to detect SELinux status and use itClark Williams2010-02-191-0/+11
| | | | | | | | | 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>
* Merge branch 'master' into clarkClark Williams2009-02-011-1/+0
|\
| * removed import of popen2 from py/mock/util.py (gets rid of deprecated warning)Clark Williams2008-12-191-1/+0
| |
* | Signed-off-by: Mike McLean <mikem redhat com>Mike McLean2008-11-111-2/+10
|/
* internal setarch support for s390/s390xMike McLean2008-10-141-0/+1
| | | | Signed-off-by: Mike McLean <mikem@redhat.com>
* fix typo which causes exception in command-timeout code (which was trying to ↵Michael E Brown2008-03-311-1/+1
| | | | raise exception)
* log child return code for debugging.Michael E Brown2008-03-041-0/+1
|
* add fcntl importMichael E Brown2008-01-301-0/+1
|
* Merge ssh://mock/var/ftp/pub/Applications/git/mockMichael E Brown2008-01-291-12/+32
|\ | | | | | | | | | | | | * ssh://mock/var/ftp/pub/Applications/git/mock: updates to mock.util.do(): 1) nonblocking read, 2) dont leave zombies (waitpid). we now run /etc/profile, so no need to manually do ccache stuff. use makeChrootPath() functionality rather than obscure string interpolation
| * updates to mock.util.do(): 1) nonblocking read, 2) dont leave zombies (waitpid).Michael E Brown2008-01-291-12/+32
| |
* | set the current working directory in the chrootMike Bonnet2008-01-241-4/+9
|/ | | | | | | | | | | | | | | This patch allows you to set the current working directory (in the chroot) before running a command with --chroot. This avoids the need to pass shell snippets ('cd /some/path && /run/cmd') to mock when running a command that expects to executed from a certain directory. It's useful when using --copyin to setup the environment before running a command. >From e4071d1d41a62ccf4461dfab958f9325edf30c97 Mon Sep 17 00:00:00 2001 From: Mike Bonnet <mikeb@redhat.com> Date: Thu, 24 Jan 2008 17:09:06 -0500 Subject: [PATCH] optionally set the current working directory (in the chroot) before running command with --chroot Signed-off-by: Michael E Brown <mebrown@michaels-house.net>
* add back in dropped '.' to tar cvf command that is causing root cache ↵Michael E Brown2008-01-201-0/+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-201-128/+120
| | | | fork/exec.\nThis cleans up the code considerably. Also, start reducing the places where we use a shell in the subcommand.
* cleanup trailing whitespace.Michael E Brown2008-01-081-1/+1
|
* Doug Chapman's ia64 personality warning fixClark Williams2007-12-221-0/+1
|
* Roland McGrath's fix for ctypes LoadLibrary on ia64Clark Williams2007-12-221-1/+1
|
* fix path comparison for orphanskill.Michael E Brown2007-12-171-1/+1
|
* dont do setarch personality() call for noarchMichael E Brown2007-12-161-1/+1
|
* demote setarch log msg back to debug() since we now have a warning for when ↵Michael E Brown2007-12-111-1/+1
| | | | it doesnt run.
* Merge branch 'master' of /var/ftp/pub/Applications/git/mockMichael E Brown2007-12-111-3/+3
|\ | | | | | | | | * 'master' of /var/ftp/pub/Applications/git/mock: - make "mock --chroot" non-interactive - set the exit code of "mock --chroot" to the exit code of the process run in the chroot - log the output of the process to root.log
| * - make "mock --chroot" non-interactive - set the exit code of "mock ↵Mike Bonnet2007-12-111-3/+3
| | | | | | | | | | | | --chroot" to the exit code of the process run in the chroot - log the output of the process to root.log Signed-off-by: Michael E Brown <michael_e_brown@dell.com>
* | add warning for when personality has no constant mapping.Michael E Brown2007-12-111-1/+6
|/
* add i586/i686 setarch defs. add info message when setarch is ran.Michael E Brown2007-12-111-2/+3
|
* add sparcv9 for setarch.Michael E Brown2007-12-111-1/+1
|
* add setarch defs for sparc 32/64Michael E Brown2007-12-111-5/+6
|
* personality() returns -1 on error.Michael E Brown2007-12-111-1/+1
|
* less verbose do().Michael E Brown2007-12-061-2/+1
|
* add unshareMichael E Brown2007-12-061-5/+23
|
* fixup logging calls.Michael E Brown2007-12-061-2/+2
|
* separate out function tracing from verbosityMichael E Brown2007-12-061-25/+25
|
* consolidate imports.mock-0.8.12Michael E Brown2007-12-031-2/+1
|
* mostly whitespace fixes, plus a few other things to make pylint/pychecker ↵Michael E Brown2007-12-021-26/+28
| | | | happier. No significant code changes.
* convert @decorator-syntax to use python-2.3 compatible peak decoratortools ↵Michael E Brown2007-12-011-13/+14
| | | | syntax.
* move things around so that we can run mock.py from the build tree instead of ↵Michael E Brown2007-11-301-0/+286
having to install it.