[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 28 Jun 2012 20:56:24 +0400
From: Vasily Kulikov <segoon@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: status of 2.6.32-based kernel
On Sun, Jun 24, 2012 at 05:50 +0400, Solar Designer wrote:
> Have you already tried building the Owl userland with this kernel's
> headers? If so, how many packages build / don't build?
Not buildable: perl, util-linux, ltrace, procps, coreutils.
Patches for all of them but util-linux is as following:
diff -uNp -r perl-5.8.8.old/ext/IPC/SysV/SysV.xs perl-5.8.8/ext/IPC/SysV/SysV.xs
--- perl-5.8.8.old/ext/IPC/SysV/SysV.xs 2001-06-30 18:46:07 +0000
+++ perl-5.8.8/ext/IPC/SysV/SysV.xs 2012-06-28 15:28:19 +0000
@@ -4,7 +4,7 @@
#include <sys/types.h>
#ifdef __linux__
-# include <asm/page.h>
+# include <sys/user.h>
#endif
#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
#ifndef HAS_SEM
Index: perl.spec
===================================================================
RCS file: /home/cvs/cvsroot/Owl/packages/perl/perl.spec,v
retrieving revision 1.62
diff -u -r1.62 perl.spec
--- perl.spec 11 Oct 2011 19:06:54 -0000 1.62
+++ perl.spec 28 Jun 2012 16:50:00 -0000
@@ -50,6 +50,7 @@
Patch28: perl-5.8.8-up-rh-Safe.diff
Patch29: perl-5.8.8-up-rh-rmtree.diff
Patch30: perl-5.8.8-owl-makedepend.diff
+Patch31: perl-5.8.8-owl-PAGE_SIZE.diff
Provides: perl(:WITH_PERLIO)
%if %BUILD_THREADS
%define thread_arch -thread-multi
@@ -121,6 +122,7 @@
%patch28 -p1
%patch29 -p1
%patch30 -p1
+%patch31 -p1
find . -name '*.orig' -delete
Index: util-linux-2.11z-owl-_syscall5.diff
===================================================================
RCS file: /home/cvs/cvsroot/Owl/packages/util-linux/util-linux-2.11z-owl-_syscall5.diff,v
retrieving revision 1.1
diff -u -r1.1 util-linux-2.11z-owl-_syscall5.diff
--- util-linux-2.11z-owl-_syscall5.diff 20 Nov 2009 12:23:24 -0000 1.1
+++ util-linux-2.11z-owl-_syscall5.diff 28 Jun 2012 16:50:07 -0000
@@ -1,20 +1,34 @@
-diff -urp util-linux-2.11z.orig/fdisk/llseek.c util-linux-2.11z/fdisk/llseek.c
---- util-linux-2.11z.orig/fdisk/llseek.c 2002-10-31 13:44:31 +0000
-+++ util-linux-2.11z/fdisk/llseek.c 2009-11-20 11:50:12 +0000
-@@ -30,7 +30,9 @@ extern ext2_loff_t ext2_llseek (unsigned
+diff -uNp -r util-linux-2.11z.old/fdisk/llseek.c util-linux-2.11z/fdisk/llseek.c
+--- util-linux-2.11z.old/fdisk/llseek.c 2002-10-31 13:44:31 +0000
++++ util-linux-2.11z/fdisk/llseek.c 2012-06-28 16:27:19 +0000
+@@ -30,7 +30,14 @@ extern ext2_loff_t ext2_llseek (unsigned
#define my_llseek lseek
#else
+#define __KERNEL__
#include <linux/unistd.h> /* for __NR__llseek */
+#undef __KERNEL__
++
++#include <unistd.h>
++#include <linux/version.h>
++
++#if (KERNEL_VERSION(2,6,18) >= LINUX_VERSION_CODE)
static int _llseek (unsigned int, unsigned long,
unsigned long, ext2_loff_t *, unsigned int);
-diff -urp util-linux-2.11z.orig/fdisk/sfdisk.c util-linux-2.11z/fdisk/sfdisk.c
---- util-linux-2.11z.orig/fdisk/sfdisk.c 2003-01-28 18:18:03 +0000
-+++ util-linux-2.11z/fdisk/sfdisk.c 2009-11-20 11:49:53 +0000
-@@ -46,7 +46,9 @@
+@@ -53,6 +60,8 @@ static int _llseek (unsigned int fd, uns
+
+ #endif
+
++#endif
++
+ static ext2_loff_t my_llseek (unsigned int fd, ext2_loff_t offset,
+ unsigned int origin)
+ {
+diff -uNp -r util-linux-2.11z.old/fdisk/sfdisk.c util-linux-2.11z/fdisk/sfdisk.c
+--- util-linux-2.11z.old/fdisk/sfdisk.c 2003-01-28 18:18:03 +0000
++++ util-linux-2.11z/fdisk/sfdisk.c 2012-06-28 16:27:18 +0000
+@@ -46,9 +46,12 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/utsname.h>
@@ -23,10 +37,26 @@
+#undef __KERNEL__
#include "nls.h"
#include "common.h"
++#include <linux/version.h>
+
+ #define SIZE(a) (sizeof(a)/sizeof(a[0]))
+
+@@ -131,10 +134,12 @@ fatal(char *s, ...) {
+ * Note: we use 512-byte sectors here, irrespective of the hardware ss.
+ */
+ #if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
++#if (KERNEL_VERSION(2,6,18) >= LINUX_VERSION_CODE)
+ static
+ _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
+ loff_t *, res, uint, wh);
+ #endif
++#endif
-diff -urp util-linux-2.11z.orig/partx/partx.c util-linux-2.11z/partx/partx.c
---- util-linux-2.11z.orig/partx/partx.c 2002-10-31 13:51:06 +0000
-+++ util-linux-2.11z/partx/partx.c 2009-11-20 11:53:05 +0000
+ static int
+ sseek(char *dev, unsigned int fd, unsigned long s) {
+diff -uNp -r util-linux-2.11z.old/partx/partx.c util-linux-2.11z/partx/partx.c
+--- util-linux-2.11z.old/partx/partx.c 2002-10-31 13:51:06 +0000
++++ util-linux-2.11z/partx/partx.c 2012-06-28 16:06:49 +0000
@@ -338,7 +338,9 @@ xmalloc (size_t size) {
#endif
Index: procps-3.2.5-owl-PAGE_SIZE.diff
===================================================================
RCS file: /home/cvs/cvsroot/Owl/packages/procps/procps-3.2.5-owl-PAGE_SIZE.diff,v
retrieving revision 1.1
diff -u -r1.1 procps-3.2.5-owl-PAGE_SIZE.diff
--- procps-3.2.5-owl-PAGE_SIZE.diff 23 Nov 2009 07:36:06 -0000 1.1
+++ procps-3.2.5-owl-PAGE_SIZE.diff 28 Jun 2012 16:50:19 -0000
@@ -1,13 +1,12 @@
-diff -ur procps-3.2.5.orig/ps/common.h procps-3.2.5/ps/common.h
---- procps-3.2.5.orig/ps/common.h 2004-10-09 03:55:50 +0000
-+++ procps-3.2.5/ps/common.h 2009-11-23 07:27:39 +0000
-@@ -14,7 +14,9 @@
+diff -uNp -r procps-3.2.5.old/ps/common.h procps-3.2.5/ps/common.h
+--- procps-3.2.5.old/ps/common.h 2004-10-09 03:55:50 +0000
++++ procps-3.2.5/ps/common.h 2012-06-28 15:12:31 +0000
+@@ -14,7 +14,7 @@
#include "../proc/procps.h"
#include "../proc/readproc.h"
-+#define __KERNEL__
- #include <asm/page.h> /* looks safe for glibc, we need PAGE_SIZE */
-+#undef __KERNEL__
+-#include <asm/page.h> /* looks safe for glibc, we need PAGE_SIZE */
++#include <sys/user.h> /* looks safe for glibc, we need PAGE_SIZE */
#if 0
#define trace(args...) printf(## args)
Index: exit.c
===================================================================
RCS file: /home/cvs/cvsroot/Owl/packages/coreutils/exit.c,v
retrieving revision 1.2
diff -u -r1.2 exit.c
--- exit.c 22 Mar 2010 22:55:08 -0000 1.2
+++ exit.c 28 Jun 2012 16:50:21 -0000
@@ -1,18 +1,5 @@
-#ifdef __i386__
-
-static int errno;
-#define __KERNEL__
-#include <linux/unistd.h>
-#undef __KERNEL__
-#define __NR__exit __NR_exit
-static inline _syscall1(void, _exit, int, status)
-
-#else
-
#include <unistd.h>
-#endif
-
void
_start(void)
{
perl/perl-5.8.8-owl-PAGE_SIZE.diff
diff -uNp -r perl-5.8.8.old/ext/IPC/SysV/SysV.xs perl-5.8.8/ext/IPC/SysV/SysV.xs
--- perl-5.8.8.old/ext/IPC/SysV/SysV.xs 2001-06-30 18:46:07 +0000
+++ perl-5.8.8/ext/IPC/SysV/SysV.xs 2012-06-28 15:28:19 +0000
@@ -4,7 +4,7 @@
#include <sys/types.h>
#ifdef __linux__
-# include <asm/page.h>
+# include <sys/user.h>
#endif
#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
#ifndef HAS_SEM
As for util-linux, the bug (not yet fixed) is as following:
gcc fdisk.o llseek.o fdiskbsdlabel.o fdisksgilabel.o fdisksunlabel.o fdiskaixlabel.o i386_sys_types.o partname.o -o fdisk
llseek.o: In function `ext2_llseek':
llseek.c:(.text+0x4c): undefined reference to `_llseek'
collect2: ld returned 1 exit status
make[2]: *** [fdisk] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/usr/src/world/rpm-work-1/BUILD/util-linux-2.11z/fdisk'
--
Vasily
Powered by blists - more mailing lists
Powered by Openwall GNU/*/Linux -
Powered by OpenVZ