tags 328209 + patch found 328209 0.30.208-3 thanks Hi!
The current way of detecting the syscall number is broken for any build done without a patched kernel. This doesn't show up on i386 as the configure script use it as by default. Attached is a patched which modifies the configure.ac (and required files) by using the vserver.h found upstream [1]. The buildd should then be able to detect the correct syscall number. For clarity, the patch only provides the needed changes to autotools source files: "autoreconf" needs to be called to regenerated the configure script and other files. [1] http://vserver.13thfloor.at/Experimental/SYSCALL/vserver.h Regards, -- Jérémy
diff -urN util-vserver-0.30.208.orig/configure.ac util-vserver-0.30.208/configure.ac
--- util-vserver-0.30.208.orig/configure.ac 2005-07-15 22:25:06.000000000 +0200
+++ util-vserver-0.30.208/configure.ac 2005-10-27 02:08:20.000000000 +0200
@@ -251,7 +251,7 @@
dnl ##########################
-ENSC_SYSCALLNR(vserver,273)
+AC_VSERVER_SYSCALLNR
ENSC_SYSCALL
ENSC_CHECK_EXT2FS_HEADER
AC_CHECK_FUNCS([vserver])
@@ -339,7 +339,7 @@
Available APIs: $enable_apis
ext2fs Source: $ensc_cv_test_ext2fs_header
syscall(2) invocation: $with_syscall
- vserver(2) syscall#: $ensc_cv_value_syscall_vserver
+ vserver(2) syscall#: $ac_cv_vserver_syscallnr
Paths:
prefix: $prefix
diff -urN util-vserver-0.30.208.orig/m4/ensc_syscallnr.m4 util-vserver-0.30.208/m4/ensc_syscallnr.m4
--- util-vserver-0.30.208.orig/m4/ensc_syscallnr.m4 2004-04-07 20:46:10.000000000 +0200
+++ util-vserver-0.30.208/m4/ensc_syscallnr.m4 1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-dnl $Id: ensc_syscallnr.m4,v 1.6 2004/03/08 19:55:28 ensc Exp $
-
-dnl Copyright (C) 2004 Enrico Scholz <[EMAIL PROTECTED]>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; version 2 of the License.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-dnl Usage: ENSC_SYSCALLNR(<syscall>,<default>)
-
-AC_DEFUN([ENSC_SYSCALLNR],
-[
- AC_REQUIRE([AC_PROG_CPP])
- AC_REQUIRE([AC_PROG_EGREP])
- AC_REQUIRE([ENSC_KERNEL_HEADERS])
-
- AC_CACHE_CHECK([for number of syscall '$1'], [ensc_cv_value_syscall_$1],
- [
- AC_LANG_PUSH(C)
- AC_LANG_CONFTEST([
-#include <asm/unistd.h>
-#ifdef __NR_$1
-ensc_syscall_tmp_nr=__NR_$1;
-ensc_syscall_tmp_src=ENSC_MARK
-#endif
-])
- ensc_syscall_tmp_nr=
- ensc_syscall_tmp_src=
- test "$ensc_syscall_tmp_nr" || \
- eval $($CPP $CPPFLAGS -D ENSC_MARK='glibc' conftest.c | $EGREP '^ensc_syscall_tmp_(nr=[[1-9]][[0-9]]*;|src=.*)$')
- test "$ensc_syscall_tmp_nr" || \
- eval $($CPP $CPPFLAGS -D ENSC_MARK='kernel' -I $ensc_cv_path_kernelheaders conftest.c | $EGREP '^ensc_syscall_tmp_(nr=[[1-9]][[0-9]]*;|src=.*)$')
- test "$ensc_syscall_tmp_nr" || {
- ensc_syscall_tmp_nr=$2
- ensc_syscall_tmp_src=default
- }
-
- if test x"$ensc_syscall_tmp_nr" = x; then
- AC_MSG_ERROR(
-[Can not determine value of __NR_$1; please verify your glibc/kernelheaders, and/or set CPPFLAGS='-D__NR_$1=<value>' environment when calling configure.])
- fi
- AC_LANG_POP
-
- ensc_cv_value_syscall_$1="$ensc_syscall_tmp_nr/$ensc_syscall_tmp_src"
- ])
-
- ensc_syscall_tmp_nr=${ensc_cv_value_syscall_$1%/*}
- ensc_syscall_tmp_src=${ensc_cv_value_syscall_$1#*/}
-
- if test x"$ensc_syscall_tmp_src" != x'glibc'; then
- AC_DEFINE_UNQUOTED(ENSC_SYSCALL__NR_$1, $ensc_syscall_tmp_nr, [The number of the $1 syscall])
- fi
-])
diff -urN util-vserver-0.30.208.orig/m4/syscallnr.m4 util-vserver-0.30.208/m4/syscallnr.m4
--- util-vserver-0.30.208.orig/m4/syscallnr.m4 1970-01-01 01:00:00.000000000 +0100
+++ util-vserver-0.30.208/m4/syscallnr.m4 2005-10-27 02:09:08.000000000 +0200
@@ -0,0 +1,47 @@
+dnl Copyright (C) 2005 Jérémy Bobbio <[EMAIL PROTECTED]>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; version 2 of the License.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+dnl Usage: AC_SYSCALLNR
+
+AC_DEFUN([AC_VSERVER_SYSCALLNR],
+[
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+ AC_REQUIRE([ENSC_KERNEL_HEADERS])
+
+ AC_CACHE_CHECK([for number of the vserver syscall],
+ [ac_cv_vserver_syscallnr],
+ [
+ AC_LANG_PUSH(C)
+ AC_LANG_CONFTEST([
+#include <kernel/vserver.h>
+#ifdef __NR_vserver
+ac_vserver_syscallnr_tmp=__NR_vserver;
+#endif
+ ])
+ syscall_tmp_nr=
+ eval $($CPP $CPPFLAGS -I. conftest.c | tee /tmp/test |
+ $EGREP '^ac_vserver_syscallnr_tmp=')
+ if test x"$ac_vserver_syscallnr_tmp" = x; then
+ AC_MSG_ERROR(
+[Can not determine number of the vserver syscall. Your architecture is unsupported by this release.])
+ fi
+ AC_LANG_POP
+ ac_cv_vserver_syscallnr="$ac_vserver_syscallnr_tmp"
+ ])
+
+ AC_DEFINE_UNQUOTED(SYSCALL__NR_vserver, $ac_vserver_syscallnr_tmp, [The number of the vserver syscall])
+
+])
diff -urN util-vserver-0.30.208.orig/kernel/vserver.h util-vserver-0.30.208/kernel/vserver.h
--- util-vserver-0.30.208.orig/kernel/vserver.h 1970-01-01 01:00:00.000000000 +0100
+++ util-vserver-0.30.208/kernel/vserver.h 2005-10-26 22:42:37.000000000 +0200
@@ -0,0 +1,48 @@
+
+#include <stdint.h>
+
+#include "syscall.h"
+
+#if defined(__alpha__)
+#define __NR_vserver 428
+#elif defined(__arm__)
+#define __NR_vserver 313
+#elif defined(__cris__)
+#define __NR_vserver 273
+#elif defined(__frv__)
+#define __NR_vserver 273
+#elif defined(__h8300__)
+#define __NR_vserver 273
+#elif defined(__i386__)
+#define __NR_vserver 273
+#elif defined(__ia64__)
+#define __NR_vserver 1269
+#elif defined(__m32r__)
+#define __NR_vserver *
+#elif defined(__mc68000__)
+#define __NR_vserver 278
+#elif defined(__mips__) && (_MIPS_SIM == _MIPS_SIM_ABI32)
+#define __NR_vserver 277
+#elif defined(__mips__) && (_MIPS_SIM == _MIPS_SIM_ABI64)
+#define __NR_vserver 240
+#elif defined(__mips__) && (_MIPS_SIM == _MIPS_SIM_NABI32)
+#define __NR_vserver 236
+#elif defined(__hppa__)
+#define __NR_vserver 273
+#elif defined(__powerpc__)
+#define __NR_vserver 257
+#elif defined(__s390__)
+#define __NR_vserver 263
+#elif defined(__sh__)
+#define __NR_vserver 273
+#elif defined(__sparc__)
+#define __NR_vserver 267
+#elif defined(__v850__)
+#define __NR_vserver *
+#elif defined(__x86_64__)
+#define __NR_vserver 236
+#endif
+
+static inline
+_syscall3(int, vserver, uint32_t, cmd, uint32_t, id, void *, data);
+
diff -urN util-vserver-0.30.208.orig/lib/vserver-internal.h util-vserver-0.30.208/lib/vserver-internal.h
--- util-vserver-0.30.208.orig/lib/vserver-internal.h 2005-10-01 03:41:07.000000000 +0200
+++ util-vserver-0.30.208/lib/vserver-internal.h 2005-10-27 02:09:03.000000000 +0200
@@ -30,8 +30,8 @@
#include "internal.h"
#include "syscall-wrap.h"
-#if !defined(__NR_vserver) && defined(ENSC_SYSCALL__NR_vserver)
-# define __NR_vserver ENSC_SYSCALL__NR_vserver
+#if !defined(__NR_vserver) && defined(SYSCALL__NR_vserver)
+# define __NR_vserver SYSCALL__NR_vserver
#endif
inline static ALWAYSINLINE void vc_noop0() {}
pgp52RbaS9DaT.pgp
Description: PGP signature

