Bug#262611: FTBFS on GNU/Hurd (and GNU/k*BSD)

Robert Millan Robert Millan <rmh@debian.org>, 262611@bugs.debian.org
Sun, 01 Aug 2004 05:36:23 +0200


This is a multi-part MIME message sent by reportbug.

--===============1300756864==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: exim4
Severity: important
Tags: patch sid

The attached patch fixes FTBFS on GNU/Hurd and GNU/k*BSD. I had the GNU
definitions in sync with GNU/Linux's, and then copied them for GNU/k*BSD
with some modifications.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1-k7
Locale: LANG=ca_ES@euro, LC_CTYPE=ca_ES@euro (ignored: LC_ALL set to C)

--===============1300756864==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="exim4_4.34-4.diff"

diff -Nur exim4-4.34.old/debian/patches/37_kbsd-gnu.dpatch exim4-4.34/debian/patches/37_kbsd-gnu.dpatch
--- exim4-4.34.old/debian/patches/37_kbsd-gnu.dpatch	1970-01-01 01:00:00.000000000 +0100
+++ exim4-4.34/debian/patches/37_kbsd-gnu.dpatch	2004-08-01 04:25:49.000000000 +0200
@@ -0,0 +1,249 @@
+#! /bin/sh -e
+## 37_kbsd-gnu.dpatch by Robert Millan <rmh@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: GNU and GNU/k*BSD porting fixes.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+	-patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+	-unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+	*)
+		echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+		exit 1;;
+esac
+
+exit 0
+				    
+@DPATCH@
+diff -Nur exim4-4.34.old/OS/Makefile-GNU exim4-4.34/OS/Makefile-GNU
+--- exim4-4.34.old/OS/Makefile-GNU	2004-08-01 04:16:31.000000000 +0200
++++ exim4-4.34/OS/Makefile-GNU	2004-08-01 04:19:06.000000000 +0200
+@@ -1,6 +1,12 @@
+-# Exim: OS-specific make file for GNU/Hurd.
++# Exim: OS-specific make file for GNU and variants.
++
++HAVE_ICONV=yes
+ 
+ BASENAME_COMMAND=look_for_it
++CHOWN_COMMAND=look_for_it
++CHGRP_COMMAND=look_for_it
++
++CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ 
+ DBMLIB = -ldb
+ USE_DB = yes
+@@ -8,8 +14,6 @@
+ LIBS = -lnsl -lcrypt
+ LIBRESOLV = -lresolv
+ 
+-CFLAGS = -O2 -g -Wall
+-
+ X11=/usr/X11R6
+ XINCLUDE=-I$(X11)/include
+ XLFLAGS=-L$(X11)/lib
+@@ -17,6 +21,8 @@
+ 
+ EXIWHAT_PS_ARG=ax
+ EXIWHAT_EGREP_ARG='/exim( |$$)'
++EXIWHAT_MULTIKILL_CMD=killall
++EXIWHAT_MULTIKILL_ARG=exim4
+ EXIWHAT_KILL_SIGNAL=-USR1
+ 
+ # End
+diff -Nur exim4-4.34.old/OS/Makefile-GNUkFreeBSD exim4-4.34/OS/Makefile-GNUkFreeBSD
+--- exim4-4.34.old/OS/Makefile-GNUkFreeBSD	1970-01-01 01:00:00.000000000 +0100
++++ exim4-4.34/OS/Makefile-GNUkFreeBSD	2004-08-01 04:19:16.000000000 +0200
+@@ -0,0 +1,28 @@
++# Exim: OS-specific make file for GNU and variants.
++
++HAVE_ICONV=yes
++
++BASENAME_COMMAND=look_for_it
++CHOWN_COMMAND=look_for_it
++CHGRP_COMMAND=look_for_it
++
++CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
++
++DBMLIB = -ldb
++USE_DB = yes
++
++LIBS = -lnsl -lcrypt
++LIBRESOLV = -lresolv
++
++X11=/usr/X11R6
++XINCLUDE=-I$(X11)/include
++XLFLAGS=-L$(X11)/lib
++X11_LD_LIB=$(X11)/lib
++
++EXIWHAT_PS_ARG=ax
++EXIWHAT_EGREP_ARG='/exim( |$$)'
++EXIWHAT_MULTIKILL_CMD=killall
++EXIWHAT_MULTIKILL_ARG=exim4
++EXIWHAT_KILL_SIGNAL=-USR1
++
++# End
+diff -Nur exim4-4.34.old/OS/Makefile-GNUkNetBSD exim4-4.34/OS/Makefile-GNUkNetBSD
+--- exim4-4.34.old/OS/Makefile-GNUkNetBSD	1970-01-01 01:00:00.000000000 +0100
++++ exim4-4.34/OS/Makefile-GNUkNetBSD	2004-08-01 04:19:19.000000000 +0200
+@@ -0,0 +1,28 @@
++# Exim: OS-specific make file for GNU and variants.
++
++HAVE_ICONV=yes
++
++BASENAME_COMMAND=look_for_it
++CHOWN_COMMAND=look_for_it
++CHGRP_COMMAND=look_for_it
++
++CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
++
++DBMLIB = -ldb
++USE_DB = yes
++
++LIBS = -lnsl -lcrypt
++LIBRESOLV = -lresolv
++
++X11=/usr/X11R6
++XINCLUDE=-I$(X11)/include
++XLFLAGS=-L$(X11)/lib
++X11_LD_LIB=$(X11)/lib
++
++EXIWHAT_PS_ARG=ax
++EXIWHAT_EGREP_ARG='/exim( |$$)'
++EXIWHAT_MULTIKILL_CMD=killall
++EXIWHAT_MULTIKILL_ARG=exim4
++EXIWHAT_KILL_SIGNAL=-USR1
++
++# End
+diff -Nur exim4-4.34.old/OS/os.h-GNU exim4-4.34/OS/os.h-GNU
+--- exim4-4.34.old/OS/os.h-GNU	2004-08-01 04:16:31.000000000 +0200
++++ exim4-4.34/OS/os.h-GNU	2004-08-01 04:21:29.000000000 +0200
+@@ -1,13 +1,12 @@
+ /* Exim: OS-specific C header file for GNU/Hurd */
+ 
+ #define CRYPT_H
++#define GLIBC_IP_OPTIONS
+ #define HAVE_MMAP
++#define HAVE_BSD_GETLOADAVG
+ #define HAVE_SYS_VFS_H
+ #define NO_IP_VAR_H
+-#define NO_NET_IF_H
+-#define NO_FIND_INTERFACES
+-#define SETRLIMIT_NOT_SUPPORTED
+-#define GLIBC_IP_OPTIONS
++#define SIG_IGN_WORKS
+ 
+ #define F_FREESP     O_TRUNC
+ typedef struct flock flock_t;
+@@ -15,4 +14,6 @@
+ #define os_strsignal strsignal
+ #define OS_STRSIGNAL
+ 
++/* Hurd-specific bits below */
++
+ /* End */
+diff -Nur exim4-4.34.old/OS/os.h-GNUkFreeBSD exim4-4.34/OS/os.h-GNUkFreeBSD
+--- exim4-4.34.old/OS/os.h-GNUkFreeBSD	1970-01-01 01:00:00.000000000 +0100
++++ exim4-4.34/OS/os.h-GNUkFreeBSD	2004-08-01 04:20:31.000000000 +0200
+@@ -0,0 +1,22 @@
++/* Exim: OS-specific C header file for GNU/kFreeBSD */
++
++#define CRYPT_H
++#define GLIBC_IP_OPTIONS
++#define HAVE_MMAP
++#define HAVE_BSD_GETLOADAVG
++#define HAVE_SYS_VFS_H
++#define NO_IP_VAR_H
++#define SIG_IGN_WORKS
++
++#define F_FREESP     O_TRUNC
++typedef struct flock flock_t;
++
++#define os_strsignal strsignal
++#define OS_STRSIGNAL
++
++/* kFreeBSD-specific bits below */
++
++#define HAVE_SYS_MOUNT_H
++#define SIOCGIFCONF_GIVES_ADDR
++
++/* End */
+diff -Nur exim4-4.34.old/OS/os.h-GNUkNetBSD exim4-4.34/OS/os.h-GNUkNetBSD
+--- exim4-4.34.old/OS/os.h-GNUkNetBSD	1970-01-01 01:00:00.000000000 +0100
++++ exim4-4.34/OS/os.h-GNUkNetBSD	2004-08-01 04:20:31.000000000 +0200
+@@ -0,0 +1,22 @@
++/* Exim: OS-specific C header file for GNU/kNetBSD */
++
++#define CRYPT_H
++#define GLIBC_IP_OPTIONS
++#define HAVE_MMAP
++#define HAVE_BSD_GETLOADAVG
++#define HAVE_SYS_VFS_H
++#define NO_IP_VAR_H
++#define SIG_IGN_WORKS
++
++#define F_FREESP     O_TRUNC
++typedef struct flock flock_t;
++
++#define os_strsignal strsignal
++#define OS_STRSIGNAL
++
++/* kNetBSD-specific bits below */
++
++#define HAVE_SYS_MOUNT_H
++#define SIOCGIFCONF_GIVES_ADDR
++
++/* End */
+diff -Nur exim4-4.34.old/OS/os.h-Linux exim4-4.34/OS/os.h-Linux
+--- exim4-4.34.old/OS/os.h-Linux	2004-08-01 04:16:31.000000000 +0200
++++ exim4-4.34/OS/os.h-Linux	2004-08-01 04:20:31.000000000 +0200
+@@ -3,11 +3,22 @@
+ #define CRYPT_H
+ #define GLIBC_IP_OPTIONS
+ #define HAVE_MMAP
++#define HAVE_BSD_GETLOADAVG
+ #define HAVE_SYS_VFS_H
+ #define NO_IP_VAR_H
+-#define SIOCGIFCONF_GIVES_ADDR
+ #define SIG_IGN_WORKS
+ 
++#define F_FREESP     O_TRUNC
++typedef struct flock flock_t;
++
++#define os_strsignal strsignal
++#define OS_STRSIGNAL
++
++/* Linux-specific bits below */
++
++#define SIOCGIFCONF_GIVES_ADDR
++#define HAVE_SYS_MOUNT_H
++
+ /* Some versions of Linux need explicit sync-ing of directories as well as
+ files. This setting requests that. If the directory is on NFS, it may not
+ be possible to sync it - in that case, Exim now should ignore the error. But
+@@ -20,12 +31,6 @@
+ /* Other OS have "const" in here */
+ #define ICONV_ARG2_TYPE char **
+ 
+-#define F_FREESP     O_TRUNC
+-typedef struct flock flock_t;
+-
+-#define os_strsignal strsignal
+-#define OS_STRSIGNAL
+-
+ #define os_find_running_interfaces os_find_running_interfaces_linux
+ 
+ /* Need a prototype for the Linux-specific function. The structure hasn't
+@@ -34,4 +39,9 @@
+ struct ip_address_item;
+ extern struct ip_address_item *os_find_running_interfaces_linux(void);
+ 
++/* Fudge added because this Linux doesn't appear to have a definition
++for ip_options in /usr/include/linux/ip.h. */
++
++#define ip_options options
++
+ /* End */

--===============1300756864==--