[libvirt] [PATCH] Remove all generated RPC files from GIT

Daniel P. Berrange berrange at redhat.com
Mon May 9 09:21:47 UTC 2011


On Fri, May 06, 2011 at 10:11:48AM -0600, Eric Blake wrote:
> On 05/06/2011 07:11 AM, Daniel P. Berrange wrote:
> > commit 7a2fd256cb85dd9a9d6640d9faed0b66ca617411
> > Author: Daniel P. Berrange <berrange at redhat.com>
> > Date:   Fri May 6 13:36:21 2011 +0100
> > 
> >     Remove all generated files for remote protocol
> >     
> >     Stop storing the generated files for the remote protocol client
> >     and server in source control. The generated files will still be
> >     included in the result of 'make dist' to avoid end-users needing
> >     to generate the files
> >     
> >     * daemon/Makefile.am: Removed generated files with
> >       maintainer-clean target
> >     * src/Makefile.am: Removed generated files with
> >       maintainer-clean target. Always run 'rpcgen' if
> >       generated files are missing
> > 
> > 
> > NB: hand edited diff to remove the huge deleted files
> 
> Thanks for doing that.  However, it means that 'git am' didn't like this
> patch, so I hope I tested it correctly.  At any rate, after applying
> your patch, removing the generated files, then running 'make dist', and
> comparing that to a 'make dist' pre-patch, the minor differences were
> all expected (in the Makefiles, not in the generated files).
> 
> 
> > +++ b/src/remote/rpcgen_fix.pl
> > @@ -1,4 +1,6 @@
> > -# Fix XDR code (generated by rpcgen) so that it compiles
> > +# 
> > +# Generate code for an XDR protocol, optionally applying
> > +# fixups to the glibc rpcgen code so that it compiles
> >  # with warnings turned on.
> >  #
> >  # This code is evil.  Arguably better would be just to compile
> > @@ -17,10 +19,35 @@ use strict;
> >  my $in_function = 0;
> >  my @function = ();
> >  
> > -while (<>) {
> > +my $rpcgen = shift;
> > +my $mode = shift;
> > +my $xdrdef = shift;
> > +my $target = shift;
> > +
> > +unlink $target;
> > +
> > +open RPCGEN, "-|", $rpcgen, $mode, $xdrdef
> > +    or die "cannot run $rpcgen $mode $xdrdef: $!";
> > +open TARGET, ">$target"
> > +    or die "cannot create $target: $!";
> > +
> > +my $fixup = $^O eq "linux";
> 
> I guess I'll see what happens when I try this on Cygwin, but if there
> are any followups needed, it should be separate patches.  As is, cygwin
> already can't use -Werror because of repetitive  declarations in the
> tirpc headers that trigger one of our default set of gcc warnings.

This shouldn't make Cygwin any worse should it ?  We don't support
running bootstrap on Win32 at all, only building from a dist. So
they'd not be running rpcgen

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 :|




More information about the libvir-list mailing list