Bug#874301: libgtop2: FTBFS on kFreeBSD: strlcpy undefined

2019-08-10 Thread dai
Hi,

Control: tags -1 + patch

fix patch attached. tested via porterbox.
-- 
Regards,
dai

GPG Fingerprint = 0B29 D88E 42E6 B765 B8D8 EA50 7839 619D D439 668E
diff -Nru libgtop2-2.38.0/debian/changelog libgtop2-2.38.0/debian/changelog
--- libgtop2-2.38.0/debian/changelog	2018-12-28 12:58:54.0 +0900
+++ libgtop2-2.38.0/debian/changelog	2019-08-10 21:46:38.0 +0900
@@ -1,3 +1,13 @@
+libgtop2 (2.38.0-4.1) unstable; urgency=medium
+
+  [ HIGUCHI Daisuke (VDR dai) ]
+  * Non-maintainer upload.
+  * Fix FTBFS on kFreeBSD: strlcpy undefined (Closes: #874301)
+- d/p/05_kfreebsd_strlcpy.patch: use strlcpy of FreeBSD's libc.
+- d/rules: add -lbsd to LDFLAGS if kFreeBSD.
+
+ -- HIGUCHI Daisuke (VDR dai)   Sat, 10 Aug 2019 21:46:38 +0900
+
 libgtop2 (2.38.0-4) unstable; urgency=medium
 
   [ Andrea Azzarone ]
diff -Nru libgtop2-2.38.0/debian/patches/05_kfreebsd_strlcpy.patch libgtop2-2.38.0/debian/patches/05_kfreebsd_strlcpy.patch
--- libgtop2-2.38.0/debian/patches/05_kfreebsd_strlcpy.patch	1970-01-01 09:00:00.0 +0900
+++ libgtop2-2.38.0/debian/patches/05_kfreebsd_strlcpy.patch	2019-08-10 21:46:24.0 +0900
@@ -0,0 +1,20 @@
+Description: use strlcpy of FreeBSD's libc
+Author: HIGUCHI Daisuke (VDR dai) 
+Bug-Debian: https://bugs.debian.org/874301
+Last-Update: 2019-08-10
+
+Index: libgtop2-2.38.0/sysdeps/freebsd/netload.c
+===
+--- libgtop2-2.38.0.orig/sysdeps/freebsd/netload.c
 libgtop2-2.38.0/sysdeps/freebsd/netload.c
+@@ -36,6 +36,10 @@
+ #include 
+ #include 
+ 
++#ifdef __FreeBSD__
++#include 
++#endif
++
+ static const unsigned long _glibtop_sysdeps_netload =
+ (1L << GLIBTOP_NETLOAD_IF_FLAGS) +
+ (1L << GLIBTOP_NETLOAD_MTU) +
diff -Nru libgtop2-2.38.0/debian/patches/series libgtop2-2.38.0/debian/patches/series
--- libgtop2-2.38.0/debian/patches/series	2018-12-28 12:58:54.0 +0900
+++ libgtop2-2.38.0/debian/patches/series	2019-08-10 21:46:31.0 +0900
@@ -1,3 +1,4 @@
 03_kfreebsd_installdirs.patch
 04_kfreebsd_version.patch
 mountlist-ignore-snap-squashfs.patch
+05_kfreebsd_strlcpy.patch
diff -Nru libgtop2-2.38.0/debian/rules libgtop2-2.38.0/debian/rules
--- libgtop2-2.38.0/debian/rules	2018-12-28 12:58:54.0 +0900
+++ libgtop2-2.38.0/debian/rules	2019-08-10 21:44:29.0 +0900
@@ -7,6 +7,7 @@
 
 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
 CPPFLAGS += $(shell pkg-config --cflags libbsd-overlay)
+LDFLAGS += -lbsd
 endif
 
 %:


signature.asc
Description: PGP signature


Bug#874301: libgtop2: FTBFS on kFreeBSD: strlcpy undefined

2017-09-04 Thread Aaron M. Ucko
Jeremy Bicha  writes:

> I'm not set up to test builds for those architectures.

Neither am I, except via porter boxes; I just like to make sure that
build failures involving NEW binary packages don't slip through the
cracks.  Any of these changes should be a small formal fix, though.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#874301: libgtop2: FTBFS on kFreeBSD: strlcpy undefined

2017-09-04 Thread Jeremy Bicha
On Mon, Sep 4, 2017 at 3:57 PM, Aaron M. Ucko  wrote:
> strlcpy may be part of FreeBSD's libc, but GNU libc (as used by
> kFreeBSD leaves it out); please either substitute a different
> function, supply a fallback definition, or build against libbsd-dev.

Do you want to submit a patch to do that?

I'm not set up to test builds for those architectures.

Thanks,
Jeremy Bicha



Bug#874301: libgtop2: FTBFS on kFreeBSD: strlcpy undefined

2017-09-04 Thread Aaron M. Ucko
Source: libgtop2
Version: 2.37.90-2
Severity: important
Tags: upstream
Justification: fails to build from source (but built successfully in the past)

Builds of libgtop2 for kfreebsd-amd64 and kfreebsd-i386 (not release
architectures, admittedly) have been failing:

  ./sysdeps/freebsd/netload.c:109: undefined reference to `strlcpy'
  ./sysdeps/freebsd/netload.c:122: undefined reference to `strlcpy'

strlcpy may be part of FreeBSD's libc, but GNU libc (as used by
kFreeBSD leaves it out); please either substitute a different
function, supply a fallback definition, or build against libbsd-dev.

Thanks!

FTR, hurd-i386 isn't a release architecture either; sorry for
neglecting to note that in #847294.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu