Package: bgpdump
Version: 1.4.99.15+hg127-1
Severity: normal
Tags: help patch

So bgpdump FTBFS on hurd and kbsd as it needs strlcat there without
declaring a dependency. The patch (debdiff) attached should fix this,
can someone with access to a hurd and/or kbsd box confirm?

    Christoph
diff -Nru bgpdump-1.4.99.15+hg127/debian/control 
bgpdump-1.4.99.15+hg127/debian/control
--- bgpdump-1.4.99.15+hg127/debian/control      2016-07-20 18:54:11.000000000 
+0200
+++ bgpdump-1.4.99.15+hg127/debian/control      2016-07-21 18:28:02.000000000 
+0200
@@ -5,6 +5,7 @@
 Build-Depends: debhelper (>= 9~),
     asciidoc,
     dh-autoreconf,
+    libbsd-dev,
     libbz2-dev,
     xmlto,
     zlib1g-dev,
diff -Nru bgpdump-1.4.99.15+hg127/debian/patches/re-autoconfig.patch 
bgpdump-1.4.99.15+hg127/debian/patches/re-autoconfig.patch
--- bgpdump-1.4.99.15+hg127/debian/patches/re-autoconfig.patch  2016-07-20 
22:35:16.000000000 +0200
+++ bgpdump-1.4.99.15+hg127/debian/patches/re-autoconfig.patch  2016-07-21 
18:28:02.000000000 +0200
@@ -22,7 +22,7 @@
 +      [ ! -d test_data ] || ./test.sh
 --- /dev/null
 +++ b/configure.ac
-@@ -0,0 +1,42 @@
+@@ -0,0 +1,43 @@
 +AC_REVISION([m4_esyscmd([dpkg-parsechangelog -SVersion])])
 +
 +AC_INIT([libbgpdump], 1.4.99.15, [r...@ripe.net])
@@ -50,6 +50,7 @@
 +
 +AC_CHECK_LIB(z, gzopen, [], AC_DEFINE(DONT_HAVE_GZ, 1, Define if libz not 
present))
 +AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], AC_DEFINE(DONT_HAVE_BZ2, 1, Define if 
libbzip2 not present))
++AC_CHECK_LIB(bsd, strlcat)
 +
 +# Check for inet_ntoa in -lnsl if not found (Solaris)
 +AC_CHECK_FUNCS(inet_ntoa, [], AC_CHECK_LIB(nsl, inet_ntoa, [], 
AC_MSG_ERROR([inet_ntoa not found],1)))
diff -Nru bgpdump-1.4.99.15+hg127/debian/patches/series 
bgpdump-1.4.99.15+hg127/debian/patches/series
--- bgpdump-1.4.99.15+hg127/debian/patches/series       2016-07-20 
18:38:12.000000000 +0200
+++ bgpdump-1.4.99.15+hg127/debian/patches/series       2016-07-21 
18:28:02.000000000 +0200
@@ -19,3 +19,4 @@
 
 # big test (see README.Debian)
 fix-test.patch
+use-strlcat.patch
diff -Nru bgpdump-1.4.99.15+hg127/debian/patches/use-strlcat.patch 
bgpdump-1.4.99.15+hg127/debian/patches/use-strlcat.patch
--- bgpdump-1.4.99.15+hg127/debian/patches/use-strlcat.patch    1970-01-01 
01:00:00.000000000 +0100
+++ bgpdump-1.4.99.15+hg127/debian/patches/use-strlcat.patch    2016-07-21 
18:28:02.000000000 +0200
@@ -0,0 +1,33 @@
+Description: Use strlcat provided by libbsd
+Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de>
+Forwarded: No
+Last-Update: 2016-07-21
+
+--- a/bgpdump_lib.c
++++ b/bgpdump_lib.c
+@@ -37,6 +37,7 @@
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
++#include <bsd/string.h>
+ 
+ #include <zlib.h>
+ #include <assert.h>
+@@ -78,7 +79,7 @@
+ 
+ BGPDUMP_TABLE_DUMP_V2_PEER_INDEX_TABLE *table_dump_v2_peer_index_table = NULL;
+ 
+-#if defined(linux)
++#if 0
+ static    size_t strlcat(char *dst, const char *src, size_t size);
+ #endif
+ 
+@@ -1482,7 +1483,7 @@
+   }
+ }
+ 
+-#if defined(linux)
++#if 0
+ size_t strlcat(char *dst, const char *src, size_t size) {
+   if (strlen (dst) + strlen (src) >= size)
+     return -1;

Attachment: signature.asc
Description: Digital signature

Reply via email to