[libvirt] [PATCH] build: Properly generate and check virkeepaliveprotocol-structs

This fixes make dist broken by recent keepalive series --- src/Makefile.am | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index e8f20de..33a32a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -247,14 +247,15 @@ EXTRA_DIST += $(REMOTE_DRIVER_PROTOCOL) \ # The alternation of the following regexps matches both cases. r1 = /\* \d+ \*/ r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/ +struct_prefix = (remote_|qemu_|virNet|keepalive_) PDWTAGS = \ $(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then \ pdwtags --verbose $(<:.lo=.$(OBJEXT)) \ | perl -0777 -n \ -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \ - -e ' if ($$p =~ /^(struct|enum) (remote_|qemu_|virNet)/ ||' \ - -e ' $$p =~ /^enum {/) {' \ + -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \ + -e ' $$p =~ /^enum {/) {' \ -e ' $$p =~ s!\t*/\*.*?\*/!!sg;' \ -e ' $$p =~ s!\s+\n!\n!sg;' \ -e ' $$p =~ s!\s+$$!!;' \ @@ -267,7 +268,7 @@ PDWTAGS = \ -e ' print "/* -*- c -*- */\n";' \ -e '}' \ -e 'END {' \ - -e ' if ($$n < 3) {' \ + -e ' if ($$n < 1) {' \ -e ' warn "WARNING: your pdwtags program is too old\n";' \ -e ' warn "WARNING: skipping the $@ test\n";' \ -e ' warn "WARNING: install dwarves-1.3 or newer\n";' \ @@ -295,6 +296,7 @@ $(srcdir)/%_protocol-structs: libvirt_driver_remote_la-%_protocol.lo $(srcdir)/virnetprotocol-structs: libvirt_net_rpc_la-virnetprotocol.lo $(PDWTAGS) $(srcdir)/virkeepaliveprotocol-structs: libvirt_net_rpc_la-virkeepaliveprotocol.lo + $(PDWTAGS) else !WITH_REMOTE # These generated files must live in git, because they cannot be re-generated # when configured --without-remote. -- 1.7.8.rc3

On Thu, Nov 24, 2011 at 02:18:48PM +0100, Jiri Denemark wrote:
This fixes make dist broken by recent keepalive series --- src/Makefile.am | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index e8f20de..33a32a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -247,14 +247,15 @@ EXTRA_DIST += $(REMOTE_DRIVER_PROTOCOL) \ # The alternation of the following regexps matches both cases. r1 = /\* \d+ \*/ r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/ +struct_prefix = (remote_|qemu_|virNet|keepalive_)
PDWTAGS = \ $(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then \ pdwtags --verbose $(<:.lo=.$(OBJEXT)) \ | perl -0777 -n \ -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \ - -e ' if ($$p =~ /^(struct|enum) (remote_|qemu_|virNet)/ ||' \ - -e ' $$p =~ /^enum {/) {' \ + -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \ + -e ' $$p =~ /^enum {/) {' \ -e ' $$p =~ s!\t*/\*.*?\*/!!sg;' \ -e ' $$p =~ s!\s+\n!\n!sg;' \ -e ' $$p =~ s!\s+$$!!;' \ @@ -267,7 +268,7 @@ PDWTAGS = \ -e ' print "/* -*- c -*- */\n";' \ -e '}' \ -e 'END {' \ - -e ' if ($$n < 3) {' \ + -e ' if ($$n < 1) {' \ -e ' warn "WARNING: your pdwtags program is too old\n";' \ -e ' warn "WARNING: skipping the $@ test\n";' \ -e ' warn "WARNING: install dwarves-1.3 or newer\n";' \ @@ -295,6 +296,7 @@ $(srcdir)/%_protocol-structs: libvirt_driver_remote_la-%_protocol.lo $(srcdir)/virnetprotocol-structs: libvirt_net_rpc_la-virnetprotocol.lo $(PDWTAGS) $(srcdir)/virkeepaliveprotocol-structs: libvirt_net_rpc_la-virkeepaliveprotocol.lo + $(PDWTAGS) else !WITH_REMOTE # These generated files must live in git, because they cannot be re-generated # when configured --without-remote.
AKC Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Thu, Nov 24, 2011 at 13:25:14 +0000, Daniel P. Berrange wrote:
On Thu, Nov 24, 2011 at 02:18:48PM +0100, Jiri Denemark wrote:
This fixes make dist broken by recent keepalive series --- src/Makefile.am | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
AKC
Hmm, virkeepaliveprotocol-structs should have been part of this patch too. I added it and pushed. Thanks, Jirka

On 11/24/2011 06:18 AM, Jiri Denemark wrote:
This fixes make dist broken by recent keepalive series --- src/Makefile.am | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index e8f20de..33a32a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -247,14 +247,15 @@ EXTRA_DIST += $(REMOTE_DRIVER_PROTOCOL) \ # The alternation of the following regexps matches both cases. r1 = /\* \d+ \*/ r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/ +struct_prefix = (remote_|qemu_|virNet|keepalive_)
Nice factoring to avoid the long line. ACK.
-e 'END {' \ - -e ' if ($$n < 3) {' \ + -e ' if ($$n < 1) {' \ -e ' warn "WARNING: your pdwtags program is too old\n";' \
That's now a rather weak test, but I can't think of anything more reliable that doesn't also reject keepalive. Hmm, I wonder if I should add cppi and pdwtags to my list of required maintainer tools in this unreviewed patch: https://www.redhat.com/archives/libvir-list/2011-November/msg01052.html They would still be optional for tarball builds, of course, but having them required when doing autogen.sh on libvirt.git may help more developers catch problems up front. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Thu, Nov 24, 2011 at 06:26:50AM -0700, Eric Blake wrote:
On 11/24/2011 06:18 AM, Jiri Denemark wrote:
This fixes make dist broken by recent keepalive series --- src/Makefile.am | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index e8f20de..33a32a8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -247,14 +247,15 @@ EXTRA_DIST += $(REMOTE_DRIVER_PROTOCOL) \ # The alternation of the following regexps matches both cases. r1 = /\* \d+ \*/ r2 = /\* <[[:xdigit:]]+> \S+:\d+ \*/ +struct_prefix = (remote_|qemu_|virNet|keepalive_)
Nice factoring to avoid the long line.
ACK.
-e 'END {' \ - -e ' if ($$n < 3) {' \ + -e ' if ($$n < 1) {' \ -e ' warn "WARNING: your pdwtags program is too old\n";' \
That's now a rather weak test, but I can't think of anything more reliable that doesn't also reject keepalive.
Hmm, I wonder if I should add cppi and pdwtags to my list of required maintainer tools in this unreviewed patch: https://www.redhat.com/archives/libvir-list/2011-November/msg01052.html
They would still be optional for tarball builds, of course, but having them required when doing autogen.sh on libvirt.git may help more developers catch problems up front.
Wasn't the problem that cppi isn't universaly available ? If that's the case the status quo while a bit more painful for those whove have it, avoid a dependance needed to build and submit patches. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 11/24/2011 07:13 AM, Daniel Veillard wrote:
Hmm, I wonder if I should add cppi and pdwtags to my list of required maintainer tools in this unreviewed patch: https://www.redhat.com/archives/libvir-list/2011-November/msg01052.html
They would still be optional for tarball builds, of course, but having them required when doing autogen.sh on libvirt.git may help more developers catch problems up front.
Wasn't the problem that cppi isn't universaly available ? If that's the case the status quo while a bit more painful for those whove have it, avoid a dependance needed to build and submit patches.
Good point - while things like xmllint are available pre-built for RHEL 5, cppi and pdwtags are not, not even through EPEL. You've convinced me - keep cppi and pdwtags optional for now, until they are available as pre-built packages on all the major all Linux development platforms supported at the time. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (4)
-
Daniel P. Berrange
-
Daniel Veillard
-
Eric Blake
-
Jiri Denemark