Bug#502518: libnet-ssleay-perl: FTBFS on GNU/kFreeBSD

Petr Salinger Petr.Salinger at seznam.cz
Fri Oct 17 09:08:19 UTC 2008


Package: libnet-ssleay-perl
Severity: important
Version: 1.35-1
Tags: patch
User: glibc-bsd-devel at lists.alioth.debian.org
Usertags: kfreebsd

Hi,

the current version fails to build on GNU/kFreeBSD.

It is due to failed tests. Unfortunately, tests assume
some variant of "struct sockaddr". This variant is not
used on BSD* systems. The linux one have at the beginning 
"short family", but BSD* systems have "char length; char family".

It looks like it would be better to use sockaddr_in() for constructing
needed parameters. With the patch bellow the test suite passes on 
GNU/kFreeBSD.

It would be nice if you can inform upstream about this problem,
there are also needed similar changes in examples.

Alternatively, could you make failed tests non fatal on non-linux 
architectures.

Thanks in advance

                         Petr

only in patch2:
unchanged:
--- libnet-ssleay-perl-1.35.orig/t/local/06_tcpecho.t
+++ libnet-ssleay-perl-1.35/t/local/06_tcpecho.t
@@ -15,7 +15,7 @@

  {
      my $ip = "\x7F\0\0\x01";
-    my $serv_params = pack('S n a4 x8', AF_INET, $port, $ip);
+    my $serv_params = sockaddr_in($port, $ip);
      $sock = gensym();
      socket($sock, AF_INET, SOCK_STREAM, 0) or die;
      bind($sock, $serv_params) or die;
only in patch2:
unchanged:
--- libnet-ssleay-perl-1.35.orig/t/local/07_sslecho.t
+++ libnet-ssleay-perl-1.35/t/local/07_sslecho.t
@@ -13,7 +13,7 @@

  my $port = 1212;
  my $dest_ip = gethostbyname('localhost');
-my $dest_serv_params  = pack ('S n a4 x8', AF_INET, $port, $dest_ip);
+my $dest_serv_params  = sockaddr_in($port,  $dest_ip);

  my $msg = 'ssleay-test';
  my $cert_pem = File::Spec->catfile('t', 'data', 'cert.pem');
@@ -31,7 +31,7 @@

  {
      my $ip = "\x7F\0\0\x01";
-    my $serv_params = pack ('S n a4 x8', AF_INET, $port, $ip);
+    my $serv_params = sockaddr_in($port, $ip);
      $sock = gensym();
      socket($sock, AF_INET, SOCK_STREAM, 0) or BAIL_OUT("failed to open socket: $!");
      bind($sock, $serv_params) or BAIL_OUT("failed to bind socket: $!");






More information about the pkg-perl-maintainers mailing list