diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-09 16:22:09 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2009-08-09 16:22:09 +0000 |
commit | cd1b6c939060e3fb44a091f158b35c440cf2f173 (patch) | |
tree | 48697ca3f145dd9206682f5a9d78c674180b4bba /sys-apps/mkinitrd | |
parent | ppc stable #280416 (diff) | |
download | gentoo-2-cd1b6c939060e3fb44a091f158b35c440cf2f173.tar.gz gentoo-2-cd1b6c939060e3fb44a091f158b35c440cf2f173.tar.bz2 gentoo-2-cd1b6c939060e3fb44a091f158b35c440cf2f173.zip |
Fix building with GLIBC 2.10+ wrt #271605.
(Portage version: 2.2_rc36/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/mkinitrd')
-rw-r--r-- | sys-apps/mkinitrd/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/mkinitrd/files/mkinitrd-4.2.0.3-glibc-2.10.patch | 29 | ||||
-rw-r--r-- | sys-apps/mkinitrd/mkinitrd-4.2.0.3-r1.ebuild | 47 |
3 files changed, 84 insertions, 2 deletions
diff --git a/sys-apps/mkinitrd/ChangeLog b/sys-apps/mkinitrd/ChangeLog index b9bf61e6815e..466d7fa56be1 100644 --- a/sys-apps/mkinitrd/ChangeLog +++ b/sys-apps/mkinitrd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/mkinitrd -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/mkinitrd/ChangeLog,v 1.23 2008/10/14 15:28:49 flameeyes Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/mkinitrd/ChangeLog,v 1.24 2009/08/09 16:22:09 ssuominen Exp $ + +*mkinitrd-4.2.0.3-r1 (09 Aug 2009) + + 09 Aug 2009; Samuli Suominen <ssuominen@gentoo.org> + +mkinitrd-4.2.0.3-r1.ebuild, +files/mkinitrd-4.2.0.3-glibc-2.10.patch: + Fix building with GLIBC 2.10+ wrt #271605. 14 Oct 2008; Diego Pettenò <flameeyes@gentoo.org> mkinitrd-4.2.0.3.ebuild: diff --git a/sys-apps/mkinitrd/files/mkinitrd-4.2.0.3-glibc-2.10.patch b/sys-apps/mkinitrd/files/mkinitrd-4.2.0.3-glibc-2.10.patch new file mode 100644 index 000000000000..b8f4842c60a7 --- /dev/null +++ b/sys-apps/mkinitrd/files/mkinitrd-4.2.0.3-glibc-2.10.patch @@ -0,0 +1,29 @@ +diff -ur mkinitrd-4.2.0.3.orig/grubby/grubby.c mkinitrd-4.2.0.3/grubby/grubby.c +--- mkinitrd-4.2.0.3.orig/grubby/grubby.c 2005-01-19 06:29:14.000000000 +0200 ++++ mkinitrd-4.2.0.3/grubby/grubby.c 2009-08-09 19:19:41.000000000 +0300 +@@ -239,7 +239,9 @@ + struct singleEntry * findEntryByPath(struct grubConfig * cfg, + const char * path, const char * prefix, + int * index); ++#ifndef strndup + static char * strndup(char * from, int len); ++#endif + static int readFile(int fd, char ** bufPtr); + static void lineInit(struct singleLine * line); + static void lineFree(struct singleLine * line); +@@ -249,6 +251,7 @@ + struct configFileInfo * cfi); + static char * getRootSpecifier(char * str); + ++#ifndef strndup + static char * strndup(char * from, int len) { + char * to; + +@@ -258,6 +261,7 @@ + + return to; + } ++#endif + + static char * sdupprintf(const char *format, ...) + #ifdef __GNUC__ diff --git a/sys-apps/mkinitrd/mkinitrd-4.2.0.3-r1.ebuild b/sys-apps/mkinitrd/mkinitrd-4.2.0.3-r1.ebuild new file mode 100644 index 000000000000..4158cd421476 --- /dev/null +++ b/sys-apps/mkinitrd/mkinitrd-4.2.0.3-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/mkinitrd/mkinitrd-4.2.0.3-r1.ebuild,v 1.1 2009/08/09 16:22:09 ssuominen Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Tools for creating initrd images" +HOMEPAGE="http://www.redhat.com/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86" +IUSE="selinux" + +DEPEND="dev-libs/popt + virtual/os-headers" +RDEPEND="app-shells/bash" +PDEPEND="selinux? ( sys-apps/policycoreutils )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-glibc-2.10.patch + # bug 29694 -- Change vgwrapper to static vgscan and vgchange + epatch "${FILESDIR}"/mkinitrd-lvm_statics.diff + sed -i \ + -e '/^CFLAGS/s: -Werror::' \ + -e '/^CFLAGS/s: -g::' \ + -e '/^CFLAGS/s:=:+=:' \ + grubby/Makefile nash/Makefile +} + +src_compile() { + if has_version ">=sys-libs/glibc-2.10"; then + append-flags -Dstrndup=strndup + fi + + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" -C nash || die "nash compile failed." + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" -C grubby|| die "grubby compile failed." +} + +src_install() { + into / + dosbin grubby/grubby nash/nash mkinitrd || die + doman grubby/grubby.8 nash/nash.8 mkinitrd.8 +} |