[PATCH] daemon: umount-all: Give a "second chance" for temporary umount failures (RHBZ#1246032).
by Richard W.M. Jones
When unmounting all filesystems, it appears that large amounts of
writes in flight + very slow storage may cause the umount command to
fail temporarily. Even the briefest of pauses appears to let the
umount succeed.
In this patch, call umount as normal, but if it fails, wait a few
seconds then call it again (if it fails a second time, we report the
error and fail the operation).
I considered using 'umount -l' instead, but that is unsafe since when
using umount-all we usually want the filesystem to be unmounted and
synchronized properly by the time umount-all returns.
---
daemon/mount.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/daemon/mount.c b/daemon/mount.c
index c5b7d89..a076305 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -419,13 +419,20 @@ do_umount_all (void)
/* Unmount them. */
for (i = 0; i < mounts.size; ++i) {
- CLEANUP_FREE char *err = NULL;
-
- r = command (NULL, &err, str_umount, mounts.argv[i], NULL);
+ /* To avoid problems caused by temporary failures, such as a udev
+ * operation still completing, allow a second chance for each umount.
+ */
+ r = command (NULL, NULL, str_umount, mounts.argv[i], NULL);
if (r == -1) {
- reply_with_error ("umount: %s: %s", mounts.argv[i], err);
- free_stringslen (mounts.argv, mounts.size);
- return -1;
+ CLEANUP_FREE char *err = NULL;
+
+ sleep (5);
+ r = command (NULL, &err, str_umount, mounts.argv[i], NULL);
+ if (r == -1) {
+ reply_with_error ("umount: %s: %s", mounts.argv[i], err);
+ free_stringslen (mounts.argv, mounts.size);
+ return -1;
+ }
}
}
--
2.4.3
9 years, 5 months
[PATCH] appliance: exclude /usr/lib/firmware
by Richard W.M. Jones
Brings the size of the appliance down to 95 MB [xz-compressed], which
is the same as for libguestfs 1.28.
---
appliance/excludefiles.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/appliance/excludefiles.in b/appliance/excludefiles.in
index d3c66cc..a63eca9 100644
--- a/appliance/excludefiles.in
+++ b/appliance/excludefiles.in
@@ -22,6 +22,9 @@ dnl The right kernel modules are added back by supermin.
-/boot/*
-/lib/modules/*
+dnl Firmware blobs should not be required by a virtual machine.
+-/usr/lib/firmware/*
+
-/usr/lib/locale/*
-/usr/share/cracklib/*
-/usr/share/doc/*
--
2.4.3
9 years, 5 months
[PATCH] appliance: exclude /usr/share/fonts and /usr/share/icons.
by Richard W.M. Jones
I also sorted the list.
Between libguestfs 1.28 and 1.30, the appliance grew from 95MB to 213MB.
Using guestmount and filelight (see link below) I could see that the
main contributor was these two directories, which should not be
necessary.
With this change, the size goes down to 119MB.
See also:
https://rwmj.wordpress.com/2015/07/23/why-has-the-libguestfs-appliance-gr...
---
appliance/excludefiles.in | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/appliance/excludefiles.in b/appliance/excludefiles.in
index 1564386..d3c66cc 100644
--- a/appliance/excludefiles.in
+++ b/appliance/excludefiles.in
@@ -23,13 +23,15 @@ dnl The right kernel modules are added back by supermin.
-/lib/modules/*
-/usr/lib/locale/*
--/usr/share/locale/*
--/usr/share/man/*
+-/usr/share/cracklib/*
-/usr/share/doc/*
--/usr/share/info/*
+-/usr/share/fonts/*
-/usr/share/gnome/help/*
--/usr/share/cracklib/*
-/usr/share/i18n/*
+-/usr/share/icons/*
+-/usr/share/info/*
+-/usr/share/locale/*
+-/usr/share/man/*
-/usr/share/pkgconfig/*
-/var/log/?tmp
--
2.4.3
9 years, 5 months
ANNOUNCE: libguestfs 1.30 released
by Richard W.M. Jones
I'm pleased to announce libguestfs 1.30, a library and set of tools
for accessing and modifying virtual machine disk images.
This release took 9 months of work by a considerable number of people,
and has many new features (see release notes below).
You can get libguestfs 1.30 here:
Main website: http://libguestfs.org/
Source: http://libguestfs.org/download/1.30-stable/
You will also need latest supermin from here:
http://libguestfs.org/download/supermin/
Fedora 22+: http://koji.fedoraproject.org/koji/packageinfo?packageID=8391
It will appear as an update for F22/F23 in about a week.
Debian/experimental coming soon, see:
https://packages.debian.org/experimental/libguestfs0
[ From http://libguestfs.org/guestfs-release-notes.1.html ]
NAME
guestfs-release-notes - libguestfs Release Notes
RELEASE NOTES FOR LIBGUESTFS 1.30
These release notes only cover the differences from the previous
stable/dev branch split (1.28.0). For detailed changelogs, please see
the git repository, or the ChangeLog file distributed in the tarball.
New features
New tools
virt-dib(1) is a secure and safe alternative to the OpenStack
"diskimage-builder" tool. It is compatible with diskimage-builder
elements. (Pino Toscano)
virt-get-kernel(1) extracts the kernel and ramdisk from a disk image.
Previously this functionality was part of virt-builder(1), but the new
tool is more featureful. (Pino Toscano)
New features in existing tools
virt-v2v(1) -i ova mode can now read a wider range of OVA files, and
also unpacked files (directories).
virt-v2v now securely passes options to curl, so passwords, cookies and
so on cannot be seen by users with shell access on the same machine.
virt-v2v has a new --password-file option to allow you to securely pass
in a password, and to avoid an interactive prompt.
virt-v2v disables Windows autoreboot, making debugging conversion
failures on Windows easier.
virt-v2v now comes with an extensive external test suite. See
virt-v2v-test-harness(1).
virt-v2v allows virtio drivers to come from any location (Roman Kagan),
and drivers can be read directly from the virtio ISO.
virt-v2v supports conversion of Windows ≥ 8. Note this is experimental,
and possibly broken. Use with caution.
virt-v2v can now convert UEFI guests.
virt-p2v(1) adds a network configuration dialog.
virt-p2v now has p2v.pre, p2v.post and p2v.fail triggers, allowing
arbitrary scripts for preparing the host for conversion and tidying up
post-conversion.
virt-p2v now uses the more advanced metacity window manager (instead of
matchbox).
virt-sysprep(1) will remove /var/spool/mail/username for non-root
accounts (Hu Tao).
virt-customize(1), virt-builder(1) and virt-sysprep have the following
new options:
--commands-from-file
allow long lists of commands to be read from a file instead of from
the command line (Pino Toscano)
--copy
copy files inside the guest (Maros Zatko)
--copy-in
copy host files recursively into the guest (Pino Toscano)
--move
move files inside the guest (Maros Zatko)
--ssh-inject
inject SSH keys into a guest (Pino Toscano)
--sm-attach
--sm-credentials
--sm-register
--sm-remove
--sm-unregister
register and unregister a guest from subscription-manager (Pino
Toscano)
--touch
touch a file in the guest (Pino Toscano)
--truncate
--truncate-recursive
truncate files (Maros Zatko)
Improvements to virt-customize firstboot support. In particular,
Windows firstboot should work as well as Linux (Roman Kagan).
virt-df(1) can now use PolicyKit, SASL and other authentication methods
when getting the list of domains from libvirt.
Improvements to guestfish bash completion (Pino Toscano).
Bash completion now completes short options as well as long options
(Pino Toscano).
guestfish(1) now displays a command synopsis if the number of
parameters given to a command is wrong (Hu Tao).
virt-builder now supports Red Hat Enterprise Linux versions back to
RHEL 3.
virt-builder supports SUSE guests using zypper (Cédric Bosdonnat).
Language bindings
The Java bindings now include validated Javadoc, and other improvements
(Pino Toscano).
Multiple fixes and improvements to the PHP bindings (Pino Toscano).
Inspection
Inspection can now get icons from RHEL 7 and CentOS 7.
/etc/favicon.png is now allowed to be a symbolic link.
For RPM-based guests, inspection now returns RPM Epoch fields.
Debian packages now have separate Epoch and Version fields (Nikos
Skalkotos).
OpenBSD detection added, FreeBSD and NetBSD added as separate
"distros", and other BSD inspection improvements and bug fixes (Nikos
Skalkotos).
CoreOS detection added (Nikos Skalkotos).
The package manager in Fedora ≥ 22 is dnf.
ReactOS guests can be inspected (Maros Zatko).
Add support for UEFI guests.
Inspection now works when kernel modules are gzip or xz compressed
(Pino Toscano).
Inspection now recognizes ppc64 and ppc64le guests (Maros Zatko).
Inspection lists the installed applications on Archlinux guests (Nikos
Skalkotos).
Architectures and platforms
PPC64 (POWER7) and PPC64LE (POWER8) architectures are now much better
supported, and should work out of the box.
For aarch64, we use AAVMF (an open source UEFI implementation based on
OVMF) if available to run the appliance.
For armv7, we now use the -M virt machine type by default.
There is better support for compiling on non-Linux platforms (Pino
Toscano, Margaret Lewicka).
Libguestfs should now work on MIPS 32 bit little endian ("mipsel"). I
have not been able to try 64 bit or big endian.
Security
CVE-2014-8484
CVE-2014-8485
Libguestfs previously ran the strings(1) utility on untrusted files.
Strings could parse BFD headers in an unsafe way, leading to possible
arbitrary code execution. Libguestfs now runs strings with a flag to
ensure it does not try to parse BFD headers. This could have led to
exploitation of the libguestfs appliance, but since libguestfs
further constrains the appliance through virtualization, SELinux and
other techniques, it was unlikely to have caused any privilege
escalation on the host.
XPath injection in virt-v2v
One possible XPath injection vulnerability was fixed in virt-v2v.
This might have allowed a malicious guest which was being converted
by virt-v2v to construct an arbitrary XPath expression which would
have been evaluated on the host (by the libxml2 library linked to the
virt-v2v binary). It is not clear what the effects of this might be.
For further information, see upstream commit
https://github.com/libguestfs/libguestfs/commit/6c6ce85f94c36803fe2db35a9...
Denial of service problems when using qemu-img info
When using the American Fuzzy Lop fuzzer (afl-fuzz) on the qemu-img
info command, Richard W.M. Jones found that certain files can cause
the qemu-img program to use lots of memory and time (for example 6GB
of heap and 14 seconds of CPU time on a fast Intel processor), and in
some cases to crash. Since libguestfs may run qemu-img info on disk
images to find out what they contain, this transitively could cause
libguestfs to hang or consume lots of memory.
Libguestfs was modified so that it uses resource limits to limit the
space and time used by qemu-img info, to avoid this problem. If a
malicious user tries to pass one of these disk images to libguestfs,
qemu-img will crash and the crash is reported back to libguestfs
callers as an error message.
API
New APIs
guestfs_add_libvirt_dom
This exposes a previously private API that allows you to pass a
virDomainPtr object directly from libvirt to libguestfs.
guestfs_blockdev_setra
Adjust readahead parameter for devices. See blockdev --setra command.
guestfs_btrfs_balance
guestfs_btrfs_balance_cancel
guestfs_btrfs_balance_pause
guestfs_btrfs_balance_resume
guestfs_btrfs_balance_status
Balance support for Btrfs filesystems (Hu Tao).
guestfs_btrfs_filesystem_defragment
Filesystem defragmentation support for Btrfs filesystems (Hu Tao).
guestfs_btrfs_image
Create an image of a Btrfs filesystem (Chen Hanxiao)
guestfs_btrfs_qgroup_assign
guestfs_btrfs_qgroup_create
guestfs_btrfs_qgroup_destroy
guestfs_btrfs_qgroup_limit
guestfs_btrfs_qgroup_remove
guestfs_btrfs_qgroup_show
guestfs_btrfs_quota_enable
guestfs_btrfs_quota_rescan
Quote support for Btrfs filesystems (Hu Tao).
guestfs_btrfs_rescue_chunk_recover
Scan and recover the chunk tree in Btrfs filesystems (Hu Tao).
guestfs_btrfs_rescue_super_recover
Restore superblocks in Btrfs filesystems (Hu Tao).
guestfs_btrfs_replace
Replace a device in a Btrfs filesystem (Cao Jin).
guestfs_btrfs_scrub
guestfs_btrfs_scrub_cancel
guestfs_btrfs_scrub_resume
guestfs_btrfs_scrub_status
Scrub a Btrfs filesystem (Hu Tao).
guestfs_btrfs_subvolume_get_default
Get the default subvolume of a Btrfs filesystem (Hu Tao).
guestfs_btrfs_subvolume_show
List detailed information about the subvolume of a Btrfs filesystem
(Hu Tao).
guestfs_btrfstune_enable_extended_inode_refs
guestfs_btrfstune_enable_skinny_metadata_extent_refs
guestfs_btrfstune_seeding
Various tuning parameters for Btrfs filesystems (Chen Hanxiao).
guestfs_c_pointer
Return the C pointer to the underlying guestfs_h *. This allows
interworking of libguestfs bindings with bindings from other
libraries. For further information see
https://bugzilla.redhat.com/1075164
guestfs_copy_in
guestfs_copy_out
Flexible APIs for recursively copying directories of files between
the host and guest filesystem. Previously these were available only
as guestfish commands, but now any API users can call them (Pino
Toscano).
guestfs_part_get_gpt_guid
guestfs_part_set_gpt_guid
Get and set the GPT per-partition GUID.
guestfs_part_get_mbr_part_type
Get MBR partition type (Chen Hanxiao).
guestfs_set_uuid_random
Set the UUID of a filesystem to a randomly generated value; supported
filesystems currently are ext2/3/4, XFS, Btrfs, and swap partitions.
(Chen Hanxiao).
Other API changes
guestfs_disk_create can now use VMDK files as backing files.
guestfs_btrfs_subvolume_snapshot takes extra optional parameters (all
added by Hu Tao):
ro
for creating a read-only Btrfs snapshot
qgroupid
for adding the snapshot to a qgroup
guestfs_btrfs_subvolume_create can also take the optional qgroupid
parameter (Hu Tao).
guestfs_set_uuid can set UUID of swap partitions, Btrfs (Hu Tao, Chen
Hanxiao).
guestfs_copy_device_to_file and guestfs_copy_file_to_file have a new
optional append parameter, allowing you to append to the output file
instead of truncating it.
guestfs_mkfs has a new optional label parameter to set the initial
label of the new filesystem (Pino Toscano).
guestfs_set_label and guestfs_set_uuid now set ENOTSUP as errno when
there is no implemented support for the filesystem of the specified
mountable (Chen Hanxiao).
Environment variables now let you write LIBGUESTFS_DEBUG=true,
LIBGUESTFS_DEBUG=0 and so on.
All guestfs_sfdisk* APIs have been deprecated. Because sfdisk(8) was
rewritten, incompatibly, upstream, we don't recommend using these APIs
in future code. Use the guestfs_part* APIs as replacements.
APIs such as guestfs_download do not truncate /dev/stdout or
/dev/stderr when writing to them, meaning that if you redirect stdout
or stderr to a file, the file is no longer truncated.
Build changes
The daemon no longer uses its own separate copy of gnulib. Instead it
shares a single copy with the library.
OCaml .annot files are now created, so IDEs and editors like emacs and
vi can browse OCaml types in the source code.
Various fixes to allow different host/appliance architecture builds
(Pino Toscano).
Automake is now used directly to build all the OCaml programs, instead
of ad hoc Makefile rules. One side effect of this is to enable warnings
in all the C code used by OCaml programs.
-fno-strict-overflow is used throughout the build to avoid dubious GCC
optimizations.
Multiple cleanups to support GCC 5.
OCaml OUnit2 is needed to run some OCaml tests.
Creating a statically linked libguestfs.a should work again.
The src/api-support subdirectory and its scripts are no longer used.
Instead we store in the generator/actions.ml when the API was added to
libguestfs.
Internationalization
The translation service has changed from Transifex to Zanata.
Many more translations are available now, for both library and tools
messages and documentation.
Internals
In all OCaml tools, there are now common error, warning, info
functions, and common way to set and get the --quiet, -x (trace) and -v
(verbose) flags, and colour highlighting used consistently.
COMPILE_REGEXP macros are used to simplify PCRE constructors and
destructors.
In the generator, Pointer arguments have finally been implemented.
Internal identifiers no longer use double and triple underscores (eg.
guestfs___program_name). These identifiers are invalid for C99 and C++
programs, although compilers would accept them.
The daemon no longer parses guestfs_* options from /proc/cmdline.
Instead it only takes ordinary command line options. The appliance init
script turns /proc/cmdline into daemon command line options.
The tests can now run the daemon as a "captive process", allowing it to
be run directly on the host. The main advantage of this is we can run
valgrind directly on the daemon during testing.
Bugs fixed
https://bugzilla.redhat.com/1239053
virt-v2v error reporting when grub.conf cannot be parsed by Augeas
https://bugzilla.redhat.com/1238053
v2v:Duplicate disk target set when convert guest with cdrom attached
https://bugzilla.redhat.com/1237869
Virtio drivers are not installed for windows 2008 guests by virt-v2v
https://bugzilla.redhat.com/1234351
virt-v2v Support for Fedora virtio-win drivers
https://bugzilla.redhat.com/1232192
Virt-v2v gives an error on a blank disk: part_get_parttype: unknown
signature, of the output: BYT;
https://bugzilla.redhat.com/1229385
virt-p2v in kernel command line mode should power off the machine
after conversion
https://bugzilla.redhat.com/1229340
virt-p2v no GUI mode appends \n to the final command line parameter
https://bugzilla.redhat.com/1229305
virt-sysprep at cleanup deletes /var/spool/at/.SEQ which results in
failing at
https://bugzilla.redhat.com/1226794
"Doing conversion……" still shows after cancel the conversion from
virt-p2v client
https://bugzilla.redhat.com/1215042
Memory leak in virNetSocketNewConnectUNIX
https://bugzilla.redhat.com/1213324
virt-v2v: warning: unknown guest operating system: windows windows
6.3 when converting win8,win8.1,win2012,win2012R2 to rhev
https://bugzilla.redhat.com/1213247
virt tools should print the same format of version string
https://bugzilla.redhat.com/1212808
RFE: virt-builder --touch
https://bugzilla.redhat.com/1212807
virt-builder --selinux-relabel flag fails on cross-architecture
builds
https://bugzilla.redhat.com/1212680
RFE: virt-inspector xpath query should output a neat format of the
query element
https://bugzilla.redhat.com/1212152
virt-builder firstboot-command fails: File name too long
https://bugzilla.redhat.com/1211996
virt-inspector gives incorrect arch (ppc64) for ppc64le guest
https://bugzilla.redhat.com/1203817
RFE: virt-customize --move and --copy
https://bugzilla.redhat.com/1201526
index-parser can't parse systemd mount files properly
https://bugzilla.redhat.com/1196101
virt-builder --upload option doesn't work to a FAT partition
https://bugzilla.redhat.com/1196100
virt-builder -x option on its own does not enable tracing
https://bugzilla.redhat.com/1195204
`virt-builder` should create $HOME/.cache directory if it already
doesn't exist
https://bugzilla.redhat.com/1193237
Virt-builder fingerprint is required even when no check desired
https://bugzilla.redhat.com/1189284
virt-resize should preserve GPT partition UUIDs, else EFI guests
become unbootable
https://bugzilla.redhat.com/1188866
Performance regression in virt-builder when uncompressing image
https://bugzilla.redhat.com/1186800
virt-v2v should support gzip format ova as input
https://bugzilla.redhat.com/1185561
virt-sparsify should ignore read-only LVs
https://bugzilla.redhat.com/1182463
"mknod-b", "mknod-c", and "mkfifo" do not strip non-permissions bits
from "mode"
https://bugzilla.redhat.com/1176493
virt-v2v ignores sound device when convert xen guest to local kvm
https://bugzilla.redhat.com/1175676
Typo error in 'help ping-daemon'
https://bugzilla.redhat.com/1175196
"parse-environment" and "parse-environment-list" fail to parse
"LIBGUESTFS_TRACE = 0"
https://bugzilla.redhat.com/1175035
"is-blockdev"/"is-blockdev-opts" fail to detect "/dev/sda"
https://bugzilla.redhat.com/1174280
RFE: Allow v2v conversion of Oracle Linux 5.8 VMware VM
https://bugzilla.redhat.com/1174200
New virt-v2v failure: CURL: Error opening file: NSS: client
certificate not found (nickname not specified): Invalid argument
https://bugzilla.redhat.com/1174123
Graphics password disappear after conversion of virt-v2v
https://bugzilla.redhat.com/1174073
The listen address for vnc is changed after conversion by virt-v2v
https://bugzilla.redhat.com/1171666
inspection thinks EFI partition is a separate operating system
https://bugzilla.redhat.com/1171130
virt-v2v conversion of RHEL 3 guest fails with: All of your loopback
devices are in use
https://bugzilla.redhat.com/1170685
Conversion of RHEL 4 guest fails: rpm -ql 1:kernel-utils-2.4-23.el4:
virt-v2v: error: libguestfs error: command_lines:
https://bugzilla.redhat.com/1170073
virt-v2v picks debug kernels over non-debug kernels when versions are
equal
https://bugzilla.redhat.com/1169045
virt-sparsify: libguestfs error: qemu-img info: 'virtual-size' is not
representable as a 64 bit integer
https://bugzilla.redhat.com/1169015
virt-resize --expand fails on ubuntu-14.04.img image (regression)
https://bugzilla.redhat.com/1168144
warning: fstrim: fstrim: /sysroot/: FITRIM ioctl failed: Operation
not supported (ignored) when convert win2003 guest from xen server
https://bugzilla.redhat.com/1167921
p2v: No Network Connection dialog
https://bugzilla.redhat.com/1167774
virt-p2v fails with error:"nbd.c:nbd_receive_negotiate():L501: read
failed"
https://bugzilla.redhat.com/1167623
Remove "If reporting bugs, run virt-v2v with debugging enabled .."
message when running virt-p2v
https://bugzilla.redhat.com/1167601
"Conversion was successful" pop out even virt-p2v fails
https://bugzilla.redhat.com/1167302
virt-v2v: warning: ova hard disk has no parent controller when
convert from a ova file
https://bugzilla.redhat.com/1166618
virt-resize should give out the detail warning info to let customers
know what's going wrong
https://bugzilla.redhat.com/1165975
File "/boot/grub2/device.map" showing is not right after converting a
rhel7 guest from esx server
https://bugzilla.redhat.com/1165785
mount-loop command fails: mount failed: Unknown error -1
https://bugzilla.redhat.com/1165569
Disable "cancel conversion" button after virt-p2v conversion finished
https://bugzilla.redhat.com/1165564
Provide Reboot/Shutdown button after virt-p2v
https://bugzilla.redhat.com/1164853
Booting in qemu found no volume groups and failed checking the
filesystems
https://bugzilla.redhat.com/1164732
The description of 'help append' is not accurately, it add the kernel
options to libguestfs appliance not the guest kernel
https://bugzilla.redhat.com/1164697
typo errors in man pages
https://bugzilla.redhat.com/1164619
Inspect-get-icon failed on RHEL7 guest
https://bugzilla.redhat.com/1162966
xfs should also give a warning out to let customer know the
limitation
https://bugzilla.redhat.com/1161575
Failed to import guest with "rtl8139" nic to openstack server after
converted by v2v
https://bugzilla.redhat.com/1159651
virt-sysprep firstboot script is not deleted if it reboot a RHEL 7
guest
https://bugzilla.redhat.com/1159258
esx win2008 32 bit guest fail to load after conversion because the
firmware isn't ACPI compatible
https://bugzilla.redhat.com/1159016
libvirt backend does not set RBD password
https://bugzilla.redhat.com/1158526
Use password file instead of process interaction
https://bugzilla.redhat.com/1157679
virt-p2v-make-disk should add firmwares
https://bugzilla.redhat.com/1156449
libguestfs FTBFS on f21 ppc64le
https://bugzilla.redhat.com/1156301
virt-inspector support adding a remote disk, but in its man page -a
URI / --add URI is missing
https://bugzilla.redhat.com/1155121
Virt-v2v will fail when using relative path for -i ova
https://bugzilla.redhat.com/1153844
Redundancy whitespace at the end of directory name when use <TAB> to
complete the directory name in guestfish with a xfs filesystem in
guest
https://bugzilla.redhat.com/1153589
virt-v2v will hang when converting esx guest before disk copy phase
https://bugzilla.redhat.com/1152998
virt-v2v / qemu-img fails on ova image
https://bugzilla.redhat.com/1151910
virt-ls should remove '/' in the output when specify the directory
name as /etc/
https://bugzilla.redhat.com/1151900
Should also add a field for directory files when run virt-ls with
--csv option
https://bugzilla.redhat.com/1151033
virt-v2v conversions from VMware vCenter server run slowly
https://bugzilla.redhat.com/1146832
virt-v2v fail to convert guest with disk type volume
https://bugzilla.redhat.com/1146007
Input/output error during conversion of esx guest.
https://bugzilla.redhat.com/1135585
[RFE] virt-builder should support copying in a directory/list of
files
https://bugzilla.redhat.com/1089566
[abrt] livecd-tools: kickstart.py:276:apply:IOError: [Errno 2] No
such file or directory:
'/run/media/jones/2tp001data/createlive/temp/imgcreate-_dX8Us/install_root/etc/rpm/macros.imgcreate'
https://bugzilla.redhat.com/1079625
virt-sparsify fails if a btrfs filesystem contains readonly snapshots
https://bugzilla.redhat.com/1075164
RFE: allow passing in a pre-opened libvirt connection from python
https://bugzilla.redhat.com/912499
Security context on image file gets reset
https://bugzilla.redhat.com/889082
[RFE] virt-v2v should check whether guest with same name exist on
target first then transfer the disk
https://bugzilla.redhat.com/855059
RFE: virt-p2v: display more information about network devices such as
topology, bonding, etc.
https://bugzilla.redhat.com/823758
p2v client should have largest number restrictions for CPU and Memory
settings
https://bugzilla.redhat.com/709327
hivex cannot read registry hives from ReactOS
https://bugzilla.redhat.com/709326
virt-inspector cannot detect ReactOS
https://bugzilla.redhat.com/119673
installation via NFS doesn't seem to work
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
9 years, 5 months
[PATCH] p2v: tests: Don't fail when test machine has only a single hard disk.
by Richard W.M. Jones
virt-p2v looks in /sys/block to find disks, and ignores the hard disk
containing the root device. This is correct when virt-p2v runs off
the ISO, but when running the tests on a machine that has a single
hard disk, all_disks would be NULL, resulting in a test failure.
Fix this by allowing all_disks to be NULL, but adding an extra check
later so that we don't perform the conversion with no hard disks (the
gui.c path already has this check, so it is only needed in the
kernel.c path).
---
p2v/kernel.c | 9 +++++++++
p2v/main.c | 14 ++++----------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/p2v/kernel.c b/p2v/kernel.c
index dce6fbb..b283417 100644
--- a/p2v/kernel.c
+++ b/p2v/kernel.c
@@ -206,6 +206,15 @@ kernel_configuration (struct config *config, char **cmdline, int cmdline_source)
exit (EXIT_SUCCESS);
}
+ /* Some disks must have been specified for conversion. */
+ if (config->disks == NULL || guestfs_int_count_strings (config->disks) == 0) {
+ fprintf (stderr, "%s: error: no non-removable disks were discovered on this machine.\n",
+ guestfs_int_program_name);
+ fprintf (stderr, "virt-p2v looked in /sys/block and in p2v.disks on the kernel command line.\n");
+ fprintf (stderr, "This is a fatal error and virt-p2v cannot continue.\n");
+ exit (EXIT_FAILURE);
+ }
+
/* Perform the conversion in text mode. */
if (start_conversion (config, notify_ui_callback) == -1) {
const char *err = get_conversion_error ();
diff --git a/p2v/main.c b/p2v/main.c
index be32e4b..12ffd01 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -279,7 +279,8 @@ set_config_defaults (struct config *config)
config->flags = 0;
find_all_disks ();
- config->disks = guestfs_int_copy_string_list (all_disks);
+ if (all_disks)
+ config->disks = guestfs_int_copy_string_list (all_disks);
if (all_removable)
config->removable = guestfs_int_copy_string_list (all_removable);
find_all_interfaces ();
@@ -448,15 +449,8 @@ find_all_disks (void)
exit (EXIT_FAILURE);
}
- if (all_disks == NULL) {
- fprintf (stderr, "%s: error: no non-removable disks were discovered on this machine.\n",
- guestfs_int_program_name);
- fprintf (stderr, "virt-p2v looked in /sys/block.\n");
- fprintf (stderr, "This is a fatal error and virt-p2v cannot continue.\n");
- exit (EXIT_FAILURE);
- }
-
- qsort (all_disks, nr_disks, sizeof (char *), compare);
+ if (all_disks)
+ qsort (all_disks, nr_disks, sizeof (char *), compare);
if (all_removable)
qsort (all_removable, nr_removable, sizeof (char *), compare);
}
--
2.4.3
9 years, 5 months
[PATCH v2 0/2] basic subscription-manager support in virt-customize
by Pino Toscano
Hi,
this is the v2 of a series introducing basic support for
registering/attaching/unregistering RHEL guests using
subscription-manager, so it is possible to do for example:
$ virt-customize -a rhel-guest.qcow2 \
--sm-credentials user:file:/path/to/password-file --sm-register \
--sm-attach file:/path/to/pool-file \
--install pkg1 --install pkg2 .. \
--sm-remove --sm-unregister
The same operations are doable also using --run-command, but this
allows to not put passwords/pools on command lines, and in general
encapsulate them for better control.
Pino Toscano (2):
mllib: add and use read_first_line_from_file
customize: add basic subscription-manager operations
builder/Makefile.am | 1 +
builder/virt-builder.pod | 47 ++++++++++++++++++
customize/Makefile.am | 2 +
customize/customize_run.ml | 34 +++++++++++++
customize/password.ml | 8 +--
customize/subscription_manager.ml | 53 ++++++++++++++++++++
customize/subscription_manager.mli | 34 +++++++++++++
generator/customize.ml | 99 ++++++++++++++++++++++++++++++++++++--
mllib/common_utils.ml | 6 +++
mllib/common_utils.mli | 4 ++
po/POTFILES-ml | 1 +
sysprep/Makefile.am | 1 +
v2v/cmdline.ml | 2 +-
13 files changed, 281 insertions(+), 11 deletions(-)
create mode 100644 customize/subscription_manager.ml
create mode 100644 customize/subscription_manager.mli
--
2.1.0
9 years, 5 months
[PATCH] daemon: add a space after func/macro to fit code-style
by Chen Hanxiao
more daemon codes covered
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
daemon/debug.c | 2 +-
daemon/devsparts.c | 2 +-
daemon/guestfsd.c | 6 +++---
daemon/labels.c | 4 ++--
daemon/ldm.c | 16 ++++++++--------
daemon/md.c | 10 +++++-----
daemon/mkfs.c | 2 +-
daemon/parted.c | 8 ++++----
daemon/statvfs.c | 8 ++++----
daemon/sync.c | 2 +-
daemon/uuids.c | 4 ++--
daemon/xfs.c | 16 ++++++++--------
12 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/daemon/debug.c b/daemon/debug.c
index 92f5aa6..a210db1 100644
--- a/daemon/debug.c
+++ b/daemon/debug.c
@@ -588,7 +588,7 @@ debug_core_pattern (const char *subcmd, size_t argc, char *const *const argv)
}
const char *pattern = argv[0];
- const size_t pattern_len = strlen(pattern);
+ const size_t pattern_len = strlen (pattern);
#define CORE_PATTERN "/proc/sys/kernel/core_pattern"
int fd = open (CORE_PATTERN, O_WRONLY|O_CLOEXEC);
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index 875238a..aebc213 100644
--- a/daemon/devsparts.c
+++ b/daemon/devsparts.c
@@ -53,7 +53,7 @@ foreach_block_device (block_dev_func_t func)
for (;;) {
errno = 0;
- d = readdir(dir);
+ d = readdir (dir);
if (!d) break;
if (STREQLEN (d->d_name, "sd", 2) ||
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index ee0aa43..5edfc69 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -1203,7 +1203,7 @@ print_shell_quote (FILE *stream,
const char *str = *((const char **) (args[0]));
for (i = len = 0; str[i]; ++i) {
- if (!SAFE(str[i])) {
+ if (!SAFE (str[i])) {
putc ('\\', stream);
len ++;
}
@@ -1399,8 +1399,8 @@ mountable_to_string (const mountable_t *mountable)
return strdup (mountable->device);
case MOUNTABLE_BTRFSVOL:
- if (asprintf(&desc, "btrfsvol:%s/%s",
- mountable->device, mountable->volume) == -1)
+ if (asprintf (&desc, "btrfsvol:%s/%s",
+ mountable->device, mountable->volume) == -1)
return NULL;
return desc;
diff --git a/daemon/labels.c b/daemon/labels.c
index 130f1db..20f27cb 100644
--- a/daemon/labels.c
+++ b/daemon/labels.c
@@ -86,8 +86,8 @@ do_set_label (const mountable_t *mountable, const char *label)
r = xfslabel (mountable->device, label);
else
- NOT_SUPPORTED(-1, "don't know how to set the label for '%s' filesystems",
- vfs_type);
+ NOT_SUPPORTED (-1, "don't know how to set the label for '%s' filesystems",
+ vfs_type);
return r;
}
diff --git a/daemon/ldm.c b/daemon/ldm.c
index 3563313..3705aa4 100644
--- a/daemon/ldm.c
+++ b/daemon/ldm.c
@@ -187,9 +187,9 @@ json_value_to_string_list (yajl_val node)
if (! YAJL_IS_ARRAY (node))
return TYPE_ERROR;
- len = YAJL_GET_ARRAY(node)->len;
+ len = YAJL_GET_ARRAY (node)->len;
for (i = 0; i < len; ++i) {
- n = YAJL_GET_ARRAY(node)->values[i];
+ n = YAJL_GET_ARRAY (node)->values[i];
if (! YAJL_IS_STRING (n))
return TYPE_ERROR;
if (add_string (&strs, YAJL_GET_STRING (n)) == -1)
@@ -238,10 +238,10 @@ parse_json_get_object_string (const char *json, const char *key, int flags,
if (! YAJL_IS_OBJECT (tree))
goto bad_type;
- len = YAJL_GET_OBJECT(tree)->len;
+ len = YAJL_GET_OBJECT (tree)->len;
for (i = 0; i < len; ++i) {
- if (STREQ (YAJL_GET_OBJECT(tree)->keys[i], key)) {
- node = YAJL_GET_OBJECT(tree)->values[i];
+ if (STREQ (YAJL_GET_OBJECT (tree)->keys[i], key)) {
+ node = YAJL_GET_OBJECT (tree)->values[i];
if ((flags & GET_STRING_NULL_TO_EMPTY) && YAJL_IS_NULL (node))
ret = strdup ("");
@@ -282,10 +282,10 @@ parse_json_get_object_string_list (const char *json, const char *key,
if (! YAJL_IS_OBJECT (tree))
goto bad_type;
- len = YAJL_GET_OBJECT(tree)->len;
+ len = YAJL_GET_OBJECT (tree)->len;
for (i = 0; i < len; ++i) {
- if (STREQ (YAJL_GET_OBJECT(tree)->keys[i], key)) {
- node = YAJL_GET_OBJECT(tree)->values[i];
+ if (STREQ (YAJL_GET_OBJECT (tree)->keys[i], key)) {
+ node = YAJL_GET_OBJECT (tree)->values[i];
ret = json_value_to_string_list (node);
if (ret == TYPE_ERROR)
goto bad_type;
diff --git a/daemon/md.c b/daemon/md.c
index 08a17e3..06b5142 100644
--- a/daemon/md.c
+++ b/daemon/md.c
@@ -248,7 +248,7 @@ do_list_md_devices (void)
n = dev;
n = mempcpy (n, DEV, strlen (DEV));
- n = mempcpy (n, &mds.gl_pathv[i][strlen(PREFIX)], len);
+ n = mempcpy (n, &mds.gl_pathv[i][strlen (PREFIX)], len);
*n = '\0';
if (!is_raid_device (dev)) {
@@ -273,7 +273,7 @@ error:
}
char **
-do_md_detail(const char *md)
+do_md_detail (const char *md)
{
size_t i;
int r;
@@ -345,15 +345,15 @@ error:
}
int
-do_md_stop(const char *md)
+do_md_stop (const char *md)
{
int r;
CLEANUP_FREE char *err = NULL;
const char *mdadm[] = { str_mdadm, "--stop", md, NULL};
- r = commandv(NULL, &err, mdadm);
+ r = commandv (NULL, &err, mdadm);
if (r == -1) {
- reply_with_error("%s", err);
+ reply_with_error ("%s", err);
return -1;
}
return 0;
diff --git a/daemon/mkfs.c b/daemon/mkfs.c
index da28e86..ee9e46d 100644
--- a/daemon/mkfs.c
+++ b/daemon/mkfs.c
@@ -86,7 +86,7 @@ do_mkfs (const char *fstype, const char *device, int blocksize,
*/
if (STREQ (fstype, "reiserfs") || STREQ (fstype, "jfs") ||
STREQ (fstype, "xfs"))
- ADD_ARG(argv, i, "-f");
+ ADD_ARG (argv, i, "-f");
/* For GFS, GFS2, assume a single node. */
if (STREQ (fstype, "gfs") || STREQ (fstype, "gfs2")) {
diff --git a/daemon/parted.c b/daemon/parted.c
index cb6c486..b7f560c 100644
--- a/daemon/parted.c
+++ b/daemon/parted.c
@@ -1092,7 +1092,7 @@ do_part_get_mbr_part_type (const char *device, int partnum)
char temp_type[16] = {'\0'};
for (i = 0, row = start; row < end; ++i, ++row) {
if (STREQ (parttype, "gpt")) {
- memcpy (temp_type, "primary", strlen("primary"));
+ memcpy (temp_type, "primary", strlen ("primary"));
if (sscanf (lines[row], "%d%" SCNi64 "B%" SCNi64 "B%" SCNi64 "B",
&part_num,
&temp_int64,
@@ -1117,15 +1117,15 @@ do_part_get_mbr_part_type (const char *device, int partnum)
continue;
if (STRPREFIX (temp_type, "primary")) {
- part_type = strdup("primary");
+ part_type = strdup ("primary");
if (part_type == NULL)
goto error;
} else if (STRPREFIX (temp_type, "logical")) {
- part_type = strdup("logical");
+ part_type = strdup ("logical");
if (part_type == NULL)
goto error;
} else if (STRPREFIX (temp_type, "extended")) {
- part_type = strdup("extended");
+ part_type = strdup ("extended");
if (part_type == NULL)
goto error;
} else
diff --git a/daemon/statvfs.c b/daemon/statvfs.c
index a1f2f08..987537d 100644
--- a/daemon/statvfs.c
+++ b/daemon/statvfs.c
@@ -113,13 +113,13 @@ do_statvfs (const char *path)
* the version of Windows. So this code assumes the disk is NTFS
* and the version of Windows is >= Win2K.
*/
- if (total_number_of_bytes < UINT64_C(16) * 1024 * 1024 * 1024 * 1024)
+ if (total_number_of_bytes < UINT64_C (16) * 1024 * 1024 * 1024 * 1024)
ret->bsize = 4096;
- else if (total_number_of_bytes < UINT64_C(32) * 1024 * 1024 * 1024 * 1024)
+ else if (total_number_of_bytes < UINT64_C (32) * 1024 * 1024 * 1024 * 1024)
ret->bsize = 8192;
- else if (total_number_of_bytes < UINT64_C(64) * 1024 * 1024 * 1024 * 1024)
+ else if (total_number_of_bytes < UINT64_C (64) * 1024 * 1024 * 1024 * 1024)
ret->bsize = 16384;
- else if (total_number_of_bytes < UINT64_C(128) * 1024 * 1024 * 1024 * 1024)
+ else if (total_number_of_bytes < UINT64_C (128) * 1024 * 1024 * 1024 * 1024)
ret->bsize = 32768;
else
ret->bsize = 65536;
diff --git a/daemon/sync.c b/daemon/sync.c
index ebe9b47..18513ec 100644
--- a/daemon/sync.c
+++ b/daemon/sync.c
@@ -97,7 +97,7 @@ fsync_devices (void)
for (;;) {
errno = 0;
- d = readdir(dir);
+ d = readdir (dir);
if (!d) break;
if (STREQLEN (d->d_name, "sd", 2) ||
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 00c47d8..e6287c5 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -78,7 +78,7 @@ do_set_uuid (const char *device, const char *uuid)
r = btrfs_set_uuid (device, uuid);
else
- NOT_SUPPORTED(-1, "don't know how to set the UUID for '%s' filesystems",
+ NOT_SUPPORTED (-1, "don't know how to set the UUID for '%s' filesystems",
vfs_type);
return r;
@@ -111,7 +111,7 @@ do_set_uuid_random (const char *device)
r = btrfs_set_uuid_random (device);
else
- NOT_SUPPORTED(-1, "don't know how to set the random UUID for '%s' filesystems",
+ NOT_SUPPORTED (-1, "don't know how to set the random UUID for '%s' filesystems",
vfs_type);
return r;
}
diff --git a/daemon/xfs.c b/daemon/xfs.c
index e5e8b62..c1a1854 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -408,7 +408,7 @@ do_xfs_growfs (const char *path,
reply_with_error ("logsize must be >= 0");
return -1;
}
- snprintf(logsize_s, sizeof logsize_s, "%" PRIi64, logsize);
+ snprintf (logsize_s, sizeof logsize_s, "%" PRIi64, logsize);
ADD_ARG (argv, i, "-L");
ADD_ARG (argv, i, logsize_s);
}
@@ -418,7 +418,7 @@ do_xfs_growfs (const char *path,
reply_with_error ("rtsize must be >= 0");
return -1;
}
- snprintf(rtsize_s, sizeof rtsize_s, "%" PRIi64, rtsize);
+ snprintf (rtsize_s, sizeof rtsize_s, "%" PRIi64, rtsize);
ADD_ARG (argv, i, "-R");
ADD_ARG (argv, i, rtsize_s);
}
@@ -428,7 +428,7 @@ do_xfs_growfs (const char *path,
reply_with_error ("rtextsize must be >= 0");
return -1;
}
- snprintf(rtextsize_s, sizeof rtextsize_s, "%" PRIi64, rtextsize);
+ snprintf (rtextsize_s, sizeof rtextsize_s, "%" PRIi64, rtextsize);
ADD_ARG (argv, i, "-e");
ADD_ARG (argv, i, rtextsize_s);
}
@@ -438,7 +438,7 @@ do_xfs_growfs (const char *path,
reply_with_error ("maxpct must be >= 0");
return -1;
}
- snprintf(maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct);
+ snprintf (maxpct_s, sizeof maxpct_s, "%" PRIi32, maxpct);
ADD_ARG (argv, i, "-m");
ADD_ARG (argv, i, maxpct_s);
}
@@ -591,7 +591,7 @@ do_xfs_repair (const char *device,
reply_with_error ("maxmem must be >= 0");
return -1;
}
- snprintf(maxmem_s, sizeof maxmem_s, "%" PRIi64, maxmem);
+ snprintf (maxmem_s, sizeof maxmem_s, "%" PRIi64, maxmem);
ADD_ARG (argv, i, "-m");
ADD_ARG (argv, i, maxmem_s);
}
@@ -601,7 +601,7 @@ do_xfs_repair (const char *device,
reply_with_error ("ihashsize must be >= 0");
return -1;
}
- snprintf(ihashsize_s, sizeof ihashsize_s, "ihash=" "%" PRIi64, ihashsize);
+ snprintf (ihashsize_s, sizeof ihashsize_s, "ihash=" "%" PRIi64, ihashsize);
ADD_ARG (argv, i, "-o");
ADD_ARG (argv, i, ihashsize_s);
}
@@ -611,7 +611,7 @@ do_xfs_repair (const char *device,
reply_with_error ("bhashsize must be >= 0");
return -1;
}
- snprintf(bhashsize_s, sizeof bhashsize_s, "bhash=" "%" PRIi64, bhashsize);
+ snprintf (bhashsize_s, sizeof bhashsize_s, "bhash=" "%" PRIi64, bhashsize);
ADD_ARG (argv, i, "-o");
ADD_ARG (argv, i, bhashsize_s);
}
@@ -621,7 +621,7 @@ do_xfs_repair (const char *device,
reply_with_error ("agstride must be >= 0");
return -1;
}
- snprintf(agstride_s, sizeof agstride_s, "ag_stride=" "%" PRIi64, agstride);
+ snprintf (agstride_s, sizeof agstride_s, "ag_stride=" "%" PRIi64, agstride);
ADD_ARG (argv, i, "-o");
ADD_ARG (argv, i, agstride_s);
}
--
2.1.0
9 years, 5 months
[PATCH 1/2] actions: tar_out: add xattrs and selinux optargs
by Pino Toscano
Add additional arguments for tar, so extended attributes and/or SELinux
contexts can be saved in output tars.
---
daemon/tar.c | 18 +++++++++++++-----
generator/actions.ml | 10 +++++++++-
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/daemon/tar.c b/daemon/tar.c
index d6f8f2f..68af749 100644
--- a/daemon/tar.c
+++ b/daemon/tar.c
@@ -311,7 +311,7 @@ make_exclude_from_file (char *const *excludes)
/* Takes optional arguments, consult optargs_bitmask. */
int
do_tar_out (const char *dir, const char *compress, int numericowner,
- char *const *excludes)
+ char *const *excludes, int xattrs, int selinux)
{
CLEANUP_FREE char *buf = NULL;
struct stat statbuf;
@@ -349,6 +349,12 @@ do_tar_out (const char *dir, const char *compress, int numericowner,
return -1;
}
+ if (!(optargs_bitmask & GUESTFS_TAR_OUT_XATTRS_BITMASK))
+ xattrs = 0;
+
+ if (!(optargs_bitmask & GUESTFS_TAR_OUT_SELINUX_BITMASK))
+ selinux = 0;
+
/* Check the filename exists and is a directory (RHBZ#908322). */
buf = sysroot_path (dir);
if (buf == NULL) {
@@ -367,12 +373,14 @@ do_tar_out (const char *dir, const char *compress, int numericowner,
}
/* "tar -C /sysroot%s -cf - ." but we have to quote the dir. */
- if (asprintf_nowarn (&cmd, "%s -C %Q%s%s%s%s -cf - .",
+ if (asprintf_nowarn (&cmd, "%s -C %Q%s%s%s%s%s%s -cf - .",
str_tar,
buf, filter,
numericowner ? " --numeric-owner" : "",
exclude_from_file ? " -X " : "",
- exclude_from_file ? exclude_from_file : "") == -1) {
+ exclude_from_file ? exclude_from_file : "",
+ xattrs ? " --xattrs" : "",
+ selinux ? " --selinux" : "") == -1) {
reply_with_perror ("asprintf");
return -1;
}
@@ -423,7 +431,7 @@ int
do_tgz_out (const char *dir)
{
optargs_bitmask = GUESTFS_TAR_OUT_COMPRESS_BITMASK;
- return do_tar_out (dir, "gzip", 0, NULL);
+ return do_tar_out (dir, "gzip", 0, NULL, 0, 0);
}
/* Has one FileOut parameter. */
@@ -431,5 +439,5 @@ int
do_txz_out (const char *dir)
{
optargs_bitmask = GUESTFS_TAR_OUT_COMPRESS_BITMASK;
- return do_tar_out (dir, "xz", 0, NULL);
+ return do_tar_out (dir, "xz", 0, NULL, 0, 0);
}
diff --git a/generator/actions.ml b/generator/actions.ml
index 16aeb4b..b336f56 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -4824,7 +4824,7 @@ compression types)." };
{ defaults with
name = "tar_out"; added = (1, 0, 3);
- style = RErr, [String "directory"; FileOut "tarfile"], [OString "compress"; OBool "numericowner"; OStringList "excludes"];
+ style = RErr, [String "directory"; FileOut "tarfile"], [OString "compress"; OBool "numericowner"; OStringList "excludes"; OBool "xattrs"; OBool "selinux"];
proc_nr = Some 70;
once_had_no_optargs = true;
cancellable = true;
@@ -4854,6 +4854,14 @@ wildcards.
If set to true, the output tar file will contain UID/GID numbers
instead of user/group names.
+=item C<xattrs>
+
+If set to true, extended attributes are saved in the output tar.
+
+=item C<selinux>
+
+If set to true, SELinux contexts are saved in the output tar.
+
=back" };
{ defaults with
--
2.1.0
9 years, 5 months
[PATCH] docs: Use F<> for filenames instead of C<>
by Pino Toscano
---
src/supermin.pod | 60 ++++++++++++++++++++++++++++----------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/supermin.pod b/src/supermin.pod
index f9b7395..53d1b11 100644
--- a/src/supermin.pod
+++ b/src/supermin.pod
@@ -46,7 +46,7 @@ For example:
creates a supermin appliance containing the packages C<bash> and
C<coreutils>. Specifically, it creates some files in directory
-C<supermin.d>. This directory I<is> the supermin appliance. (See
+F<supermin.d>. This directory I<is> the supermin appliance. (See
L</SUPERMIN APPLIANCES> below).
It is intended that the I<--prepare> step is done on a central build
@@ -60,8 +60,8 @@ builds the full appliance from the supermin appliance:
supermin --build --format ext2 supermin.d -o appliance.d
-This will create files called C<appliance.d/kernel>,
-C<appliance.d/root> etc, which is the full sized bootable appliance.
+This will create files called F<appliance.d/kernel>,
+F<appliance.d/root> etc, which is the full sized bootable appliance.
It is intended that the I<--build> step is done on the end user's
machine at the last second before the appliance is needed. The
@@ -112,7 +112,7 @@ a separate program called C<supermin-helper>.
(I<--build> mode only)
Copy the kernel (and device tree, if created) instead of symlinking to
-the kernel in C</boot>.
+the kernel in F</boot>.
This is fractionally slower, but is necessary if you want to change
the permissions or SELinux label on the kernel or device tree.
@@ -124,7 +124,7 @@ the permissions or SELinux label on the kernel or device tree.
If specified, search for a device tree which is compatible with the
selected kernel and the name of which matches the given wildcard. You
can use a wildcard such as C<vexpress-*a9*.dtb> which would match
-C<vexpress-v2p-ca9.dtb>.
+F<vexpress-v2p-ca9.dtb>.
Notes:
@@ -170,7 +170,7 @@ Possible formats are:
A directory tree in the host filesystem.
-The filesystem tree is written to C<OUTPUTDIR> (ie. the I<-o> option).
+The filesystem tree is written to F<OUTPUTDIR> (ie. the I<-o> option).
This is called a C<chroot> because you could literally L<chroot(1)>
into this directory afterwards, although it's a better idea to use a
@@ -183,13 +183,13 @@ assumed that you will be running the appliance using the host kernel.
An ext2 filesystem disk image.
-The output kernel is written to C<OUTPUTDIR/kernel>, the device tree
-(if using) to C<OUTPUTDIR/dtb>, a small initramfs which can mount the
-appliance to C<OUTPUTDIR/initrd>, and the ext2 filesystem image to
-C<OUTPUTDIR/root>. (Where C<OUTPUTDIR> is specified by the I<-o>
+The output kernel is written to F<OUTPUTDIR/kernel>, the device tree
+(if using) to F<OUTPUTDIR/dtb>, a small initramfs which can mount the
+appliance to F<OUTPUTDIR/initrd>, and the ext2 filesystem image to
+F<OUTPUTDIR/root>. (Where F<OUTPUTDIR> is specified by the I<-o>
option).
-The filesystem (C<OUTPUTDIR/root>) has a default size of 4 GB
+The filesystem (F<OUTPUTDIR/root>) has a default size of 4 GB
(see also the I<--size> option).
=back
@@ -210,7 +210,7 @@ The output directory is checked and it is I<not> rebuilt unless it
needs to be.
This is done by consulting the dates of the host package database
-(C</var/lib/rpm> etc), the input supermin files, and the output
+(F</var/lib/rpm> etc), the input supermin files, and the output
directory. The operation is only carried out if either the host
package database or the input supermin files are newer than the output
directory.
@@ -248,9 +248,9 @@ B<Any previous contents of the output directory are deleted>, and a
new output directory is created.
The output directory is created (nearly) atomically by constructing a
-temporary directory called something like C<OUTPUTDIR.abc543>, then
+temporary directory called something like F<OUTPUTDIR.abc543>, then
renaming the old output directory (if present) and deleting it, and
-then renaming the temporary directory to C<OUTPUTDIR>. By combining
+then renaming the temporary directory to F<OUTPUTDIR>. By combining
this option with I<--lock> you can ensure that multiple parallel runs
of supermin do not conflict with each other.
@@ -262,10 +262,10 @@ Set the configuration file for the package manager. This allows you
to specify alternate software repositories.
For ArchLinux, this sets the pacman configuration file (default
-C</etc/pacman.conf>). See L<pacman.conf(5)>.
+F</etc/pacman.conf>). See L<pacman.conf(5)>.
For Yum/RPM distributions, this sets the yum configuration file
-(default C</etc/yum.conf>). See L<yum.conf(5)>.
+(default F</etc/yum.conf>). See L<yum.conf(5)>.
=item B<--prepare>
@@ -336,8 +336,8 @@ Print the package name and version number, and exit.
Supermin appliances consist of just enough information to be able to
build an appliance containing the same operating system (Linux
version, distro, release etc) as the host OS. Since the host and
-appliance share many common files such as C</bin/bash> and
-C</lib/libc.so> there is no reason to ship these files in the
+appliance share many common files such as F</bin/bash> and
+F</lib/libc.so> there is no reason to ship these files in the
appliance. They can simply be read from the host on demand when the
appliance is launched. Therefore to save space we just store the
names of the packages we want from the host, and copy those in (plus
@@ -350,20 +350,20 @@ skeleton base image which contains these files and the outline
directory structure.
Therefore the supermin appliance normally consists of at least two
-control files (C<packages> and C<base.tar.gz>).
+control files (F<packages> and F<base.tar.gz>).
=over 4
-=item B<packages>
+=item F<packages>
The list of packages to be copied from the host. Dependencies are
resolved automatically.
The file is plain text, one package name per line.
-=item B<base.tar>
+=item F<base.tar>
-=item B<base.tar.gz>
+=item F<base.tar.gz>
This tar file (which may be compressed) contains the skeleton
filesystem. Mostly it contains directories and a few configuration
@@ -372,7 +372,7 @@ files.
All paths in the tar file should be relative to the root directory of
the appliance.
-=item B<hostfiles>
+=item F<hostfiles>
Any other files that are to be copied from the host. This is a plain
text file with one pathname per line.
@@ -382,7 +382,7 @@ is created, eg:
/etc/yum.repos.d/*.repo
-would copy all of the C<*.repo> files into the appliance.
+would copy all of the F<*.repo> files into the appliance.
Each pathname in the file should start with a C</> character.
@@ -392,7 +392,7 @@ However you may drop one or more of these files into the supermin
appliance directory if you want to copy random unpackaged files into
the full appliance.
-=item B<excludefiles>
+=item F<excludefiles>
A list of filenames, directory names, or wildcards prefixed by C<->
which are excluded from the final appliance.
@@ -427,9 +427,9 @@ directories passed to it. A common layout could look like this:
supermin.d/zz-hostfiles
In this way extra files can be added to the appliance just by creating
-another tar file (C<extra.tar.gz> in the example above) and dropping
+another tar file (F<extra.tar.gz> in the example above) and dropping
it into the directory, and additional host files can be added
-(C<zz-hostfiles> in the example above). When the appliance is
+(F<zz-hostfiles> in the example above). When the appliance is
constructed, the extra files will appear in the appliance.
=head2 MINIMIZING THE SUPERMIN APPLIANCE
@@ -481,7 +481,7 @@ then you should do something like this:
=head2 ENFORCING AVAILABILITY OF PACKAGES
Supermin builds the appliance by copying in the packages listed in
-C<packages>. For this to work those packages must be available. We
+F<packages>. For this to work those packages must be available. We
usually enforce this by adding requirements (eg. RPM C<Requires:>
lines) on the package that uses the supermin appliance, so that
package cannot be installed without pulling in the dependent packages
@@ -497,14 +497,14 @@ If this environment variable is set, then automatic selection of the
kernel is bypassed and this kernel is used.
The environment variable should point to a kernel file,
-eg. C</boot/vmlinuz-3.0.x86_64>
+eg. F</boot/vmlinuz-3.0.x86_64>
=item SUPERMIN_MODULES
This specifies the kernel modules directory to use.
The environment variable should point to a module directory,
-eg. C</lib/modules/3.0.x86_64/>
+eg. F</lib/modules/3.0.x86_64/>
=item SUPERMIN_DTB
--
2.1.0
9 years, 5 months