summaryrefslogtreecommitdiff
path: root/morphlib/execute.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years, get rid of long lines and unused imports.Jannis Pohlmann2012-01-231-2/+1
|
* stop morph from using fakeroot and sudoLars Wirzenius2012-01-111-25/+2
| | | | | | | | | | | | | Instead, assume the whole build will be run, by the user, under fakeroot or sudo (the latter for system image builds). This allows us to run all non-system-image-build tests without root access at all. We now always create the cache directory, if missing, even if we're running as root. We no longer run ldconfig if ld.so.conf is missing. It is missing during our tests, but is (now) created by fhs-dirs for real builds.
* do not try to use object.__del__Lars Wirzenius2012-01-111-4/+0
| | | | | object does not have __del__ so there's never a point in trying to use it.
* mark more stuff outside of test coverageLars Wirzenius2012-01-111-1/+1
| | | | | | This bit is now twice excluded. The version of coverage.py in Debian squeeze does not work with the original one, so the new one should hopefully help.
* mark stuff outside coverage testingLars Wirzenius2012-01-111-1/+1
| | | | | This particular bit will be going away when we get rid of morph's juggling between non-root/fakeroot/sudo.
* remove fake fakeroot and sudo from chroot and make morph not use them when ↵Richard Maw2011-12-141-18/+17
| | | | | | running as root This is just sufficient to get stuff working for bootstrapping.
* Fix tests to reflect changesRichard Maw2011-12-091-4/+4
| | | | | | | | bins now takes an Execute, so the test needed to be changed to also pass one Execute had to be changed to ignore a statement from coverage Also fixed Execute.runv not outputting its error. I think it is not logged this way, but it does get output like it was before. Also check no longer runs cmdtest from the home directory.
* Made some sudo commands into fakeroot commandsRichard Maw2011-12-081-8/+36
| | | | | | | | | | | | | | | | | | | | Some commands can remain as fakeroot if they share the same fakeroot This can be done with the -i and -s parameters to fakeroot Now the Execute objects contain a reference to the file that stores their state, so fake commands' fake state is recognised by later commands The creating a system image definitely needs to be sudo though. Morph needs to create some files as part of the process, so unfortunately the equivalent to 'echo foo | sudo tee bar >/dev/null' is being used. They could be created with sufficient permissions, written then have better permissions set, but it seemed neater this way A better solution may be to have a subprogram that does the system image creation Putting files into the staging area for building other chunks is currently sudo, but shouldn't have to be. Rather than having a fakeroot per Execute object, it may be better to have a global one, though this would prevent concurrent use of fakeroot.
* Make the install parts of morphs run as sudoRichard Maw2011-12-081-2/+6
| | | | | | | | Then fix all the places where this broke things because they didn't have the required permissions. This is a potential security risk of course, it would be preferable if the install commands were run in a fakeroot session and only the final image building was run as root, but it needs to work first
* add logging to debug failure to execute stuffLars Wirzenius2011-12-061-0/+6
| | | | | (The real fix was --keep-path. I wish we had bootstrapped Baserock already.)
* Fix broken string escapeLars Wirzenius2011-11-151-1/+1
|
* Tweak error reporting from failed commands.Lars Wirzenius2011-11-141-5/+8
|
* Silence logging during testsLars Wirzenius2011-11-141-8/+10
|
* Only log stdout/err when command failsLars Wirzenius2011-11-071-6/+6
|
* Combine stdout and stderr when running programsLars Wirzenius2011-11-041-19/+10
| | | | | | Too many build tools and compilers produce a confusing mix of stdout and stderr output, which need to be read interleaved for things to make sense.
* Include stdout output in CommandFailed errors.Lars Wirzenius2011-10-191-5/+13
| | | | | | This is necessary because compilers tend to write error messages to stdout, not stderr, and it is silly to make morph users go read the log files to see what the error actually is.
* Fix GPL version sentence grammar.Lars Wirzenius2011-10-061-1/+1
|
* Differentiate between real and fake root.Lars Wirzenius2011-10-051-2/+6
|
* Make Execute.run and .runv be able to easily run commands as root.Lars Wirzenius2011-10-031-3/+8
|
* Build strata recursively.Lars Wirzenius2011-09-291-1/+1
| | | | If a chunk is missing, it will be built.
* Initial import.Lars Wirzenius2011-09-291-0/+87