.\" Automatically generated by Podwrapper::Man 1.42.3 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "p2v-building 1" .TH p2v-building 1 "2022-10-13" "virt-p2v-1.42.3" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" p2v\-building \- How to build virt\-p2v from source .SH "DESCRIPTION" .IX Header "DESCRIPTION" This manual page describes how to build virt\-p2v from source. .PP The main steps are: .IP "\(bu" 4 Install the requirements. .IP "\(bu" 4 Build, either from the git repository or from a tarball. .IP "\(bu" 4 Run the tests. .IP "\(bu" 4 Run the tools from the source directory, or install. .SH "REQUIREMENTS" .IX Header "REQUIREMENTS" .SS "Full list of requirements" .IX Subsection "Full list of requirements" .IP "qemu-img ≥ 2.2.0" 4 .IX Item "qemu-img ≥ 2.2.0" \&\fIRequired\fR. .IP "Gcc or Clang" 4 .IX Item "Gcc or Clang" \&\fIRequired\fR. We use \f(CW\*(C`_\|_attribute_\|_((cleanup))\*(C'\fR which is a \s-1GCC\s0 extension also supported by Clang. .IP "Perl" 4 .IX Item "Perl" \&\fIRequired\fR. Various build steps and tests are written in Perl. Perl is not needed at runtime. .ie n .IP "Perl ""Pod::Man""" 4 .el .IP "Perl \f(CWPod::Man\fR" 4 .IX Item "Perl Pod::Man" .PD 0 .ie n .IP "Perl ""Pod::Simple""" 4 .el .IP "Perl \f(CWPod::Simple\fR" 4 .IX Item "Perl Pod::Simple" .PD \&\fIRequired\fR. Part of Perl core. .IP "autoconf" 4 .IX Item "autoconf" .PD 0 .IP "automake" 4 .IX Item "automake" .PD \&\fIRequired\fR if compiling from git. Optional if compiling from tarball. .IP "Perl-compatible Regular Expressions (\s-1PCRE2\s0) library" 4 .IX Item "Perl-compatible Regular Expressions (PCRE2) library" \&\fIRequired\fR. .IP "libxml2" 4 .IX Item "libxml2" \&\fIRequired\fR. .IP "xz" 4 .IX Item "xz" \&\fIRequired\fR. .IP "nbdkit" 4 .IX Item "nbdkit" Optional. .Sp \&\fBvirt\-p2v\fR\|(1) requires nbdkit, but it only needs to be present on the virt\-p2v \s-1ISO,\s0 it does not need to be installed at compile time. .IP "Glib ≥ 2.56" 4 .IX Item "Glib ≥ 2.56" \&\fIRequired\fR. .IP "Gtk ≥ 3.22" 4 .IX Item "Gtk ≥ 3.22" \&\fIRequired\fR. .IP "D\-Bus" 4 .IX Item "D-Bus" Optional. .Sp If the D\-Bus low level C \s-1API\s0 is available, virt\-p2v can send a D\-Bus message to logind to inhibit power saving (sleep, suspend, etc) during P2V conversions. .Sp If this \s-1API\s0 is not available at build time, then very long conversions might be interrupted if the physical machine goes to sleep. .IP "valgrind" 4 .IX Item "valgrind" Optional. For testing memory problems. .IP "bash-completion" 4 .IX Item "bash-completion" Optional. For tab-completion of commands in bash. .SH "BUILDING FROM GIT" .IX Header "BUILDING FROM GIT" You will need to install additional dependencies \f(CW\*(C`autoconf\*(C'\fR, and \f(CW\*(C`automake\*(C'\fR when building from git. .PP .Vb 5 \& git clone https://github.com/libguestfs/virt\-p2v \& cd virt\-p2v \& autoreconf \-i \& ./configure \& make .Ve .SH "BUILDING FROM TARBALLS" .IX Header "BUILDING FROM TARBALLS" Tarballs are downloaded from http://download.libguestfs.org/. Stable tarballs are signed with the GnuPG key for \f(CW\*(C`rich@annexia.org\*(C'\fR, see https://pgp.mit.edu/pks/lookup?op=vindex&search=0x91738F73E1B768A0. The fingerprint is \f(CW\*(C`F777 4FB1 AD07 4A7E 8C87 67EA 9173 8F73 E1B7 68A0\*(C'\fR. .PP Download and unpack the tarball. .PP .Vb 3 \& cd virt\-p2v\-1.xx.yy \& ./configure \& make .Ve .SH "RUNNING THE TESTS" .IX Header "RUNNING THE TESTS" \&\fB\s-1DO NOT\s0 run the tests as root!\fR Virt\-p2v can be built and tested as non-root. Running the tests as root could even be dangerous, don't do it. .PP To run the tests, do: .PP .Vb 1 \& make check .Ve .PP There are many more tests you can run. See \fBp2v\-hacking\fR\|(1) for details. .SH "INSTALLING" .IX Header "INSTALLING" \&\fB\s-1DO NOT\s0 use \f(CB\*(C`make install\*(C'\fB!\fR You'll end up with conflicting versions of virt\-p2v installed, and this causes constant headaches for users. See the next section for how to use the \fI./run\fR script instead. .PP Distro packagers can use: .PP .Vb 1 \& make DESTDIR=[temp\-build\-dir] install .Ve .SH "THE ./run SCRIPT" .IX Header "THE ./run SCRIPT" You can test \fBvirt\-p2v\fR\|(1) and the other tools without needing to install them by using the \fI./run\fR script in the top directory. This script works by setting several environment variables. .PP For example: .PP .Vb 1 \& ./run virt\-p2v\-make\-disk [usual virt\-p2v\-make\-disk args ...] .Ve .PP The \fI./run\fR script adds every virt\-p2v binary to the \f(CW$PATH\fR, so the above example run virt\-p2v\-make\-disk from the build directory (not the globally installed virt\-p2v\-make\-disk if there is one). .SH "SELECTED ./configure SETTINGS" .IX Header "SELECTED ./configure SETTINGS" There are many \f(CW\*(C`./configure\*(C'\fR options. Use: .PP .Vb 1 \& ./configure \-\-help .Ve .PP to list them all. This section covers some of the more important ones. .IP "\fB\-\-enable\-werror\fR" 4 .IX Item "--enable-werror" This turns compiler warnings into errors (ie. \f(CW\*(C`\-Werror\*(C'\fR). Use this for development, especially when submitting patches. It should generally \fInot\fR be used for production or distro builds. .ie n .IP "\fB\-\-with\-extra=""\fR\fIdistroname\fR=\fIversion\fR,...\fB""\fR" 4 .el .IP "\fB\-\-with\-extra=``\fR\fIdistroname\fR=\fIversion\fR,...\fB''\fR" 4 .IX Item "--with-extra=""distroname=version,...""" .PD 0 .ie n .IP "\fB\-\-with\-extra=""local""\fR" 4 .el .IP "\fB\-\-with\-extra=``local''\fR" 4 .IX Item "--with-extra=local" .PD This option appends a text to the version of the virt\-p2v tools. It is a free text field, but a good idea is to encode a comma-separated list of facts such as the distro name and version, and anything else that may help with debugging problems raised by users. .Sp For custom and/or local builds, this can be set to \f(CW\*(C`local\*(C'\fR to indicate this is \fInot\fR a distro build. .SH "USING CLANG (LLVM) INSTEAD OF GCC" .IX Header "USING CLANG (LLVM) INSTEAD OF GCC" .Vb 3 \& export CC=clang \& ./configure \& make .Ve .SH "BUILDING i686 32 BIT VIRT\-P2V" .IX Header "BUILDING i686 32 BIT VIRT-P2V" \&\fI(This section only applies on the x86\-64 architecture.)\fR .PP Building a 32 bit virt\-p2v (i686) binary improves compatibility with older hardware. See \fBvirt\-p2v\-make\-disk\fR\|(1) for details. Although virt\-p2v is a simple Gtk application, it is not especially easy to build just virt\-p2v as a 32 bit application on a 64 bit host. Usually the simplest way is to use a 32 bit chroot or even a 32 bit virtual machine to build virt\-p2v. .PP On Fedora you can use the \fBmock\fR\|(1) tool. For example: .PP .Vb 1 \& fedpkg mockbuild \-\-root fedora\-23\-i386 .Ve .PP This will result in a \fIvirt\-v2v\-*.i686.rpm\fR file which can be unpacked to extract the 32 bit virt\-p2v binary. .PP The binary may be compressed to either \fIvirt\-p2v.i686.xz\fR, or \&\fI\f(CI$libdir\fI/virt\-p2v/virt\-p2v.i686.xz\fR or \&\fI\f(CI$VIRT_P2V_DATA_DIR\fI/virt\-p2v.i686.xz\fR as appropriate. This enables the \fBvirt\-p2v\-make\-disk\fR\|(1) \fI\-\-arch\fR option. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBp2v\-hacking\fR\|(1), \&\fBp2v\-release\-notes\fR\|(1), http://libguestfs.org/. .SH "AUTHORS" .IX Header "AUTHORS" Richard W.M. Jones (\f(CW\*(C`rjones at redhat dot com\*(C'\fR) .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2009\-2019 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" This library is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This library is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 Lesser General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 Lesser General Public License along with this program. If not, see . .SH "BUGS" .IX Header "BUGS" To get a list of bugs against libguestfs (which include virt\-p2v), use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools .PP To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools .PP When reporting a bug, please supply: .IP "\(bu" 4 The version of virt\-p2v. .IP "\(bu" 4 Where you got virt\-p2v (eg. which Linux distro, compiled from source, etc) .IP "\(bu" 4 Describe the bug accurately and give a way to reproduce it.