Implement the GUESTFS_ADD_DRIVE_OPTS_SECRET argument of
guestfs_add_drive_opts. For libvirt we have to save the secret in
libvirtd first, get a UUID, and then pass the UUID back through the
domain XML.
On filesystems whose dirent.d_type is DT_UNKNOWN or some unknown value,
manually check whether an entry is a directory, thus completing in the
proper way.
Instead of passing the (uri, key, proxy) tuple around, pass the whole
Sources.source record; this requires creating proper Sources.source also
for uri+fingerprint passed via command line.
No functional changes.
Instead of making up an ordinary curl command line, write a temporary
config file and use 'curl --config tmpfile' to pass the arguments.
The advantage is that it's more secure if we want to supply passwords
to curl, since a '--user username:password' parameter on the command
line could be read (eg. by 'ps ax'), but the temporary file has mode
0600 and cannot be read by other users.
This is mostly code motion, but it also passes the '-q' option to curl
to stop it from reading default configuration files.
Must NOT use:
- One of the interim versions of virt-v2v (1.27.x) that we published
during development.
- Old virt-v2v (0.9.x).
Also use the --version option (instead of -V) since old virt-v2v
required it:
$ virt-v2v -V
Option v is ambiguous (version, vmtype)
Usage:
[...]
$ virt-v2v --version
0.9.1
Include the usb-storage kernel module, to permit booting from USB
keys.
Rerun dracut to rebuild the initramfs. This is complicated because by
default dracut will try to build an initramfs for the running
(ie. appliance) kernel, which is completely useless. We need to find
the latest installed kernel and rebuild the initramfs for that
instead, which is hairy.
This also does a small refactoring of the distro-specific code,
removing the $selinux_relabel variable and replacing it with a generic
$extra_args variable.
I only added this to the virt-builder script, since one assumes that
livecd-creator/whatever should make the kickstart ISO bootable by
installing whatever drivers and modules are necessary.
Running 'dracut -f' installs a dracut for the running kernel (of the
appliance) not the installed kernel. Stupid stupid stupid.
This reverts commit 7a6d44ebfe.
I only added this to the virt-builder script, since one assumes that
livecd-creator/whatever should make the kickstart ISO bootable by
installing whatever drivers and modules are necessary.
Add common error/warning/info functions.
Examine every existing call to printf/eprintf and change where
necessary so that:
- error is used instead of eprintf + exit 1
- warning no longer needs ~prog argument (it is added by Utils module)
- any verbose output should go to stdout, not stderr
- info is used to print general informational messages
Also, don't indent summary of changes.
Add a Customize_utils module. This contains common error/warning/info
functions, and also quote = Filename.quote.
Examine every existing call to printf/eprintf and change where
necessary so that:
- error is used instead of eprintf + exit 1
- warning no longer needs ~prog argument (it is added by Utils module)
- any verbose output should go to stdout, not stderr
- info is used to print general informational messages
Also, don't pass ~prog parameter around. Instead we just get it from
the executable name.
Add a Utils module. This contains common error/warning/info functions,
and also quote = Filename.quote.
Examine every existing call to printf/eprintf and change where
necessary so that:
- error is used instead of eprintf + exit 1
- warning no longer needs ~prog argument (it is added by Utils module)
- any verbose output should go to stdout, not stderr
- info is used to print general informational messages
get_current_dir_name exists on GNU libc only, so not portable.
On the other hand, while POSIX leaves a null buffer argument for getcwd
as unspecified behaviour, basically the most used/important Unix
implementations (GNU libc, FreeBSD's libc, etc) allow such value,
returning a new allocated buffer with the current directory.
In any case, the change just affects two tests, so even if it hits a
libc not implementing this behaviour for getcwd, only tests are
affected.
uri-c.c and perl_edit-c.c end up (directly or indirectly) including
guestfs-internal-frontend.h, which in turns includes libvirt/libvirt.h;
hence, make sure to use the libvirt CFLAGS.
Add a IfNotCrossAppliance prereq for tests, so a test using it can only
be run when the appliance is a copy of the running host system; this can
help marking tests which run stuff (usually built in the host) inside
the appliance.