[Pkg-vsquare-devel] Bug#745430: vde2: FTBFS on hurd-any

Gabriele Giacone 1o5g4r8o at gmail.com
Mon Apr 21 15:34:31 UTC 2014


Package: vde2
Version: 2.3.2-4
Severity: wishlist
Tags: patch
User: debian-hurd at lists.debian.org
Usertags: hurd

Attached debdiff fixes FTBFS on Hurd.

Thanks for considering.


-- System Information:
Debian Release: jessie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable'), (1, 'experimental')
Architecture: hurd-i386 (i686-AT386)

Kernel: GNU-Mach 1.4-486-dbg/Hurd-0.5
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
diff -u vde2-2.3.2/debian/patches/series vde2-2.3.2/debian/patches/series
--- vde2-2.3.2/debian/patches/series
+++ vde2-2.3.2/debian/patches/series
@@ -4,0 +5 @@
+compile_with_hurd.patch
only in patch2:
unchanged:
--- vde2-2.3.2.orig/debian/patches/compile_with_hurd.patch
+++ vde2-2.3.2/debian/patches/compile_with_hurd.patch
@@ -0,0 +1,110 @@
+Description: Fix FTBFS on hurd-i386, PATH_MAX and MAXSYMLINKS are not defined
+ on Hurd. maxsymlinks() from [0] by Justus Winter
+ [0] http://anonscm.debian.org/gitweb/?p=collab-maint/sysvinit;a=commitdiff;h=b2db6477ee38490a593b14d5ae20f1bef86e65d2
+Author: Gabriele Giacone <1o5g4r8o at gmail.com>, Justus Winter <4winter at informatik.uni-hamburg.de>
+
+--- a/src/common/canonicalize.c
++++ b/src/common/canonicalize.c
+@@ -32,6 +32,24 @@
+ #include <stddef.h>
+ #include <config.h>
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
++/*
++ * Get the maximal number of symlinks to follow.
++ */
++
++static int maxsymlinks(void)
++{
++	int v = sysconf(_SC_SYMLOOP_MAX);
++#ifdef MAXSYMLINKS
++	if (v == -1)
++		return MAXSYMLINKS;
++#endif
++	return v;
++}
++
+ /*
+  * Return the canonical absolute name of file NAME.  A canonical name does not
+  * contain any `.', `..' components nor any repeated path separators ('/') or
+@@ -162,7 +180,7 @@ char *vde_realpath(const char *name, cha
+ 				{
+ 					size_t len;
+ 
+-					if (++num_links > MAXSYMLINKS)
++					if (++num_links > maxsymlinks())
+ 					{
+ 						errno = ELOOP;
+ 						goto abort;
+--- a/include/vdeplugin.h
++++ b/include/vdeplugin.h
+@@ -124,4 +124,8 @@ void qtime_csexit();
+ unsigned int qtimer_add(time_t period,int times,void (*call)(),void *arg);
+ void qtimer_del(unsigned int n);
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ #endif
+--- a/include/vde.h
++++ b/include/vde.h
+@@ -24,4 +24,8 @@
+  */
+ #define VDE_PQ
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ #endif
+--- a/src/vde_plug2tap.c
++++ b/src/vde_plug2tap.c
+@@ -242,6 +242,7 @@ static ssize_t vde_plug2tap_recv(void *o
+ 
+ int main(int argc, char **argv)
+ {
++#ifndef VDE_GNU
+ 	static char *sockname=NULL;
+ 	static char *tapname=NULL;
+ 	int daemonize=0;
+@@ -392,4 +393,5 @@ int main(int argc, char **argv)
+ 
+ 	}
+ 	return(0);
++#endif
+ }
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -309,6 +309,9 @@
+ /* If defined, this is a kFreeBSD system */
+ #undef VDE_KFREEBSD
+ 
++/* If defined, this is a Hurd system */
++#undef VDE_GNU
++
+ /* If defined, this is a Linux system */
+ #undef VDE_LINUX
+ 
+--- a/configure
++++ b/configure
+@@ -17062,9 +17062,14 @@ $as_echo "#define VDE_KFREEBSD 1" >>conf
+ $as_echo "#define VDE_FREEBSD 1" >>confdefs.h
+ 
+   ;;
++  gnu*)
++
++$as_echo "#define VDE_GNU 1" >>confdefs.h
++
++  ;;
+   *)
+-    as_fn_error $? "Unsupported OS: $build_os. At the moment, only Linux, Darwin
+-and FreeBSD are supported. Contributions are appreciated! :-)" "$LINENO" 5
++    as_fn_error $? "Unsupported OS: $build_os. At the moment, only Linux, Darwin,
++FreeBSD and Hurd are supported. Contributions are appreciated! :-)" "$LINENO" 5
+   ;;
+ esac
+ 


More information about the Pkg-vsquare-devel mailing list