summaryrefslogtreecommitdiffstats
path: root/sysprep
Commit message (Collapse)AuthorAgeFilesLines
* inspection, virt-sysprep: Use /etc/hostname on F18+, RHEL7+ (RHBZ#881953, ↵Richard W.M. Jones2012-11-301-10/+16
| | | | RHBZ#858696).
* sysprep: remove crash data generated by kexec-toolsWanlong Gao2012-11-222-0/+48
| | | | | | | | | | Remove the kdump generated kernel crash data. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> RWMJ: - Added /var/log/dump/* path for SLES (thanks Olaf Hering). - Update po/POTFILES-ml.
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-132-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* sysprep: Don't fail when trying to remove /var/spool/at/spool (directory).Richard W.M. Jones2012-11-011-1/+3
| | | | This fixes commit 1949016e899b2737525fdc9b6dda451ad9ecbd66.
* sysprep: Move a comment.Richard W.M. Jones2012-10-301-1/+3
| | | | No change.
* sysprep: remove man pages cacheWanlong Gao2012-10-301-0/+3
| | | | | | Remove the cache files generated by man-db. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: remove fontconfig cacheWanlong Gao2012-10-301-0/+3
| | | | | | Remove the cache files generated by fontconfig. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* syntax: Use __PATTERNS__ instead of @PATTERNS@ in podwrapper man pages.Richard W.M. Jones2012-10-032-4/+4
| | | | | It is slightly dangerous to use @PATTERNS@, since these might be substituted by autoconf when they appear in Makefile.am files.
* sysprep: Typo in man page: resets -> reset.Richard W.M. Jones2012-09-261-1/+1
|
* sysprep: handle at jobs in cron-spool operationOlaf Hering2012-09-221-0/+6
| | | | | | | cron-spool claims to remove at jobs, but it has no code to actually do that. Add patterns to remove files in known at spool locations. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: handle distro specific sysv scriptsOlaf Hering2012-09-221-11/+70
| | | | | | | | | | | | | Currently firstboot would only work on redhat-based images. Handle redhat-based, suse-based and debian guests, error out in case of an unknown distro. Update firstboot.sh: - make sure scripts exists and can be executed - add LSB header to avoid insserv warnings later on - run script only if called with "start" Update functions, pass only required options. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: handle suse-based in hostname operationOlaf Hering2012-09-211-1/+1
| | | | Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: handle SuSE in random-seed operationOlaf Hering2012-09-191-0/+1
| | | | Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: add zypper to package-manager-cache operationOlaf Hering2012-09-191-0/+2
| | | | | | | | libzypp and zypper store their cache files in /var/cache/zypp/{packages,raw,solv}/ and /var/cache/zypper/RPMS/ Add a single pattern to match both cases. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: remove apache2, audit and ntp in logfile operationOlaf Hering2012-09-191-0/+4
| | | | | | Add more entries to the dump ground of logfile patterns. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: handle SuSE in hostname operationOlaf Hering2012-09-191-0/+4
| | | | | | | | SuSE based installations store the hostname in /etc/HOSTNAME. Add code to handle both opensuse and sles. Code to properly detect the latter will be added with another patch. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* sysprep: Create /etc/sysconfig/network file if it doesn't exist (RHBZ#858696).Richard W.M. Jones2012-09-191-10/+19
|
* sysprep: remove hostname from ifcfg-*Wanlong Gao2012-09-032-0/+59
| | | | | | Remove hostname from network interface configuration. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* podwrapper: Add --license parameter, which is required.Richard W.M. Jones2012-08-211-0/+1
| | | | | | | | | | This adds standard LICENSE and BUGS sections to all of the man pages that are processed by podwrapper. Modify all the calls to $(PODWRAPPER) to add the right --license parameter according to the content. Note that this relaxes the license on some code example pages, making them effectively BSD-style licensed.
* man pages: Ensure consistent copyright/author sections, remove licenseRichard W.M. Jones2012-08-211-14/+0
| | | | | | | | | | section. Ensure each man page contains consistent COPYRIGHT and AUTHOR sections. Remove the LICENSE section. We will add that back in podwrapper in a later commit.
* sysprep: docs: virt-sysprep can now be used to customize a guest.Richard W.M. Jones2012-08-181-6/+18
|
* sysprep: Add --firstboot functionality.Richard W.M. Jones2012-08-188-7/+299
| | | | | This allows you to add scripts that run in the context of the guest the first time it boots.
* sysprep: Improve error messages.Richard W.M. Jones2012-08-163-1/+25
|
* sysprep: remove the process accounting log filesWanlong Gao2012-08-113-3/+62
| | | | | | | | | | We just remove the process accounting files previously without touch a empty file, this will cause psacct runs error. Restart the service can't help us create this file auto. couldn't open file '/var/account/pacct': No such file or directory Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: Describe more directly how to use qemu-img for snapshotting.Richard W.M. Jones2012-07-281-14/+24
|
* build: Use $(top_builddir)/run in Makefile.am's.Richard W.M. Jones2012-07-261-2/+2
| | | | | Not necessary, but this makes all invocations of 'run' consistent. There is no functional change.
* sysprep: Generate new random UUIDs for LVM2 PVs and VGs (thanks Kazuo Moriwaka).Richard W.M. Jones2012-07-252-2/+55
|
* sysprep: Change perform callback to perform_on_filesystems and ↵Richard W.M. Jones2012-07-2533-40/+115
| | | | | | | | | perform_on_devices. Operations that need to work directly on guest block devices will fail because the block devices are busy. Therefore add a phase with the filesystems unmounted, and allow operations to specify that they need to work in this phase.
* sysprep: Tidy up the Makefile.Richard W.M. Jones2012-07-251-60/+12
| | | | This is just code motion.
* sysprep: operation machine-id: return `Created_files.Richard W.M. Jones2012-07-251-1/+1
| | | | | | | This operation can create the /etc/machine-id file, so it may need to be relabelled by SELinux. This fixes commit e68336d72a7d71a44d80f0d13c40ff44653e5c01.
* sysprep: remove the local machine IDWanlong Gao2012-07-252-0/+49
| | | | | | | | | | | remove the local machine ID, leave it empty, let it be generated during next booting. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> RWMJ: - Whitespace change. - Remove completed items from TODO.
* sysprep: remove the auto generated abrt dataWanlong Gao2012-07-252-0/+48
| | | | | | | | | | remove the automatically generated abrt data. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> RWMJ: - Remove copy and pasted line. - Use C<> in description.
* build: Return 77 from skipped tests.Richard W.M. Jones2012-07-191-2/+2
|
* build: Change calls to podwrapper.sh to use $(PODWRAPPER).Richard W.M. Jones2012-07-161-1/+1
| | | | | This will allow us to easily change the location of this script in future.
* generator: Rename 'add_drive_opts' API to 'add_drive'.Richard W.M. Jones2012-07-141-1/+1
| | | | | | By using the once_had_no_optargs flag, this change is backwards compatible for callers (except Haskell, PHP and GObject as discussed in earlier commit).
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples
* run: Set MALLOC_PERTURB_ to a random value.Richard W.M. Jones2012-06-281-3/+0
| | | | | | | | | | | | | | | | | MALLOC_PERTURB_ is a glibc feature which causes malloc to wipe memory before and after it is used, allowing both use-after-free and uninitialized reads to be detected with relatively little performance penalty: http://udrepper.livejournal.com/11429.html?nojs=1 Modify the ./run script so that it always sets this. We were already using MALLOC_PERTURB_ in most tests. Since ./run is now setting this, we can remove it from individual Makefiles. Most TESTS_ENVIRONMENT will now simply look like this: TESTS_ENVIRONMENT = $(top_builddir)/run --test
* tests: Add ./run --test option.Richard W.M. Jones2012-06-261-1/+1
| | | | | | | This option, when added via TESTS_ENVIRONMENT = [...] $(top_builddir)/run --test allows us to run the tests and only print the full output (including debugging etc) when the test fails.
* sysprep: Don't check for /dev/fuse before running the test.Richard W.M. Jones2012-06-251-5/+0
| | | | | The program doesn't actually require FUSE when used without any --script options.
* tests: Add SKIP_TEST_* variables to allow these tests to be skipped.Richard W.M. Jones2012-06-221-0/+5
| | | | | By setting these variables, we can skip tests that fail on RHEL 5.
* build: Define abs_builddir if not defined already.Richard W.M. Jones2012-06-181-0/+3
| | | | | | This is missing on RHEL 5. This updates commit 50aa9533e4a505e1c64dbedddb30491bfbb755d6.
* build: Define builddir and abs_srcdir when they are missing.Richard W.M. Jones2012-06-181-0/+6
| | | | | | | | | | | | | | | | | | | | | RHEL 5-era autoconf did not define these, so define them manually when they are missing. Define builddir as '.' The scripts require this. It won't work in the srcdir != builddir case, but we don't care about that for RHEL 5. This commit also moves the builddir / abs_srcdir variable setting above the include of subdir-rules.mk, in case that include uses these variables. Useful script: for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do if ! grep -q '^abs_srcdir' $f; then echo missing in $f fi done
* ocaml: Use OCAMLOPTFLAGS when compiling .cmx (ie. native code) files.Richard W.M. Jones2012-06-181-1/+1
|
* sysprep: remove the data and log files of puppetWanlong Gao2012-05-252-0/+54
| | | | | | Remove the data(keys) and log files of puppet. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: Credit Wanlong Gao, Fujitsu under 'AUTHORS' section.Richard W.M. Jones2012-05-181-1/+5
|
* sysprep: remove kerberos data in the guestWanlong Gao2012-05-182-0/+54
| | | | | | Remove the generated kerberos data in the guest. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: remove ca certificates in the guestWanlong Gao2012-05-182-0/+61
| | | | | | Remove the ca certificates. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: Add missing 'utils.mli' to SOURCES.Richard W.M. Jones2012-05-141-1/+2
| | | | Consequently this file was also missing from the tarball.
* sysprep: remove blkid tab in the guestWanlong Gao2012-05-102-0/+57
| | | | | | Remove blkid tab cache in the guest. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* sysprep: remove pam dataWanlong Gao2012-05-082-0/+54
| | | | | | Remove the generated pam data in the guest. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>