The customize module includes an --selinux-label option which can run
'fixfiles restore' (on most SELinux guests) or set /.autorelabel (on
some older ones).
Commit 49014f81f3 renamed the old
--selinux-label option to --autorelabel, but note this was not
included in a stable version of libguestfs.
Note this change leaves a bunch of now redundant code for detecting if
we created a new file in the guest.
Split virt-builder into build and customize steps, so that we can spin
off a separate tool called 'virt-customize'. This commit does not in
fact create such a tool, but it moves all the common code into a
library, in the customize/ subdirectory of the source.
Although this is mostly refactoring, it does change the order in which
virt-builder command line arguments are processed, so they are now
processed in the order they appear, not the inflexible fixed order
used before.
Previously we ran them in essentially a random order, although it
might have looked alphabetical in some cases because the modules are
loaded in order.
Some tests might spawn an appliance, which will take time on slower
architectures and on some virtualized environments.
Hence raise the per-test timeout from the default of 60s to 300s (which
should be hopefully enough for now).
Commit f75142c577 disabled parallel
builds in the ocaml subdirectory (which was the correct thing to do).
This made building the OCaml tests in particular very slow. Therefore
fix things so that parallel builds can be used again.
See also discussion here about different approaches:
https://www.redhat.com/archives/libguestfs/2014-March/thread.html#00223
This reintroduces commit dce94f3e26.
When parsing the repository configuration files, track the file names
parsed, and in case of same file name in multiple location consider only
the one in the directory coming before others in the prioritised list of
paths.
This way it is possible to "shadow" a configuration file in a system
path with one with the same name in a local directory, for example.
Always close the file (ignoring its result) after a parsing, and cleanup
the parse_context object before any exit().
This eases the debugging of memory issues in the actual parser.
This changes podwrapper so that the input (POD) files should not
contain an =encoding directive. However they must be UTF-8.
Podwrapper then adds the '=encoding utf8' directive back during final
generation.
This in particular avoids problems with nested =encoding directives in
fragments. These break POD, and are undesirable anyway.
Switch the lex/yacc parser into reentrant mode, to ease the handling of
parsing-specific data; introduce a new parser_context struct for that,
which is added as extra data to the parser.
This should cause no behaviour changes in the parsing, just no more
global variables used for getting data in/out the parser.
So far the failure of some test would have not reported a non-zero
return value by run-tests.php. Since now all the PHP tests pass, we can
ask for failures to be fatal, by exporting REPORT_EXIT_STATUS=1 for
run-tests.php.
We have generally forbidden declaration-after-statement in our code
(although there are plenty of places that do it). In any case this
warning is not in the default set, so we don't need to turn off the
warning.