[Debootloaders-devel] r225 - in /trunk/silo/debian: changelog patches/series patches/silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch patches/silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch

jurij at alioth.debian.org jurij at alioth.debian.org
Sun Aug 24 09:23:32 UTC 2008


Author: jurij
Date: Sun Aug 24 09:23:32 2008
New Revision: 225

URL: http://svn.debian.org/wsvn/debootloaders/?sc=1&rev=225
Log:
Pull patches from git tree to fix the build failure with kernel 
headers 2.6.25 or newer, prepare 1.4.13a+git20070930-3 for upload.

Added:
    trunk/silo/debian/patches/silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch
    trunk/silo/debian/patches/silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch
Modified:
    trunk/silo/debian/changelog
    trunk/silo/debian/patches/series

Modified: trunk/silo/debian/changelog
URL: http://svn.debian.org/wsvn/debootloaders/trunk/silo/debian/changelog?rev=225&op=diff
==============================================================================
--- trunk/silo/debian/changelog (original)
+++ trunk/silo/debian/changelog Sun Aug 24 09:23:32 2008
@@ -1,3 +1,13 @@
+silo (1.4.13a+git20070930-3) unstable; urgency=low
+
+  [ Jurij Smakov ]
+  * Include patches eb6151388752b52804f80ff27e90ec2dbde71339 and
+    a55764ceef83086d00b5f7b8b3027b517fc4ca23 from the git tree to
+    fix build failure when building against kernel headers 2.6.25
+    or newer. (Closes: #495860)
+
+ -- Jurij Smakov <jurij at debian.org>  Sun, 24 Aug 2008 10:04:17 +0100
+
 silo (1.4.13a+git20070930-2) unstable; urgency=low
 
   [ Aurélien GÉRÔME ]

Modified: trunk/silo/debian/patches/series
URL: http://svn.debian.org/wsvn/debootloaders/trunk/silo/debian/patches/series?rev=225&op=diff
==============================================================================
--- trunk/silo/debian/patches/series (original)
+++ trunk/silo/debian/patches/series Sun Aug 24 09:23:32 2008
@@ -1,2 +1,4 @@
 11-silocheck_non-failure_on_stat.patch
 20-silo_ls_fix_date_calc.patch
+silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch
+silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch

Added: trunk/silo/debian/patches/silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch
URL: http://svn.debian.org/wsvn/debootloaders/trunk/silo/debian/patches/silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch?rev=225&op=file
==============================================================================
--- trunk/silo/debian/patches/silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch (added)
+++ trunk/silo/debian/patches/silo.git-a55764ceef83086d00b5f7b8b3027b517fc4ca23.patch Sun Aug 24 09:23:32 2008
@@ -1,0 +1,158 @@
+From: Friedrich Oslage <ben.collins at canonical.com>
+Date: Thu, 21 Aug 2008 14:27:48 +0000 (-0400)
+Subject: Include libgcc.a to get __ffssi2 and add a simple sprintf function to fix these undef ...
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fbcollins%2Fsilo.git;a=commitdiff_plain;h=a55764ceef83086d00b5f7b8b3027b517fc4ca23;hp=eb6151388752b52804f80ff27e90ec2dbde71339
+
+Include libgcc.a to get __ffssi2 and add a simple sprintf function to fix these undefined references when compiling with GCC-4.3:
+
+/usr/bin/../lib/libext2fs.a(inline.o): In function `ext2fs_find_next_bit_set': (.text+0x4f8): undefined reference to `__ffssi2'
+/usr/bin/../lib/libext2fs.a(inline.o): In function `ext2fs_find_next_bit_set': (.text+0x518): undefined reference to `__ffssi2'
+/usr/bin/../lib/libext2fs.a(inline.o): In function `ext2fs_find_next_bit_set': (.text+0x544): undefined reference to `__ffssi2'
+/usr/bin/../lib/libext2fs.a(inline.o): In function `ext2fs_find_first_bit_set': (.text+0x5a8): undefined reference to `__ffssi2'
+/usr/bin/../lib/libext2fs.a(inline.o): In function `ext2fs_find_first_bit_set': (.text+0x5d8): undefined reference to `__ffssi2'
+/usr/bin/../lib/libext2fs.a(rw_bitmaps.o): In function `read_bitmaps': (.text+0x46c): undefined reference to `sprintf'
+/usr/bin/../lib/libext2fs.a(rw_bitmaps.o): In function `read_bitmaps': (.text+0x664): undefined reference to `sprintf'
+
+Signed-off-by: Friedrich Oslage <bluebird at gentoo.org>
+Signed-off-by: Ben Collins <ben.collins at canonical.com>
+---
+
+diff --git a/common/printf.c b/common/printf.c
+index eed5da2..0d6d84c 100644
+--- a/common/printf.c
++++ b/common/printf.c
+@@ -21,6 +21,7 @@
+    USA.  */
+ 
+ #include "promlib.h"
++#include <stringops.h>
+ 
+ /*
+  * This part is rewritten by Igor Timkin <ivt at msu.su>. Than I
+@@ -147,3 +148,91 @@ void prom_printf (char *fmt,...)
+     vprintf (fmt, x1);
+     va_end (x1);
+ }
++
++static int sprintn (char *str, long long n, int b)
++{
++    static char prbuf[33];
++    register char *cp;
++    int count = 0;
++
++    if (b == 10 && n < 0) {
++	memset (str + count, '-', 1);
++	count++;
++	n = -n;
++    }
++    cp = prbuf;
++    do
++	*cp++ = "0123456789ABCDEF"[(unsigned int) (((unsigned long)n) % b)];
++    while ((n = ((unsigned long long)n) / b & 0x0FFFFFFFFFFFFFFFULL));
++    do {
++	memset (str + count, *--cp, 1);
++	count++;
++    } while (cp > prbuf);
++
++    return count;
++}
++
++int vsprintf (char *str, char *fmt, va_list adx)
++{
++    register int c;
++    char *s;
++    int count = 0;
++
++    for (;;) {
++	while ((c = *fmt++) != '%') {
++	    memset (str + count, c, 1);
++	    if (c == '\0') {
++		return count;
++	    }
++	}
++	c = *fmt++;
++	if (c == 'd' || c == 'o' || c == 'x' || c == 'X') {
++	    count += sprintn (str + count, (long long) va_arg (adx, unsigned),
++			     c == 'o' ? 8 : (c == 'd' ? 10 : 16));
++	} else if (c == 'c') {
++	    memset (str + count, va_arg (adx, unsigned), 1);
++	    count++;
++	} else if (c == 's') {
++	    if ((s = va_arg (adx, char *)) == NULL)
++		s = (char *)"(null)";
++	    while ((c = *s++)) {
++		memset (str + count, c, 1);
++		count++;
++	    }
++	} else if (c == 'l' || c == 'O') {
++	    count += sprintn (str + count, (long long) va_arg (adx, long), c == 'l' ? 10 : 8);
++	} else if (c == 'L') {
++	    int hex = 0;
++	    if (*fmt == 'x') {
++		fmt++;
++		hex = 1;
++	    }
++	    count += sprintn (str + count, (long long) va_arg (adx, long long), hex ? 16 : 10);
++	} else {
++	    /* This is basically what libc's printf does */
++	    memset (str + count, '%', 1);
++	    count++;
++	    memset (str + count, c, 1);
++	    count++;
++	}
++    }
++
++    return count;
++}
++
++/*
++ * Scaled down version of C Library sprintf.
++ * Only %c %s %d (==%u) %o %x %X %l %O are recognized.
++ */
++
++int sprintf (char *s, char *format, ...)
++{
++    va_list arg;
++    int done;
++
++    va_start (arg, format);
++    done = vsprintf (s, format, arg);
++    va_end (arg);
++
++    return done;
++}
+diff --git a/include/silo.h b/include/silo.h
+index 51c62e7..fe5adcb 100644
+--- a/include/silo.h
++++ b/include/silo.h
+@@ -87,6 +87,8 @@ int silo_disk_partitionable(void);
+ void silo_disk_close(void);
+ /* printf.c */
+ int vprintf (char *, va_list);
++int vsprintf (char *str, char *fmt, va_list adx);
++int sprintf (char *s, char *format, ...);
+ int putchar (int);
+ /* malloc.c */
+ void *malloc (int);
+diff --git a/second/Makefile b/second/Makefile
+index 3a7763d..ff4c8b5 100644
+--- a/second/Makefile
++++ b/second/Makefile
+@@ -58,13 +58,13 @@ fs/libfs.a: $(FS_OBJS)
+ 	$(AR) rc $@ $(FS_OBJS)
+ 
+ second: $(OBJS) mark.o
+-	$(LD) $(LDFLAGS_SMALL) -Bstatic -o second $(OBJS) -lext2fs mark.o
+-	$(LD) $(LDFLAGS_LARGE) -Bstatic -o second2 $(OBJS) -lext2fs mark.o
++	$(LD) $(LDFLAGS_SMALL) -Bstatic -o second $(OBJS) -lext2fs mark.o `$(CC) -print-libgcc-file-name`
++	$(LD) $(LDFLAGS_LARGE) -Bstatic -o second2 $(OBJS) -lext2fs mark.o `$(CC) -print-libgcc-file-name`
+ 	$(NM) second | grep -v '*ABS*' | sort > second.map
+ 
+ silotftp: $(OBJSNET) mark.o
+-	$(LD) $(LDFLAGS_SMALL) -Bstatic -o silotftp $(OBJSNET) -lext2fs mark.o
+-	$(LD) $(LDFLAGS_LARGE) -Bstatic -o silotftp2 $(OBJSNET) -lext2fs mark.o
++	$(LD) $(LDFLAGS_SMALL) -Bstatic -o silotftp $(OBJSNET) -lext2fs mark.o `$(CC) -print-libgcc-file-name`
++	$(LD) $(LDFLAGS_LARGE) -Bstatic -o silotftp2 $(OBJSNET) -lext2fs mark.o `$(CC) -print-libgcc-file-name`
+ 	$(NM) silotftp | grep -v '*ABS*' | sort > silotftp.map
+ 
+ second.l: second

Added: trunk/silo/debian/patches/silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch
URL: http://svn.debian.org/wsvn/debootloaders/trunk/silo/debian/patches/silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch?rev=225&op=file
==============================================================================
--- trunk/silo/debian/patches/silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch (added)
+++ trunk/silo/debian/patches/silo.git-eb6151388752b52804f80ff27e90ec2dbde71339.patch Sun Aug 24 09:23:32 2008
@@ -1,0 +1,38 @@
+From: Friedrich Oslage <ben.collins at canonical.com>
+Date: Thu, 21 Aug 2008 14:26:43 +0000 (-0400)
+Subject: Fix includes to work with linux headers >= 2.6.25
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fbcollins%2Fsilo.git;a=commitdiff_plain;h=eb6151388752b52804f80ff27e90ec2dbde71339;hp=fa2c84cc063b8056863332d4c8ca7ccbc6754da5
+
+Fix includes to work with linux headers >= 2.6.25
+
+Signed-off-by: Friedrich Oslage <bluebird at gentoo.org>
+Signed-off-by: Ben Collins <ben.collins at canonical.com>
+---
+
+diff --git a/include/ext2fs/ext2fs.h b/include/ext2fs/ext2fs.h
+index 55aed7d..6973caa 100644
+--- a/include/ext2fs/ext2fs.h
++++ b/include/ext2fs/ext2fs.h
+@@ -39,7 +39,7 @@ extern "C" {
+  */
+ #define EXT2_LIB_CURRENT_REV	0
+ 
+-#ifdef HAVE_SYS_TYPES_H
++#if defined(HAVE_SYS_TYPES_H) && !defined(_LINUX_TYPES_H)
+ #include <sys/types.h>
+ #endif
+ 
+diff --git a/second/main.c b/second/main.c
+index 4f753b0..182b263 100644
+--- a/second/main.c
++++ b/second/main.c
+@@ -25,8 +25,7 @@
+ /* TODO: This file is a good candidate for rewrite from scratch.  */
+ 
+ #include <silo.h>
+-#include <asm/page.h>
+-#include <linux/elf.h>
++#include <elf.h>
+ #include <stringops.h>
+ 
+ #ifndef NULL




More information about the Debootloaders-devel mailing list