summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Porcel <armin76@gentoo.org>2011-01-22 12:25:21 +0000
committerRaúl Porcel <armin76@gentoo.org>2011-01-22 12:25:21 +0000
commit5bb3103ee283828fc14acdca43deccb10aee2772 (patch)
treef816dd37db6a73e1b798ecfb2998bc13c5161ccb /sys-boot
parentold (diff)
downloadgentoo-2-5bb3103ee283828fc14acdca43deccb10aee2772.tar.gz
gentoo-2-5bb3103ee283828fc14acdca43deccb10aee2772.tar.bz2
gentoo-2-5bb3103ee283828fc14acdca43deccb10aee2772.zip
sparc stable, remove old and add patch to fix build with >=e2fsprogs-1.4.14 from upstream, bug #350677
(Portage version: 2.1.9.25/cvs/Linux ia64)
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/silo/ChangeLog9
-rw-r--r--sys-boot/silo/files/gcc-4.3-compile.patch121
-rw-r--r--sys-boot/silo/files/qa-no-strip.patch11
-rw-r--r--sys-boot/silo/files/sanitized-linuxheaders.patch13
-rw-r--r--sys-boot/silo/files/silo-1.4.x-noglibc_time.patch12
-rw-r--r--sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch54
-rw-r--r--sys-boot/silo/silo-1.4.14.ebuild72
-rw-r--r--sys-boot/silo/silo-1.4.14_p20100228.ebuild10
8 files changed, 66 insertions, 236 deletions
diff --git a/sys-boot/silo/ChangeLog b/sys-boot/silo/ChangeLog
index 1b068f2dce33..b88caca20388 100644
--- a/sys-boot/silo/ChangeLog
+++ b/sys-boot/silo/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-boot/silo
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/ChangeLog,v 1.45 2011/01/09 03:25:11 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/ChangeLog,v 1.46 2011/01/22 12:25:20 armin76 Exp $
+
+ 22 Jan 2011; Raúl Porcel <armin76@gentoo.org> -silo-1.4.14.ebuild,
+ silo-1.4.14_p20100228.ebuild, +files/silo-e2fsprogs-1.4.14.patch,
+ -files/silo-1.4.x-noglibc_time.patch, -files/gcc-4.3-compile.patch,
+ -files/qa-no-strip.patch, -files/sanitized-linuxheaders.patch:
+ sparc stable, remove old and add patch to fix build with >=e2fsprogs-1.4.14
+ from upstream, bug #350677
09 Jan 2011; Mike Frysinger <vapier@gentoo.org> silo-1.4.14.ebuild,
silo-1.4.14_p20100228.ebuild:
diff --git a/sys-boot/silo/files/gcc-4.3-compile.patch b/sys-boot/silo/files/gcc-4.3-compile.patch
deleted file mode 100644
index d7fa3ea07bfc..000000000000
--- a/sys-boot/silo/files/gcc-4.3-compile.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-diff --git a/common/printf.c b/common/printf.c
---- 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@msu.su>. Than I
-@@ -147,3 +148,88 @@ 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;
-+}
-+
-+/* Write formatted output into S, according to the format string FORMAT. */
-+/* VARARGS2 */
-+int sprintf (char *s, const char *format, ...)
-+{
-+ va_list arg;
-+ int done;
-+
-+ va_start (arg, format);
-+ done = vsprintf (s, format, arg);
-+ va_end (arg);
-+
-+ return done;
-+}
-diff --git a/second/Makefile b/second/Makefile
---- 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
diff --git a/sys-boot/silo/files/qa-no-strip.patch b/sys-boot/silo/files/qa-no-strip.patch
deleted file mode 100644
index ea01e2ed10b7..000000000000
--- a/sys-boot/silo/files/qa-no-strip.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- Rules.make
-+++ Rules.make
-@@ -6,7 +6,7 @@
- CC=gcc -m32
- LD=ld -m elf32_sparc
- AS=as
--STRIP=strip
-+STRIP=true
- NM=nm
- ELFTOAOUT=elftoaout
- BIN2H=../common/bin2h
diff --git a/sys-boot/silo/files/sanitized-linuxheaders.patch b/sys-boot/silo/files/sanitized-linuxheaders.patch
deleted file mode 100644
index 3de1c0331e0b..000000000000
--- a/sys-boot/silo/files/sanitized-linuxheaders.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ur silo.orig/second/main.c silo/second/main.c
---- silo.orig/second/main.c 2008-05-04 20:44:35.493619781 +0000
-+++ silo/second/main.c 2008-05-04 20:44:50.113166947 +0000
-@@ -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
diff --git a/sys-boot/silo/files/silo-1.4.x-noglibc_time.patch b/sys-boot/silo/files/silo-1.4.x-noglibc_time.patch
deleted file mode 100644
index a77c9a9db983..000000000000
--- a/sys-boot/silo/files/silo-1.4.x-noglibc_time.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- silo-1.4.9/second/fs/ext2.c.orig 2005-04-05 22:39:41.000000000 -0700
-+++ silo-1.4.9/second/fs/ext2.c 2005-04-05 22:58:17.000000000 -0700
-@@ -19,6 +19,9 @@
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
- USA. */
-
-+/* Prevent usersparce time.h from being included and messing up our time() */
-+#define _TIME_H
-+
- #include <sys/types.h>
- #include <silo.h>
- #include <file.h>
diff --git a/sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch b/sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch
new file mode 100644
index 000000000000..afcfc462ea87
--- /dev/null
+++ b/sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch
@@ -0,0 +1,54 @@
+# Patch to make silo compile and work with >=e2fsprogs-1.4.14
+# http://bugs.gentoo.org/show_bug.cgi?id=350677
+# http://marc.info/?l=linux-sparc&m=129468771631829&w=2
+--- silo.orig/common/malloc.c 2010-02-28 12:11:51.000000000 +0100
++++ silo/common/malloc.c 2011-01-22 12:06:42.849946213 +0100
+@@ -27,6 +27,12 @@
+
+ static char *last_alloc = 0;
+
++static char *align_ptr_to(char *ptr, unsigned long align)
++{
++ return (char *) ((((unsigned long) ptr) + (align - 1UL)) &
++ ~(align - 1UL));
++}
++
+ void *malloc (int size)
+ {
+ char *caddr;
+@@ -34,10 +40,34 @@
+ caddr = malloc_ptr;
+ malloc_ptr += size;
+ last_alloc = caddr;
+- malloc_ptr = (char *) ((((unsigned long) malloc_ptr) + 7) & (~7));
++ malloc_ptr = align_ptr_to(malloc_ptr, 8UL);
+ return caddr;
+ }
+
++int posix_memalign(void **memptr, unsigned long alignment, unsigned long size)
++{
++ char *caddr;
++
++ if (alignment & (alignment - 1UL))
++ return -1;
++ if (alignment & (sizeof(void *) - 1UL))
++ return -1;
++
++ if (size == 0) {
++ *memptr = (void *) 0;
++ return 0;
++ }
++
++ caddr = align_ptr_to(malloc_ptr, alignment);
++ malloc_ptr = (caddr + size);
++ last_alloc = caddr;
++ malloc_ptr = align_ptr_to(malloc_ptr, 8UL);
++
++ *memptr = caddr;
++
++ return 0;
++}
++
+ void free (void *m)
+ {
+ if (m == last_alloc)
diff --git a/sys-boot/silo/silo-1.4.14.ebuild b/sys-boot/silo/silo-1.4.14.ebuild
deleted file mode 100644
index e132c337b171..000000000000
--- a/sys-boot/silo/silo-1.4.14.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/silo-1.4.14.ebuild,v 1.4 2011/01/09 03:25:11 vapier Exp $
-
-inherit mount-boot flag-o-matic toolchain-funcs
-
-DESCRIPTION="SPARC/UltraSPARC Improved Loader, a boot loader for sparc"
-SRC_URI="mirror://ubuntu/pool/main/s/${PN}/${PN}_${PV}.orig.tar.gz"
-
-# the sourceforge project is dead. there is no homepage other than gitweb :(
-HOMEPAGE="http://git.kernel.org/?p=linux/kernel/git/bcollins/silo.git;a=summary"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="-* sparc"
-IUSE="hardened"
-
-PROVIDE="virtual/bootloader"
-
-DEPEND="sys-fs/e2fsprogs
- sys-apps/sparc-utils"
-
-ABI_ALLOW="sparc32"
-
-src_unpack() {
- unpack ${A}
-
- cd "${S}"
-
- # Sanitized headers bug #162537
- epatch "${FILESDIR}"/sanitized-linuxheaders.patch
-
- epatch "${FILESDIR}"/silo-1.4.x-noglibc_time.patch
-
- # make it compile with gcc 4.3
- epatch "${FILESDIR}"/gcc-4.3-compile.patch
-
- # don't strip binaries, let portage handle it!
- epatch "${FILESDIR}"/qa-no-strip.patch
-
- # Fix build failure
- sed -i -e "s/-fno-strict-aliasing/-fno-strict-aliasing -U_FORTIFY_SOURCE/g" Rules.make
-
-}
-
-src_compile() {
- filter-flags "-fstack-protector"
-
- if use hardened
- then
- make ${MAKEOPTS} CC="$(tc-getCC) -fno-stack-protector -fno-pic"
- else
- make ${MAKEOPTS} CC="$(tc-getCC)" || die
- fi
-}
-
-src_install() {
- make DESTDIR="${D}" install || die
- dodoc first-isofs/README.SILO_ISOFS docs/README*
-
- # Fix maketilo manpage
- rm "${D}"/usr/share/man/man1/maketilo.1
- dosym /usr/share/man/man1/tilo.1 /usr/share/man/man1/maketilo.1
-}
-
-pkg_postinst() {
- mount-boot_pkg_postinst
- ewarn "NOTE: If this is an upgrade to an existing SILO install,"
- ewarn " you will need to re-run silo as the /boot/second.b"
- ewarn " file has changed, else the system will fail to load"
- ewarn " SILO at the next boot."
-}
diff --git a/sys-boot/silo/silo-1.4.14_p20100228.ebuild b/sys-boot/silo/silo-1.4.14_p20100228.ebuild
index f3075ad8a591..ca501c60e854 100644
--- a/sys-boot/silo/silo-1.4.14_p20100228.ebuild
+++ b/sys-boot/silo/silo-1.4.14_p20100228.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/silo-1.4.14_p20100228.ebuild,v 1.3 2011/01/09 03:25:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/silo-1.4.14_p20100228.ebuild,v 1.4 2011/01/22 12:25:20 armin76 Exp $
inherit mount-boot flag-o-matic toolchain-funcs
@@ -17,7 +17,7 @@ HOMEPAGE="http://git.kernel.org/?p=linux/kernel/git/davem/silo.git;a=summary"
SLOT="0"
LICENSE="GPL-2"
-KEYWORDS="-* ~sparc"
+KEYWORDS="-* sparc"
IUSE="hardened"
PROVIDE="virtual/bootloader"
@@ -31,11 +31,7 @@ S="${WORKDIR}/${PN}"
src_unpack() {
unpack ${A}
-
-# epatch ${MY_P}-${DEB_PL}.diff
-
cd "${S}"
-# epatch "${WORKDIR}"/${MY_P/_/-}/debian/patches/*.patch
#Set the correct version
sed -i -e "s/1.4.14/1.4.14_git2010228_p1/g" Rules.make
@@ -43,6 +39,8 @@ src_unpack() {
# Fix build failure
sed -i -e "s/-fno-strict-aliasing/-fno-strict-aliasing -U_FORTIFY_SOURCE/g" Rules.make
+ # Fix bug #350677
+ epatch "${FILESDIR}"/silo-e2fsprogs-1.4.14.patch
}
src_compile() {