[lsb-discuss] Problem with alien

Till Kamppeter till.kamppeter at gmail.com
Wed Apr 30 16:19:05 PDT 2008


Christopher N. Lawrence wrote:
> On Wed, Apr 30, 2008 at 5:05 PM, Till Kamppeter
> <till.kamppeter at gmail.com> wrote:
>> Wichmann, Mats D wrote:
>>  > Till Kamppeter wrote:
>>  >> Hi,
>>  >>
>>  >> I am currently rebuilding the driver packages which I have created for
>>  >> testing to get LSB 3.2 packages. They needed some changes, as in LSB
>>  >> 3.2 there is no buildenv chroot any more and so I have to build in the
>>  >> actual system.
>>  >
>>  > Hopefully this will be "g/buildenv chroot/s/any more/yet/"
>>  >
>>  >> But now it seems that I have hit a bug in alien. I cannot convert one
>>  >> package as alien is not generating the debian/changelog for it
>>  >> correctly.
>>  >
>>  > alien/dpkg is extraordinarily fussy about its changelog syntax (why?????
>>  > it's a freaking changelog, why should it kill a build?) and if you
>>  > expect to convert with alien you need to follow their syntax exactly.
>>  >
>>  > several of us have run in to, and been irritated, by this in the past.
>>  >
>>  > I can't tell you exactly what it thinks is wrong, and how to fix,
>>  > without seeing it (and maybe not even then).
>>  >
>>  >
>>
>>  You can download the package (both source and binary RPM) and its spec
>>  file via the links which I have posted in my original posting.
>>
>>  If anyone knows here how to make the %changelog correctly, please tell.
>>  Thanks.
> 
> [cc'd Joey Hess since this looks like a problem with alien]
> 
> dpkg per se doesn't care about changelog formats; I think it's
> dpkg-buildpackage that's choking (and it cares because that's how
> dpkg-buildpackage figures out what version number to give the
> package).  From my alien run and looking at the entrails left behind
> in /tmp, it looks like alien is not substituting the lines from the
> RPM changelog in the right place and this is confusing
> dpkg-buildpackage which expects saner/more consistent formatting these
> days than apparently it did in the past.
> 
> The simplest fix would be to comment out lines 339-340 of
> /usr/share/perl5/Alien/Package/Deb.pm; you could move them to before
> line 338 and possibly produce a better changelog but that might be
> fragile in some cases depending on how funky upstream RPM changelogs
> get (you'd want to make sure you don't have any lines in the RPM
> changelog that match the Debian 'end of changelog entry' magic).
> 
> (Joey: the relevant files are at
> http://www.linux-foundation.org/~till/tmp/ splix*)
> 

Thank you very much Chris, commenting out the two lines did the trick. 
For me this looks like an obvious bug, the text of the changelog is 
added after the line to close the entry and not before, as it should be.

The real fix would be to move line 339 and 340 before line 338 and in 
addition do the following search and replace on this->changelogtext:

this->changelogtext =~ s/^(\s+)--(\s+)/$1-$2/m;

This should eliminate "end of changelog entry" character of the lines of 
the inserted changelog text.

    Till



More information about the lsb-discuss mailing list