Ray's Blog

Sunday, June 1, 2008

Argh!

So my libyahoo2 package was finally approved for inclusion into Fedora. Branches were set up and I was ready to go; should be simple right? Not...

As soon as I imported my package I found out it wouldn't build in Fedora 9 or Fedora rawhide (Koji told me this). An examination of the logs showed some weird errors accessing a hostent struct. Upon examination of the source it seems that the Fedora 9 and later glibc headers have slightly changed the hostent struct. The old functionality is still available if your code is build using the _GNU_SOURCE define. D'oh!

I tested this and the code built find if I added -D_GNU_SOURCE to my Makefile. But what was the right way to get this into Fedora? I either had to make a patch for this against the libyahoo2 0.7.6 sources or get upstream to change this for me. Since I recently received access to libyahoo2 upstream I chose the latter.

The "right" way to do this seems to be to modify the configure.ac file to include a simple macro:

AC_GNU_SOURCE

So, with this completed, I proceeded to release libyahoo2 0.7.6.1. Which I'd totally forgotten how to do properly so this time I wrote up instructions in my wiki so next time I'd remember.

Finally I went to rebuild my RPM with the new version of libyahoo2. Bah, still fails! After more tinkering in my own mock setups I realized I needed to add a couple BuildRequires for glib2-devel and pkgconfig. I sent my changes to the Fedora CVS server and ran make build again. Failure once more. Seemingly on the same error... apparently Koji must cache based on tags. So I bumped the release version up by 1, re-tagged and rebuilt. Now everything works fine!

What an ordeal. :-)

Labels: ,