diff options
author | 2002-09-27 09:55:02 +0000 | |
---|---|---|
committer | 2002-09-27 09:55:02 +0000 | |
commit | 8fcb5827509f5b3451f70094d8e257cebfca0ced (patch) | |
tree | 733d197df5d80f7a48d3eef3e197a406386689e3 /sys-libs | |
parent | Version bump including security fix. (diff) | |
download | historical-8fcb5827509f5b3451f70094d8e257cebfca0ced.tar.gz historical-8fcb5827509f5b3451f70094d8e257cebfca0ced.tar.bz2 historical-8fcb5827509f5b3451f70094d8e257cebfca0ced.zip |
-r7 includes a bugfix for the security update in -r6. -r8 is the old -r7.
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 26 | ||||
-rw-r--r-- | sys-libs/glibc/files/digest-glibc-2.2.5-r8 | 2 | ||||
-rw-r--r-- | sys-libs/glibc/files/glibc-2.2.5-sunrpc-overflow.diff | 82 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.2.5-r7.ebuild | 64 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.2.5-r8.ebuild | 218 |
5 files changed, 338 insertions, 54 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index 4aea9ab5c0ce..1ab2ae7960ee 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,18 +1,17 @@ # ChangeLog for sys-libs/glibc # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.14 2002/09/22 08:01:31 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.15 2002/09/27 09:55:02 aliz Exp $ - 22 Sep 2002; Martin Schlemmer <azarah@gentoo.org> glibc-2.2.5-r6.ebuild : - - Fix pic support, thanks to Christopher Horler <chris@horler.demon.co.uk>. - This closes bug #8178. - - 08 Sep 2002; Martin Schlemmer <azarah@gentoo.org> glibc-2.2.5-r6.ebuild : - - Add alpha related patches thanks to Bjoern Brauel <bjoern@tuxnetwork.de>. +*glibc-2.2.5-r8 (27 Sep 2002) + + 27 Sep 2002; Daniel Ahlberg <aliz@gentoo.org> : + Moved -r7 to -r8 to give room for updated -r6 release. *glibc-2.2.5-r7 (03 Aug 2002) + 27 Sep 2002; Daniel Ahlberg <aliz@gentoo.org> : + Bumped -r6 to -r7 to include fix for sunrpc overflow. + 03 Aug 2002; Martin Schlemmer <azarah@gentoo.org> glibc-2.2.5-r7.ebuild : Add the patch for fixing the segfaults in mutt, etc while sandbox is @@ -24,6 +23,15 @@ *glibc-2.2.5-r6 (02 Aug 2002) + 22 Sep 2002; Martin Schlemmer <azarah@gentoo.org> glibc-2.2.5-r6.ebuild : + + Fix pic support, thanks to Christopher Horler <chris@horler.demon.co.uk>. + This closes bug #8178. + + 08 Sep 2002; Martin Schlemmer <azarah@gentoo.org> glibc-2.2.5-r6.ebuild : + + Add alpha related patches thanks to Bjoern Brauel <bjoern@tuxnetwork.de>. + 02 Aug 2002; Daniel Ahlberg <aliz@gentoo.org> Added patch for sunrpc overflow. diff --git a/sys-libs/glibc/files/digest-glibc-2.2.5-r8 b/sys-libs/glibc/files/digest-glibc-2.2.5-r8 new file mode 100644 index 000000000000..acc05c85ba28 --- /dev/null +++ b/sys-libs/glibc/files/digest-glibc-2.2.5-r8 @@ -0,0 +1,2 @@ +MD5 5be613d02b934d8e305dd2f93062fa6c glibc-2.2.5.tar.bz2 12404613 +MD5 33b9ae01d51263867d338adfba105278 glibc-linuxthreads-2.2.5.tar.bz2 168269 diff --git a/sys-libs/glibc/files/glibc-2.2.5-sunrpc-overflow.diff b/sys-libs/glibc/files/glibc-2.2.5-sunrpc-overflow.diff index a65c8f22847e..eb7e59c0ceb3 100644 --- a/sys-libs/glibc/files/glibc-2.2.5-sunrpc-overflow.diff +++ b/sys-libs/glibc/files/glibc-2.2.5-sunrpc-overflow.diff @@ -1,24 +1,88 @@ ---- libc/sunrpc/xdr_array.c 2001/08/17 04:48:31 1.5 -+++ libc/sunrpc/xdr_array.c 2002/08/02 01:35:39 1.5.2.1 +--- glibc-2.2.5.orig/malloc/malloc.c Wed Sep 19 05:23:27 2001 ++++ glibc-2.2.5/malloc/malloc.c Tue Aug 13 11:16:26 2002 +@@ -3795,14 +3795,26 @@ + { + arena *ar_ptr; + mchunkptr p, oldtop; +- INTERNAL_SIZE_T sz, csz, oldtopsize; ++ INTERNAL_SIZE_T bytes, sz, csz, oldtopsize; + Void_t* mem; + + #if defined _LIBC || defined MALLOC_HOOKS + __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) = + __malloc_hook; ++ ++ /* size_t is unsigned so the behavior on overflow is defined. */ ++ bytes = n * elem_size; ++#define HALF_INTERNAL_SIZE_T \ ++ (((INTERNAL_SIZE_T) 1) << (8 * sizeof (INTERNAL_SIZE_T) / 2)) ++ if (__builtin_expect ((n | elem_size) >= HALF_INTERNAL_SIZE_T, 0)) { ++ if (elem_size != 0 && bytes / elem_size != n) { ++ __set_errno (ENOMEM); ++ return 0; ++ } ++ } ++ + if (hook != NULL) { +- sz = n * elem_size; ++ sz = bytes; + #if defined __GNUC__ && __GNUC__ >= 2 + mem = (*hook)(sz, RETURN_ADDRESS (0)); + #else +@@ -3819,7 +3831,7 @@ + } + #endif + +- if(request2size(n * elem_size, sz)) ++ if(request2size(bytes, sz)) + return 0; + arena_get(ar_ptr, sz); + if(!ar_ptr) +@@ -3862,7 +3874,7 @@ + } + if (p == 0) return 0; + } +- mem = BOUNDED_N(chunk2mem(p), n * elem_size); ++ mem = BOUNDED_N(chunk2mem(p), bytes); + + /* Two optional cases in which clearing not necessary */ + +@@ -4899,9 +4911,9 @@ + { + void *mem; + +- /* Test whether the SIZE argument is valid. It must be a power of +- two multiple of sizeof (void *). */ +- if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0) ++ /* Test whether the ALIGNMENT argument is valid. It must be a power ++ of two multiple of sizeof (void *). */ ++ if (alignment % sizeof (void *) != 0 || (alignment & (alignment - 1)) != 0) + return EINVAL; + + mem = __libc_memalign (alignment, size); +diff -urN glibc-2.2.5.orig/sunrpc/xdr_array.c glibc-2.2.5/sunrpc/xdr_array.c +--- glibc-2.2.5.orig/sunrpc/xdr_array.c Fri Sep 7 13:59:19 2001 ++++ glibc-2.2.5/sunrpc/xdr_array.c Thu Aug 1 16:48:38 2002 @@ -45,6 +45,7 @@ #include <rpc/types.h> #include <rpc/xdr.h> #include <libintl.h> +#include <limits.h> - + #ifdef USE_IN_LIBIO # include <wchar.h> -@@ -81,7 +82,11 @@ +@@ -81,7 +82,9 @@ return FALSE; } c = *sizep; - if ((c > maxsize) && (xdrs->x_op != XDR_FREE)) -+ /* -+ * XXX: Let the overflow possibly happen with XDR_FREE because mem_free() -+ * doesn't actually use its second argument anyway. -+ */ -+ if ((c > maxsize || c > UINT_MAX / elsize) && (xdrs->x_op != XDR_FREE)) ++ ++ /* Make sure that "c * elsize" doesn't overflow */ ++ if ((c > maxsize || UINT_MAX/elsize < c) && (xdrs->x_op != XDR_FREE)) { return FALSE; } + + + diff --git a/sys-libs/glibc/glibc-2.2.5-r7.ebuild b/sys-libs/glibc/glibc-2.2.5-r7.ebuild index df36f0c09cfa..054d9695a89f 100644 --- a/sys-libs/glibc/glibc-2.2.5-r7.ebuild +++ b/sys-libs/glibc/glibc-2.2.5-r7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.5-r7.ebuild,v 1.5 2002/09/08 16:33:24 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.5-r7.ebuild,v 1.6 2002/09/27 09:55:02 aliz Exp $ inherit flag-o-matic filter-flags "-fomit-frame-pointer -malign-double" @@ -10,23 +10,25 @@ DESCRIPTION="GNU libc6 (also called glibc2) C library" SRC_URI="ftp://sources.redhat.com/pub/glibc/releases/glibc-${PV}.tar.bz2 ftp://sources.redhat.com/pub/glibc/releases/glibc-linuxthreads-${PV}.tar.bz2" HOMEPAGE="http://www.gnu.org/software/libc/libc.html" - -KEYWORDS="x86 ppc sparc sparc64" +KEYWORDS="x86 ppc sparc sparc64 alpha" LICENSE="GPL-2" SLOT="2.2" #portage-1.8.9 needed for smart library merging feature (avoids segfaults on glibc upgrade) #drobbins, 18 Mar 2002: we now rely on the system profile to select the correct linus-headers -# -#we need gcc-2.95.3-r7 or later to fix the atexit() issue with the sandbox patch -#azarah, 3 Aug 2002 DEPEND="sys-kernel/linux-headers - >=sys-devel/gcc-2.95.3-r7 nls? ( sys-devel/gettext )" - -RDEPEND="sys-kernel/linux-headers - sys-apps/baselayout - !build? ( >=sys-apps/portage-2.0.23 )" +RDEPEND="sys-kernel/linux-headers" + +if [ -z "`use build`" ] +then + RDEPEND="${RDEPEND} + sys-apps/baselayout" +else + RDEPEND="${RDEPEND} + >=sys-apps/portage-1.8.9_pre1 + sys-apps/baselayout" +fi PROVIDE="virtual/glibc" @@ -34,16 +36,8 @@ PROVIDE="virtual/glibc" export CFLAGS="$CFLAGS -O2" export CXXFLAGS="$CFLAGS" -pkg_config() { - eerror - eerror "This is a bad revision of glibc that breaks binary compatibility!!" - eerror - die -} - src_unpack() { unpack glibc-${PV}.tar.bz2 || die - cd ${S} #extract pre-made man pages. Otherwise we need perl, which is a no-no. mkdir man; cd man @@ -54,12 +48,12 @@ src_unpack() { # This patch apparently eliminates compiler warnings for some versions of gcc. # For information about the string2 patch, see: # http://lists.gentoo.org/pipermail/gentoo-dev/2001-June/001559.html - cd ${S}; patch -p0 < ${FILESDIR}/glibc-2.2.4-string2.h.diff || die + patch -p0 < ${FILESDIR}/glibc-2.2.4-string2.h.diff || die # This next one is a new patch to fix thread signal handling. See: # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00120.html # (Added by drobbins on 05 Mar 2002) - cd ${S}; patch -p0 < ${FILESDIR}/glibc-2.2.5-threadsig.diff || die + patch -p0 < ${FILESDIR}/glibc-2.2.5-threadsig.diff || die # This next patch fixes a test that will timeout due to ReiserFS' slow handling of sparse files cd ${S}/io; patch -p0 < ${FILESDIR}/glibc-2.2.2-test-lfs-timeout.patch || die @@ -92,21 +86,10 @@ src_unpack() { # cd ${S}; patch -p1 < ${FILESDIR}/${P}-sunrpc-overflow.diff || die - # This one fixes a segfault in some programs when sandbox is running. - # We need gcc-2.95.3-r7 or later, or else precompiled stuff like Quake3, - # etc do not run. See for more info: - # - # http://sources.redhat.com/ml/bug-glibc/2002-04/msg00025.html - # http://bugs.gentoo.org/show_bug.cgi?id=501 - # - # Azarah (3 Aug 2002) - cd ${S}; patch -p1 < ${FILESDIR}/${P}-sandbox.diff || die - - if [ ${ARCH} == "x86" ]; then + if [ "${ARCH}" = "x86" ]; then # This patch fixes the nvidia-glx probs, openoffice and vmware probs and such.. # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00152.html - cd ${S} - patch -p1 < ${FILESDIR}/glibc-divdi3.diff || die + cd ${S}; patch -p1 < ${FILESDIR}/glibc-divdi3.diff || die fi # Some gcc-3.1.1 fixes. This works fine for other versions of gcc as well, @@ -116,8 +99,15 @@ src_unpack() { cd ${S}; patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311.patch || die # Avoid "Error: illegal instruction" when compiling on sparc with gcc 3.1.1 - if [ ${ARCH} == "sparc" -o ${ARCH} == "sparc64" ]; then - patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311-sparc.patch || die + if [ "${ARCH}" = "sparc" -o "${ARCH}" = "sparc64" ]; then + cd ${S}; patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311-sparc.patch || die + fi + + # Some patches to fixup build on alpha + if [ "${ARCH}" = "alpha" ]; then + cd ${S} + patch -p1 < ${FILESDIR}/glibc-2.2.5-alpha-gcc3-fix.diff || die + patch -p1 < ${FILESDIR}/glibc-2.2.5-alpha-pcdyn-fix.diff || die fi } @@ -177,6 +167,8 @@ src_install() { if [ "`use pic`" ] then + find ${S}/buildhere -name "soinit.os" -exec cp {} ${D}/lib/soinit.o \; + find ${S}/buildhere -name "sofini.os" -exec cp {} ${D}/lib/sofini.o \; find ${S}/buildhere -name "*_pic.a" -exec cp {} ${D}/lib \; find ${S}/buildhere -name "*.map" -exec cp {} ${D}/lib \; for i in ${D}/lib/*.map diff --git a/sys-libs/glibc/glibc-2.2.5-r8.ebuild b/sys-libs/glibc/glibc-2.2.5-r8.ebuild new file mode 100644 index 000000000000..28676c3a75ff --- /dev/null +++ b/sys-libs/glibc/glibc-2.2.5-r8.ebuild @@ -0,0 +1,218 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.2.5-r8.ebuild,v 1.1 2002/09/27 09:55:02 aliz Exp $ +inherit flag-o-matic + +filter-flags "-fomit-frame-pointer -malign-double" + +S=${WORKDIR}/${P} +DESCRIPTION="GNU libc6 (also called glibc2) C library" +SRC_URI="ftp://sources.redhat.com/pub/glibc/releases/glibc-${PV}.tar.bz2 + ftp://sources.redhat.com/pub/glibc/releases/glibc-linuxthreads-${PV}.tar.bz2" +HOMEPAGE="http://www.gnu.org/software/libc/libc.html" + +KEYWORDS="x86 ppc sparc sparc64" +LICENSE="GPL-2" +SLOT="2.2" + +#portage-1.8.9 needed for smart library merging feature (avoids segfaults on glibc upgrade) +#drobbins, 18 Mar 2002: we now rely on the system profile to select the correct linus-headers +# +#we need gcc-2.95.3-r7 or later to fix the atexit() issue with the sandbox patch +#azarah, 3 Aug 2002 +DEPEND="sys-kernel/linux-headers + >=sys-devel/gcc-2.95.3-r7 + nls? ( sys-devel/gettext )" + +RDEPEND="sys-kernel/linux-headers + sys-apps/baselayout + !build? ( >=sys-apps/portage-2.0.23 )" + +PROVIDE="virtual/glibc" + +#lock glibc at -O2 -- linuxthreads needs it and we want to be conservative here +export CFLAGS="$CFLAGS -O2" +export CXXFLAGS="$CFLAGS" + +pkg_config() { + eerror + eerror "This is a bad revision of glibc that breaks binary compatibility!!" + eerror + die +} + +src_unpack() { + unpack glibc-${PV}.tar.bz2 || die + + cd ${S} + #extract pre-made man pages. Otherwise we need perl, which is a no-no. + mkdir man; cd man + tar xjf ${FILESDIR}/glibc-manpages-${PV}.tar.bz2 || die + cd ${S} + unpack glibc-linuxthreads-${PV}.tar.bz2 || die + + # This patch apparently eliminates compiler warnings for some versions of gcc. + # For information about the string2 patch, see: + # http://lists.gentoo.org/pipermail/gentoo-dev/2001-June/001559.html + cd ${S}; patch -p0 < ${FILESDIR}/glibc-2.2.4-string2.h.diff || die + + # This next one is a new patch to fix thread signal handling. See: + # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00120.html + # (Added by drobbins on 05 Mar 2002) + cd ${S}; patch -p0 < ${FILESDIR}/glibc-2.2.5-threadsig.diff || die + + # This next patch fixes a test that will timeout due to ReiserFS' slow handling of sparse files + cd ${S}/io; patch -p0 < ${FILESDIR}/glibc-2.2.2-test-lfs-timeout.patch || die + + # The following spinlock error should only bite if you compile without any -O in CFLAGS, so a tweak + # shouldn't be necessary. The solution is to add -O2. According to Andreas Jaeger of SuSE, "glibc + # *needs* to be compiled with optimization" (emphasis mine). So let's fix the optimization settings, + # not tweak glibc. + # (drobbins, 10 Feb 2002) + # http://sources.redhat.com/ml/bug-glibc/2001-09/msg00041.html + # http://sources.redhat.com/ml/bug-glibc/2001-09/msg00042.html + # cd ${S}/linuxthreads + # cp spinlock.c spinlock.c.orig + # sed -e 's/"=m" (lock->__status) : "0" (lock->__status/"+m" (lock->__status/g' spinlock.c.orig > spinlock.c + + # The glob() buffer overflow in glibc 2.2.4 was fixed in 2.2.5; commenting out. + # http://lwn.net/2001/1220/a/glibc-vulnerability.php3 + # cd ${S} + # patch -p1 < ${FILESDIR}/glibc-2.2.4-glob-overflow.diff || die + + # A buffer overflow vulnerability exists in multiple implementations of DNS + # resolver libraries. This affects glibc-2.2.5 and earlier. See bug #4923 + # and: + # + # http://www.cert.org/advisories/CA-2002-19.html + cd ${S}; patch -p1 < ${FILESDIR}/${P}-dns-network-overflow.diff || die + + # Security update for sunrpc + # <aliz@gentoo.org> + # + cd ${S}; patch -p1 < ${FILESDIR}/${P}-sunrpc-overflow.diff || die + + # This one fixes a segfault in some programs when sandbox is running. + # We need gcc-2.95.3-r7 or later, or else precompiled stuff like Quake3, + # etc do not run. See for more info: + # + # http://sources.redhat.com/ml/bug-glibc/2002-04/msg00025.html + # http://bugs.gentoo.org/show_bug.cgi?id=501 + # + # Azarah (3 Aug 2002) + cd ${S}; patch -p1 < ${FILESDIR}/${P}-sandbox.diff || die + + if [ ${ARCH} == "x86" ]; then + # This patch fixes the nvidia-glx probs, openoffice and vmware probs and such.. + # http://sources.redhat.com/ml/libc-hacker/2002-02/msg00152.html + cd ${S} + patch -p1 < ${FILESDIR}/glibc-divdi3.diff || die + fi + + # Some gcc-3.1.1 fixes. This works fine for other versions of gcc as well, + # and should generally be ok, as it just fixes define order that causes scope + # problems with gcc-3.1.1. + # (Azarah, 14 Jul 2002) + cd ${S}; patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311.patch || die + + # Avoid "Error: illegal instruction" when compiling on sparc with gcc 3.1.1 + if [ ${ARCH} == "sparc" -o ${ARCH} == "sparc64" ]; then + patch -p1 < ${FILESDIR}/glibc-2.2.5-gcc311-sparc.patch || die + fi +} + +src_compile() { + local myconf="" + # If we build for the build system we use the kernel headers from the target + use build && myconf="${myconf} --with-header=${ROOT}usr/include" + use nls || myconf="${myconf} --disable-nls" + + rm -rf buildhere + mkdir buildhere + cd buildhere + ../configure --host=${CHOST} \ + --with-gd=no \ + --without-cvs \ + --enable-add-ons=linuxthreads \ + --disable-profile \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --libexecdir=/usr/lib/misc \ + ${myconf} || die + #This next option breaks the Sun JDK and the IBM JDK + #We should really keep compatibility with older kernels, anyway + #--enable-kernel=2.4.0 + + make PARALLELMFLAGS="${MAKEOPTS}" || die + make check +} + + +src_install() { + export LC_ALL=C + make PARALLELMFLAGS="${MAKEOPTS}" \ + install_root=${D} \ + install -C buildhere || die + + if [ -z "`use build`" ] + then + make PARALLELMFLAGS="${MAKEOPTS}" \ + install_root=${D} \ + info -C buildhere || die + + make PARALLELMFLAGS="${MAKEOPTS}" \ + install_root=${D} \ + localedata/install-locales -C buildhere || die + + #install linuxthreads man pages + dodir /usr/share/man/man3 + doman ${S}/man/*.3thr + install -m 644 nscd/nscd.conf ${D}/etc + dodoc BUGS ChangeLog* CONFORMANCE COPYING* FAQ INTERFACE \ + NEWS NOTES PROJECTS README* + else + rm -rf ${D}/usr/share ${D}/usr/lib/gconv + fi + + if [ "`use pic`" ] + then + find ${S}/buildhere -name "*_pic.a" -exec cp {} ${D}/lib \; + find ${S}/buildhere -name "*.map" -exec cp {} ${D}/lib \; + for i in ${D}/lib/*.map + do + mv ${i} ${i%.map}_pic.map + done + fi + + #is this next line actually needed or does the makefile get it right? + #It previously has 0755 perms which was killing things. + chmod 4755 ${D}/usr/lib/misc/pt_chown + rm -f ${D}/etc/ld.so.cache + + #prevent overwriting of the /etc/localtime symlink. We'll handle the + #creation of the "factory" symlink in pkg_postinst(). + rm -f ${D}/etc/localtime + + #some things want this, notably ash. + dosym /usr/lib/libbsd-compat.a /usr/lib/libbsd.a +} + +pkg_postinst() { + # Correct me if I am wrong here, but my /etc/localtime is a file + # created by zic .... + # I am thinking that it should only be recreated if no /etc/localtime + # exists, or if it is an invalid symlink. + # + # For invalid symlink: + # -f && -e will fail + # -L will succeed + # + if [ ! -e ${ROOT}/etc/localtime ] + then + echo "Please remember to set your timezone using the zic command." + rm -f ${ROOT}/etc/localtime + ln -s ../usr/share/zoneinfo/Factory ${ROOT}/etc/localtime + fi +} + |