[libvirt] [PATCH] Fixes for check and rpm builds without sanlock (and qemu)

Apart from the non-sanlock check build, there is also a little fix for qemu (EXTRA_DIST had qemu.conf and others inside even if the build was supposed to be without qemu). --- libvirt.spec.in | 5 +++++ src/Makefile.am | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d4e43f6..3c544f1 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1232,6 +1232,11 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug %endif %find_lang %{name} +%if ! %{with_sanlock} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug +%endif + %if ! %{with_lxc} rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug diff --git a/src/Makefile.am b/src/Makefile.am index 23747d7..e56a8ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -785,9 +785,9 @@ augeas_DATA += qemu/libvirtd_qemu.aug augeastest_DATA += qemu/test_libvirtd_qemu.aug CLEANFILES += qemu/test_libvirtd_qemu.aug -endif EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \ qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt +endif if WITH_LXC @@ -1147,6 +1147,7 @@ else check-augeas-lxc: endif +if HAVE_SANLOCK test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \ locking/qemu-sanlock.conf $(AUG_GENTEST) $(AUG_GENTEST) locking/qemu-sanlock.conf $< $@ @@ -1155,6 +1156,9 @@ check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi +else +check-augeas-sanlock: +endif # # Build our version script. This is composed of three parts: -- 1.7.8.6

On 05/30/2012 09:35 AM, Martin Kletzander wrote:
Apart from the non-sanlock check build, there is also a little fix for qemu (EXTRA_DIST had qemu.conf and others inside even if the build was supposed to be without qemu). --- libvirt.spec.in | 5 +++++ src/Makefile.am | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index d4e43f6..3c544f1 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1232,6 +1232,11 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug %endif %find_lang %{name}
+%if ! %{with_sanlock} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug +%endif +
ACK to this hunk.
%if ! %{with_lxc} rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug diff --git a/src/Makefile.am b/src/Makefile.am index 23747d7..e56a8ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -785,9 +785,9 @@ augeas_DATA += qemu/libvirtd_qemu.aug augeastest_DATA += qemu/test_libvirtd_qemu.aug CLEANFILES += qemu/test_libvirtd_qemu.aug
-endif EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \ qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt +endif
NACK to this hunk. If we decide something is worth putting in the tarball, then it must _always_ be in the tarball, regardless of configure options. How can I reproduce the failure you were seeing, so that we can fix it properly? If the problem is one of 'make dist' failing when qemu is configured to be off, because EXTRA_DIST unconditionally includes the file but the file is only generated under HAVE_QEMU, then we need to either fix things so that the file can unconditionally be generated, or so that the file is not part of the tarball (and that depends on what tools are required for generating the file).
@@ -1147,6 +1147,7 @@ else check-augeas-lxc: endif
+if HAVE_SANLOCK test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \ locking/qemu-sanlock.conf $(AUG_GENTEST) $(AUG_GENTEST) locking/qemu-sanlock.conf $< $@ @@ -1155,6 +1156,9 @@ check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi +else +check-augeas-sanlock: +endif
ACK to this hunk - if sanlock is not configured, then we don't need to test it. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/30/2012 05:50 PM, Eric Blake wrote:
On 05/30/2012 09:35 AM, Martin Kletzander wrote:
Apart from the non-sanlock check build, there is also a little fix for qemu (EXTRA_DIST had qemu.conf and others inside even if the build was supposed to be without qemu). --- libvirt.spec.in | 5 +++++ src/Makefile.am | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index d4e43f6..3c544f1 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1232,6 +1232,11 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug %endif %find_lang %{name}
+%if ! %{with_sanlock} +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug +rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug +%endif +
ACK to this hunk.
%if ! %{with_lxc} rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug diff --git a/src/Makefile.am b/src/Makefile.am index 23747d7..e56a8ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -785,9 +785,9 @@ augeas_DATA += qemu/libvirtd_qemu.aug augeastest_DATA += qemu/test_libvirtd_qemu.aug CLEANFILES += qemu/test_libvirtd_qemu.aug
-endif EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug \ qemu/test_libvirtd_qemu.aug.in qemu/THREADS.txt +endif
NACK to this hunk. If we decide something is worth putting in the tarball, then it must _always_ be in the tarball, regardless of configure options. How can I reproduce the failure you were seeing, so that we can fix it properly? If the problem is one of 'make dist' failing when qemu is configured to be off, because EXTRA_DIST unconditionally includes the file but the file is only generated under HAVE_QEMU, then we need to either fix things so that the file can unconditionally be generated, or so that the file is not part of the tarball (and that depends on what tools are required for generating the file).
@@ -1147,6 +1147,7 @@ else check-augeas-lxc: endif
+if HAVE_SANLOCK test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \ locking/qemu-sanlock.conf $(AUG_GENTEST) $(AUG_GENTEST) locking/qemu-sanlock.conf $< $@ @@ -1155,6 +1156,9 @@ check-augeas-sanlock: test_libvirt_sanlock.aug $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \ fi +else +check-augeas-sanlock: +endif
ACK to this hunk - if sanlock is not configured, then we don't need to test it.
Thanks, ACK'd hunks are pushed, the NACK'd one was just my misunderstanding, it doesn't do anything wrong. However, I didn't change the commit message, so it maybe a little confusing and I realized it after the push. What's the best way to solve that? Martin

On 05/30/2012 10:59 AM, Martin Kletzander wrote:
On 05/30/2012 05:50 PM, Eric Blake wrote:
On 05/30/2012 09:35 AM, Martin Kletzander wrote:
Apart from the non-sanlock check build, there is also a little fix for qemu (EXTRA_DIST had qemu.conf and others inside even if the build was supposed to be without qemu). ---
Thanks, ACK'd hunks are pushed, the NACK'd one was just my misunderstanding, it doesn't do anything wrong.
However, I didn't change the commit message, so it maybe a little confusing and I realized it after the push. What's the best way to solve that?
Oh well. It's not worth rewinding history just to change a bad commit message, and this isn't the first time a commit message is a bit out of date with the actual contents of the change. We'll just have to live with it :) -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Hi Eric, Compiling error still exists: <snip> Considering target file `test_libvirt_sanlock.aug'. File `test_libvirt_sanlock.aug' does not exist. Considering target file `locking/test_libvirt_sanlock.aug.in'. File `locking/test_libvirt_sanlock.aug.in' does not exist. Finished prerequisites of target file `locking/test_libvirt_sanlock.aug.in'. Must remake target `locking/test_libvirt_sanlock.aug.in'. make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' make[3]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `test_libvirt_sanlock.aug'. Stop. </snip> Regards, Alex ----- Original Message ----- From: "Eric Blake" <eblake@redhat.com> To: "Martin Kletzander" <mkletzan@redhat.com> Cc: libvir-list@redhat.com Sent: Thursday, May 31, 2012 1:03:44 AM Subject: Re: [libvirt] [PATCH] Fixes for check and rpm builds without sanlock (and qemu) On 05/30/2012 10:59 AM, Martin Kletzander wrote:
On 05/30/2012 05:50 PM, Eric Blake wrote:
On 05/30/2012 09:35 AM, Martin Kletzander wrote:
Apart from the non-sanlock check build, there is also a little fix for qemu (EXTRA_DIST had qemu.conf and others inside even if the build was supposed to be without qemu). ---
Thanks, ACK'd hunks are pushed, the NACK'd one was just my misunderstanding, it doesn't do anything wrong.
However, I didn't change the commit message, so it maybe a little confusing and I realized it after the push. What's the best way to solve that?
Oh well. It's not worth rewinding history just to change a bad commit message, and this isn't the first time a commit message is a bit out of date with the actual contents of the change. We'll just have to live with it :) -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 05/31/2012 02:19 AM, Alex Jia wrote:
Hi Eric, Compiling error still exists: <snip> Considering target file `test_libvirt_sanlock.aug'. File `test_libvirt_sanlock.aug' does not exist. Considering target file `locking/test_libvirt_sanlock.aug.in'. File `locking/test_libvirt_sanlock.aug.in' does not exist. Finished prerequisites of target file `locking/test_libvirt_sanlock.aug.in'. Must remake target `locking/test_libvirt_sanlock.aug.in'. make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' make[3]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `test_libvirt_sanlock.aug'. Stop. </snip>
How is that possible? Are you building from libvirt.git (where src/locking/test_libvirt_sanlock.aug.in is part of the repo) or from a tarball (and if so, how did you create the tarball)? Are you doing an in-tree build or a VPATH build? -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/31/2012 11:01 PM, Eric Blake wrote:
On 05/31/2012 02:19 AM, Alex Jia wrote:
Hi Eric, Compiling error still exists: <snip> Considering target file `test_libvirt_sanlock.aug'. File `test_libvirt_sanlock.aug' does not exist. Considering target file `locking/test_libvirt_sanlock.aug.in'. File `locking/test_libvirt_sanlock.aug.in' does not exist. Finished prerequisites of target file `locking/test_libvirt_sanlock.aug.in'. Must remake target `locking/test_libvirt_sanlock.aug.in'. make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' make[3]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `test_libvirt_sanlock.aug'. Stop. </snip> How is that possible? Are you building from libvirt.git (where src/locking/test_libvirt_sanlock.aug.in is part of the repo) or from a tarball (and if so, how did you create the tarball)? Are you doing an in-tree build or a VPATH build? Ah, I need to clarify this problem, I shouldn't directly reply this mail, in fact, my problem hasn't relationship with this fixing, it just is a compiling error when run 'make' not 'make rpm', then I will meet the above issue.
Thanks, Alex

On 05/31/2012 08:22 PM, Alex Jia wrote:
make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' make[3]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `test_libvirt_sanlock.aug'. Stop. </snip> How is that possible? Are you building from libvirt.git (where src/locking/test_libvirt_sanlock.aug.in is part of the repo) or from a tarball (and if so, how did you create the tarball)? Are you doing an in-tree build or a VPATH build? Ah, I need to clarify this problem, I shouldn't directly reply this mail, in fact, my problem hasn't relationship with this fixing, it just is a compiling error when run 'make' not 'make rpm', then I will meet the above issue.
I still need exact steps to reproduce the issue before I can fix anything, if there is anything to be reproduced. You answered that you triggered it with 'make', but was this on a fresh 'git clone' or an incremental tree that might have garbage lying around from earlier builds? And you didn't answer whether you were doing a VPATH or in-tree build. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/31/2012 08:22 PM, Alex Jia wrote:
make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' make[3]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `test_libvirt_sanlock.aug'. Stop. </snip> How is that possible? Are you building from libvirt.git (where src/locking/test_libvirt_sanlock.aug.in is part of the repo) or from a tarball (and if so, how did you create the tarball)? Are you doing an I worked at libvirt upstream without trying/making any tarball. in-tree build or a VPATH build? I have ever done 'make rpm' then 'make clean' to clean my env, but it seems some garbage are reserved on my repo. Isn't 'make clean' okay to clean up previous env? Ah, I need to clarify this problem, I shouldn't directly reply this mail, in fact, my problem hasn't relationship with this fixing, it just is a compiling error when run 'make' not 'make rpm', then I will meet the above issue. I still need exact steps to reproduce the issue before I can fix anything, if there is anything to be reproduced. You answered that you triggered it with 'make', but was this on a fresh 'git clone' or an incremental tree that might have garbage lying around from earlier I guess it's a root reason for my dirty env, but I still can meet the issue after running 'make clean', I don't want to run 'git clone' to get a new repo, it will miss a chance to find a final reason, so I reserve my old repo, please feel free to contact me on #libvirt-qe IRC then check it. thanks. builds? And you didn't answer whether you were doing a VPATH or in-tree build. I just done regular libvirt compiling without any build now then meet
On 06/01/2012 10:50 PM, Eric Blake wrote: the problem again. Thanks, Alex

On 05/31/2012 08:22 PM, Alex Jia wrote:
make[3]: Entering directory `/home/ajia/Workspace/libvirt/src' make[3]: *** No rule to make target `locking/test_libvirt_sanlock.aug.in', needed by `test_libvirt_sanlock.aug'. Stop. </snip> How is that possible? Are you building from libvirt.git (where src/locking/test_libvirt_sanlock.aug.in is part of the repo) or from a tarball (and if so, how did you create the tarball)? Are you doing an I worked at libvirt upstream without trying/making any tarball. in-tree build or a VPATH build? I have ever done 'make rpm' then 'make clean' to clean my env, but it seems some garbage are reserved on my repo. Isn't 'make clean' okay to clean up previous env? Ah, I need to clarify this problem, I shouldn't directly reply this mail, in fact, my problem hasn't relationship with this fixing, it just is a compiling error when run 'make' not 'make rpm', then I will meet the above issue. I still need exact steps to reproduce the issue before I can fix anything, if there is anything to be reproduced. You answered that you triggered it with 'make', but was this on a fresh 'git clone' or an incremental tree that might have garbage lying around from earlier I guess it's a root reason for my dirty env, but I still can meet the issue after running 'make clean', I don't want to run 'git clone' to get a new repo, it will miss a chance to find a final reason, so I reserve my old repo, please feel free to contact me on #libvirt-qe IRC then check it. thanks. builds? And you didn't answer whether you were doing a VPATH or in-tree build. I just done regular libvirt compiling without any build now then meet
Martin help me find a root reason, I don't know when the src/locking/test_libvirt_sanlock.aug.in is deleted from my git repo, in fact, I have never manually done it by myself except running 'make', 'make clean' or 'make rpm' ago, it's weird for me. Martin, Thanks. Alex ----- Original Message ----- From: "Alex Jia" <ajia@redhat.com> To: "Eric Blake" <eblake@redhat.com> Cc: libvir-list@redhat.com, "Martin Kletzander" <mkletzan@redhat.com> Sent: Monday, June 4, 2012 10:34:44 AM Subject: Re: [libvirt] [PATCH] Fixes for check and rpm builds without sanlock (and qemu) On 06/01/2012 10:50 PM, Eric Blake wrote: the problem again. Thanks, Alex -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 06/04/2012 09:54 AM, Alex Jia wrote:
Martin help me find a root reason, I don't know when the src/locking/test_libvirt_sanlock.aug.in is deleted from my git repo, in fact, I have never manually done it by myself except running 'make', 'make clean' or 'make rpm' ago, it's weird for me.
Martin, Thanks. Alex
You're welcome, I'm glad it's solved. To answer our 'make clean' question, I was about to reply, so here's a copy-paste from the draft mail: 'make clean' doesn't clean everything and that's on purpose. There are Makefile targets that cleans more than that, it depends on what you want to clean. You can use distclean (cleaning also all distribution-specific files), maintainer-clean (cleaning generated files by tools not needed for the compilation) and probably more (I don't know these). There is a git command to remove everything that is not in the repository, but that can remove *everything* that git doesn't know about, so I don't recommend that if you're not sure this is exactly what you wanted. If you want to check something in a super-clean environment, you can always git-clone into new folder ;-) Have a nice day, Martin
participants (3)
-
Alex Jia
-
Eric Blake
-
Martin Kletzander