Bug 894545

Summary: libguestfs FTBFS on Fedora 19 because of new ruby
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mbooth, mtasaka, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-18 06:49:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for rake 10.0.3 none

Description Richard W.M. Jones 2013-01-12 01:42:11 UTC
Description of problem:

Making all in ruby
make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.21.2/ruby'
make -C ../generator stamp-generator
make[3]: Entering directory `/builddir/build/BUILD/libguestfs-1.21.2/generator'
make[3]: `stamp-generator' is up to date.
make[3]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2/generator'
rake build
rake aborted!
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.
/builddir/build/BUILD/libguestfs-1.21.2/ruby/Rakefile:20:in `<top (required)>'
(See full trace by running task with --trace)
make[2]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2/ruby'
make[2]: *** [all] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2'
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Version-Release number of selected component (if applicable):

libguestfs 1.21.2 + Fedora 19

Comment 1 Mamoru TASAKA 2013-01-12 13:25:28 UTC
Created attachment 677297 [details]
Patch for rake 10.0.3

The issue you see with rawhide rubygem-rake (10.0.3) should be resolved with the attached patch.

Unfortunately now build fails with something related to ocaml:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4862774

make[2]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2/perl/examples'
Making all in ocaml
make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.21.2/ocaml'
Makefile:1904: *** unterminated variable reference.  Stop.
make[2]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2/ocaml'
make[1]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2'
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.7Yr8hq (%build)
    Bad exit status from /var/tmp/rpm-tmp.7Yr8hq (%build)

However it seems I cannot reproduce this on local mockbuild??

Comment 2 Richard W.M. Jones 2013-01-13 05:53:51 UTC
Thanks -- setting NEEDINFO of me to look at this when I
get back from holiday later this week.

Comment 3 Richard W.M. Jones 2013-01-16 14:02:51 UTC
(In reply to comment #1)
> Created attachment 677297 [details]
> Patch for rake 10.0.3
> 
> The issue you see with rawhide rubygem-rake (10.0.3) should be resolved with
> the attached patch.

When I came to look at the attachment, I notice it doesn't
seem to contain the patch itself (just a patch applying
the unseen patch to libguestfs.spec).  Could you attach the
patch to this bug please.

> Unfortunately now build fails with something related to ocaml:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4862774
> 
> make[2]: Leaving directory
> `/builddir/build/BUILD/libguestfs-1.21.2/perl/examples'
> Making all in ocaml
> make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.21.2/ocaml'
> Makefile:1904: *** unterminated variable reference.  Stop.

I don't see this error.  And line 1904 in my ocaml/Makefile
seems innocuous.  I don't see how it could cause the error.
Do you have ocaml & ocaml-ocamlfind-devel installed?

Comment 4 Mamoru TASAKA 2013-01-16 14:36:12 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Created attachment 677297 [details]
> > Patch for rake 10.0.3
> > 
> > The issue you see with rawhide rubygem-rake (10.0.3) should be resolved with
> > the attached patch.
> 
> When I came to look at the attachment, I notice it doesn't
> seem to contain the patch itself (just a patch applying
> the unseen patch to libguestfs.spec).  Could you attach the
> patch to this bug please.

Please check
https://bugzilla.redhat.com/attachment.cgi?id=677297
not
https://bugzilla.redhat.com/attachment.cgi?id=677297&action=diff
(well, action=diff on bugzilla is not smart... I always see
 raw patch)

> > Unfortunately now build fails with something related to ocaml:
> > http://koji.fedoraproject.org/koji/taskinfo?taskID=4862774
> > 
> > make[2]: Leaving directory
> > `/builddir/build/BUILD/libguestfs-1.21.2/perl/examples'
> > Making all in ocaml
> > make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.21.2/ocaml'
> > Makefile:1904: *** unterminated variable reference.  Stop.
> 
> I don't see this error.  And line 1904 in my ocaml/Makefile
> seems innocuous.  I don't see how it could cause the error.
> Do you have ocaml & ocaml-ocamlfind-devel installed?

As I wrote in comment 1, this is
http://koji.fedoraproject.org/koji/taskinfo?taskID=4862774 
http://kojipkgs.fedoraproject.org//work/tasks/2775/4862775/root.log
has ocaml & ocaml-ocamlfind-devel and
http://kojipkgs.fedoraproject.org//work/tasks/2775/4862775/build.log
contains this.

Comment 5 Richard W.M. Jones 2013-01-16 14:36:54 UTC
OK I've come up with a patch which appears to fix this,
while hopefully remaining backwards compatible:

https://github.com/libguestfs/libguestfs/commit/a0e9d310d1a2bd725c762a485f2b72761bac35df

Comment 6 Richard W.M. Jones 2013-01-16 14:38:22 UTC
I think my patch is more general than yours, since it should
allow this to work with ancient versions of ruby as well.  This
is a concern since we also build libguestfs on RHEL 5.

However for some reason I didn't need to do (the equivalent of)
this in my version:

+-Rake::RDocTask.new(:ri) do |rd|
++RDoc::Task.new(:ri) do |rd|

Comment 7 Mamoru TASAKA 2013-01-16 15:00:42 UTC
(In reply to comment #6)
> I think my patch is more general than yours, since it should
> allow this to work with ancient versions of ruby as well.  This
> is a concern since we also build libguestfs on RHEL 5.

Well, as libguestfs.spec already uses one F-17+ specific patch,
I thought I need not write so (anyway it is up to you)

> 
> However for some reason I didn't need to do (the equivalent of)
> this in my version:
> 
> +-Rake::RDocTask.new(:ri) do |rd|
> ++RDoc::Task.new(:ri) do |rd|

Oh, (I found that) rubygem-rdoc 3.12 still supports this (comment says "For backwards compatibility"), so for now Rake::RDocTask can be used. I think anyway trying RDoc::Task first is better, however this is also up to you.

Comment 8 Richard W.M. Jones 2013-01-17 11:38:28 UTC
(In reply to comment #1)
> Unfortunately now build fails with something related to ocaml:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4862774
> 
> make[2]: Leaving directory
> `/builddir/build/BUILD/libguestfs-1.21.2/perl/examples'
> Making all in ocaml
> make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.21.2/ocaml'
> Makefile:1904: *** unterminated variable reference.  Stop.
> make[2]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2/ocaml'
> make[1]: Leaving directory `/builddir/build/BUILD/libguestfs-1.21.2'
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> RPM build errors:
> error: Bad exit status from /var/tmp/rpm-tmp.7Yr8hq (%build)
>     Bad exit status from /var/tmp/rpm-tmp.7Yr8hq (%build)
> 
> However it seems I cannot reproduce this on local mockbuild??

Now I see this as well ...  but same as you, only in Koji,
not in local builds on F19.  Looking into it.  It may be a
missing dependency.

Comment 9 Richard W.M. Jones 2013-01-17 12:50:11 UTC
This is a bug in automake.  I filed a bug which should
appear here at some point in the near future:

http://lists.gnu.org/archive/html/bug-automake/2013-01/threads.html

Comment 10 Richard W.M. Jones 2013-01-18 06:49:08 UTC
I've fixed the Ruby problem and the automake problem.  I'm
still trying to wrangle a build (there seem to be further
bugs) so libguestfs is still temporarily FTBFS on Rawhide,
but this bug at least has been fixed.

Should get a build working today ...

Comment 11 Fedora Update System 2013-02-16 09:25:37 UTC
libguestfs-1.20.2-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/libguestfs-1.20.2-5.fc18

Comment 12 Fedora Update System 2013-02-26 02:50:20 UTC
libguestfs-1.20.2-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.