Package: squid
Version: 2.6.5-4
Severity: important
Tags: patch
squid 2.6.5-4 fails to build from source on hurd-i386. The attached patch
allow squid to build successfully on hurd. There are some missing squid
features, like ARP ACL, wich currently is not supported by hurd.
Thanks
Matheus Morais
--- helpers/basic_auth/MSNT/allowusers.c 2002-06-26 16:09:48.000000000 -0300
+++ helpers/basic_auth/MSNT/allowusers.c 2007-01-30 14:35:02.000000000 -0200
@@ -20,6 +20,10 @@
static usersfile AllowUsers;
static int init = 0;
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
/* shared */
char Allowuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */
--- cfgaux/config.sub 2006-05-23 11:54:24.000000000 -0300
+++ cfgaux/config.sub 2007-01-30 12:06:51.000000000 -0200
@@ -118,7 +118,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova* | hurd*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -1140,7 +1140,8 @@
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* \
+ | -hurd)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
--- helpers/basic_auth/MSNT/confload.c 2002-06-26 16:09:48.000000000 -0300
+++ helpers/basic_auth/MSNT/confload.c 2007-01-30 14:35:29.000000000 -0200
@@ -32,6 +32,10 @@
#define MAXSERVERS 5
#define NTHOSTLEN 65
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
extern char Denyuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */
extern char Allowuserpath[MAXPATHLEN];
--- helpers/basic_auth/MSNT/denyusers.c 2002-06-26 16:09:48.000000000 -0300
+++ helpers/basic_auth/MSNT/denyusers.c 2007-01-30 14:24:07.000000000 -0200
@@ -21,6 +21,10 @@
static usersfile DenyUsers;
static int init = 0;
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
/* shared */
char Denyuserpath[MAXPATHLEN]; /* MAXPATHLEN defined in param.h */
--- debian/rules 2007-02-01 07:32:43.000000000 -0200
+++ debian/rules 2007-01-30 14:10:47.000000000 -0200
@@ -13,7 +13,15 @@
LC_ALL = POSIX
DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
-DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+# Take account of old dpkg-architecture output.
+ifeq ($(DEB_HOST_ARCH_OS),)
+ DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+ ifeq ($(DEB_HOST_ARCH_OS),gnu)
+ DEB_HOST_ARCH_OS := hurd
+ endif
+endif
CFLAGS = -Wall -g
INSTALL = install
@@ -65,7 +73,7 @@
DEFAULT_MIB_PATH=$(datadir)/mib.txt
# The HURD doesn't have pthreads yet.
-ifeq ($(DEB_HOST_ARCH_OS), gnu)
+ifeq ($(DEB_HOST_ARCH_OS), hurd)
with_pthreads = --enable-storeio=ufs,diskd,null
with_netfilter =
with_arp_acl =