problem packaging Net::TFTP for fedora 13 amd64

Discussion in 'Perl Misc' started by Natxo, Oct 24, 2010.

  1. Natxo

    Natxo Guest

    hi,

    Fedora 13 does not have the Net::TFTP module in their repositories, so I
    am using cpanspec to try to build a rpm module. I follow the
    instructions on http://fedoraproject.org/wiki/Perl/cpanspec

    I then run this:

    $ cpanspec -v Net::TFTP --packager 'Natxo Asenjo <>'
    --srpm
    Updating
    /home/user/.cpan/sources/modules/02packages.details.txt.gz...
    Fetching /home/user/.cpan/sources/modules/02packages.details.txt.gz
    from http://www.cpan.org/modules/02packages.details.txt.gz...
    Fetching Net-TFTP-0.18.tar.gz from
    http://www.cpan.org/authors/id/G/GB/GBARR/Net-TFTP-0.18.tar.gz...
    Trying to fetch description from Net-TFTP-0.18/TFTP.pm...
    Writing perl-Net-TFTP.spec...
    Building source rpm from perl-Net-TFTP.spec
    Wrote: /home/user/perl/build/perl-Net-TFTP-0.18-1.fc13.src.rpm

    So I get a source rpm file. When I try to rebuild it:

    $ rpmbuild --rebuild perl-Net-TFTP-0.18-1.fc13.src.rpm
    Installing perl-Net-TFTP-0.18-1.fc13.src.rpm
    error: Failed build dependencies:
    perl(Test::More) >= 0.8701 is needed by
    perl-Net-TFTP-0.18-1.fc13.noarch

    But the Test::More version is bigger than that:

    $ perl -MTest::More\ 9999
    Test::More version 9999 required--this is only version 0.94.
    BEGIN failed--compilation aborted.

    Any idea why?

    TIA,
    --
    Groeten,
    Natxo Asenjo
    Natxo, Oct 24, 2010
    #1
    1. Advertising

  2. On 2010-10-24 13:21, Natxo <> wrote:
    > Fedora 13 does not have the Net::TFTP module in their repositories, so I
    > am using cpanspec to try to build a rpm module. I follow the
    > instructions on http://fedoraproject.org/wiki/Perl/cpanspec

    [...]
    > $ rpmbuild --rebuild perl-Net-TFTP-0.18-1.fc13.src.rpm
    > Installing perl-Net-TFTP-0.18-1.fc13.src.rpm
    > error: Failed build dependencies:
    > perl(Test::More) >= 0.8701 is needed by
    > perl-Net-TFTP-0.18-1.fc13.noarch
    >
    > But the Test::More version is bigger than that:
    >
    > $ perl -MTest::More\ 9999
    > Test::More version 9999 required--this is only version 0.94.
    > BEGIN failed--compilation aborted.
    >
    > Any idea why?


    The versioning schemes of RPM and Perl are incompatible. Perl version
    numbers are simple floating point numbers, so 0.94 > 0.8701. But RPM
    version numbers consist of segments which are compared indvidually from
    left to right. Since 0 = 0 and 94 < 8701, 0.94 is less than 0.8701.

    This means that when packaging Perl modules as RPMs, one may have to
    adjust the number of digits in version numbers. If there was a version
    0.8701 and the new version is 0.94, it must be written as 0.9400 to be
    larger than the old version. Or you could change the dependency in the
    ..spec file from 0.8701 to 0.87.01 so that it is less than 0.94.

    In any case you have to inspect the version numbers of the RPM packages
    not the Perl modules, to see what scheme is used by Fedora.

    hp
    Peter J. Holzer, Oct 24, 2010
    #2
    1. Advertising

  3. Natxo

    J.I. Asenjo Guest

    On 2010-10-24, Peter J. Holzer <> wrote:

    > This means that when packaging Perl modules as RPMs, one may have to
    > adjust the number of digits in version numbers. If there was a version
    > 0.8701 and the new version is 0.94, it must be written as 0.9400 to be
    > larger than the old version. Or you could change the dependency in the
    > .spec file from 0.8701 to 0.87.01 so that it is less than 0.94.


    ok, I changed that in the spec file and it works. Thanks for the
    pointer.

    > In any case you have to inspect the version numbers of the RPM packages
    > not the Perl modules, to see what scheme is used by Fedora.


    Yes, that will be the correct way for future packages. I need to read up
    on rpm packaging now.

    Thanks again.
    --
    Groeten,
    Natxo Asenjo
    J.I. Asenjo, Oct 24, 2010
    #3
  4. version numbers (was: problem packaging Net::TFTP for fedora 13amd64)

    On 2010-10-24 21:31, Ben Morrow <> wrote:
    >
    > Quoth "Peter J. Holzer" <>:
    >>
    >> The versioning schemes of RPM and Perl are incompatible. Perl version
    >> numbers are simple floating point numbers,

    >
    > Ahahahahaha. Would that it were so.


    I left out v-strings, since I think they weren't relevant to the OP's
    question.

    In the case of Test::More (and many other modules on CPAN), v-strings
    also don't capture the intent of the author. If you have two version
    numbers like "0.8701" and "0.94", I think it is clear that the author
    intended that to mean "version 0, subversion 87, subsubversion 1" and
    "version 0, subversion 94", respectively. But 0.8701 is equivalent to
    v0.870.100 and 0.94 is equivalent to v.940.0. Fortunately, for
    comparison purposes, it doesn't make any difference.

    BTW, there's an error in perldoc version. It says (at least until
    5.12.1):

    $v1 = version->parse("v0.95.0");
    $bool = $v1 < 0.96; # FALSE since 0.96 is v0.960.0

    The comment should read "TRUE since 0.96 is v0.960.0", but of course
    that isn't surprising. A better example would be

    $v1 = version->parse("v0.97.0");
    $bool = $v1 < 0.96; # TRUE since 0.96 is v0.960.0


    > Presumably you haven't come across the 'delights' of version.pm yet?


    I know about v-strings, the _ convention for alpha versions on CPAN,
    etc. But so far it hasn't caused me any trouble.

    hp
    Peter J. Holzer, Oct 25, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TFTP client in python

    , Jul 14, 2006, in forum: Python
    Replies:
    3
    Views:
    2,781
    Stefan Behnel
    Jul 14, 2006
  2. msoulier
    Replies:
    1
    Views:
    361
    msoulier
    Oct 5, 2006
  3. John Nagle
    Replies:
    15
    Views:
    519
    John J. Lee
    Mar 11, 2007
  4. Heinrich Piard

    Cisco tftp upload via snmpset

    Heinrich Piard, Jul 23, 2008, in forum: Ruby
    Replies:
    0
    Views:
    312
    Heinrich Piard
    Jul 23, 2008
  5. Chris G.
    Replies:
    1
    Views:
    122
    Ted Zlatanov
    Jul 21, 2006
Loading...

Share This Page