Bug#656880: Hurd: make apr "work" better
Package: apr
Version: 1.4.5-1.1
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd
Hi,
at the moment, the shared memory and file locking parts of apr don't
work correctly on GNU/Hurd.
The problem is that there are some methods for shared memory and file
locking that are not implemented on Hurd, yet, causing failures in the
test suite (which is currently disabled for Hurd). Luckly, there are
few methods which actually work, so we can temporarly force their usage.
Furthermore, there is a small issue in the way arch-specific hints are
set, making the Hurd ones not used.
* hurd_fix-hints.diff
This patch, which could be sent upstream, fixes the set of predefined
hints for Hurd: usually the $host string is "i686-unknown-gnu0.3" or
"i486-pc-gnu", so the "GNU" string won't match anywhere; furthermore,
since the proposed string could be too broad (potentially matching
also the kFreeBSD string, e.g. "i686-unknown-kfreebsd8.2-gnu"), it has
been moved as very last check.
* hurd_shm_flock.diff
This patch disables all the methods for shared memory and file locking
found by the configure checks, forcing the only working ones.
This patch should stay Debian-specific, as it is not that suitable for
upstream inclusion. (As you can guess, ideally all of those
non-working methods should be ideally fixed in Hurd...)
* debian_enabletests.diff
This patch reenables the test suite on Hurd, which should pass now
with the above patches. (Note that testsockets will still fail, but
a testsockets+testsock run failure is ignored; the bug is a wrong
errno code set in hurd's version of socket() in glibc, and it has
been reported already.)
Thanks,
--
Pino
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -129,9 +129,6 @@
esac
APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_GNU_SOURCE])
;;
- *-GNU*)
- APR_ADDTO(CPPFLAGS, [-DHURD -D_GNU_SOURCE])
- ;;
*-lynx-lynxos)
APR_ADDTO(CPPFLAGS, [-D__NO_INCLUDE_WARN__ -DLYNXOS])
APR_ADDTO(LIBS, [-lbsd])
@@ -479,6 +476,9 @@
;;
esac
;;
+ *-*-gnu*)
+ APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_GNU_SOURCE])
+ ;;
esac
fi
--- a/configure.in
+++ b/configure.in
@@ -1189,6 +1189,13 @@
APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET_ANON)
;;
esac
+case $host_os in
+ gnu* )
+ haveshmgetanon="0"
+ havemmapanon="0"
+ APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_ZERO)
+ ;;
+esac
APR_END_DECISION
AC_DEFINE_UNQUOTED($ac_decision)
@@ -1257,6 +1264,13 @@
fi
;;
esac
+case $host_os in
+ gnu* )
+ havemmapshm="0"
+ haveshmget="0"
+ APR_DECISION_OVERRIDE(USE_SHMEM_MMAP_TMP)
+ ;;
+esac
APR_END_DECISION
AC_DEFINE_UNQUOTED($ac_decision)
@@ -2216,6 +2230,12 @@
if test "x$apr_lock_method" != "x"; then
APR_DECISION_FORCE($apr_lock_method)
fi
+case $host_os in
+ gnu* )
+ hasfcntlser="0"
+ APR_DECISION_OVERRIDE(USE_FLOCK_SERIALIZE)
+ ;;
+esac
APR_END_DECISION
AC_DEFINE_UNQUOTED($ac_decision)
--- a/debian/rules
+++ b/debian/rules
@@ -69,11 +69,6 @@
TEST_TARGET =
endif
-# disable tests on hurd until they are fixed (#530286)
-ifeq (hurd, $(DEB_BUILD_ARCH_OS))
- TEST_TARGET =
-endif
-
SHELL=/bin/bash
$(BUILDDIR)/config.status: patch-stamp
Reply to: