See individual patches for details. Pino Toscano (5): Include signal.h Remove unused variables Push -Wsuggest-attribute=noreturn only with GCC tests: do not set libguestfs environment variables Define the GCC version macro Makefile.am | 2 +- conversion.c | 3 +++ p2v.h | 7 +++++++ ssh.c | 8 +++++--- 4 files changed, 16 insertions(+), 4 deletions(-) -- 2.21.0
It is needed for kill() and the SIG* macros. --- conversion.c | 1 + ssh.c | 1 + 2 files changed, 2 insertions(+) diff --git a/conversion.c b/conversion.c index 7dd201a..3d07c7e 100644 --- a/conversion.c +++ b/conversion.c @@ -46,6 +46,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> +#include <signal.h> #include <pthread.h> diff --git a/ssh.c b/ssh.c index c852803..fca5883 100644 --- a/ssh.c +++ b/ssh.c @@ -52,6 +52,7 @@ #include <libintl.h> #include <sys/types.h> #include <sys/wait.h> +#include <signal.h> #include "ignore-value.h" #include "getprogname.h" -- 2.21.0
--- ssh.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ssh.c b/ssh.c index fca5883..bb86fa9 100644 --- a/ssh.c +++ b/ssh.c @@ -773,7 +773,6 @@ int test_connection (struct config *config) { mexp_h *h; - CLEANUP_FREE char *major_str = NULL, *minor_str = NULL, *release_str = NULL; int feature_libguestfs_rewrite = 0; int status; const int ovecsize = 12; -- 2.21.0
Pino Toscano
2019-Jul-12 15:03 UTC
[Libguestfs] [p2v PATCH 3/5] Push -Wsuggest-attribute=noreturn only with GCC
Isolate the GCC pragmas properly; since clang defines __GNUC__, explicitly check for __clang__ too. --- conversion.c | 2 ++ ssh.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/conversion.c b/conversion.c index 3d07c7e..044cee3 100644 --- a/conversion.c +++ b/conversion.c @@ -150,7 +150,9 @@ set_control_h (mexp_h *new_h) pthread_mutex_unlock (&cancel_requested_mutex); } +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" +#endif int start_conversion (struct config *config, void (*notify_ui) (int type, const char *data)) diff --git a/ssh.c b/ssh.c index bb86fa9..c11ef11 100644 --- a/ssh.c +++ b/ssh.c @@ -768,7 +768,9 @@ static void add_input_driver (const char *name, size_t len); static void add_output_driver (const char *name, size_t len); static int compatible_version (const char *v2v_version); +#if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" /* WTF? */ +#endif int test_connection (struct config *config) { -- 2.21.0
Pino Toscano
2019-Jul-12 15:03 UTC
[Libguestfs] [p2v PATCH 4/5] tests: do not set libguestfs environment variables
They are not needed now. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 31c54c0..d359a5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -376,7 +376,7 @@ test-virt-p2v-pxe.sshd_config: test-virt-p2v-pxe.sshd_config.in test-virt-p2v-pxe.authorized_keys: test-virt-p2v-pxe.id_rsa.pub $(top_builddir)/run rm -f $@ $@-t - $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\",environment=\"LD_LIBRARY_PATH=$(abs_top_builddir)/lib/.libs\",environment=\"LIBGUESTFS_PATH=$(abs_top_builddir)/appliance\",environment=\"LIBGUESTFS_CACHEDIR=$(abs_top_builddir)/tmp\"\ ' > $@-t + $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\"\ ' > $@-t cat $< >> $@-t mv $@-t $@ -- 2.21.0
Pino Toscano
2019-Jul-12 15:03 UTC
[Libguestfs] [p2v PATCH 5/5] Define the GCC version macro
Carry over the GUESTFS_GCC_VERSION macros from libguestfs, that defines the GCC version as single number; also, rename it to P2V_GCC_VERSION, and limit it to GCC (defined to 0 for any other compiler). --- p2v.h | 7 +++++++ ssh.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/p2v.h b/p2v.h index 66c245e..52842bd 100644 --- a/p2v.h +++ b/p2v.h @@ -32,6 +32,13 @@ #include "guestfs-utils.h" +#if defined(__GNUC__) && !defined(__clang__) +# define P2V_GCC_VERSION \ + (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#else +# define P2V_GCC_VERSION 0 +#endif + /* All disks / removable media / network interfaces discovered * when the program started. Do not change these. */ diff --git a/ssh.c b/ssh.c index c11ef11..59d1891 100644 --- a/ssh.c +++ b/ssh.c @@ -314,7 +314,7 @@ cache_ssh_identity (struct config *config) * thinks might grow to an unbounded size. Since we control * extra_args, this is not in fact a problem. */ -#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */ +#if P2V_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-usage=" #endif @@ -575,7 +575,7 @@ start_ssh (unsigned spawn_flags, struct config *config, return h; } -#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */ +#if P2V_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */ #pragma GCC diagnostic pop #endif -- 2.21.0
--- README | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..6888bcb --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +Virt-p2v is a GUI interface to convert a physical machine to run +as virtual machine on KVM. For more information see the home page: + + http://libguestfs.org/ + +For discussion, development, patches, etc. please use the mailing +list: + + http://www.redhat.com/mailman/listinfo/libguestfs + +To find out how to build libguestfs from source, read: + + docs/p2v-building.pod + http://libguestfs.org/p2v-building.1.html + man docs/p2v-building.1 + +Copyright (C) 2009-2019 Red Hat Inc. + +The library is distributed under the LGPLv2+. The programs are +distributed under the GPLv2+. Please see the files COPYING and +COPYING.LIB for full license information. The examples are under a +very liberal license. -- 2.21.0
Richard W.M. Jones
2019-Jul-13 11:25 UTC
Re: [Libguestfs] [p2v PATCH 4/5] tests: do not set libguestfs environment variables
On Fri, Jul 12, 2019 at 05:03:22PM +0200, Pino Toscano wrote:> They are not needed now. > --- > Makefile.am | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile.am b/Makefile.am > index 31c54c0..d359a5b 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -376,7 +376,7 @@ test-virt-p2v-pxe.sshd_config: test-virt-p2v-pxe.sshd_config.in > > test-virt-p2v-pxe.authorized_keys: test-virt-p2v-pxe.id_rsa.pub $(top_builddir)/run > rm -f $@ $@-t > - $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\",environment=\"LD_LIBRARY_PATH=$(abs_top_builddir)/lib/.libs\",environment=\"LIBGUESTFS_PATH=$(abs_top_builddir)/appliance\",environment=\"LIBGUESTFS_CACHEDIR=$(abs_top_builddir)/tmp\"\ ' > $@-t > + $(top_builddir)/run sh -c 'echo -n environment=\"PATH=$$PATH\"\ ' > $@-t > cat $< >> $@-t > mv $@-t $@I guess we test against the installed virt-v2v? That's fine. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Richard W.M. Jones
2019-Jul-13 11:26 UTC
Re: [Libguestfs] [p2v PATCH 6/5] Add a simple README
This is all fine, ACK series. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW