From f4e418c74a37dfd4481a2a661da8e861237759da Mon Sep 17 00:00:00 2001 From: Rosa Date: Wed, 1 Feb 2012 14:42:15 +0400 Subject: [PATCH] Automatic import for version 2.13 --- .abf.yml | 8 + 0001-x86_64-fix-for-new-memcpy-behavior.patch | 43 + crypt_freesec.c | 766 +++++ crypt_freesec.h | 24 + glibc-2.10.1-biarch-cpp-defines.patch | 17 + glibc-2.10.1-mdv-avx-owl-crypt.patch | 57 + glibc-2.10.1-mdv-owl-crypt_freesec.patch | 127 + glibc-2.10.1-multiarch.patch | 15 + ....1-localedef-archive-follow-symlinks.patch | 18 + ...n-global-scope-to-RFC-1918-addresses.patch | 44 + glibc-2.12.1-fhs.patch | 38 + ...expand-ORIGIN-in-privileged-programs.patch | 92 + glibc-2.12.1-submitted-translit-colon.patch | 35 + glibc-2.12.2-resolve-tls.patch | 64 + glibc-2.13-fix-compile-error.patch | 30 + glibc-2.13-prelink.patch | 32 + glibc-2.2-nss-upgrade.patch | 26 + glibc-2.2.4-xterm-xvt.patch | 13 + ....3.2-tcsetattr-kernel-bug-workaround.patch | 47 + glibc-2.3.3-nscd-enable.patch | 11 + glibc-2.3.4-i586-if-no-cmov.patch | 30 + glibc-2.3.4-timezone.patch | 21 + glibc-2.3.5-biarch-utils.patch | 57 + glibc-2.3.6-avx-increase_BF_FRAME.patch | 13 + glibc-2.3.6-nsswitch.conf.patch | 50 + glibc-2.3.6-ppc-build-lddlibc4.patch | 14 + glibc-2.3.6-pt_BR-i18nfixes.patch | 29 + glibc-2.4.90-compat-EUR-currencies.patch | 93 + glibc-2.4.90-gcc4-fortify.patch | 11 + glibc-2.4.90-i386-hwcapinfo.patch | 100 + glibc-2.4.90-i586-hptiming.patch | 132 + glibc-2.4.90-testsuite-ldbl-bits.patch | 18 + glibc-2.4.90-testsuite-rt-notparallel.patch | 24 + glibc-2.6-nice_fix.patch | 16 + glibc-2.7-mdv-wrapper_handle_sha.patch | 147 + ...ovide_CFI_for_the_outermost_function.patch | 58 + glibc-2.8-ENOTTY-fr-translation.patch | 12 + glibc-2.8-nscd-init-should-start.patch | 12 + glibc-2.9-avx-relocate_fcrypt.patch | 49 + glibc-2.9-ldd-non-exec.patch | 40 + glibc-2.9-nscd-no-host-cache.patch | 16 + glibc-2.9-share-locale.patch | 36 + glibc-check.sh | 59 + glibc-find-requires.sh | 140 + glibc-post-wrapper.c | 141 + glibc.spec | 2669 +++++++++++++++++ glibc_local-syscall-mcount.diff | 27 + 47 files changed, 5521 insertions(+) create mode 100644 .abf.yml create mode 100644 0001-x86_64-fix-for-new-memcpy-behavior.patch create mode 100644 crypt_freesec.c create mode 100644 crypt_freesec.h create mode 100644 glibc-2.10.1-biarch-cpp-defines.patch create mode 100644 glibc-2.10.1-mdv-avx-owl-crypt.patch create mode 100644 glibc-2.10.1-mdv-owl-crypt_freesec.patch create mode 100644 glibc-2.10.1-multiarch.patch create mode 100644 glibc-2.11.1-localedef-archive-follow-symlinks.patch create mode 100644 glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch create mode 100644 glibc-2.12.1-fhs.patch create mode 100644 glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch create mode 100644 glibc-2.12.1-submitted-translit-colon.patch create mode 100644 glibc-2.12.2-resolve-tls.patch create mode 100644 glibc-2.13-fix-compile-error.patch create mode 100644 glibc-2.13-prelink.patch create mode 100644 glibc-2.2-nss-upgrade.patch create mode 100644 glibc-2.2.4-xterm-xvt.patch create mode 100644 glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch create mode 100644 glibc-2.3.3-nscd-enable.patch create mode 100644 glibc-2.3.4-i586-if-no-cmov.patch create mode 100644 glibc-2.3.4-timezone.patch create mode 100644 glibc-2.3.5-biarch-utils.patch create mode 100644 glibc-2.3.6-avx-increase_BF_FRAME.patch create mode 100644 glibc-2.3.6-nsswitch.conf.patch create mode 100644 glibc-2.3.6-ppc-build-lddlibc4.patch create mode 100644 glibc-2.3.6-pt_BR-i18nfixes.patch create mode 100644 glibc-2.4.90-compat-EUR-currencies.patch create mode 100644 glibc-2.4.90-gcc4-fortify.patch create mode 100644 glibc-2.4.90-i386-hwcapinfo.patch create mode 100644 glibc-2.4.90-i586-hptiming.patch create mode 100644 glibc-2.4.90-testsuite-ldbl-bits.patch create mode 100644 glibc-2.4.90-testsuite-rt-notparallel.patch create mode 100644 glibc-2.6-nice_fix.patch create mode 100644 glibc-2.7-mdv-wrapper_handle_sha.patch create mode 100644 glibc-2.7-provide_CFI_for_the_outermost_function.patch create mode 100644 glibc-2.8-ENOTTY-fr-translation.patch create mode 100644 glibc-2.8-nscd-init-should-start.patch create mode 100644 glibc-2.9-avx-relocate_fcrypt.patch create mode 100644 glibc-2.9-ldd-non-exec.patch create mode 100644 glibc-2.9-nscd-no-host-cache.patch create mode 100644 glibc-2.9-share-locale.patch create mode 100755 glibc-check.sh create mode 100755 glibc-find-requires.sh create mode 100644 glibc-post-wrapper.c create mode 100644 glibc.spec create mode 100644 glibc_local-syscall-mcount.diff diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..d9e788d --- /dev/null +++ b/.abf.yml @@ -0,0 +1,8 @@ +--- +sources: + crypt_blowfish-1.0.2.tar.gz: e83e798528e72695e610e2a6419b57272d00fa0b + glibc-2.13.tar.xz: 38e7d510b41a2c36eb392c79eb5c80e0ec35a7f2 + glibc-2.13.tar.xz.sig: c7953c5c032a3394af6711c21ee8972500f5667d + glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f + glibc-powerpc-cpu-addon-v0.03.tar.bz2: a88f5e1e7647f131984cb831d54ea885b820001e + glibc-redhat.tar.bz2: 4ac897d3bb2367d00bfed2c45a00e4a8a532e9fc diff --git a/0001-x86_64-fix-for-new-memcpy-behavior.patch b/0001-x86_64-fix-for-new-memcpy-behavior.patch new file mode 100644 index 0000000..33d83b7 --- /dev/null +++ b/0001-x86_64-fix-for-new-memcpy-behavior.patch @@ -0,0 +1,43 @@ +From 03f3e2574dc5f8cd7a1fad83edee7f1d9f6b45cb Mon Sep 17 00:00:00 2001 +From: Felipe Contreras +Date: Mon, 11 Apr 2011 13:41:20 +0300 +Subject: [PATCH] x86_64: fix for new memcpy behavior + +On 2.14 memcpy@GLIBC_2.2.5 is an alias to memmove, only +memcpy@GLIBC_2.13 uses the new behavior. + +This backports the old behavior for versions before than 2.14. + +Signed-off-by: Felipe Contreras +--- + sysdeps/x86_64/multiarch/memcpy-ssse3-back.S | 1 + + sysdeps/x86_64/multiarch/memcpy-ssse3.S | 1 + + 2 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S +index 48c974e..2867d45 100644 +--- a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S ++++ b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S +@@ -30,6 +30,7 @@ + #ifndef MEMCPY + # define MEMCPY __memcpy_ssse3_back + # define MEMCPY_CHK __memcpy_chk_ssse3_back ++# define USE_AS_MEMMOVE + #endif + + #ifndef ALIGN +diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3.S b/sysdeps/x86_64/multiarch/memcpy-ssse3.S +index 9a878d3..fb60e06 100644 +--- a/sysdeps/x86_64/multiarch/memcpy-ssse3.S ++++ b/sysdeps/x86_64/multiarch/memcpy-ssse3.S +@@ -30,6 +30,7 @@ + #ifndef MEMCPY + # define MEMCPY __memcpy_ssse3 + # define MEMCPY_CHK __memcpy_chk_ssse3 ++# define USE_AS_MEMMOVE + #endif + + #ifndef ALIGN +-- +1.7.5.rc1 + diff --git a/crypt_freesec.c b/crypt_freesec.c new file mode 100644 index 0000000..b23cccc --- /dev/null +++ b/crypt_freesec.c @@ -0,0 +1,766 @@ +/* + * This version is derived from the original implementation of FreeSec + * (release 1.1) by David Burren. I've reviewed the changes made in + * OpenBSD (as of 2.7) and modified the original code in a similar way + * where applicable. I've also made it reentrant and did a number of + * other changes -- SD. + */ + +/* + * FreeSec: libcrypt for NetBSD + * + * Copyright (c) 1994 David Burren + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.4 2005/11/16 13:08:32 solar Exp $ + * $Id: crypt.c,v 1.15 1994/09/13 04:58:49 davidb Exp $ + * + * This is an original implementation of the DES and the crypt(3) interfaces + * by David Burren . + * + * An excellent reference on the underlying algorithm (and related + * algorithms) is: + * + * B. Schneier, Applied Cryptography: protocols, algorithms, + * and source code in C, John Wiley & Sons, 1994. + * + * Note that in that book's description of DES the lookups for the initial, + * pbox, and final permutations are inverted (this has been brought to the + * attention of the author). A list of errata for this book has been + * posted to the sci.crypt newsgroup by the author and is available for FTP. + * + * ARCHITECTURE ASSUMPTIONS: + * This code used to have some nasty ones, but I believe these have + * been removed by now. The code isn't very portable and requires a + * 32-bit integer type, though -- SD. + */ + +#include +#include + +#ifdef TEST +#include +#endif + +#include "crypt_freesec.h" + +#define _PASSWORD_EFMT1 '_' + +static u_char IP[64] = { + 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, + 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, + 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, + 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7 +}; + +static u_char key_perm[56] = { + 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, + 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, + 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, + 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4 +}; + +static u_char key_shifts[16] = { + 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 +}; + +static u_char comp_perm[48] = { + 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32 +}; + +/* + * No E box is used, as it's replaced by some ANDs, shifts, and ORs. + */ + +static u_char sbox[8][64] = { + { + 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7, + 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8, + 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0, + 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 + }, + { + 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10, + 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5, + 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15, + 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 + }, + { + 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8, + 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1, + 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7, + 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 + }, + { + 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15, + 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9, + 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4, + 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 + }, + { + 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9, + 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6, + 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14, + 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 + }, + { + 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11, + 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8, + 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6, + 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13 + }, + { + 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1, + 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6, + 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2, + 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12 + }, + { + 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7, + 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2, + 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8, + 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11 + } +}; + +static u_char pbox[32] = { + 16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10, + 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25 +}; + +static u_int32_t bits32[32] = +{ + 0x80000000, 0x40000000, 0x20000000, 0x10000000, + 0x08000000, 0x04000000, 0x02000000, 0x01000000, + 0x00800000, 0x00400000, 0x00200000, 0x00100000, + 0x00080000, 0x00040000, 0x00020000, 0x00010000, + 0x00008000, 0x00004000, 0x00002000, 0x00001000, + 0x00000800, 0x00000400, 0x00000200, 0x00000100, + 0x00000080, 0x00000040, 0x00000020, 0x00000010, + 0x00000008, 0x00000004, 0x00000002, 0x00000001 +}; + +static u_char bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; + +static u_char ascii64[] = + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; +/* 0000000000111111111122222222223333333333444444444455555555556666 */ +/* 0123456789012345678901234567890123456789012345678901234567890123 */ + +static u_char m_sbox[4][4096]; +static u_int32_t psbox[4][256]; +static u_int32_t ip_maskl[8][256], ip_maskr[8][256]; +static u_int32_t fp_maskl[8][256], fp_maskr[8][256]; +static u_int32_t key_perm_maskl[8][128], key_perm_maskr[8][128]; +static u_int32_t comp_maskl[8][128], comp_maskr[8][128]; + +static inline int +ascii_to_bin(char ch) +{ + if (ch > 'z') + return(0); + if (ch >= 'a') + return(ch - 'a' + 38); + if (ch > 'Z') + return(0); + if (ch >= 'A') + return(ch - 'A' + 12); + if (ch > '9') + return(0); + if (ch >= '.') + return(ch - '.'); + return(0); +} + +void +_crypt_extended_init(void) +{ + int i, j, b, k, inbit, obit; + u_int32_t *p, *il, *ir, *fl, *fr; + u_int32_t *bits28, *bits24; + u_char inv_key_perm[64]; + u_char u_key_perm[56]; + u_char inv_comp_perm[56]; + u_char init_perm[64], final_perm[64]; + u_char u_sbox[8][64]; + u_char un_pbox[32]; + + bits24 = (bits28 = bits32 + 4) + 4; + + /* + * Invert the S-boxes, reordering the input bits. + */ + for (i = 0; i < 8; i++) + for (j = 0; j < 64; j++) { + b = (j & 0x20) | ((j & 1) << 4) | ((j >> 1) & 0xf); + u_sbox[i][j] = sbox[i][b]; + } + + /* + * Convert the inverted S-boxes into 4 arrays of 8 bits. + * Each will handle 12 bits of the S-box input. + */ + for (b = 0; b < 4; b++) + for (i = 0; i < 64; i++) + for (j = 0; j < 64; j++) + m_sbox[b][(i << 6) | j] = + (u_sbox[(b << 1)][i] << 4) | + u_sbox[(b << 1) + 1][j]; + + /* + * Set up the initial & final permutations into a useful form, and + * initialise the inverted key permutation. + */ + for (i = 0; i < 64; i++) { + init_perm[final_perm[i] = IP[i] - 1] = i; + inv_key_perm[i] = 255; + } + + /* + * Invert the key permutation and initialise the inverted key + * compression permutation. + */ + for (i = 0; i < 56; i++) { + u_key_perm[i] = key_perm[i] - 1; + inv_key_perm[key_perm[i] - 1] = i; + inv_comp_perm[i] = 255; + } + + /* + * Invert the key compression permutation. + */ + for (i = 0; i < 48; i++) { + inv_comp_perm[comp_perm[i] - 1] = i; + } + + /* + * Set up the OR-mask arrays for the initial and final permutations, + * and for the key initial and compression permutations. + */ + for (k = 0; k < 8; k++) { + for (i = 0; i < 256; i++) { + *(il = &ip_maskl[k][i]) = 0; + *(ir = &ip_maskr[k][i]) = 0; + *(fl = &fp_maskl[k][i]) = 0; + *(fr = &fp_maskr[k][i]) = 0; + for (j = 0; j < 8; j++) { + inbit = 8 * k + j; + if (i & bits8[j]) { + if ((obit = init_perm[inbit]) < 32) + *il |= bits32[obit]; + else + *ir |= bits32[obit-32]; + if ((obit = final_perm[inbit]) < 32) + *fl |= bits32[obit]; + else + *fr |= bits32[obit - 32]; + } + } + } + for (i = 0; i < 128; i++) { + *(il = &key_perm_maskl[k][i]) = 0; + *(ir = &key_perm_maskr[k][i]) = 0; + for (j = 0; j < 7; j++) { + inbit = 8 * k + j; + if (i & bits8[j + 1]) { + if ((obit = inv_key_perm[inbit]) == 255) + continue; + if (obit < 28) + *il |= bits28[obit]; + else + *ir |= bits28[obit - 28]; + } + } + *(il = &comp_maskl[k][i]) = 0; + *(ir = &comp_maskr[k][i]) = 0; + for (j = 0; j < 7; j++) { + inbit = 7 * k + j; + if (i & bits8[j + 1]) { + if ((obit=inv_comp_perm[inbit]) == 255) + continue; + if (obit < 24) + *il |= bits24[obit]; + else + *ir |= bits24[obit - 24]; + } + } + } + } + + /* + * Invert the P-box permutation, and convert into OR-masks for + * handling the output of the S-box arrays setup above. + */ + for (i = 0; i < 32; i++) + un_pbox[pbox[i] - 1] = i; + + for (b = 0; b < 4; b++) + for (i = 0; i < 256; i++) { + *(p = &psbox[b][i]) = 0; + for (j = 0; j < 8; j++) { + if (i & bits8[j]) + *p |= bits32[un_pbox[8 * b + j]]; + } + } +} + +static void +des_init_local(struct _crypt_extended_data *data) +{ + data->old_rawkey0 = data->old_rawkey1 = 0; + data->saltbits = 0; + data->old_salt = 0; + + data->initialized = 1; +} + +static void +setup_salt(u_int32_t salt, struct _crypt_extended_data *data) +{ + u_int32_t obit, saltbit, saltbits; + int i; + + if (salt == data->old_salt) + return; + data->old_salt = salt; + + saltbits = 0; + saltbit = 1; + obit = 0x800000; + for (i = 0; i < 24; i++) { + if (salt & saltbit) + saltbits |= obit; + saltbit <<= 1; + obit >>= 1; + } + data->saltbits = saltbits; +} + +static int +des_setkey(const char *key, struct _crypt_extended_data *data) +{ + u_int32_t k0, k1, rawkey0, rawkey1; + int shifts, round; + + rawkey0 = + (u_int32_t)(u_char)key[3] | + ((u_int32_t)(u_char)key[2] << 8) | + ((u_int32_t)(u_char)key[1] << 16) | + ((u_int32_t)(u_char)key[0] << 24); + rawkey1 = + (u_int32_t)(u_char)key[7] | + ((u_int32_t)(u_char)key[6] << 8) | + ((u_int32_t)(u_char)key[5] << 16) | + ((u_int32_t)(u_char)key[4] << 24); + + if ((rawkey0 | rawkey1) + && rawkey0 == data->old_rawkey0 + && rawkey1 == data->old_rawkey1) { + /* + * Already setup for this key. + * This optimisation fails on a zero key (which is weak and + * has bad parity anyway) in order to simplify the starting + * conditions. + */ + return(0); + } + data->old_rawkey0 = rawkey0; + data->old_rawkey1 = rawkey1; + + /* + * Do key permutation and split into two 28-bit subkeys. + */ + k0 = key_perm_maskl[0][rawkey0 >> 25] + | key_perm_maskl[1][(rawkey0 >> 17) & 0x7f] + | key_perm_maskl[2][(rawkey0 >> 9) & 0x7f] + | key_perm_maskl[3][(rawkey0 >> 1) & 0x7f] + | key_perm_maskl[4][rawkey1 >> 25] + | key_perm_maskl[5][(rawkey1 >> 17) & 0x7f] + | key_perm_maskl[6][(rawkey1 >> 9) & 0x7f] + | key_perm_maskl[7][(rawkey1 >> 1) & 0x7f]; + k1 = key_perm_maskr[0][rawkey0 >> 25] + | key_perm_maskr[1][(rawkey0 >> 17) & 0x7f] + | key_perm_maskr[2][(rawkey0 >> 9) & 0x7f] + | key_perm_maskr[3][(rawkey0 >> 1) & 0x7f] + | key_perm_maskr[4][rawkey1 >> 25] + | key_perm_maskr[5][(rawkey1 >> 17) & 0x7f] + | key_perm_maskr[6][(rawkey1 >> 9) & 0x7f] + | key_perm_maskr[7][(rawkey1 >> 1) & 0x7f]; + /* + * Rotate subkeys and do compression permutation. + */ + shifts = 0; + for (round = 0; round < 16; round++) { + u_int32_t t0, t1; + + shifts += key_shifts[round]; + + t0 = (k0 << shifts) | (k0 >> (28 - shifts)); + t1 = (k1 << shifts) | (k1 >> (28 - shifts)); + + data->de_keysl[15 - round] = + data->en_keysl[round] = comp_maskl[0][(t0 >> 21) & 0x7f] + | comp_maskl[1][(t0 >> 14) & 0x7f] + | comp_maskl[2][(t0 >> 7) & 0x7f] + | comp_maskl[3][t0 & 0x7f] + | comp_maskl[4][(t1 >> 21) & 0x7f] + | comp_maskl[5][(t1 >> 14) & 0x7f] + | comp_maskl[6][(t1 >> 7) & 0x7f] + | comp_maskl[7][t1 & 0x7f]; + + data->de_keysr[15 - round] = + data->en_keysr[round] = comp_maskr[0][(t0 >> 21) & 0x7f] + | comp_maskr[1][(t0 >> 14) & 0x7f] + | comp_maskr[2][(t0 >> 7) & 0x7f] + | comp_maskr[3][t0 & 0x7f] + | comp_maskr[4][(t1 >> 21) & 0x7f] + | comp_maskr[5][(t1 >> 14) & 0x7f] + | comp_maskr[6][(t1 >> 7) & 0x7f] + | comp_maskr[7][t1 & 0x7f]; + } + return(0); +} + +static int +do_des(u_int32_t l_in, u_int32_t r_in, u_int32_t *l_out, u_int32_t *r_out, + int count, struct _crypt_extended_data *data) +{ + /* + * l_in, r_in, l_out, and r_out are in pseudo-"big-endian" format. + */ + u_int32_t l, r, *kl, *kr, *kl1, *kr1; + u_int32_t f, r48l, r48r, saltbits; + int round; + + if (count == 0) { + return(1); + } else if (count > 0) { + /* + * Encrypting + */ + kl1 = data->en_keysl; + kr1 = data->en_keysr; + } else { + /* + * Decrypting + */ + count = -count; + kl1 = data->de_keysl; + kr1 = data->de_keysr; + } + + /* + * Do initial permutation (IP). + */ + l = ip_maskl[0][l_in >> 24] + | ip_maskl[1][(l_in >> 16) & 0xff] + | ip_maskl[2][(l_in >> 8) & 0xff] + | ip_maskl[3][l_in & 0xff] + | ip_maskl[4][r_in >> 24] + | ip_maskl[5][(r_in >> 16) & 0xff] + | ip_maskl[6][(r_in >> 8) & 0xff] + | ip_maskl[7][r_in & 0xff]; + r = ip_maskr[0][l_in >> 24] + | ip_maskr[1][(l_in >> 16) & 0xff] + | ip_maskr[2][(l_in >> 8) & 0xff] + | ip_maskr[3][l_in & 0xff] + | ip_maskr[4][r_in >> 24] + | ip_maskr[5][(r_in >> 16) & 0xff] + | ip_maskr[6][(r_in >> 8) & 0xff] + | ip_maskr[7][r_in & 0xff]; + + saltbits = data->saltbits; + while (count--) { + /* + * Do each round. + */ + kl = kl1; + kr = kr1; + round = 16; + while (round--) { + /* + * Expand R to 48 bits (simulate the E-box). + */ + r48l = ((r & 0x00000001) << 23) + | ((r & 0xf8000000) >> 9) + | ((r & 0x1f800000) >> 11) + | ((r & 0x01f80000) >> 13) + | ((r & 0x001f8000) >> 15); + + r48r = ((r & 0x0001f800) << 7) + | ((r & 0x00001f80) << 5) + | ((r & 0x000001f8) << 3) + | ((r & 0x0000001f) << 1) + | ((r & 0x80000000) >> 31); + /* + * Do salting for crypt() and friends, and + * XOR with the permuted key. + */ + f = (r48l ^ r48r) & saltbits; + r48l ^= f ^ *kl++; + r48r ^= f ^ *kr++; + /* + * Do sbox lookups (which shrink it back to 32 bits) + * and do the pbox permutation at the same time. + */ + f = psbox[0][m_sbox[0][r48l >> 12]] + | psbox[1][m_sbox[1][r48l & 0xfff]] + | psbox[2][m_sbox[2][r48r >> 12]] + | psbox[3][m_sbox[3][r48r & 0xfff]]; + /* + * Now that we've permuted things, complete f(). + */ + f ^= l; + l = r; + r = f; + } + r = l; + l = f; + } + /* + * Do final permutation (inverse of IP). + */ + *l_out = fp_maskl[0][l >> 24] + | fp_maskl[1][(l >> 16) & 0xff] + | fp_maskl[2][(l >> 8) & 0xff] + | fp_maskl[3][l & 0xff] + | fp_maskl[4][r >> 24] + | fp_maskl[5][(r >> 16) & 0xff] + | fp_maskl[6][(r >> 8) & 0xff] + | fp_maskl[7][r & 0xff]; + *r_out = fp_maskr[0][l >> 24] + | fp_maskr[1][(l >> 16) & 0xff] + | fp_maskr[2][(l >> 8) & 0xff] + | fp_maskr[3][l & 0xff] + | fp_maskr[4][r >> 24] + | fp_maskr[5][(r >> 16) & 0xff] + | fp_maskr[6][(r >> 8) & 0xff] + | fp_maskr[7][r & 0xff]; + return(0); +} + +static int +des_cipher(const char *in, char *out, u_int32_t salt, int count, + struct _crypt_extended_data *data) +{ + u_int32_t l_out, r_out, rawl, rawr; + int retval; + + setup_salt(salt, data); + + rawl = + (u_int32_t)(u_char)in[3] | + ((u_int32_t)(u_char)in[2] << 8) | + ((u_int32_t)(u_char)in[1] << 16) | + ((u_int32_t)(u_char)in[0] << 24); + rawr = + (u_int32_t)(u_char)in[7] | + ((u_int32_t)(u_char)in[6] << 8) | + ((u_int32_t)(u_char)in[5] << 16) | + ((u_int32_t)(u_char)in[4] << 24); + + retval = do_des(rawl, rawr, &l_out, &r_out, count, data); + + out[0] = l_out >> 24; + out[1] = l_out >> 16; + out[2] = l_out >> 8; + out[3] = l_out; + out[4] = r_out >> 24; + out[5] = r_out >> 16; + out[6] = r_out >> 8; + out[7] = r_out; + + return(retval); +} + +char * +_crypt_extended_r(const char *key, const char *setting, + struct _crypt_extended_data *data) +{ + int i; + u_int32_t count, salt, l, r0, r1, keybuf[2]; + u_char *p, *q; + + if (!data->initialized) + des_init_local(data); + + /* + * Copy the key, shifting each character up by one bit + * and padding with zeros. + */ + q = (u_char *) keybuf; + while (q - (u_char *) keybuf < sizeof(keybuf)) { + if ((*q++ = *key << 1)) + key++; + } + if (des_setkey((u_char *) keybuf, data)) + return(NULL); + + if (*setting == _PASSWORD_EFMT1) { + /* + * "new"-style: + * setting - underscore, 4 bytes of count, 4 bytes of salt + * key - unlimited characters + */ + for (i = 1, count = 0; i < 5; i++) + count |= ascii_to_bin(setting[i]) << (i - 1) * 6; + + for (i = 5, salt = 0; i < 9; i++) + salt |= ascii_to_bin(setting[i]) << (i - 5) * 6; + + while (*key) { + /* + * Encrypt the key with itself. + */ + if (des_cipher((u_char *) keybuf, (u_char *) keybuf, + 0, 1, data)) + return(NULL); + /* + * And XOR with the next 8 characters of the key. + */ + q = (u_char *) keybuf; + while (q - (u_char *) keybuf < sizeof(keybuf) && *key) + *q++ ^= *key++ << 1; + + if (des_setkey((u_char *) keybuf, data)) + return(NULL); + } + strncpy(data->output, setting, 9); + /* + * Double check that we weren't given a short setting. + * If we were, the above code will probably have created + * wierd values for count and salt, but we don't really care. + * Just make sure the output string doesn't have an extra + * NUL in it. + */ + data->output[9] = '\0'; + p = (u_char *) data->output + strlen(data->output); + } else { + /* + * "old"-style: + * setting - 2 bytes of salt + * key - up to 8 characters + */ + count = 25; + + salt = (ascii_to_bin(setting[1]) << 6) + | ascii_to_bin(setting[0]); + + data->output[0] = setting[0]; + /* + * If the encrypted password that the salt was extracted from + * is only 1 character long, the salt will be corrupted. We + * need to ensure that the output string doesn't have an extra + * NUL in it! + */ + data->output[1] = setting[1] ? setting[1] : data->output[0]; + p = (u_char *) data->output + 2; + } + setup_salt(salt, data); + /* + * Do it. + */ + if (do_des(0, 0, &r0, &r1, count, data)) + return(NULL); + /* + * Now encode the result... + */ + l = (r0 >> 8); + *p++ = ascii64[(l >> 18) & 0x3f]; + *p++ = ascii64[(l >> 12) & 0x3f]; + *p++ = ascii64[(l >> 6) & 0x3f]; + *p++ = ascii64[l & 0x3f]; + + l = (r0 << 16) | ((r1 >> 16) & 0xffff); + *p++ = ascii64[(l >> 18) & 0x3f]; + *p++ = ascii64[(l >> 12) & 0x3f]; + *p++ = ascii64[(l >> 6) & 0x3f]; + *p++ = ascii64[l & 0x3f]; + + l = r1 << 2; + *p++ = ascii64[(l >> 12) & 0x3f]; + *p++ = ascii64[(l >> 6) & 0x3f]; + *p++ = ascii64[l & 0x3f]; + *p = 0; + + return(data->output); +} + +#ifdef TEST +static char * +_crypt_extended(const char *key, const char *setting) +{ + static int initialized = 0; + static struct _crypt_extended_data data; + + if (!initialized) { + _crypt_extended_init(); + initialized = 1; + data.initialized = 0; + } + return _crypt_extended_r(key, setting, &data); +} + +#define crypt _crypt_extended + +static struct { + char *hash; + char *pw; +} tests[] = { + {"_J9..CCCCXBrJUJV154M", "U*U*U*U*"}, + {"_J9..CCCCXUhOBTXzaiE", "U*U***U"}, + {"_J9..CCCC4gQ.mB/PffM", "U*U***U*"}, + {"_J9..XXXXvlzQGqpPPdk", "*U*U*U*U"}, + {"_J9..XXXXsqM/YSSP..Y", "*U*U*U*U*"}, + {"_J9..XXXXVL7qJCnku0I", "*U*U*U*U*U*U*U*U"}, + {"_J9..XXXXAj8cFbP5scI", "*U*U*U*U*U*U*U*U*"}, + {"_J9..SDizh.vll5VED9g", "ab1234567"}, + {"_J9..SDizRjWQ/zePPHc", "cr1234567"}, + {"_J9..SDizxmRI1GjnQuE", "zxyDPWgydbQjgq"}, + {"_K9..SaltNrQgIYUAeoY", "726 even"}, + {"_J9..SDSD5YGyRCr4W4c", ""}, + {NULL} +}; + +int main(void) +{ + int i; + + for (i = 0; tests[i].hash; i++) + if (strcmp(crypt(tests[i].pw, tests[i].hash), tests[i].hash)) { + puts("FAILED"); + return 1; + } + + puts("PASSED"); + + return 0; +} +#endif diff --git a/crypt_freesec.h b/crypt_freesec.h new file mode 100644 index 0000000..bbf7be8 --- /dev/null +++ b/crypt_freesec.h @@ -0,0 +1,24 @@ +#ifndef _CRYPT_FREESEC_H +#define _CRYPT_FREESEC_H + +struct _crypt_extended_data { + int initialized; + u_int32_t saltbits; + u_int32_t old_salt; + u_int32_t en_keysl[16], en_keysr[16]; + u_int32_t de_keysl[16], de_keysr[16]; + u_int32_t old_rawkey0, old_rawkey1; + char output[21]; +}; + +/* + * _crypt_extended_init() must be called explicitly before first use of + * _crypt_extended_r(). + */ + +void _crypt_extended_init(void); + +char *_crypt_extended_r(const char *key, const char *setting, + struct _crypt_extended_data *data); + +#endif diff --git a/glibc-2.10.1-biarch-cpp-defines.patch b/glibc-2.10.1-biarch-cpp-defines.patch new file mode 100644 index 0000000..ab53528 --- /dev/null +++ b/glibc-2.10.1-biarch-cpp-defines.patch @@ -0,0 +1,17 @@ +2004-01-23 Gwenole Beauchesne + + * Makeconfig (%.v.i): Make sure to define __$(base-machine)__ for + biarch asm headers. + +diff -p -up glibc-2.10.1/Makeconfig.orig glibc-2.10.1/Makeconfig +--- glibc-2.10.1/Makeconfig.orig 2009-05-26 23:40:06.000000000 -0300 ++++ glibc-2.10.1/Makeconfig 2009-05-26 23:41:42.000000000 -0300 +@@ -795,7 +795,7 @@ ifeq (yes, $(build-shared)) + %.v.i: $(common-objpfx)config.h $(..)Makeconfig + sed '/^[ ]*%/!s/#.*$$//;/^[ ]*$$/d;s/^[ ]*%/#/' \ + $(filter-out FORCE %.h $(..)Makeconfig,$^) \ +- | $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - \ ++ | $(CC) -E -undef $(CPPFLAGS) -D__$(base-machine)__ -x assembler-with-cpp - \ + > $@T + mv -f $@T $@ + %.v: %.v.i diff --git a/glibc-2.10.1-mdv-avx-owl-crypt.patch b/glibc-2.10.1-mdv-avx-owl-crypt.patch new file mode 100644 index 0000000..7076c18 --- /dev/null +++ b/glibc-2.10.1-mdv-avx-owl-crypt.patch @@ -0,0 +1,57 @@ +diff -p -up glibc-2.10.1/crypt/Makefile.orig glibc-2.10.1/crypt/Makefile +--- glibc-2.10.1/crypt/Makefile.orig 2009-04-07 15:34:04.000000000 -0300 ++++ glibc-2.10.1/crypt/Makefile 2009-05-27 00:02:34.000000000 -0300 +@@ -21,13 +21,13 @@ + # + subdir := crypt + +-headers := crypt.h ++headers := crypt.h gnu-crypt.h ow-crypt.h + + extra-libs := libcrypt + extra-libs-others := $(extra-libs) + + libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ +- crypt_util ++ crypt_util crypt_blowfish x86 crypt_gensalt wrapper + + tests := cert md5c-test sha256c-test sha512c-test + +diff -p -up glibc-2.10.1/crypt/Versions.orig glibc-2.10.1/crypt/Versions +--- glibc-2.10.1/crypt/Versions.orig 2000-03-03 21:47:30.000000000 -0300 ++++ glibc-2.10.1/crypt/Versions 2009-05-26 23:58:49.000000000 -0300 +@@ -1,5 +1,6 @@ + libcrypt { + GLIBC_2.0 { + crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r; ++ crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra; + } + } +diff -p -up glibc-2.10.1/crypt/crypt-entry.c.orig glibc-2.10.1/crypt/crypt-entry.c +--- glibc-2.10.1/crypt/crypt-entry.c.orig 2007-09-19 17:37:15.000000000 -0300 ++++ glibc-2.10.1/crypt/crypt-entry.c 2009-05-26 23:58:49.000000000 -0300 +@@ -82,7 +82,7 @@ extern struct crypt_data _ufc_foobar; + */ + + char * +-__crypt_r (key, salt, data) ++__des_crypt_r (key, salt, data) + const char *key; + const char *salt; + struct crypt_data * __restrict data; +@@ -137,6 +137,7 @@ __crypt_r (key, salt, data) + _ufc_output_conversion_r (res[0], res[1], salt, data); + return data->crypt_3_buf; + } ++#if 0 + weak_alias (__crypt_r, crypt_r) + + char * +@@ -160,6 +161,7 @@ crypt (key, salt) + + return __crypt_r (key, salt, &_ufc_foobar); + } ++#endif + + + /* diff --git a/glibc-2.10.1-mdv-owl-crypt_freesec.patch b/glibc-2.10.1-mdv-owl-crypt_freesec.patch new file mode 100644 index 0000000..7ff6c05 --- /dev/null +++ b/glibc-2.10.1-mdv-owl-crypt_freesec.patch @@ -0,0 +1,127 @@ +diff -p -up glibc-2.10.1/crypt/Makefile.orig glibc-2.10.1/crypt/Makefile +--- glibc-2.10.1/crypt/Makefile.orig 2009-05-27 00:19:48.000000000 -0300 ++++ glibc-2.10.1/crypt/Makefile 2009-05-27 00:21:27.000000000 -0300 +@@ -27,7 +27,8 @@ extra-libs := libcrypt + extra-libs-others := $(extra-libs) + + libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ +- crypt_util crypt_blowfish x86 crypt_gensalt wrapper ++ crypt_util crypt_blowfish x86 crypt_gensalt crypt_freesec \ ++ wrapper + + tests := cert md5c-test sha256c-test sha512c-test + +diff -p -up glibc-2.10.1/crypt/wrapper.c.orig glibc-2.10.1/crypt/wrapper.c +--- glibc-2.10.1/crypt/wrapper.c.orig 2006-03-05 11:28:17.000000000 -0300 ++++ glibc-2.10.1/crypt/wrapper.c 2009-05-27 00:20:03.000000000 -0300 +@@ -105,32 +105,72 @@ static char *_crypt_retval_magic(char *r + * its initialization code. Thus, it is important that our multiple hashing + * algorithms either don't conflict with each other in their use of the + * data area or reset the initialized field themselves whenever required. +- * Currently, the hashing algorithms simply have no conflicts: the first +- * field of struct crypt_data is the 128-byte large DES key schedule which +- * __des_crypt_r() calculates each time it is called while the two other +- * hashing algorithms use less than 128 bytes of the data area. ++ * Currently, three of the four supported hashing algorithms simply have no ++ * conflicts: the first field of struct crypt_data is the 128-byte large ++ * DES key schedule which __des_crypt_r() calculates each time it is called ++ * while two other hashing algorithms use less than 128 bytes of the data ++ * area. + */ + ++#include "crypt_freesec.h" ++ ++#include ++#include ++ ++__libc_lock_define_initialized (static, _crypt_extended_init_lock) ++ ++static void _crypt_extended_init_r(void) ++{ ++ static volatile sig_atomic_t initialized = 0; ++ ++ if (initialized) return; ++ ++ __libc_lock_lock(_crypt_extended_init_lock); ++ if (!initialized) { ++ _crypt_extended_init(); ++ initialized = 1; ++ } ++ __libc_lock_unlock(_crypt_extended_init_lock); ++} ++ + char *__crypt_rn(__const char *key, __const char *setting, + void *data, int size) + { ++ char *retval; ++ + if (setting[0] == '$' && setting[1] == '2') + return _crypt_blowfish_rn(key, setting, (char *)data, size); + if (setting[0] == '$' && setting[1] == '1') + return __md5_crypt_r(key, setting, (char *)data, size); +- if (setting[0] == '$' || setting[0] == '_') { +- __set_errno(EINVAL); +- return NULL; ++ if (setting[0] == '$') goto out_einval; ++ if (setting[0] == '_') { ++ if (size < sizeof(struct _crypt_extended_data)) goto out_erange; ++ _crypt_extended_init_r(); ++ ((struct _crypt_extended_data *)data)->initialized = 0; ++ if (size >= sizeof(struct crypt_data)) ++ ((struct crypt_data *)data)->initialized = 0; ++ retval = _crypt_extended_r(key, setting, ++ (struct _crypt_extended_data *)data); ++ if (!retval) goto out_einval; ++ return retval; + } + if (size >= sizeof(struct crypt_data)) + return __des_crypt_r(key, setting, (struct crypt_data *)data); ++ ++out_erange: + __set_errno(ERANGE); + return NULL; ++ ++out_einval: ++ __set_errno(EINVAL); ++ return NULL; + } + + char *__crypt_ra(__const char *key, __const char *setting, + void **data, int *size) + { ++ char *retval; ++ + if (setting[0] == '$' && setting[1] == '2') { + if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) + return NULL; +@@ -141,13 +181,27 @@ char *__crypt_ra(__const char *key, __co + return NULL; + return __md5_crypt_r(key, setting, (char *)*data, *size); + } +- if (setting[0] == '$' || setting[0] == '_') { +- __set_errno(EINVAL); +- return NULL; ++ if (setting[0] == '$') goto out_einval; ++ if (setting[0] == '_') { ++ if (_crypt_data_alloc(data, size, ++ sizeof(struct _crypt_extended_data))) ++ return NULL; ++ _crypt_extended_init_r(); ++ ((struct _crypt_extended_data *)*data)->initialized = 0; ++ if (*size >= sizeof(struct crypt_data)) ++ ((struct crypt_data *)*data)->initialized = 0; ++ retval = _crypt_extended_r(key, setting, ++ (struct _crypt_extended_data *)*data); ++ if (!retval) goto out_einval; ++ return retval; + } + if (_crypt_data_alloc(data, size, sizeof(struct crypt_data))) + return NULL; + return __des_crypt_r(key, setting, (struct crypt_data *)*data); ++ ++out_einval: ++ __set_errno(EINVAL); ++ return NULL; + } + + char *__crypt_r(__const char *key, __const char *setting, diff --git a/glibc-2.10.1-multiarch.patch b/glibc-2.10.1-multiarch.patch new file mode 100644 index 0000000..33fbdf7 --- /dev/null +++ b/glibc-2.10.1-multiarch.patch @@ -0,0 +1,15 @@ +2006-05-16 Gwenole Beauchesne + + * scripts/check-local-headers.sh: Filter out multiarch headers. + +diff -p -up glibc-2.10.1/scripts/check-local-headers.sh.orig glibc-2.10.1/scripts/check-local-headers.sh +--- glibc-2.10.1/scripts/check-local-headers.sh.orig 2009-04-02 13:59:53.000000000 -0300 ++++ glibc-2.10.1/scripts/check-local-headers.sh 2009-05-26 23:45:32.000000000 -0300 +@@ -30,6 +30,7 @@ if fgrep "$includedir" */*.{o,os,oS}.d | + fgrep -v "$includedir/asm" | + fgrep -v "$includedir/linux" | + fgrep -v "$includedir/selinux" | ++fgrep -v "$includedir/multiarch-" | + fgrep -v "$includedir/sys/capability.h" | + fgrep -v "$includedir/gd" | + fgrep -v "$includedir/nss3"; then diff --git a/glibc-2.11.1-localedef-archive-follow-symlinks.patch b/glibc-2.11.1-localedef-archive-follow-symlinks.patch new file mode 100644 index 0000000..1dc7abb --- /dev/null +++ b/glibc-2.11.1-localedef-archive-follow-symlinks.patch @@ -0,0 +1,18 @@ +localedef --add-to-archive doesn't follow symbolic links, thus if you have any +locale with symlinked files to save disk space, for example: +/usr/share/locale/pt_BR/LC_CTYPE -> ../ISO-8859-1/LC_CTYPE +"localedef --add-to-archive /usr/share/locale/pt_BR" will not work, because +current locarchive.c code doesn't consider symlink case. + +diff -p -up glibc-2.11.1/locale/programs/locarchive.c.orig glibc-2.11.1/locale/programs/locarchive.c +--- glibc-2.11.1/locale/programs/locarchive.c.orig 2010-04-08 14:10:46.515770746 -0300 ++++ glibc-2.11.1/locale/programs/locarchive.c 2010-04-08 14:11:55.587520585 -0300 +@@ -1323,7 +1323,7 @@ add_locales_to_archive (nlist, list, rep + char fullname[fnamelen + 2 * strlen (d->d_name) + 7]; + + #ifdef _DIRENT_HAVE_D_TYPE +- if (d_type == DT_UNKNOWN) ++ if (d_type == DT_UNKNOWN || d_type == DT_LNK) + #endif + { + strcpy (stpcpy (stpcpy (fullname, fname), "/"), diff --git a/glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch b/glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch new file mode 100644 index 0000000..9379131 --- /dev/null +++ b/glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch @@ -0,0 +1,44 @@ +See https://qa.mandriva.com/show_bug.cgi?id=58834 +Patch from bug report, updated for glibc 2.12.1 in Mandriva + +diff -p -up glibc-2.12.1/posix/gai.conf.orig glibc-2.12.1/posix/gai.conf +--- glibc-2.12.1/posix/gai.conf.orig 2010-07-27 08:34:39.000000000 -0300 ++++ glibc-2.12.1/posix/gai.conf 2010-08-25 11:27:32.302898528 -0300 +@@ -56,9 +56,7 @@ + # + # scopev4 + # Add another rule to the RFC 3484 scope table for IPv4 addresses. +-# By default the scope IDs described in section 3.2 in RFC 3484 are +-# used. Changing these defaults should hardly ever be necessary. +-# The defaults are equivalent to: ++# The definitions in RFC 3484 are equivalent to: + # + #scopev4 ::ffff:169.254.0.0/112 2 + #scopev4 ::ffff:127.0.0.0/104 2 +@@ -69,8 +67,8 @@ + # + # For sites which use site-local IPv4 addresses behind NAT there is + # the problem that even if IPv4 addresses are preferred they do not +-# have the same scope and are therefore not sorted first. To change +-# this use only these rules: ++# have the same scope and are therefore not sorted first. Therefore, ++# the following settings are used by default on this system: + # + #scopev4 ::ffff:169.254.0.0/112 2 + #scopev4 ::ffff:127.0.0.0/104 2 +diff -p -up glibc-2.12.1/sysdeps/posix/getaddrinfo.c.orig glibc-2.12.1/sysdeps/posix/getaddrinfo.c +--- glibc-2.12.1/sysdeps/posix/getaddrinfo.c.orig 2010-07-27 08:34:39.000000000 -0300 ++++ glibc-2.12.1/sysdeps/posix/getaddrinfo.c 2010-08-25 11:24:03.960253468 -0300 +@@ -1099,10 +1099,12 @@ static const struct scopeentry + /* Link-local addresses: scope 2. */ + { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 }, + { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 }, ++#if 0 + /* Site-local addresses: scope 5. */ + { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 }, + { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 }, + { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 }, ++#endif + /* Default: scope 14. */ + { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 } + }; diff --git a/glibc-2.12.1-fhs.patch b/glibc-2.12.1-fhs.patch new file mode 100644 index 0000000..2049e65 --- /dev/null +++ b/glibc-2.12.1-fhs.patch @@ -0,0 +1,38 @@ +diff -p -up glibc-2.12.1/sysdeps/generic/paths.h.orig glibc-2.12.1/sysdeps/generic/paths.h +--- glibc-2.12.1/sysdeps/generic/paths.h.orig 2010-07-27 08:34:39.000000000 -0300 ++++ glibc-2.12.1/sysdeps/generic/paths.h 2010-12-27 11:19:18.515673954 -0200 +@@ -62,13 +62,13 @@ + #define _PATH_UNIX "/vmunix" + #define _PATH_UTMP "/var/run/utmp" + #define _PATH_UTMP_DB "/var/run/utmp.db" +-#define _PATH_VI "/usr/bin/vi" ++#define _PATH_VI "/bin/vi" + #define _PATH_WTMP "/var/log/wtmp" + + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/misc/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + +diff -p -up glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h.orig glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h +--- glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h.orig 2010-07-27 08:34:39.000000000 -0300 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/paths.h 2010-12-27 11:20:43.701245004 -0200 +@@ -62,13 +62,13 @@ + #define _PATH_TTY "/dev/tty" + #define _PATH_UNIX "/boot/vmlinux" + #define _PATH_UTMP "/var/run/utmp" +-#define _PATH_VI "/usr/bin/vi" ++#define _PATH_VI "/bin/vi" + #define _PATH_WTMP "/var/log/wtmp" + + /* Provide trailing slash, since mostly used for building pathnames. */ + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" +-#define _PATH_VARDB "/var/db/" ++#define _PATH_VARDB "/var/lib/misc/" + #define _PATH_VARRUN "/var/run/" + #define _PATH_VARTMP "/var/tmp/" + diff --git a/glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch b/glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch new file mode 100644 index 0000000..9b288fe --- /dev/null +++ b/glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch @@ -0,0 +1,92 @@ +From: Andreas Schwab +Subject: [PATCH] Never expand $ORIGIN in privileged programs +Date: Mon, 18 Oct 2010 15:12:09 +0200 + +Path elements containing $ORIGIN should always be ignored in privileged +programs. + +Andreas. + +2010-10-18 Andreas Schwab + + * elf/dl-load.c (is_dst): Remove last parameter. + (_dl_dst_count): Ignore $ORIGIN in privileged programs. + (_dl_dst_substitute): Likewise. +--- + elf/dl-load.c | 30 +++++++++++++----------------- + 1 files changed, 13 insertions(+), 17 deletions(-) + +diff --git a/elf/dl-load.c b/elf/dl-load.c +index a7162eb..776f7e4 100644 +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -169,8 +169,7 @@ local_strdup (const char *s) + + + static size_t +-is_dst (const char *start, const char *name, const char *str, +- int is_path, int secure) ++is_dst (const char *start, const char *name, const char *str, int is_path) + { + size_t len; + bool is_curly = false; +@@ -199,11 +198,6 @@ is_dst (const char *start, const char *name, const char *str, + && (!is_path || name[len] != ':')) + return 0; + +- if (__builtin_expect (secure, 0) +- && ((name[len] != '\0' && (!is_path || name[len] != ':')) +- || (name != start + 1 && (!is_path || name[-2] != ':')))) +- return 0; +- + return len; + } + +@@ -218,13 +212,12 @@ _dl_dst_count (const char *name, int is_path) + { + size_t len; + +- /* $ORIGIN is not expanded for SUID/GUID programs (except if it +- is $ORIGIN alone) and it must always appear first in path. */ ++ /* $ORIGIN is not expanded for SUID/GUID programs. */ + ++name; +- if ((len = is_dst (start, name, "ORIGIN", is_path, +- INTUSE(__libc_enable_secure))) != 0 +- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0 +- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0) ++ if (((len = is_dst (start, name, "ORIGIN", is_path)) != 0 ++ && !INTUSE(__libc_enable_secure)) ++ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0 ++ || (len = is_dst (start, name, "LIB", is_path)) != 0) + ++cnt; + + name = strchr (name + len, '$'); +@@ -256,9 +249,12 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result, + size_t len; + + ++name; +- if ((len = is_dst (start, name, "ORIGIN", is_path, +- INTUSE(__libc_enable_secure))) != 0) ++ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0) + { ++ /* Ignore this path element in SUID/SGID programs. */ ++ if (INTUSE(__libc_enable_secure)) ++ repl = (const char *) -1; ++ else + #ifndef SHARED + if (l == NULL) + repl = _dl_get_origin (); +@@ -266,9 +262,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result, + #endif + repl = l->l_origin; + } +- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0) ++ else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0) + repl = GLRO(dl_platform); +- else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0) ++ else if ((len = is_dst (start, name, "LIB", is_path)) != 0) + repl = DL_DST_LIB; + + if (repl != NULL && repl != (const char *) -1) +-- +1.7.2.3 diff --git a/glibc-2.12.1-submitted-translit-colon.patch b/glibc-2.12.1-submitted-translit-colon.patch new file mode 100644 index 0000000..c073821 --- /dev/null +++ b/glibc-2.12.1-submitted-translit-colon.patch @@ -0,0 +1,35 @@ +2010-06-13 Aurelien Jarno + + * locale/C-translit.h.in: Add entry for U20A1. + +diff --git a/locale/C-translit.h.in b/locale/C-translit.h.in +index ab0b130..5286802 100644 +--- a/locale/C-translit.h.in ++++ b/locale/C-translit.h.in +@@ -103,6 +103,7 @@ + "\x2061" "" /* FUNCTION APPLICATION */ + "\x2062" "" /* INVISIBLE TIMES */ + "\x2063" "" /* INVISIBLE SEPARATOR */ ++"\x20a1" "CRC" /* COLON SIGN */ + "\x20a8" "Rs" /* RUPEE SIGN */ + "\x20ac" "EUR" /* EURO SIGN */ + "\x2100" "a/c" /* ACCOUNT OF */ + + +2010-06-13 Aurelien Jarno + + * locales/translit_neutral: Add entry for U20A1. + +diff --git a/localedata/locales/translit_neutral b/localedata/locales/translit_neutral +index 5883d28..5712361 100644 +--- a/localedata/locales/translit_neutral ++++ b/localedata/locales/translit_neutral +@@ -128,6 +128,8 @@ include "translit_wide";"" + "" + % DONG SIGN + "" ++% COLON SIGN ++ "" + % EURO SIGN + "" + % TRADE MARK SIGN diff --git a/glibc-2.12.2-resolve-tls.patch b/glibc-2.12.2-resolve-tls.patch new file mode 100644 index 0000000..c509ddc --- /dev/null +++ b/glibc-2.12.2-resolve-tls.patch @@ -0,0 +1,64 @@ +Fix a bug in tls initialization which caused __tls_get_addr to return NULL. + +We need to postpone all calls to _dl_update_slotinfo until after +_dl_add_to_slotinfo is complete. This is because _dl_update_slotinfo +will modify the generation of the DTV to match that of the new +slot. We cannot allow this to happen until all slots of the generation +have been added. + + 2010-01-30 Martin von Gagern + +References: +http://sources.redhat.com/bugzilla/show_bug.cgi?id=12453 +https://github.com/cschwan/sage-on-gentoo/issues/#issue/40 +https://bugs.gentoo.org/353224 + +Index: glibc-2.12.2/elf/dl-open.c +=================================================================== +--- glibc-2.12.2.orig/elf/dl-open.c ++++ glibc-2.12.2/elf/dl-open.c +@@ -346,7 +346,7 @@ dl_open_worker (void *a) + + /* If the file is not loaded now as a dependency, add the search + list of the newly loaded object to the scope. */ +- bool any_tls = false; ++ bool any_tls = false, any_static_tls = false; + for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i) + { + struct link_map *imap = new->l_searchlist.r_list[i]; +@@ -426,6 +426,25 @@ dl_open_worker (void *a) + _dl_add_to_slotinfo (imap); + + if (imap->l_need_tls_init) ++ any_static_tls = true; ++ ++ /* We have to bump the generation counter. */ ++ any_tls = true; ++ } ++ } ++ ++ /* We need a second pass for static tls data, because _dl_update_slotinfo ++ must not be run while calls to _dl_add_to_slotinfo are still pending. */ ++ if (__builtin_expect (any_static_tls, 0)) ++ { ++ for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i) ++ { ++ struct link_map *imap = new->l_searchlist.r_list[i]; ++ if (__builtin_expect (imap->l_need_tls_init, 0) ++ /* The following two can likely be dropped, but let's be extra ++ safe and copy all the conditions for now. */ ++ && ! imap->l_init_called ++ && __builtin_expect (imap->l_tls_blocksize > 0, 0)) + { + /* For static TLS we have to allocate the memory here + and now. This includes allocating memory in the DTV. +@@ -449,9 +468,6 @@ cannot load any more object with static + GL(dl_init_static_tls) (imap); + assert (imap->l_need_tls_init == 0); + } +- +- /* We have to bump the generation counter. */ +- any_tls = true; + } + } + diff --git a/glibc-2.13-fix-compile-error.patch b/glibc-2.13-fix-compile-error.patch new file mode 100644 index 0000000..93bb813 --- /dev/null +++ b/glibc-2.13-fix-compile-error.patch @@ -0,0 +1,30 @@ +Index: sysdeps/unix/sysv/linux/i386/sysdep.h +=================================================================== +--- sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) ++++ sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h +Index: nptl/sysdeps/pthread/pt-initfini.c +=================================================================== +--- nptl/sysdeps/pthread/pt-initfini.c (revision 1469) ++++ nptl/sysdeps/pthread/pt-initfini.c (working copy) +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); diff --git a/glibc-2.13-prelink.patch b/glibc-2.13-prelink.patch new file mode 100644 index 0000000..7c63b7a --- /dev/null +++ b/glibc-2.13-prelink.patch @@ -0,0 +1,32 @@ +--- glibc-2.13/ChangeLog.orig 2011-04-08 05:49:27.201205590 -0300 ++++ glibc-2.13/ChangeLog 2011-04-08 05:50:13.815394267 -0300 +@@ -0,0 +1,5 @@ ++2010-09-28 Andreas Schwab ++ ++ * elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs) ++ before performing relro protection. ++ +--- glibc-2.13/elf/rtld.c.orig 2011-04-08 05:47:56.573838933 -0300 ++++ glibc-2.13/elf/rtld.c 2011-04-08 05:48:53.401068817 -0300 +@@ -2187,6 +2187,10 @@ ERROR: ld.so: object '%s' cannot be load + we need it in the memory handling later. */ + GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist; + ++ /* Remember the last search directory added at startup, now that ++ malloc will no longer be the one from dl-minimal.c. */ ++ GLRO(dl_init_all_dirs) = GL(dl_all_dirs); ++ + if (prelinked) + { + if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL) +@@ -2306,10 +2310,6 @@ ERROR: ld.so: object '%s' cannot be load + lossage); + } + +- /* Remember the last search directory added at startup, now that +- malloc will no longer be the one from dl-minimal.c. */ +- GLRO(dl_init_all_dirs) = GL(dl_all_dirs); +- + if (! prelinked && rtld_multiple_ref) + { + /* There was an explicit ref to the dynamic linker as a shared lib. diff --git a/glibc-2.2-nss-upgrade.patch b/glibc-2.2-nss-upgrade.patch new file mode 100644 index 0000000..a3630b7 --- /dev/null +++ b/glibc-2.2-nss-upgrade.patch @@ -0,0 +1,26 @@ +--- glibc-2.2/nss/nsswitch.c.chmou Fri Mar 31 22:38:32 2000 ++++ glibc-2.2/nss/nsswitch.c Wed Nov 22 00:35:53 2000 +@@ -333,9 +333,20 @@ + ni->library->lib_handle = __libc_dlopen (shlib_name); + if (ni->library->lib_handle == NULL) + { +- /* Failed to load the library. */ +- ni->library->lib_handle = (void *) -1l; +- __set_errno (saved_errno); ++ /* Failed to load the library. Try a fallback. */ ++ int n = __snprintf(shlib_name, shlen, "libnss_%s.so.%d.%d", ++ ni->library->name, __GLIBC__, __GLIBC_MINOR__); ++ if (n >= shlen) ++ ni->library->lib_handle = NULL; ++ else ++ ni->library->lib_handle = __libc_dlopen (shlib_name); ++ ++ if (ni->library->lib_handle == NULL) ++ { ++ /* Ok, really fail now. */ ++ ni->library->lib_handle = (void *) -1l; ++ __set_errno (saved_errno); ++ } + } + } + diff --git a/glibc-2.2.4-xterm-xvt.patch b/glibc-2.2.4-xterm-xvt.patch new file mode 100644 index 0000000..87758a7 --- /dev/null +++ b/glibc-2.2.4-xterm-xvt.patch @@ -0,0 +1,13 @@ +--- glibc-2.2.4/debug/xtrace.sh.chmou Mon Jul 9 20:56:57 2001 ++++ glibc-2.2.4/debug/xtrace.sh Mon Nov 12 14:16:51 2001 +@@ -78,8 +78,8 @@ + # If the variable COLUMNS is not set do this now. + COLUMNS=${COLUMNS:-80} + +-# If `TERMINAL_PROG' is not set, set it to `xterm'. +-TERMINAL_PROG=${TERMINAL_PROG:-xterm} ++# If `TERMINAL_PROG' is not set, set it to `xvt'. ++TERMINAL_PROG=${TERMINAL_PROG:-xvt} + + # The data file to process, if any. + data= diff --git a/glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch b/glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch new file mode 100644 index 0000000..2d71f88 --- /dev/null +++ b/glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch @@ -0,0 +1,47 @@ +--- glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c.tcsetattr-kernel-bug-workaround 2003-02-24 21:26:01.000000000 +0100 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c 2003-06-05 11:11:01.000000000 +0200 +@@ -56,6 +56,7 @@ tcsetattr (fd, optional_actions, termios + { + struct __kernel_termios k_termios; + unsigned long int cmd; ++ int retval; + + switch (optional_actions) + { +@@ -87,6 +88,35 @@ tcsetattr (fd, optional_actions, termios + memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], + __KERNEL_NCCS * sizeof (cc_t)); + +- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); ++ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); ++ ++ if (retval == 0 && cmd == TCSETS) ++ { ++ /* The Linux kernel has a bug which silently ignore the invalid ++ c_cflag on pty. We have to check it here. */ ++ int save = errno; ++ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); ++ if (retval) ++ { ++ /* We cannot verify if the setting is ok. We don't return ++ an error (?). */ ++ __set_errno (save); ++ retval = 0; ++ } ++ else if ((termios_p->c_cflag & (PARENB | CREAD)) ++ != (k_termios.c_cflag & (PARENB | CREAD)) ++ || ((termios_p->c_cflag & CSIZE) ++ && ((termios_p->c_cflag & CSIZE) ++ != (k_termios.c_cflag & CSIZE)))) ++ { ++ /* It looks like the Linux kernel silently changed the ++ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an ++ error. */ ++ __set_errno (EINVAL); ++ retval = -1; ++ } ++ } ++ ++ return retval; + } + libc_hidden_def (tcsetattr) diff --git a/glibc-2.3.3-nscd-enable.patch b/glibc-2.3.3-nscd-enable.patch new file mode 100644 index 0000000..45fb1dd --- /dev/null +++ b/glibc-2.3.3-nscd-enable.patch @@ -0,0 +1,11 @@ +--- glibc-2.3.3/nscd/nscd.init.nscd-enable 2004-08-24 10:31:20.000000000 -0400 ++++ glibc-2.3.3/nscd/nscd.init 2004-08-25 04:41:47.571810880 -0400 +@@ -2,7 +2,7 @@ + # + # nscd: Starts the Name Switch Cache Daemon + # +-# chkconfig: - 30 74 ++# chkconfig: 345 30 74 + # description: This is a daemon which handles passwd and group lookups \ + # for running programs and cache the results for the next \ + # query. You should start this daemon if you use \ diff --git a/glibc-2.3.4-i586-if-no-cmov.patch b/glibc-2.3.4-i586-if-no-cmov.patch new file mode 100644 index 0000000..6873eab --- /dev/null +++ b/glibc-2.3.4-i586-if-no-cmov.patch @@ -0,0 +1,30 @@ +2003-08-29 Gwenole Beauchesne + + * sysdeps/i386/dl-machine.h (dl_platform_init): Avoid i686 + libraries to be loaded if the host doesn't support CMOV. + +--- glibc-2.3.3/sysdeps/i386/dl-machine.h.i586-if-no-cmov 2004-06-03 01:21:36.000000000 +0200 ++++ glibc-2.3.3/sysdeps/i386/dl-machine.h 2004-06-03 07:09:51.518703634 +0200 +@@ -347,6 +347,9 @@ _dl_start_user:\n\ + Prelinked libraries may use Elf32_Rela though. */ + #define ELF_MACHINE_PLT_REL 1 + ++/* We need the definition of HWCAP_I386_CMOV. */ ++#include ++ + /* We define an initialization functions. This is called very early in + _dl_sysdep_start. */ + #define DL_PLATFORM_INIT dl_platform_init () +@@ -357,6 +360,12 @@ dl_platform_init (void) + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') + /* Avoid an empty string which would disturb us. */ + GLRO(dl_platform) = NULL; ++ ++ if (GLRO(dl_platform) != NULL ++ && GLRO(dl_platform)[1] >= '6' && (GLRO(dl_hwcap) & HWCAP_I386_CMOV) == 0) ++ /* Avoid i686 compiled libraries to be loaded if the host doesn't ++ support CMOV instructions. */ ++ GLRO(dl_platform) = "i586"; + } + + static inline Elf32_Addr diff --git a/glibc-2.3.4-timezone.patch b/glibc-2.3.4-timezone.patch new file mode 100644 index 0000000..a2352c1 --- /dev/null +++ b/glibc-2.3.4-timezone.patch @@ -0,0 +1,21 @@ +--- glibc-2.3.4/timezone/backward.timezone 2005-03-07 18:47:33.000000000 -0500 ++++ glibc-2.3.4/timezone/backward 2005-03-10 11:09:08.973233047 -0500 +@@ -98,3 +98,18 @@ Link Etc/UTC UTC + Link Etc/UTC Universal + Link Europe/Moscow W-SU + Link Etc/UTC Zulu ++ ++# links requested by users (to access timezones by the name of main cities) ++# pablo@mandrakesoft.com ++# Canada/Saskatchewan ++Link America/Regina America/Saskatoon ++# Canada/Mountain (Alberta) ++Link America/Edmonton America/Calgary ++# Canada/Atlantic (New Brunswick) ++Link America/Halifax America/Fredericton ++# America/Eastern (Ontario) ++Link America/Montreal America/Ontario ++# PRC ++Link Asia/Shanghai Asia/Beijing ++# South Africa ++Link Africa/Johannesburg Africa/Pretoria diff --git a/glibc-2.3.5-biarch-utils.patch b/glibc-2.3.5-biarch-utils.patch new file mode 100644 index 0000000..62c2d2a --- /dev/null +++ b/glibc-2.3.5-biarch-utils.patch @@ -0,0 +1,57 @@ +2005-08-29 Gwenole Beauchesne + + * debug/xtrace.sh: Make it biarch capable on 64-bit Linux platforms. + * malloc/memusage.sh: Likewise. + +--- glibc-2.3.5/debug/xtrace.sh.biarch-utils 2005-08-29 12:48:24.000000000 -0400 ++++ glibc-2.3.5/debug/xtrace.sh 2005-08-29 16:58:02.000000000 -0400 +@@ -151,6 +151,23 @@ if test ! -x "$program"; then + help_info + fi + ++# Biarch transmutation. ++host_os=`uname -o` ++host_cpu=`uname -m` ++case $host_os in ++*Linux*) ++ # test if the binary is 32-bit ++ elf32=no ++ if file -L `which $program` | grep -q "ELF 32"; then ++ elf32=yes ++ fi ++esac ++case $host_cpu:$elf32 in ++powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ pcprofileso=`echo $pcprofileso | sed -e "s,/lib64/,/lib/,"` ++ ;; ++esac ++ + # We have two modes. If a data file is given simply print the included data. + printf "%-20s %-*s %6s\n" Function $(expr $COLUMNS - 30) File Line + for i in $(seq 1 $COLUMNS); do printf -; done; printf '\n' +--- glibc-2.3.5/malloc/memusage.sh.biarch-utils 2005-03-07 18:44:10.000000000 -0500 ++++ glibc-2.3.5/malloc/memusage.sh 2005-08-29 16:25:12.000000000 -0400 +@@ -205,6 +205,23 @@ if test $# -eq 0; then + do_usage + fi + ++# Biarch transmutation. ++host_os=`uname -o` ++host_cpu=`uname -m` ++case $host_os in ++*Linux*) ++ # test if the binary is 32-bit ++ elf32=no ++ if file -L `which $1` | grep -q "ELF 32"; then ++ elf32=yes ++ fi ++esac ++case $host_cpu:$elf32 in ++powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) ++ memusageso=`echo $memusageso | sed -e "s,/lib64/,/lib/,"` ++ ;; ++esac ++ + # This will be in the environment. + add_env="LD_PRELOAD=$memusageso" + diff --git a/glibc-2.3.6-avx-increase_BF_FRAME.patch b/glibc-2.3.6-avx-increase_BF_FRAME.patch new file mode 100644 index 0000000..3056698 --- /dev/null +++ b/glibc-2.3.6-avx-increase_BF_FRAME.patch @@ -0,0 +1,13 @@ +--- glibc-2.3.5/crypt/x86.S.avx 2006-07-06 11:16:18.000000000 -0600 ++++ glibc-2.3.5/crypt/x86.S 2006-07-06 11:16:30.000000000 -0600 +@@ -32,8 +32,8 @@ + #define DO_ALIGN(log) .align (1 << (log)) + #endif + +-#define BF_FRAME 0x200 +-#define BF_CLEAN 0x300 ++#define BF_FRAME 0x400 ++#define BF_CLEAN 0x500 + #define ctx %esp + + #define BF_ptr (ctx) diff --git a/glibc-2.3.6-nsswitch.conf.patch b/glibc-2.3.6-nsswitch.conf.patch new file mode 100644 index 0000000..8485aec --- /dev/null +++ b/glibc-2.3.6-nsswitch.conf.patch @@ -0,0 +1,50 @@ +--- glibc-2.3.6/mandriva/nsswitch.conf.nsswitch.conf 2006-03-20 10:39:14.000000000 +0100 ++++ glibc-2.3.6/mandriva/nsswitch.conf 2006-03-20 10:38:42.000000000 +0100 +@@ -0,0 +1,47 @@ ++# ++# /etc/nsswitch.conf ++# ++# An example Name Service Switch config file. This file should be ++# sorted with the most-used services at the beginning. ++# ++# The entry '[NOTFOUND=return]' means that the search for an ++# entry should stop if the search in the previous entry turned ++# up nothing. Note that if the search failed due to some other reason ++# (like no NIS server responding) then the search continues with the ++# next entry. ++# ++# Legal entries are: ++# ++# compat Use compatibility setup ++# nisplus or nis+ Use NIS+ (NIS version 3) ++# nis or yp Use NIS (NIS version 2), also called YP ++# dns Use DNS (Domain Name Service) ++# files Use the local files ++# db Use the local database (.db) files ++# [NOTFOUND=return] Stop searching if not found so far ++# ++# For more information, please read the nsswitch.conf.5 manual page. ++# ++ ++# passwd: files nis ++# shadow: files nis ++# group: files nis ++ ++passwd: compat ++shadow: files nis ++group: compat ++ ++hosts: files nis dns wins ++networks: files ++ ++services: files ++protocols: files ++rpc: files ++ethers: files ++netmasks: files ++netgroup: files ++publickey: files ++ ++bootparams: files ++automount: files nis ++aliases: files diff --git a/glibc-2.3.6-ppc-build-lddlibc4.patch b/glibc-2.3.6-ppc-build-lddlibc4.patch new file mode 100644 index 0000000..4f4fedf --- /dev/null +++ b/glibc-2.3.6-ppc-build-lddlibc4.patch @@ -0,0 +1,14 @@ +--- glibc-2.3.3/sysdeps/unix/sysv/linux/powerpc/Makefile.ppc-build 2004-04-19 06:18:35.000000000 +0000 ++++ glibc-2.3.3/sysdeps/unix/sysv/linux/powerpc/Makefile 2004-11-26 12:50:57.884944570 +0000 +@@ -1,4 +1,11 @@ + 64bit-predefine = __powerpc64__ ++ ++ifeq ($(config-machine),powerpc) ++ifeq ($(subdir),elf) ++sysdep-others += lddlibc4 ++install-bin += lddlibc4 ++endif ++endif + ifeq ($(subdir),rt) + librt-routines += rt-sysdep + endif diff --git a/glibc-2.3.6-pt_BR-i18nfixes.patch b/glibc-2.3.6-pt_BR-i18nfixes.patch new file mode 100644 index 0000000..cd5d384 --- /dev/null +++ b/glibc-2.3.6-pt_BR-i18nfixes.patch @@ -0,0 +1,29 @@ +pt_BR i18n fixes from glibc-2.3.4-77143cl.src.rpm (Conectiva Linux) + +--- glibc-2.3.6/po/pt_BR.po.orig 2006-04-17 04:47:44.000000000 -0300 ++++ glibc-2.3.6/po/pt_BR.po 2006-04-17 04:48:03.000000000 -0300 +@@ -84,6 +84,7 @@ + msgstr "\t[%u] - [%u bytes] " + + #: nscd/nscd_stat.c:153 ++#, c-format + msgid "" + "\n" + "%s cache:\n" +@@ -103,11 +104,14 @@ + "cache %s:\n" + "\n" + "%15s cache está habilitado\n" +-"%15Zd tamanho sugerido%15ld segundos de vida para entradas positivas\n" ++"%15Zd tamanho sugerido\n" ++"%15ld segundos de vida para entradas positivas\n" + "%15ld segundos de vida para entradas negativas\n" + "%15ld hits do cache para entradas positivas\n" + "%15ld hits do cache para entradas negativas\n" +-"%15ld%% quantidade de hits no cache\n" ++"%15ld ausências no cache para entradas positivas\n" ++"%15ld ausências no cache para entradas negativas\n" ++"%15ld%% taxa de hits no cache\n" + "%15s verifique o arquivo /etc/%s para mudanças\n" + + #: nis/nis_print.c:251 diff --git a/glibc-2.4.90-compat-EUR-currencies.patch b/glibc-2.4.90-compat-EUR-currencies.patch new file mode 100644 index 0000000..eede980 --- /dev/null +++ b/glibc-2.4.90-compat-EUR-currencies.patch @@ -0,0 +1,93 @@ +--- glibc-2.4.90/locale/iso-4217.def.compat-EUR-currencies 2006-04-27 08:54:33.000000000 -0400 ++++ glibc-2.4.90/locale/iso-4217.def 2006-05-11 12:00:04.000000000 -0400 +@@ -8,6 +8,7 @@ + * + * !!! The list has to be sorted !!! + */ ++DEFINE_INT_CURR("ADP") /* Andorran Peseta -> EUR */ + DEFINE_INT_CURR("AED") /* United Arab Emirates Dirham */ + DEFINE_INT_CURR("AFN") /* Afghanistan Afgani */ + DEFINE_INT_CURR("ALL") /* Albanian Lek */ +@@ -15,12 +16,14 @@ DEFINE_INT_CURR("AMD") /* Armenia Dram + DEFINE_INT_CURR("ANG") /* Netherlands Antilles */ + DEFINE_INT_CURR("AOA") /* Angolan Kwanza */ + DEFINE_INT_CURR("ARS") /* Argentine Peso */ ++DEFINE_INT_CURR("ATS") /* Austrian Schilling */ + DEFINE_INT_CURR("AUD") /* Australian Dollar */ + DEFINE_INT_CURR("AWG") /* Aruba Guilder */ + DEFINE_INT_CURR("AZM") /* Azerbaijan Manat */ + DEFINE_INT_CURR("BAM") /* Bosnian and Herzegovina Convertible Mark */ + DEFINE_INT_CURR("BBD") /* Barbados Dollar */ + DEFINE_INT_CURR("BDT") /* Bangladesh Taka */ ++DEFINE_INT_CURR("BEF") /* Belgian Franc -> EUR */ + DEFINE_INT_CURR("BGN") /* Bulgarian Lev */ + DEFINE_INT_CURR("BHD") /* Bahraini Dinar */ + DEFINE_INT_CURR("BIF") /* Burundi Franc */ +@@ -45,6 +48,7 @@ DEFINE_INT_CURR("CUP") /* Cuban Peso * + DEFINE_INT_CURR("CVE") /* Cape Verde Escudo */ + DEFINE_INT_CURR("CYP") /* Cypriot Pound */ + DEFINE_INT_CURR("CZK") /* Czech Koruna */ ++DEFINE_INT_CURR("DEM") /* German Mark -> EUR */ + DEFINE_INT_CURR("DJF") /* Djibouti Franc */ + DEFINE_INT_CURR("DKK") /* Danish Krone (Faroe Islands, Greenland) */ + DEFINE_INT_CURR("DOP") /* Dominican Republic */ +@@ -52,16 +56,20 @@ DEFINE_INT_CURR("DZD") /* Algerian Dina + DEFINE_INT_CURR("EEK") /* Estonian Kroon */ + DEFINE_INT_CURR("EGP") /* Egyptian Pound */ + DEFINE_INT_CURR("ERN") /* Eritrean Nakfa */ ++DEFINE_INT_CURR("ESP") /* Spanish Peseta -> EUR */ + DEFINE_INT_CURR("ETB") /* Ethiopian Birr */ + DEFINE_INT_CURR("EUR") /* European Union Euro */ ++DEFINE_INT_CURR("FIM") /* Finnish Markka -> EUR */ + DEFINE_INT_CURR("FJD") /* Fiji Dollar */ + DEFINE_INT_CURR("FKP") /* Falkland Islands Pound (Malvinas) */ ++DEFINE_INT_CURR("FRF") /* French Franc -> EUR */ + DEFINE_INT_CURR("GBP") /* British Pound */ + DEFINE_INT_CURR("GEL") /* Georgia Lari */ + DEFINE_INT_CURR("GHC") /* Ghana Cedi */ + DEFINE_INT_CURR("GIP") /* Gibraltar Pound */ + DEFINE_INT_CURR("GMD") /* Gambian Dalasi */ + DEFINE_INT_CURR("GNF") /* Guinea Franc */ ++DEFINE_INT_CURR("GRD") /* Greek Drachma -> EUR */ + DEFINE_INT_CURR("GTQ") /* Guatemala Quetzal */ + DEFINE_INT_CURR("GYD") /* Guyana Dollar */ + DEFINE_INT_CURR("HKD") /* Hong Kong Dollar */ +@@ -70,12 +78,14 @@ DEFINE_INT_CURR("HRK") /* Croatia Kuna + DEFINE_INT_CURR("HTG") /* Haiti Gourde */ + DEFINE_INT_CURR("HUF") /* Hungarian Forint */ + DEFINE_INT_CURR("IDR") /* Indonesia Rupiah */ ++DEFINE_INT_CURR("IEP") /* Irish Pound -> EUR */ + DEFINE_INT_CURR("ILS") /* Israeli Shekel */ + DEFINE_INT_CURR("IMP") /* Isle of Man Pounds */ + DEFINE_INT_CURR("INR") /* Indian Rupee (Bhutan) */ + DEFINE_INT_CURR("IQD") /* Iraqi Dinar */ + DEFINE_INT_CURR("IRR") /* Iranian Rial */ + DEFINE_INT_CURR("ISK") /* Iceland Krona */ ++DEFINE_INT_CURR("ITL") /* Italian Lira -> EUR */ + DEFINE_INT_CURR("JEP") /* Jersey Pound */ + DEFINE_INT_CURR("JMD") /* Jamaican Dollar */ + DEFINE_INT_CURR("JOD") /* Jordanian Dinar */ +@@ -95,6 +105,7 @@ DEFINE_INT_CURR("LKR") /* Sri Lankan Ru + DEFINE_INT_CURR("LRD") /* Liberian Dollar */ + DEFINE_INT_CURR("LSL") /* Lesotho Maloti */ + DEFINE_INT_CURR("LTL") /* Lithuanian Litas */ ++DEFINE_INT_CURR("LUF") /* Luxembourg Franc -> EUR */ + DEFINE_INT_CURR("LVL") /* Latvia Lat */ + DEFINE_INT_CURR("LYD") /* Libyan Arab Jamahiriya Dinar */ + DEFINE_INT_CURR("MAD") /* Moroccan Dirham */ +@@ -115,6 +126,7 @@ DEFINE_INT_CURR("MZM") /* Mozambique Me + DEFINE_INT_CURR("NAD") /* Namibia Dollar */ + DEFINE_INT_CURR("NGN") /* Nigeria Naira */ + DEFINE_INT_CURR("NIO") /* Nicaragua Cordoba Oro */ ++DEFINE_INT_CURR("NLG") /* Netherlands Guilder -> EUR */ + DEFINE_INT_CURR("NOK") /* Norwegian Krone */ + DEFINE_INT_CURR("NPR") /* Nepalese Rupee */ + DEFINE_INT_CURR("NZD") /* New Zealand Dollar */ +@@ -125,6 +137,7 @@ DEFINE_INT_CURR("PGK") /* Papau New Gui + DEFINE_INT_CURR("PHP") /* Philippines Peso */ + DEFINE_INT_CURR("PKR") /* Pakistan Rupee */ + DEFINE_INT_CURR("PLN") /* Polish Zloty */ ++DEFINE_INT_CURR("PTE") /* Portugese Escudo -> EUR */ + DEFINE_INT_CURR("PYG") /* Paraguay Guarani */ + DEFINE_INT_CURR("QAR") /* Qatar Rial */ + DEFINE_INT_CURR("ROL") /* Romanian Leu */ diff --git a/glibc-2.4.90-gcc4-fortify.patch b/glibc-2.4.90-gcc4-fortify.patch new file mode 100644 index 0000000..03dafaa --- /dev/null +++ b/glibc-2.4.90-gcc4-fortify.patch @@ -0,0 +1,11 @@ +--- glibc-2.4.90/include/features.h.gcc4-fortify 2006-04-27 08:54:33.000000000 -0400 ++++ glibc-2.4.90/include/features.h 2006-05-11 12:22:19.000000000 -0400 +@@ -275,7 +275,7 @@ + #endif + + #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ +- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 ++ && __GNUC_PREREQ (4, 0) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 + # if _FORTIFY_SOURCE > 1 + # define __USE_FORTIFY_LEVEL 2 + # else diff --git a/glibc-2.4.90-i386-hwcapinfo.patch b/glibc-2.4.90-i386-hwcapinfo.patch new file mode 100644 index 0000000..c467b13 --- /dev/null +++ b/glibc-2.4.90-i386-hwcapinfo.patch @@ -0,0 +1,100 @@ +2002-12-07 Gwenole Beauchesne + + * sysdeps/i386/dl-procinfo.h (HWCAP_I386_*): Move to... + * sysdeps/i386/dl-hwcapinfo.h: ... here. New file. + +--- glibc-2.4.90/sysdeps/i386/dl-procinfo.h.i386-hwcapinfo 2004-03-10 19:29:31.000000000 +0100 ++++ glibc-2.4.90/sysdeps/i386/dl-procinfo.h 2006-05-17 06:23:50.000000000 +0200 +@@ -32,34 +32,8 @@ + #define _DL_HWCAP_PLATFORM (((1ULL << _DL_PLATFORMS_COUNT) - 1) \ + << _DL_FIRST_PLATFORM) + +-enum +-{ +- HWCAP_I386_FPU = 1 << 0, +- HWCAP_I386_VME = 1 << 1, +- HWCAP_I386_DE = 1 << 2, +- HWCAP_I386_PSE = 1 << 3, +- HWCAP_I386_TSC = 1 << 4, +- HWCAP_I386_MSR = 1 << 5, +- HWCAP_I386_PAE = 1 << 6, +- HWCAP_I386_MCE = 1 << 7, +- HWCAP_I386_CX8 = 1 << 8, +- HWCAP_I386_APIC = 1 << 9, +- HWCAP_I386_SEP = 1 << 11, +- HWCAP_I386_MTRR = 1 << 12, +- HWCAP_I386_PGE = 1 << 13, +- HWCAP_I386_MCA = 1 << 14, +- HWCAP_I386_CMOV = 1 << 15, +- HWCAP_I386_FCMOV = 1 << 16, +- HWCAP_I386_MMX = 1 << 23, +- HWCAP_I386_OSFXSR = 1 << 24, +- HWCAP_I386_XMM = 1 << 25, +- HWCAP_I386_XMM2 = 1 << 26, +- HWCAP_I386_AMD3D = 1 << 31, +- +- /* XXX Which others to add here? */ +- HWCAP_IMPORTANT = (HWCAP_I386_XMM2) +- +-}; ++/* Get HWCAP definitions. */ ++#include + + /* We cannot provide a general printing function. */ + #define _dl_procinfo(word) -1 +--- glibc-2.4.90/sysdeps/i386/dl-hwcapinfo.h.i386-hwcapinfo 2006-05-17 06:28:35.000000000 +0200 ++++ glibc-2.4.90/sysdeps/i386/dl-hwcapinfo.h 2006-05-17 06:25:38.000000000 +0200 +@@ -0,0 +1,53 @@ ++/* i386 version of processor capability definitions. ++ Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Ulrich Drepper , 1998. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef _DL_HWCAPINFO_H ++#define _DL_HWCAPINFO_H 1 ++ ++enum ++{ ++ HWCAP_I386_FPU = 1 << 0, ++ HWCAP_I386_VME = 1 << 1, ++ HWCAP_I386_DE = 1 << 2, ++ HWCAP_I386_PSE = 1 << 3, ++ HWCAP_I386_TSC = 1 << 4, ++ HWCAP_I386_MSR = 1 << 5, ++ HWCAP_I386_PAE = 1 << 6, ++ HWCAP_I386_MCE = 1 << 7, ++ HWCAP_I386_CX8 = 1 << 8, ++ HWCAP_I386_APIC = 1 << 9, ++ HWCAP_I386_SEP = 1 << 11, ++ HWCAP_I386_MTRR = 1 << 12, ++ HWCAP_I386_PGE = 1 << 13, ++ HWCAP_I386_MCA = 1 << 14, ++ HWCAP_I386_CMOV = 1 << 15, ++ HWCAP_I386_FCMOV = 1 << 16, ++ HWCAP_I386_MMX = 1 << 23, ++ HWCAP_I386_OSFXSR = 1 << 24, ++ HWCAP_I386_XMM = 1 << 25, ++ HWCAP_I386_XMM2 = 1 << 26, ++ HWCAP_I386_AMD3D = 1 << 31, ++ ++ /* XXX Which others to add here? */ ++ HWCAP_IMPORTANT = (HWCAP_I386_XMM2) ++ ++}; ++ ++#endif /* dl-hwcapinfo.h */ diff --git a/glibc-2.4.90-i586-hptiming.patch b/glibc-2.4.90-i586-hptiming.patch new file mode 100644 index 0000000..2378f7e --- /dev/null +++ b/glibc-2.4.90-i586-hptiming.patch @@ -0,0 +1,132 @@ +2006-05-17 Gwenole Beauchesne + + * Update and simplify for glibc 2.4.90. + +2002-12-07 Gwenole Beauchesne + + Let an i586 rtld load i686 libraries (especially libpthread) + + * elf/rtld.c (HP_TIMING_AVAIL): Redefine to HP_TIMING_HWCAP_AVAIL + since early statistics require high-precision timers. + * sysdeps/generic/ldsodefs.h (rtld_global): Declare + _dl_cpuclock_offset if HP_TIMING_HWCAP_AVAIL is defined too. + + * sysdeps/unix/sysv/linux/i386/i586/Makefile: New file. + * sysdeps/unix/sysv/linux/i386/i586/hp-timing.c: New file. + * sysdeps/unix/sysv/linux/i386/i586/hp-timing.h: New file. + +--- glibc-2.4.90/elf/rtld.c.i586-hptiming 2006-04-27 14:54:33.000000000 +0200 ++++ glibc-2.4.90/elf/rtld.c 2006-05-17 08:31:50.000000000 +0200 +@@ -17,6 +17,9 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++/* Early statistics require high-precision timing. */ ++#define NEED_HP_TIMING_HWCAP_AVAIL 1 ++ + #include + #include + #include +@@ -178,6 +181,12 @@ static void dl_main (const ElfW(Phdr) *p + static struct libname_list _dl_rtld_libname; + static struct libname_list _dl_rtld_libname2; + ++/* Run-time detect availability of high-precision timer? */ ++#ifdef HP_TIMING_HWCAP_AVAIL ++# undef HP_TIMING_AVAIL ++# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL ++#endif ++ + /* We expect less than a second for relocation. */ + #ifdef HP_SMALL_TIMING_AVAIL + # undef HP_TIMING_AVAIL +@@ -311,9 +320,8 @@ _dl_start_final (void *arg, struct dl_st + + #endif + +-#if HP_TIMING_AVAIL +- HP_TIMING_NOW (GL(dl_cpuclock_offset)); +-#endif ++ if (HP_TIMING_AVAIL) ++ HP_TIMING_NOW (GL(dl_cpuclock_offset)); + + /* Initialize the stack end variable. */ + __libc_stack_end = __builtin_frame_address (0); +--- glibc-2.4.90/sysdeps/generic/ldsodefs.h.i586-hptiming 2006-05-10 15:42:19.000000000 +0200 ++++ glibc-2.4.90/sysdeps/generic/ldsodefs.h 2006-05-17 08:13:21.000000000 +0200 +@@ -408,7 +408,7 @@ struct rtld_global + /* The object to be initialized first. */ + EXTERN struct link_map *_dl_initfirst; + +-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL ++#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL + /* Start time on CPU clock. */ + EXTERN hp_timing_t _dl_cpuclock_offset; + #endif +@@ -619,7 +619,7 @@ struct rtld_global_ro + /* All search directories defined at startup. */ + EXTERN struct r_search_path_elem *_dl_init_all_dirs; + +-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL ++#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL + /* Overhead of a high-precision timing measurement. */ + EXTERN hp_timing_t _dl_hp_timing_overhead; + #endif +--- glibc-2.4.90/sysdeps/i386/i586/Makefile.i586-hptiming 2006-05-17 06:35:29.000000000 +0200 ++++ glibc-2.4.90/sysdeps/i386/i586/Makefile 2006-05-17 06:35:41.000000000 +0200 +@@ -0,0 +1,4 @@ ++ifeq ($(subdir),csu) ++sysdep_routines += hp-timing ++static-only-routines += hp-timing ++endif +--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.c.i586-hptiming 2006-05-17 06:36:28.000000000 +0200 ++++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.c 2006-05-17 08:17:51.000000000 +0200 +@@ -0,0 +1,2 @@ ++/* We can use the i686 implementation without changes. */ ++#include +--- glibc-2.4.90/sysdeps/i386/i586/hp-timing.h.i586-hptiming 2006-05-17 06:37:28.000000000 +0200 ++++ glibc-2.4.90/sysdeps/i386/i586/hp-timing.h 2006-05-17 08:30:06.000000000 +0200 +@@ -0,0 +1,43 @@ ++#ifndef _HP_HWCAP_TIMING_H ++#define _HP_HWCAP_TIMING_H 1 ++ ++/* We can use the i686 implementation with slight changes. */ ++#include ++ ++/* We need the definition of HWCAP_I386_TSC. */ ++#include ++ ++/* We need to perform a runtime check for the timestamp register. */ ++#undef HP_TIMING_AVAIL ++#define HP_TIMING_AVAIL (0) ++ ++/* HP_TIMING_HWCAP_AVAIL: this macro performs a run-time check for the ++ capability. */ ++#define HP_TIMING_HWCAP_AVAIL (_dl_hp_timing_avail()) ++ ++/* Perform the TSC check. */ ++#ifdef NEED_HP_TIMING_HWCAP_AVAIL ++static inline ++unsigned int ++_dl_cpuid_edx (unsigned int op) ++{ ++ unsigned int edx; ++ __asm__ __volatile__("push %%ebx ; cpuid ; pop %%ebx" ++ : "=d" (edx) : "a" (op) : "ecx"); ++ return edx; ++} ++ ++static int ++internal_function ++_dl_hp_timing_avail (void) ++{ ++ static int has_tsc = -1; ++ ++ if (__builtin_expect (has_tsc == -1, 0)) ++ has_tsc = (_dl_cpuid_edx(1) & HWCAP_I386_TSC) == HWCAP_I386_TSC; ++ ++ return has_tsc; ++} ++#endif ++ ++#endif /* hp-timing.h */ diff --git a/glibc-2.4.90-testsuite-ldbl-bits.patch b/glibc-2.4.90-testsuite-ldbl-bits.patch new file mode 100644 index 0000000..f6361fa --- /dev/null +++ b/glibc-2.4.90-testsuite-ldbl-bits.patch @@ -0,0 +1,18 @@ +--- glibc-2.4.90/stdlib/Makefile.testsuite-ldbl-bits 2006-03-20 04:39:04.000000000 -0500 ++++ glibc-2.4.90/stdlib/Makefile 2006-07-21 05:39:34.000000000 -0400 +@@ -124,9 +124,14 @@ ifeq (no,$(cross-compiling)) + tests: $(objpfx)tst-fmtmsg.out + endif + ++isomac-includes = -I../include $(+sysdep-includes) $(sysincludes) -I.. ++ifeq (powerpc:8, $(base-machine):$(sizeof-long-double)) ++# XXX only necessary for bootstrapping... ++isomac-includes += -I../libio -I../stdlib -I../wcsmbs ++endif + $(objpfx)isomac.out: $(objpfx)isomac + $(dir $<)$(notdir $<) '$(CC)' \ +- '-I../include $(+sysdep-includes) $(sysincludes) -I..' > $<.out ++ '$(isomac-includes)' > $<.out + + isomac-CFLAGS = -O + $(objpfx)isomac: isomac.c diff --git a/glibc-2.4.90-testsuite-rt-notparallel.patch b/glibc-2.4.90-testsuite-rt-notparallel.patch new file mode 100644 index 0000000..9a08847 --- /dev/null +++ b/glibc-2.4.90-testsuite-rt-notparallel.patch @@ -0,0 +1,24 @@ +2006-07-26 Gwenole Beauchesne + + * rt/Makefile (tests): Don't run tests in parallel on fine-grained + SMT systems. + +--- glibc-2.4.90/rt/Makefile.testsuite-rt-notparallel 2006-02-16 09:32:18.000000000 -0500 ++++ glibc-2.4.90/rt/Makefile 2006-10-25 03:00:03.000000000 -0400 +@@ -81,6 +81,16 @@ endif + + tst-mqueue7-ARGS = -- $(built-program-cmd) + ++# XXX avoid timing issues on fine-grained SMT systems ++ifeq (powerpc, $(base-machine)) ++no-parallel-testing = yes ++endif ++ifneq ($(filter %tests,$(MAKECMDGOALS)),) ++ifeq ($(no-parallel-testing),yes) ++.NOTPARALLEL: ++endif ++endif ++ + ifeq (yes,$(build-static-nss)) + otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ + $(resolvobjdir)/libresolv.a diff --git a/glibc-2.6-nice_fix.patch b/glibc-2.6-nice_fix.patch new file mode 100644 index 0000000..8f3558f --- /dev/null +++ b/glibc-2.6-nice_fix.patch @@ -0,0 +1,16 @@ +--- glibc-2.6.orig/sysdeps/unix/nice.c 2006-08-15 02:24:45.000000000 -0300 ++++ glibc-2.6/sysdeps/unix/nice.c 2007-06-25 14:40:24.000000000 -0300 +@@ -42,7 +42,12 @@ + __set_errno (save); + } + +- result = setpriority (PRIO_PROCESS, 0, prio + incr); ++ prio += incr; ++ if (prio < PRIO_MIN) ++ prio = PRIO_MIN; ++ else if (prio >= PRIO_MAX) ++ prio = PRIO_MAX - 1; ++ result = setpriority (PRIO_PROCESS, 0, prio); + if (result == -1) + { + if (errno == EACCES) diff --git a/glibc-2.7-mdv-wrapper_handle_sha.patch b/glibc-2.7-mdv-wrapper_handle_sha.patch new file mode 100644 index 0000000..44db632 --- /dev/null +++ b/glibc-2.7-mdv-wrapper_handle_sha.patch @@ -0,0 +1,147 @@ +--- crypt/wrapper.c.org 2008-06-17 13:29:30.000000000 -0600 ++++ crypt/wrapper.c 2008-06-17 15:33:47.000000000 -0600 +@@ -43,6 +43,10 @@ extern char *_crypt_gensalt_extended_rn( + __CONST char *input, int size, char *output, int output_size); + extern char *_crypt_gensalt_md5_rn(unsigned long count, + __CONST char *input, int size, char *output, int output_size); ++extern char *_crypt_gensalt_sha256c_rn(unsigned long count, ++ __CONST char *input, int size, char *output, int output_size); ++extern char *_crypt_gensalt_sha512c_rn(unsigned long count, ++ __CONST char *input, int size, char *output, int output_size); + + #if defined(__GLIBC__) && defined(_LIBC) + /* crypt.h from glibc-crypt-2.1 will define struct crypt_data for us */ +@@ -54,6 +58,11 @@ extern char *__md5_crypt_r(const char *k + extern char *__des_crypt_r(const char *key, const char *salt, + struct crypt_data *data); + extern struct crypt_data _ufc_foobar; ++/* support for sha256-crypt and sha512-crypt */ ++extern char *__sha256_crypt_r (const char *key, const char *salt, ++ char *buffer, int buflen); ++extern char *__sha512_crypt_r (const char *key, const char *salt, ++ char *buffer, int buflen); + #endif + + static int _crypt_data_alloc(void **data, int *size, int need) +@@ -142,6 +151,10 @@ char *__crypt_rn(__const char *key, __co + return _crypt_blowfish_rn(key, setting, (char *)data, size); + if (setting[0] == '$' && setting[1] == '1') + return __md5_crypt_r(key, setting, (char *)data, size); ++ if (setting[0] == '$' && setting[1] == '5') ++ return __sha256_crypt_r(key, setting, (char *)data, size); ++ if (setting[0] == '$' && setting[1] == '6') ++ return __sha512_crypt_r(key, setting, (char *)data, size); + if (setting[0] == '$') goto out_einval; + if (setting[0] == '_') { + if (size < sizeof(struct _crypt_extended_data)) goto out_erange; +@@ -181,6 +194,16 @@ char *__crypt_ra(__const char *key, __co + return NULL; + return __md5_crypt_r(key, setting, (char *)*data, *size); + } ++ if (setting[0] == '$' && setting[1] == '5') { ++ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) ++ return NULL; ++ return __sha256_crypt_r(key, setting, (char *)*data, *size); ++ } ++ if (setting[0] == '$' && setting[1] == '6') { ++ if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) ++ return NULL; ++ return __sha512_crypt_r(key, setting, (char *)*data, *size); ++ } + if (setting[0] == '$') goto out_einval; + if (setting[0] == '_') { + if (_crypt_data_alloc(data, size, +@@ -271,6 +294,12 @@ char *__crypt_gensalt_rn(__CONST char *p + if (!strncmp(prefix, "$1$", 3)) + use = _crypt_gensalt_md5_rn; + else ++ if (!strncmp(prefix, "$5$", 3)) ++ use = _crypt_gensalt_sha256c_rn; ++ else ++ if (!strncmp(prefix, "$6$", 3)) ++ use = _crypt_gensalt_sha512c_rn; ++ else + if (prefix[0] == '_') + use = _crypt_gensalt_extended_rn; + else +--- crypt/crypt_gensalt.c.org 2008-06-17 13:31:49.000000000 -0600 ++++ crypt/crypt_gensalt.c 2008-06-17 15:30:35.000000000 -0600 +@@ -109,3 +109,78 @@ char *_crypt_gensalt_md5_rn(unsigned lon + + return output; + } ++ ++char *_crypt_gensalt_sha256c_rn(unsigned long count, ++ __CONST char *input, int size, char *output, int output_size) ++{ ++ unsigned long value; ++ ++ if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) { ++ if (output_size > 0) output[0] = '\0'; ++ __set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL); ++ return NULL; ++ } ++ ++ output[0] = '$'; ++ output[1] = '5'; ++ output[2] = '$'; ++ value = (unsigned long)(unsigned char)input[0] | ++ ((unsigned long)(unsigned char)input[1] << 8) | ++ ((unsigned long)(unsigned char)input[2] << 16); ++ output[3] = _crypt_itoa64[value & 0x3f]; ++ output[4] = _crypt_itoa64[(value >> 6) & 0x3f]; ++ output[5] = _crypt_itoa64[(value >> 12) & 0x3f]; ++ output[6] = _crypt_itoa64[(value >> 18) & 0x3f]; ++ output[7] = '\0'; ++ ++ if (size >= 6 && output_size >= 3 + 4 + 4 + 1) { ++ value = (unsigned long)(unsigned char)input[3] | ++ ((unsigned long)(unsigned char)input[4] << 8) | ++ ((unsigned long)(unsigned char)input[5] << 16); ++ output[7] = _crypt_itoa64[value & 0x3f]; ++ output[8] = _crypt_itoa64[(value >> 6) & 0x3f]; ++ output[9] = _crypt_itoa64[(value >> 12) & 0x3f]; ++ output[10] = _crypt_itoa64[(value >> 18) & 0x3f]; ++ output[11] = '\0'; ++ } ++ ++ return output; ++} ++ ++ ++char *_crypt_gensalt_sha512c_rn(unsigned long count, ++ __CONST char *input, int size, char *output, int output_size) ++{ ++ unsigned long value; ++ ++ if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) { ++ if (output_size > 0) output[0] = '\0'; ++ __set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL); ++ return NULL; ++ } ++ ++ output[0] = '$'; ++ output[1] = '6'; ++ output[2] = '$'; ++ value = (unsigned long)(unsigned char)input[0] | ++ ((unsigned long)(unsigned char)input[1] << 8) | ++ ((unsigned long)(unsigned char)input[2] << 16); ++ output[3] = _crypt_itoa64[value & 0x3f]; ++ output[4] = _crypt_itoa64[(value >> 6) & 0x3f]; ++ output[5] = _crypt_itoa64[(value >> 12) & 0x3f]; ++ output[6] = _crypt_itoa64[(value >> 18) & 0x3f]; ++ output[7] = '\0'; ++ ++ if (size >= 6 && output_size >= 3 + 4 + 4 + 1) { ++ value = (unsigned long)(unsigned char)input[3] | ++ ((unsigned long)(unsigned char)input[4] << 8) | ++ ((unsigned long)(unsigned char)input[5] << 16); ++ output[7] = _crypt_itoa64[value & 0x3f]; ++ output[8] = _crypt_itoa64[(value >> 6) & 0x3f]; ++ output[9] = _crypt_itoa64[(value >> 12) & 0x3f]; ++ output[10] = _crypt_itoa64[(value >> 18) & 0x3f]; ++ output[11] = '\0'; ++ } ++ ++ return output; ++} diff --git a/glibc-2.7-provide_CFI_for_the_outermost_function.patch b/glibc-2.7-provide_CFI_for_the_outermost_function.patch new file mode 100644 index 0000000..ae8a2e7 --- /dev/null +++ b/glibc-2.7-provide_CFI_for_the_outermost_function.patch @@ -0,0 +1,58 @@ +2006-11-30 Jan Kratochvil + + * sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost + `clone' function to ensure proper unwinding stop of gdb. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. + +Index: sysdeps/unix/sysv/linux/i386/clone.S +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/clone.S,v +retrieving revision 1.26 +retrieving revision 1.27 +diff -u -p -r1.26 -r1.27 +--- sysdeps/unix/sysv/linux/i386/clone.S 4 May 2005 17:52:08 -0000 1.26 ++++ sysdeps/unix/sysv/linux/i386/clone.S 3 Dec 2006 23:12:36 -0000 1.27 +@@ -120,6 +120,9 @@ L(pseudo_end): + ret + + L(thread_start): ++ cfi_startproc; ++ /* Clearing frame pointer is insufficient, use CFI. */ ++ cfi_undefined (eip); + /* Note: %esi is zero. */ + movl %esi,%ebp /* terminate the stack frame */ + #ifdef RESET_PID +@@ -152,6 +155,7 @@ L(nomoregetpid): + jmp L(haspid) + .previous + #endif ++ cfi_endproc; + + cfi_startproc + PSEUDO_END (BP_SYM (__clone)) +Index: sysdeps/unix/sysv/linux/x86_64/clone.S +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/x86_64/clone.S,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -p -r1.6 -r1.7 +--- sysdeps/unix/sysv/linux/x86_64/clone.S 31 Mar 2005 10:00:12 -0000 1.6 ++++ sysdeps/unix/sysv/linux/x86_64/clone.S 3 Dec 2006 23:12:36 -0000 1.7 +@@ -89,6 +89,9 @@ L(pseudo_end): + ret + + L(thread_start): ++ cfi_startproc; ++ /* Clearing frame pointer is insufficient, use CFI. */ ++ cfi_undefined (rip); + /* Clear the frame pointer. The ABI suggests this be done, to mark + the outermost frame obviously. */ + xorl %ebp, %ebp +@@ -113,6 +116,7 @@ L(thread_start): + /* Call exit with return value from function call. */ + movq %rax, %rdi + call HIDDEN_JUMPTARGET (_exit) ++ cfi_endproc; + + cfi_startproc; + PSEUDO_END (BP_SYM (__clone)) diff --git a/glibc-2.8-ENOTTY-fr-translation.patch b/glibc-2.8-ENOTTY-fr-translation.patch new file mode 100644 index 0000000..4e20728 --- /dev/null +++ b/glibc-2.8-ENOTTY-fr-translation.patch @@ -0,0 +1,12 @@ +diff -p -up glibc-2.8/po/fr.po.orig glibc-2.8/po/fr.po +--- glibc-2.8/po/fr.po.orig 2008-05-20 20:01:33.000000000 -0400 ++++ glibc-2.8/po/fr.po 2008-05-20 20:02:10.000000000 -0400 +@@ -5351,7 +5351,7 @@ msgstr "Trop de fichiers ouverts dans le + #. TRANS modes on an ordinary file. + #: sysdeps/gnu/errlist.c:285 + msgid "Inappropriate ioctl for device" +-msgstr "Ioctl() inappropré pour un périphérique" ++msgstr "Ioctl() inapproprié pour un périphérique" + + #. TRANS An attempt to execute a file that is currently open for writing, or + #. TRANS write to a file that is currently being executed. Often using a diff --git a/glibc-2.8-nscd-init-should-start.patch b/glibc-2.8-nscd-init-should-start.patch new file mode 100644 index 0000000..d7d8756 --- /dev/null +++ b/glibc-2.8-nscd-init-should-start.patch @@ -0,0 +1,12 @@ +https://qa.mandriva.com/show_bug.cgi?id=41055 + +--- glibc-2.8/nscd/nscd.init.orig 2008-05-26 10:33:11.000000000 -0400 ++++ glibc-2.8/nscd/nscd.init 2008-05-26 10:36:56.000000000 -0400 +@@ -13,6 +13,7 @@ + ### BEGIN INIT INFO + # Provides: nscd + # Required-Start: $syslog ++# Should-Start: $network ldap mysqld ypbind + # Default-Stop: 0 1 6 + # Short-Description: Starts the Name Switch Cache Daemon + # Description: This is a daemon which handles passwd and group lookups \ diff --git a/glibc-2.9-avx-relocate_fcrypt.patch b/glibc-2.9-avx-relocate_fcrypt.patch new file mode 100644 index 0000000..d92cba6 --- /dev/null +++ b/glibc-2.9-avx-relocate_fcrypt.patch @@ -0,0 +1,49 @@ +diff -p -up glibc-2.9/crypt/crypt-entry.c.orig glibc-2.9/crypt/crypt-entry.c +--- glibc-2.9/crypt/crypt-entry.c.orig 2009-01-15 10:43:01.000000000 -0500 ++++ glibc-2.9/crypt/crypt-entry.c 2009-01-15 10:43:18.000000000 -0500 +@@ -164,18 +164,3 @@ crypt (key, salt) + #endif + + +-/* +- * To make fcrypt users happy. +- * They don't need to call init_des. +- */ +-#ifdef _LIBC +-weak_alias (crypt, fcrypt) +-#else +-char * +-__fcrypt (key, salt) +- const char *key; +- const char *salt; +-{ +- return crypt (key, salt); +-} +-#endif +diff -p -up glibc-2.9/crypt/wrapper.c.orig glibc-2.9/crypt/wrapper.c +--- glibc-2.9/crypt/wrapper.c.orig 2009-01-15 10:43:01.000000000 -0500 ++++ glibc-2.9/crypt/wrapper.c 2009-01-15 10:43:18.000000000 -0500 +@@ -326,7 +326,22 @@ weak_alias(__crypt_gensalt_rn, crypt_gen + weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra) + weak_alias(__crypt_gensalt, crypt_gensalt) + #endif +- ++/* ++ * To make fcrypt users happy. ++ * They don't need to call init_des. ++ */ ++#ifdef _LIBC ++weak_alias (crypt, fcrypt) ++#else ++char * ++__fcrypt (key, salt) ++ const char *key; ++ const char *salt; ++{ ++ return crypt (key, salt); ++} ++#endif ++ + #ifdef TEST + static struct { + char *hash; diff --git a/glibc-2.9-ldd-non-exec.patch b/glibc-2.9-ldd-non-exec.patch new file mode 100644 index 0000000..f24b014 --- /dev/null +++ b/glibc-2.9-ldd-non-exec.patch @@ -0,0 +1,40 @@ +diff -p -up glibc-2.9/elf/ldd.bash.in.orig glibc-2.9/elf/ldd.bash.in +--- glibc-2.9/elf/ldd.bash.in.orig 2008-01-02 14:25:22.000000000 -0500 ++++ glibc-2.9/elf/ldd.bash.in 2009-01-15 07:47:41.000000000 -0500 +@@ -31,6 +31,7 @@ RTLDLIST=@RTLD@ + warn= + bind_now= + verbose= ++file_magic_regex="ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib)" + + while test $# -gt 0; do + case "$1" in +@@ -151,8 +152,11 @@ for file do + echo "ldd: ${file}:" $"not regular file" >&2 + result=1 + elif test -r "$file"; then ++ if eval file -L "$file" 2>/dev/null \ ++ | sed 10q | egrep -v "$file_magic_regex" > /dev/null; then + test -x "$file" || echo 'ldd:' $"\ + warning: you do not have execution permission for" "\`$file'" >&2 ++ fi + RTLD= + ret=1 + for rtld in ${RTLDLIST}; do +@@ -169,8 +173,14 @@ warning: you do not have execution permi + # If the program exits with exit code 5, it means the process has been + # invoked with __libc_enable_secure. Fall back to running it through + # the dynamic linker. +- try_trace "$file" +- rc=$? ++ if [ ! -x "$file" ] && eval file -L "$file" 2>/dev/null \ ++ | sed 10q | egrep "$file_magic_regex" > /dev/null; then ++ try_trace "$RTLD" "$file" ++ rc=$? ++ else ++ try_trace "$file" ++ rc=$? ++ fi + if [ $rc = 5 ]; then + try_trace "$RTLD" "$file" + rc=$? diff --git a/glibc-2.9-nscd-no-host-cache.patch b/glibc-2.9-nscd-no-host-cache.patch new file mode 100644 index 0000000..3c55bb3 --- /dev/null +++ b/glibc-2.9-nscd-no-host-cache.patch @@ -0,0 +1,16 @@ +diff -p -up glibc-2.9/nscd/nscd.conf.orig glibc-2.9/nscd/nscd.conf +--- glibc-2.9/nscd/nscd.conf.orig 2007-11-05 19:50:48.000000000 -0500 ++++ glibc-2.9/nscd/nscd.conf 2009-01-15 09:56:22.000000000 -0500 +@@ -60,7 +60,11 @@ + max-db-size group 33554432 + auto-propagate group yes + +- enable-cache hosts yes ++# !!!!!WARNING!!!!! Host cache is insecure!!! The mechanism in nscd to ++# cache hosts will cause your local system to not be able to trust ++# forward/reverse lookup checks. DO NOT USE THIS if your system relies on ++# this sort of security mechanism. Use a caching DNS server instead. ++ enable-cache hosts no + positive-time-to-live hosts 3600 + negative-time-to-live hosts 20 + suggested-size hosts 211 diff --git a/glibc-2.9-share-locale.patch b/glibc-2.9-share-locale.patch new file mode 100644 index 0000000..90a8ad7 --- /dev/null +++ b/glibc-2.9-share-locale.patch @@ -0,0 +1,36 @@ +diff -p -up glibc-2.9/Makeconfig.orig glibc-2.9/Makeconfig +--- glibc-2.9/Makeconfig.orig 2008-08-18 05:42:17.000000000 -0400 ++++ glibc-2.9/Makeconfig 2009-01-15 09:44:31.000000000 -0500 +@@ -226,7 +226,7 @@ inst_zonedir = $(install_root)$(zonedir) + + # Where to install the locale files. + ifndef localedir +-localedir = $(libdir)/locale ++localedir = $(datadir)/locale + endif + inst_localedir = $(install_root)$(localedir) + +diff -p -up glibc-2.9/sysdeps/unix/sysv/linux/configure.in.orig glibc-2.9/sysdeps/unix/sysv/linux/configure.in +--- glibc-2.9/sysdeps/unix/sysv/linux/configure.in.orig 2008-04-11 17:13:38.000000000 -0400 ++++ glibc-2.9/sysdeps/unix/sysv/linux/configure.in 2009-01-15 09:44:31.000000000 -0500 +@@ -169,7 +169,7 @@ case "$prefix" in + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries +- libc_cv_localedir='${exec_prefix}/lib/locale' ++ libc_cv_localedir='${datadir}/locale' + fi + ;; + *) +diff -p -up glibc-2.9/sysdeps/unix/sysv/linux/configure.orig glibc-2.9/sysdeps/unix/sysv/linux/configure +--- glibc-2.9/sysdeps/unix/sysv/linux/configure.orig 2008-04-11 17:13:51.000000000 -0400 ++++ glibc-2.9/sysdeps/unix/sysv/linux/configure 2009-01-15 09:44:31.000000000 -0500 +@@ -381,7 +381,7 @@ case "$prefix" in + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32bit and 64bit libraries +- libc_cv_localedir='${exec_prefix}/lib/locale' ++ libc_cv_localedir='${datadir}/locale' + fi + ;; + *) diff --git a/glibc-check.sh b/glibc-check.sh new file mode 100755 index 0000000..f079cd6 --- /dev/null +++ b/glibc-check.sh @@ -0,0 +1,59 @@ +#!/bin/sh +## +## Glibc "make check" helper script +## + +while [[ $# -gt 0 ]]; do + opt=$1 + shift 1 + optarg=$1 + case $opt in + -d) DIR=$optarg; shift 1;; + -k) K=$opt;; + -l) LDSO=$optarg; shift 1;; + -j) JOBS=-j$optarg; shift 1;; + -j[0-9]*) JOBS=$opt;; + esac +done + +[[ -n "$DIR" ]] || { + echo "ERROR: check dir not specified" + exit 1 +} + +function CMD() { + echo + ${1+"$@"} + ${1+"$@"} || return $? +} + +echo "########################################################################" +echo "##" +echo "## Testing in $DIR with ${LDSO:-default ld.so}" +echo "##" +echo "########################################################################" + +[[ -n "$LDSO" ]] && { + CMD mv -f $DIR/elf/ld.so $DIR/elf/ld.so.orig + CMD cp -a $LDSO $DIR/elf/ld.so + CMD find $DIR -name \*.out -exec mv -f '{}' '{}'.origldso \; +} + +CMD make $JOBS -C $DIR check $K PARALLELMFLAGS=-s +rc=$? +if [[ $rc -eq 0 ]]; then + STATUS="PASS" +else + STATUS="FAIL" + if [[ -n "$K" ]]; then + rc=0 + fi +fi + +[[ -n "$LDSO" ]] && { + CMD mv -f $DIR/elf/ld.so.orig $DIR/elf/ld.so +} + +echo "##" +echo "## Result: $STATUS" +echo "##" +exit $rc diff --git a/glibc-find-requires.sh b/glibc-find-requires.sh new file mode 100755 index 0000000..241e4e4 --- /dev/null +++ b/glibc-find-requires.sh @@ -0,0 +1,140 @@ +#!/bin/bash + +# +# Auto-generate requirements for executables (both ELF and a.out) and library +# sonames, script interpreters, and perl modules. +# + +ulimit -c 0 + +# +# --- Set needed to 0 for traditional find-requires behavior. +needed=0 +if [ X"$1" = Xldd ]; then + needed=0 +elif [ X"$1" = Xobjdump ]; then + needed=1 +fi + +# +# --- Mandrake Linux specific part + +# +# --- Grab the file manifest and classify files. +filelist=`sed "s/['\"]/\\\&/g"` +exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \ + grep ":.*executable" | cut -d: -f1` +scriptlist=`echo $filelist | grep -v /usr/doc | grep -v /usr/share/doc | xargs -r file | \ + egrep ":.* (commands|script) " | cut -d: -f1` +liblist=`echo $filelist | xargs -r file | \ + grep ":.*shared object" | cut -d : -f1` + +interplist= +perllist= +pythonlist= +tcllist= + +# +# --- Alpha does not mark 64bit dependencies +case `uname -m` in + alpha*) mark64="" ;; + *) mark64="()(64bit)" ;; +esac + +if [ "$needed" -eq 0 ]; then +# +# --- Executable dependency sonames. + for f in $exelist; do + [ -r $f -a -x $f ] || continue + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + ldd $f | awk '/=>/ { + if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) { + gsub(/'\''"/,"\\&",$1); + printf "%s'$lib64'\n", $1 + } + }' + done | xargs -r -n 1 basename | sort -u | grep -v 'libsafe|libfakeroot' + +# +# --- Library dependency sonames. + for f in $liblist; do + [ -r $f ] || continue + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + ldd $f | awk '/=>/ { + if ($1 !~ /libNoVersion.so/ && $1 !~ /4[um]lib.so/ && $1 !~ /libredhat-kernel.so/) { + gsub(/'\''"/,"\\&",$1); + printf "%s'$lib64'\n", $1 + } + }' + done | xargs -r -n 1 basename | sort -u | grep -v 'libsafe|libfakeroot' +fi + +# +# --- Perl or python deps + +# +# --- Script interpreters. +for f in $scriptlist; do + [ -r $f -a -x $f ] || continue + interp=`head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1` + interplist="$interplist $interp" + case $interp in + */perl) perllist="$perllist $f" ;; + esac +done +if [ -n "$interplist" ]; then + for i in `echo "$interplist" | tr '[:blank:]' \\\n | sort -u`; do + if ! rpm -qf $i --qf '%{NAME}\n' 2>/dev/null; then + echo $i + fi + done | sort -u | grep -v 'libsafe|libfakeroot' +fi + +# +# --- Add perl module files to perllist. +for f in $filelist; do + [ -r $f -a "${f%.pm}" != "${f}" ] && perllist="$perllist $f" +done + +# +# --- Weak symbol versions (from glibc). +[ -n "$mark64" ] && mark64="(64bit)" +for f in $liblist $exelist ; do + [ -r $f ] || continue + lib64=`if file -L $f 2>/dev/null | \ + grep "ELF 64-bit" >/dev/null; then echo "$mark64"; fi` + objdump -p $f | awk 'BEGIN { START=0; LIBNAME=""; needed='$needed'; } + /^$/ { START=0; } + /^Dynamic Section:$/ { START=1; } + (START==1) && /NEEDED/ { + if (needed) { print $2 ; } + } + /^Version References:$/ { START=2; } + (START==2) && /required from/ { + sub(/:/, "", $3); + LIBNAME=$3; + } + (START==2) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_*/)) { + print LIBNAME "(" $4 ")'$lib64'"; + } + ' +done | sort -u | grep -v 'libsafe|libfakeroot' + +# +# --- Perl modules. +#[ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \ +# echo $perllist | tr '[:blank:]' \\n | /usr/lib/rpm/perl.req | sort -u + +# +# --- Python modules. +[ -x /usr/lib/rpm/python.req -a -n "$pythonlist" ] && \ + echo $pythonlist | tr '[:blank:]' \\n | /usr/lib/rpm/python.req | sort -u + +# +# --- Tcl modules. +[ -x /usr/lib/rpm/tcl.req -a -n "$tcllist" ] && \ + echo $tcllist | tr '[:blank:]' \\n | /usr/lib/rpm/tcl.req | sort -u + +exit 0 diff --git a/glibc-post-wrapper.c b/glibc-post-wrapper.c new file mode 100644 index 0000000..b896ad0 --- /dev/null +++ b/glibc-post-wrapper.c @@ -0,0 +1,141 @@ +/* Portions derived from Fedora Core glibc_post_upgrade.c */ +#include +#include +#include +#include +#include +#include +#include + +#define verbose_exec(failcode, path...) \ + do \ + { \ + char *const arr[] = { path, NULL }; \ + vexec (failcode, arr); \ + } while (0) + +__attribute__((noinline)) void vexec (int failcode, char *const path[]); +__attribute__((noinline)) void says (const char *str); +__attribute__((noinline)) void sayn (long num); +__attribute__((noinline)) void message (char *const path[]); + +int main(int argc, char *argv[]) +{ + static const char *libs[] = { + "libc.so.6", + "libm.so.6", + "libpthread.so.0", + "librt.so.1", + "libthread_db.so.1" + }; + + static const char *dirs[] = { + SLIBDIR "/tls" + }; + + int i, j, ret; + + /* Remove obsolete libraries. */ + for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) { + for (j = 0; j < sizeof(libs) / sizeof(libs[0]); j++) { + char path[PATH_MAX], temp_path[PATH_MAX]; + ret = snprintf(path, sizeof(path), "%s/%s", dirs[i], libs[j]); + if (ret < 0 || ret >= sizeof(path)) + continue; + if ((ret = readlink(path, temp_path, sizeof(temp_path) - 1)) != -1) { + char resolved_path[PATH_MAX]; + temp_path[ret] = '\0'; + if (temp_path[0] == '/') + strcpy(resolved_path, temp_path); + else + ret = snprintf(resolved_path, sizeof(resolved_path), "%s/%s", dirs[i], temp_path); + if (ret > 0 && ret < sizeof(resolved_path)) + unlink(resolved_path); + } + unlink(path); + } + } + + /* Update ld.so.cache only. */ + if (access("/sbin/ldconfig", X_OK) == 0) + verbose_exec(110, "/sbin/ldconfig", "/sbin/ldconfig", "-X"); + + /* Delegate to ash for normal %post execution. */ + argv[0] = ASH_BIN; + execv(ASH_BIN, argv); + return 0; +} + +void +vexec (int failcode, char *const path[]) +{ + pid_t pid; + int status, save_errno; + + pid = vfork (); + if (pid == 0) + { + execv (path[0], path + 1); + save_errno = errno; + message (path); + says (" exec failed with errno "); + sayn (save_errno); + says ("\n"); + _exit (failcode); + } + else if (pid < 0) + { + save_errno = errno; + message (path); + says (" fork failed with errno "); + sayn (save_errno); + says ("\n"); + _exit (failcode + 1); + } + if (waitpid (0, &status, 0) != pid || !WIFEXITED (status)) + { + message (path); + says (" child terminated abnormally\n"); + _exit (failcode + 2); + } + if (WEXITSTATUS (status)) + { + message (path); + says (" child exited with exit code "); + sayn (WEXITSTATUS (status)); + says ("\n"); + _exit (WEXITSTATUS (status)); + } +} + +void +says (const char *str) +{ + write (1, str, strlen (str)); +} + +void +sayn (long num) +{ + char string[sizeof (long) * 3 + 1]; + char *p = string + sizeof (string) - 1; + + *p = '\0'; + if (num == 0) + *--p = '0'; + else + while (num) + { + *--p = '0' + num % 10; + num = num / 10; + } + + says (p); +} + +void +message (char *const path[]) +{ + says ("/usr/sbin/glibc_post_upgrade: While trying to execute "); + says (path[0]); +} diff --git a/glibc.spec b/glibc.spec new file mode 100644 index 0000000..1912f40 --- /dev/null +++ b/glibc.spec @@ -0,0 +1,2669 @@ +# RH 2.2.4-20, SuSE 2.3.1-32 +%define name %{cross_prefix}glibc + +# :- tags for glibc main package +%define glibcversion 2.13 +%define __glibcrelease 6 +%define glibcepoch 6 +# for added ports support for arches like arm +%define build_ports 0 +# add ports arches here +%ifarch %arm +%define build_ports 1 +%endif + +# CVS snapshots of glibc +%define RELEASE 1 +%if %{RELEASE} +%define source_package glibc-%{glibcversion} +%define source_dir glibc-%{glibcversion} +%define _glibcrelease %{__glibcrelease} +%else +%define snapshot 20081113 +%define source_package glibc-%{glibcversion}-%{snapshot} +%define source_dir glibc-%{glibcversion} +%define _glibcrelease 0.%{snapshot}.%{__glibcrelease} +%define build_ports 0 +%endif + +%if "%{?manbo_mkrel:has_manbo}" == "has_manbo" +%define glibcrelease %manbo_mkrel %{_glibcrelease} +%else +%define glibcrelease %mkrel %{_glibcrelease} +%endif + +# crypt blowfish support +%define crypt_bf_ver 1.0.2 + +# Define "cross" to an architecture to which glibc is to be +# cross-compiled +%define build_cross 0 +%{expand: %{?cross: %%global build_cross 1}} + +%if %{build_cross} +%define target_cpu %{cross} +%define cross_prefix cross-%{target_cpu}- +%define _prefix /usr/%{target_cpu}-linux +%define _lib lib +%define _slibdir %{_prefix}/%{_lib} +%define _slibdir32 %{_prefix}/lib +%else +%define target_cpu %{_target_cpu} +%define cross_prefix %{nil} +%define _slibdir /%{_lib} +%define _slibdir32 /lib +%endif + +# Define target (base) architecture +%define arch %(echo %{target_cpu}|sed -e "s/\\(i.86\\|athlon\\)/i386/" -e "s/amd64/x86_64/" -e "s/\\(sun4.*\\|sparcv[89]\\)/sparc/") +%define isarch() %(case " %* " in (*" %{arch} "*) echo 1;; (*) echo 0;; esac) + +%if %isarch %arm +%define gnuext -gnueabi +%else +%define gnuext -gnu +%endif + +# Define Xen arches to build with -mno-tls-direct-direct-seg-refs +%define xenarches %{ix86} x86_64 + +# Define to build nscd with selinux support +%define build_selinux 0 + +# Flag for build_pdf_doc: +# 1 build glibc with PDF documentation +# 0 don't build PDF glibc documentation (e.g. for bootstrap build) +%define build_pdf_doc 1 + +# Enable checking by default for arches where we know tests all pass +%define build_check 1 + +# Allow make check to fail only when running kernels where we know +# tests must pass (no missing features or bugs in the kernel) +%define check_min_kver 2.6.21 + +# Define to build a biarch package +%define build_biarch 0 +%if %isarch sparc64 x86_64 ppc64 +%define build_biarch 1 +%endif + +# Define to build glibc-debug package +%define build_debug 1 +%define _enable_debug_packages 1 +%if "%{_enable_debug_packages}" == "1" +%define build_debug 0 +%endif + +# Define to bootstrap new glibc +%define build_bootstrap 0 +%{expand: %{!?build_cross_bootstrap: %global build_cross_bootstrap 0}} + +%define build_profile 1 +%define build_nscd 1 +%define build_doc 1 +%define build_utils 1 +%define build_i18ndata 1 +%define build_timezone 0 + +# Disable a few defaults when cross-compiling a glibc +%if %{build_cross} +%define build_doc 0 +%define build_pdf_doc 0 +%define build_biarch 0 +%define build_check 0 +%define build_debug 0 +%define build_nscd 0 +%define build_profile 0 +%define build_utils 0 +%define build_i18ndata 0 +%define build_timezone 0 +%endif + +# Allow --with[out] at rpm command line build +%{expand: %{?_without_PDF: %%global build_pdf_doc 0}} +%{expand: %{?_without_CHECK: %%global build_check 0}} +%{expand: %{?_without_UTILS: %%global build_utils 0}} +%{expand: %{?_without_BOOTSTRAP:%%global build_bootstrap 0}} +%{expand: %{?_with_PDF: %%global build_pdf_doc 1}} +%{expand: %{?_with_CHECK: %%global build_check 1}} +%{expand: %{?_with_UTILS: %%global build_utils 1}} +%{expand: %{?_with_BOOTSTRAP: %%global build_bootstrap 1}} + +Summary: The GNU libc libraries +Name: %{name} +Version: %{glibcversion} +Release: %{glibcrelease} +Epoch: %{glibcepoch} +License: LGPL +Group: System/Libraries +Url: http://www.gnu.org/software/libc/ + +# FSF source +Source0: http://ftp.gnu.org/gnu/glibc/%{source_package}.tar.xz +%if %{RELEASE} +Source1: http://ftp.gnu.org/gnu/glibc/%{source_package}.tar.xz.sig +%endif + +# Red Hat tarball +Source2: glibc-redhat.tar.bz2 +Source3: glibc-manpages.tar.bz2 +Source4: glibc-find-requires.sh +Source5: glibc-check.sh + +%if %{build_ports} +Source8: http://ftp.gnu.org/gnu/glibc/glibc-ports-%{glibcversion}.tar.bz2 +Source9: http://ftp.gnu.org/gnu/glibc/glibc-ports-%{glibcversion}.tar.bz2.sig +%endif + +# wrapper to avoid rpm circular dependencies +Source14: glibc-post-wrapper.c + +# +# NOTE: this check is weak. The rationale is: Cell PPU optimized by +# default for MDV 2007.0, power5 et al. on Corporate side +%define powerpc_cpu_list noarch +%if "%{?distsuffix:%{distsuffix}}" == "mlcs4" +%define powerpc_cpu_list power5 +%endif +Source15: glibc-powerpc-cpu-addon-v0.03.tar.bz2 + +# Blowfish support +Source16: crypt_blowfish-%{crypt_bf_ver}.tar.gz +Source17: crypt_freesec.c +Source18: crypt_freesec.h + +Buildroot: %{_tmppath}/glibc-%{PACKAGE_VERSION}-root +%if %{build_cross} +Autoreq: false +Autoprov: false +%else +Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile, libc-headers, +Obsoletes: linuxthreads, gencat, locale, glibc-localedata +Provides: glibc-crypt_blowfish = %{crypt_bf_ver} +Provides: glibc-localedata +Provides: should-restart = system +%if %isarch %{xenarches} +Obsoletes: %{name}-xen +Provides: %{name}-xen +%endif +# The dynamic linker supports DT_GNU_HASH +Provides: rtld(GNU_HASH) +Autoreq: false +%endif +BuildRequires: patch, gettext, perl +BuildRequires: linux-userspace-headers +%if %{build_selinux} +BuildRequires: libselinux-devel >= 1.17.10 +%endif +# need linker for -Wl,--hash-style=both (>= 2.16.91.0.7-%{mkrel 6}) +# need gnu indirect function for multiarch (>= 2.19.51.0.14-1mnb2) +%define binutils_version 2.19.51.0.14-1mnb2 +BuildRequires: %{cross_prefix}binutils >= %{binutils_version} +# we need the static dash +%define ash_bin /bin/dash.static +Requires(pre): dash-static +Requires(post): dash-static +# we need an rpm with correct db4 lib +Conflicts: rpm < 4.2.2 +# we need an ldconfig with TLS support +%if %{build_cross} +BuildRequires: %{cross_prefix}gcc >= 3.2.2-4mdk +%endif +%ifarch %{ix86} alpha +BuildRequires: %{cross_prefix}gcc >= 2.96-0.50mdk +%endif +%ifarch ia64 +BuildRequires: %{cross_prefix}gcc >= 3.2.3-1mdk +%endif +%ifarch x86_64 +BuildRequires: %{cross_prefix}gcc >= 3.1.1-0.5mdk +%endif +BuildRequires: %{cross_prefix}gcc >= 4.0.1-2mdk +%if !%{build_cross} +%ifarch alpha +Provides: ld.so.2 +%endif +%ifarch ppc +Provides: ld.so.1 +%endif +%ifarch sparc +Obsoletes: libc +%endif +%endif + +Conflicts: rpm <= 4.0-0.65 +Conflicts: %{name}-devel < 2.2.3 +# We need initscripts recent enough to not restart service dm +Conflicts: initscripts < 6.91-18mdk +# Ease Conectiva upgrades +Conflicts: %{name}-base <= 2.3.4 +# https://qa.mandriva.com/show_bug.cgi?id=49589 +Conflicts: findutils < 4.3.5 +# Old prelink versions brakes the system with glibc 2.11 +Conflicts: prelink < 1:0.4.2-1.20091104.1mdv2010.1 + +BuildRequires: texinfo +%if %{build_pdf_doc} +BuildRequires: texlive +%endif +%if %{build_utils} +BuildRequires: gd-devel +%endif +BuildRequires: autoconf2.5 +BuildRequires: libcap-devel +BuildRequires: rpm-mandriva-setup-build >= 1.104 +BuildRequires: spec-helper >= 0.31.2 + +Patch00: glibc-2.11.1-localedef-archive-follow-symlinks.patch +Patch01: glibc-2.12.1-fhs.patch +Patch02: glibc-2.9-ldd-non-exec.patch +Patch04: glibc-2.2-nss-upgrade.patch +Patch05: glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch +Patch06: glibc-2.9-share-locale.patch +Patch07: glibc-2.3.6-nsswitch.conf.patch +Patch09: glibc-2.2.4-xterm-xvt.patch +Patch10: glibc-2.12.1-submitted-translit-colon.patch +Patch11: glibc-2.4.90-compat-EUR-currencies.patch +Patch12: glibc-2.3.6-ppc-build-lddlibc4.patch +Patch13: glibc-2.3.3-nscd-enable.patch +Patch14: glibc-2.9-nscd-no-host-cache.patch +Patch17: glibc-2.4.90-i386-hwcapinfo.patch +Patch18: glibc-2.7-provide_CFI_for_the_outermost_function.patch +Patch19: glibc-2.8-nscd-init-should-start.patch +Patch20: glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch +Patch22: glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch +Patch23: glibc-2.3.4-timezone.patch +Patch24: glibc-2.10.1-biarch-cpp-defines.patch +Patch26: glibc-2.6-nice_fix.patch +Patch27: glibc-2.8-ENOTTY-fr-translation.patch +Patch28: glibc-2.4.90-gcc4-fortify.patch +Patch29: glibc-2.3.5-biarch-utils.patch +Patch30: glibc-2.10.1-multiarch.patch +Patch31: glibc-2.4.90-i586-hptiming.patch +Patch32: glibc-2.3.4-i586-if-no-cmov.patch +Patch33: glibc-2.3.6-pt_BR-i18nfixes.patch +Patch34: glibc-2.4.90-testsuite-ldbl-bits.patch +Patch38: glibc-2.4.90-testsuite-rt-notparallel.patch +Patch39: glibc-2.10.1-mdv-owl-crypt_freesec.patch +Patch40: glibc-2.9-avx-relocate_fcrypt.patch +Patch41: glibc-2.3.6-avx-increase_BF_FRAME.patch +Patch42: glibc-2.10.1-mdv-avx-owl-crypt.patch +Patch43: glibc-2.7-mdv-wrapper_handle_sha.patch +Patch46: glibc-2.12.2-resolve-tls.patch +Patch47: glibc-2.13-fix-compile-error.patch +Patch48: glibc-2.13-prelink.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=638477#c275 +# https://bugzilla.redhat.com/show_bug.cgi?id=696096 +# https://bugzilla.redhat.com/attachment.cgi?id=491198 +Patch49: 0001-x86_64-fix-for-new-memcpy-behavior.patch +# shamlessly taken in linaro. just look dirty woraround +Patch50: glibc_local-syscall-mcount.diff + +# Determine minium kernel versions +%define enablekernel 2.6.9 +%if %isarch ppc ppc64 +# waitid syscall is available in 2.6.12+ there +%define enablekernel 2.6.12 +%endif +Conflicts: kernel < %{enablekernel} + +# People changed location of rpm scripts... +%define rpmscripts /usr/lib/rpm/%{_real_vendor} + +# Don't try to explicitly provide GLIBC_PRIVATE versioned libraries +%define __find_provides %{_builddir}/%{source_dir}/find_provides.sh +%define __find_requires %{_builddir}/%{source_dir}/find_requires.sh + +%if !%{build_cross} +Obsoletes: ld.so +Provides: ld.so +%endif + +Obsoletes: ldconfig +Provides: ldconfig = %{glibcepoch}:%{glibcversion}-%{glibcrelease} /sbin/ldconfig + +%description +The glibc package contains standard libraries which are used by +multiple programs on the system. In order to save disk space and +memory, as well as to make upgrading easier, common system code is +kept in one place and shared between programs. This particular package +contains the most important sets of shared libraries: the standard C +library and the standard math library. Without these two libraries, a +Linux system will not function. The glibc package also contains +national language (locale) support. + +This package now also provides ldconfig which was package seperately in +the past. Ldconfig is a basic system program which determines run-time +link bindings between ld.so and shared libraries. Ldconfig scans a running +system and sets up the symbolic links that are used to load shared +libraries properly. It also creates a cache (/etc/ld.so.cache) which +speeds the loading of programs which use shared libraries. + +%package devel +Summary: Header and object files for development using standard C libraries +Group: Development/C +Conflicts: texinfo < 3.11 +Requires(post): info-install +Requires(preun): info-install +Requires(post): coreutils +Requires(postun): coreutils, awk +Obsoletes: libc-debug, libc-headers, libc-devel, linuxthreads-devel, nptl-devel +%if !%{build_debug} +Obsoletes: %{name}-debug < 6:2.3.2-15mdk +%endif +Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease} +%if !%{build_cross} +Requires: linux-userspace-headers +%endif +%if !%isarch ppc +Conflicts: %{cross_prefix}gcc < 2.96-0.50mdk +%endif +# needs a gcc4 fortify capable compiler +Conflicts: gcc4.0 < 4.0.1-2mdk +%if %{build_cross} +Autoreq: false +Autoprov: false +%else +Autoreq: true +%endif +Provides: glibc-crypt_blowfish-devel = %{crypt_bf_ver} + +%description devel +The glibc-devel package contains the header and object files necessary +for developing programs which use the standard C libraries (which are +used by nearly all programs). If you are developing programs which +will use the standard C libraries, your system needs to have these +standard header and object files available in order to create the +executables. + +This package also includes the C header files for the Linux kernel. +The header files define structures and constants that are needed for +building most standard programs. The header files are also needed for +rebuilding the kernel. + +Install glibc-devel if you are going to develop programs which will +use the standard C libraries. + +%package static-devel +Summary: Static libraries for GNU C library +Group: Development/C +Requires: %{name}-devel = %{glibcepoch}:%{glibcversion}-%{glibcrelease} + +%description static-devel +The glibc-static-devel package contains the static libraries necessary +for developing programs which use the standard C libraries. Install +glibc-static-devel if you need to statically link your program or +library. + +%package profile +Summary: The GNU libc libraries, including support for gprof profiling +Group: Development/C +Obsoletes: libc-profile +Provides: libc-profile = %{glibcversion}-%{glibcrelease} +Autoreq: true + +%description profile +The glibc-profile package includes the GNU libc libraries and support +for profiling using the gprof program. Profiling is analyzing a +program's functions to see how much CPU time they use and determining +which functions are calling other functions during execution. To use +gprof to profile a program, your program needs to use the GNU libc +libraries included in glibc-profile (instead of the standard GNU libc +libraries included in the glibc package). + +If you are going to use the gprof program to profile a program, you'll +need to install the glibc-profile program. + +%package -n nscd +Summary: A Name Service Caching Daemon (nscd) +Group: System/Servers +Conflicts: kernel < 2.2.0 +Requires(pre): rpm-helper +Requires(preun): rpm-helper +Requires(post): rpm-helper +Requires(postun): rpm-helper +Autoreq: true + +%description -n nscd +Nscd caches name service lookups and can dramatically improve +performance with NIS+, and may help with DNS as well. Note that you +can't use nscd with 2.0 kernels because of bugs in the kernel-side +thread support. Unfortunately, nscd happens to hit these bugs +particularly hard. + +Install nscd if you need a name service lookup caching daemon, and +you're not using a version 2.0 kernel. + +%if %{build_debug} +%package debug +Summary: Shared standard C libraries with debugging information +Group: System/Libraries +Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease} +Autoreq: false + +%description debug +The glibc-debug package contains shared standard C libraries with +debugging information. You need this only if you want to step into C +library routines during debugging. + +To use these libraries, you need to add %{_libdir}/debug to your +LD_LIBRARY_PATH variable prior to starting the debugger. +%endif + +%package utils +Summary: Development utilities from GNU C library +Group: Development/Other +Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease} + +%description utils +The glibc-utils package contains memusage, a memory usage profiler, +mtrace, a memory leak tracer and xtrace, a function call tracer which +can be helpful during program debugging. + +If unsure if you need this, don't install this package. + +%if %{build_i18ndata} +%package i18ndata +Summary: Database sources for 'locale' +Group: System/Libraries + +%description i18ndata +This package contains the data needed to build the locale data files +to use the internationalization features of the GNU libc. +%endif + +%if %{build_timezone} +%package -n timezone +Summary: Time zone descriptions +Group: System/Base +Conflicts: glibc < 2.2.5-6mdk + +%description -n timezone +These are configuration files that describe possible +time zones. +%endif + +%package doc +Summary: GNU C library documentation +Group: Development/Other + +%description doc +The glibc-doc package contains documentation for the GNU C library in +info format. + +%if %{build_pdf_doc} +%package doc-pdf +Summary: GNU C library documentation +Group: Development/Other + +%description doc-pdf +The glibc-doc-pdf package contains the printable documentation for the +GNU C library in PDF format. +%endif + +%prep +%setup -q -n %{source_dir} -a 3 -a 2 -a 15 -a 16 +%if %{build_ports} +tar -xjf %SOURCE8 +mv glibc-ports-%{glibcversion} ports +%endif + +%patch00 -p1 -b .localedef-archive-follow-symlinks +%patch01 -p1 -b .fhs +%patch02 -p1 -b .ldd-non-exec +%patch04 -p1 -b .nss-upgrade +%patch05 -p1 -b .assign-global-scope-to-RFC-1918-addresses +%patch06 -p1 -b .share-locale +%patch07 -p1 -b .nsswitch.conf +%patch09 -p1 -b .xterm-xvt +%patch10 -p1 -b .translit-colon +%patch11 -p1 -b .compat-EUR-currencies +%patch12 -p1 -b .ppc-lddlibc4 +%patch13 -p1 -b .nscd-enable +%patch14 -p1 -b .nscd-no-host-cache +%patch17 -p1 -b .i386-hwcapinfo +%patch18 -p0 -R -b .provide_CFI_for_the_outermost_function +%patch19 -p1 -b .nscd-init-should-start +%patch20 -p1 -b .never-expand-ORIGIN-in-privileged-programs +%patch22 -p1 -b .tcsetattr-kernel-bug-workaround +%patch23 -p1 -b .timezone +%patch24 -p1 -b .biarch-cpp-defines +%patch26 -p1 -b .nice-fix +%patch27 -p1 -b .ENOTTY-fr-translation +%patch28 -p1 -b .gcc4-fortify +%patch29 -p1 -b .biarch-utils +%patch30 -p1 -b .multiarch-check +%patch31 -p1 -b .i586-hptiming +%patch32 -p1 -b .i586-if-no-cmov +%patch33 -p1 -b .pt_BR-i18nfixes +%patch34 -p1 -b .testsuite-ldbl-bits +%patch38 -p1 -b .testsuite-rt-notparallel +%patch46 -p1 -b .resolve-tls +%patch47 -p0 -b .fix-compile-error +%patch48 -p1 -b .prelink +%patch49 -p1 -b .memcpy +%if %build_ports +%patch50 -p1 -b .mcount +%endif + +# copy freesec source +cp %{_sourcedir}/crypt_freesec.[ch] crypt/ +echo "Applying crypt_blowfish patch:" +%patch42 -p1 -b .mdv-avx-owl-crypt +#patch -p1 -s < crypt_blowfish-%{crypt_bf_ver}/glibc-2.3.2-crypt.diff +mv crypt/crypt.h crypt/gnu-crypt.h +cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/ + +## FreeSec support for extended/new-style/BSDI hashes in crypt(3) +%patch39 -p1 -b .mdv-owl-crypt_freesec +%patch40 -p1 -b .avx-relocate_fcrypt +%patch41 -p1 -b .avx-increase_BF_FRAME +# add sha256-crypt and sha512-crypt support to the Openwall wrapper +%patch43 -p0 -b .mdv-wrapper_handle_sha + +%if %{build_selinux} +# XXX kludge to build nscd with selinux support as it added -nostdinc +# so /usr/include/selinux is not found +ln -s %{_includedir}/selinux selinux +%endif + +find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; + +# (Anssi 03/2008) FIXME: use _provides_exceptions +cat > find_provides.sh << EOF +#!/bin/sh +%{rpmscripts}/find-provides | grep -v GLIBC_PRIVATE +exit 0 +EOF +chmod +x find_provides.sh + +cat > find_requires.bootstrap.sh << EOF +/bin/sh %{SOURCE4} %{buildroot} %{_target_cpu} | grep -v "\(GLIBC_PRIVATE\|linux-gate\|linux-vdso\)" +exit 0 +EOF +chmod +x find_requires.bootstrap.sh + +# XXX: use better way later to avoid LD_LIBRARY_PATH issue +cat %{rpmscripts}/find-requires | sed '/.*LD_LIBRARY_PATH.*/d;' > find_requires +chmod +x find_requires +# (Anssi 03/2008) FIXME: use _requires_exceptions +cat > find_requires.noprivate.sh << EOF +%{_builddir}/%{source_dir}/find_requires %{buildroot} %{_target_cpu} | \ + grep -v GLIBC_PRIVATE +exit 0 +EOF +chmod +x find_requires.noprivate.sh + +# FIXME: fix system rpm find-requires to use the prefix cross version +%if %{build_bootstrap} || "%{_target_cpu}" != "%{target_cpu}" +ln -s find_requires.bootstrap.sh find_requires.sh +%else +ln -s find_requires.noprivate.sh find_requires.sh +%endif + +# Remove patch backups from files we ship in glibc packages +rm -f ChangeLog.[^0-9]* +rm -f localedata/locales/{???_??,??_??}.* +rm -f localedata/locales/[a-z_]*.* + +%build +# Prepare test matrix in the next function +CheckList=$PWD/Check.list +rm -f $CheckList +touch $CheckList + +# +# CompareKver +# function to compare the desired kernel version with running kernel +# version (package releases not taken into account in comparison). The +# function returns: +# -1 = is lesser than current running kernel +# 0 = is equal to the current running kernel +# 1 = is greater than current running kernel +# +function CompareKver() { + v1=`echo $1 | sed 's/\.\?$/./'` + v2=`uname -r | sed 's/[^.0-9].*//' | sed 's/\.\?$/./'` + n=1 + s=0 + while true; do + c1=`echo "$v1" | cut -d "." -f $n` + c2=`echo "$v2" | cut -d "." -f $n` + if [ -z "$c1" -a -z "$c2" ]; then + break + elif [ -z "$c1" ]; then + s=-1 + break + elif [ -z "$c2" ]; then + s=1 + break + elif [ "$c1" -gt "$c2" ]; then + s=1 + break + elif [ "$c2" -gt "$c1" ]; then + s=-1 + break + fi + n=$((n + 1)) + done + echo $s +} + +# +# BuildGlibc [+] +# +function BuildGlibc() { + arch="$1" + shift 1 + + # PowerPC CPU add-on + case $arch in + cpu-addon,*) + cpu=` echo "$arch" | sed -n "/.*,\([^,]*\),.*$/s//\1/p"` + arch=`echo "$arch" | sed -n "/.*,.*,\([^,]*\)$/s//\1/p"` + ;; + *) + cpu=$arch + ;; + esac + + # Select optimization flags and compiler to use + BuildAltArch="no" + BuildCompFlags="" + BuildFlags="" + case $arch in + i[3456]86 | athlon) + BuildFlags="-march=$arch -mtune=generic" + if [[ "`uname -m`" = "x86_64" ]]; then + BuildAltArch="yes" + BuildCompFlags="-m32" + fi + ;; + x86_64) + BuildFlags="-mtune=generic" + ;; + ppc) + if [[ "`uname -m`" = "ppc64" ]]; then + BuildAltArch="yes" + BuildCompFlags="-m32" + # 64-bit processors we support do support power4+ ISA (2.01) + if [[ "$cpu" != "$arch" ]]; then + BuildFlags="-mcpu=$cpu" + else + BuildFlags="-mcpu=power4 -mtune=cell" + fi + fi + ;; + ppc64) + if [[ "$cpu" != "$arch" ]]; then + BuildFlags="-mcpu=$cpu" + else + BuildFlags="-mcpu=power4 -mtune=cell" + fi + ;; + alphaev6) + BuildFlags="-mcpu=ev6" + ;; + sparc) + BuildFlags="-fcall-used-g6" + BuildCompFlags="-m32" + ;; + sparcv9) + BuildFlags="-mcpu=ultrasparc -fcall-used-g6" + BuildCompFlags="-m32" + ;; + sparc64) + BuildFlags="-mcpu=ultrasparc -mvis -fcall-used-g6" + BuildCompFlags="-m64 -mcpu=ultrasparc" + ;; + armv5t*) + BuildFlags="-march=armv5t" + BuildCompFlags="-march=armv5t" + ;; + # to check + armv7*) + BuildFlags="-march=armv7-a" + BuildCompFlags="-march=armv7-a" + ;; + esac + + # Choose multiarch support + MultiArchFlags= + case $arch in + i686 | x86_64) + MultiArchFlags="--enable-multi-arch" + ;; + esac + + # Determine C & C++ compilers + BuildCC="%{__cc} $BuildCompFlags" + BuildCXX="%{__cxx} $BuildCompFlags" + + # Are we supposed to cross-compile? + if [[ "%{target_cpu}" != "%{_target_cpu}" ]]; then + BuildCC="%{target_cpu}-linux-$BuildCC" + BuildCXX="%{target_cpu}-linux-$BuildCXX" + BuildCross="--build=%{_target_platform}" + export libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes + fi + + BuildFlags="$BuildFlags -DNDEBUG=1 -O2 -finline-functions -g" + if $BuildCC -v 2>&1 | grep -q 'gcc version 3.0'; then + # gcc3.0 had really poor inlining heuristics causing problems in + # resulting ld.so + BuildFlags="$BuildFlags -finline-limit=2000" + fi + + # Do not use direct references against %gs when accessing tls data + # XXX make it the default in GCC? (for other non glibc specific usage) + case $arch in + i[3456]86 | x86_64) + BuildFlags="$BuildFlags -mno-tls-direct-seg-refs" + ;; + esac + + # Arch specific compilation flags + if [[ "$arch" = "ppc64" ]]; then + BuildFlags="$BuildFlags -fno-inline-functions -mno-minimal-toc" + fi + + # Extra configure flags + ExtraFlags= + if [[ "%{build_profile}" != "0" ]]; then + ExtraFlags="$ExtraFlags --enable-profile" + fi + + # NPTL+TLS are now the default +%if %build_ports + Pthreads="ports,nptl" +%else + Pthreads="nptl" +%endif + TlsFlags="--with-tls --with-__thread" + + # Add-ons + AddOns="$Pthreads,libidn" + if [[ "$cpu" != "$arch" ]]; then + AddOns="$AddOns,powerpc-cpu" + BuildFlags="$BuildFlags -mcpu=$cpu" + ExtraFlags="$ExtraFlags --with-cpu=$cpu" + fi + + # Build with selinux support? +%if %{build_selinux} + SElinuxFlags="--with-selinux" +%else + SElinuxFlags="--without-selinux" +%endif + + # Kernel headers directory + KernelHeaders=%{_includedir} + + # Determine library name + glibc_cv_cc_64bit_output=no + if echo ".text" | $BuildCC -c -o test.o -xassembler -; then + case `/usr/bin/file test.o` in + *"ELF 64"*) + glibc_cv_cc_64bit_output=yes + ;; + esac + fi + rm -f test.o + + # Force a separate and clean object dir + rm -rf build-$cpu-linux + mkdir build-$cpu-linux + pushd build-$cpu-linux + [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main" + CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags" ../configure \ + $arch-%{_real_vendor}-linux%{gnuext} $BuildCross \ + --prefix=%{_prefix} \ + --libexecdir=%{_prefix}/libexec \ + --infodir=%{_infodir} \ + --enable-add-ons=$AddOns --without-cvs \ + $TlsFlags $ExtraFlags $MultiArchFlags $SElinuxFlags \ + --enable-experimental-malloc \ + --enable-kernel=%{enablekernel} \ + --with-headers=$KernelHeaders ${1+"$@"} + %make -r + popd + + # All tests are expected to pass on certain platforms, depending also + # on the version of the kernel running + case $arch in + athlon | ia64 | ppc | ppc64) + if [ "`CompareKver %{check_min_kver}`" -lt 0 ]; then + check_flags="" + else + check_flags="-k" + fi + ;; + *) + check_flags="-k" + ;; + esac + + # Generate test matrix + [[ -d "build-$arch-linux" ]] || { + echo "ERROR: PrepareGlibcTest: build-$arch-linux does not exist!" + return 1 + } + local BuildJobs="-j`getconf _NPROCESSORS_ONLN`" + echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList + + case $cpu in + i686|athlon) base_arch=i586;; + power*) base_arch=$arch;; + *) base_arch=none;; + esac + + [[ -d "build-$base_arch-linux" ]] && { + check_flags="$check_flags -l build-$base_arch-linux/elf/ld.so" + echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList + } + return 0 +} + +# Build main glibc +BuildGlibc %{target_cpu} + +%if %{build_biarch} +%if %isarch sparc64 +BuildGlibc sparcv9 +%endif +%if %isarch x86_64 +BuildGlibc i686 +%endif +%if %isarch ppc64 +BuildGlibc ppc +%endif +%endif + +%if %isarch ppc ppc64 +for cpu in %{powerpc_cpu_list}; do + [[ "$cpu" = "noarch" ]] && continue + BuildGlibc cpu-addon,$cpu,%{_arch} --disable-profile +done +%endif + +# Build i686 libraries if not already building for i686/athlon +case %{target_cpu} in + i686 | athlon) + ;; + i[3-6]86) + BuildGlibc i686 --disable-profile + ;; +esac + +make -C crypt_blowfish-%{crypt_bf_ver} man + +%if %{build_check} +export TMPDIR=/tmp +export TIMEOUTFACTOR=16 +Check="$PWD/glibc-check.sh" +cat %{SOURCE5} > $Check +chmod +x $Check +while read arglist; do + $Check $arglist || exit 1 +done < $CheckList +%endif + +%install +rm -rf $RPM_BUILD_ROOT + +# force use of _NPROCESSORS_ONLN jobs since RPM_BUILD_NCPUS could be +# greater for icecream +BuildJobs="-j`getconf _NPROCESSORS_ONLN`" + +make install_root=$RPM_BUILD_ROOT install -C build-%{target_cpu}-linux +%if %{build_i18ndata} +(cd build-%{target_cpu}-linux; + make $BuildJobs -C ../localedata objdir=`pwd` \ + install_root=$RPM_BUILD_ROOT \ + install-locales +) +install -m 0644 localedata/SUPPORTED $RPM_BUILD_ROOT/%{_datadir}/i18n/ +%endif +sh manpages/Script.sh + +# Empty filelist for non i686/athlon targets +> extralibs.filelist + +# Install biarch libraries +%if %{build_biarch} +%if %isarch sparc64 +ALT_ARCH=sparcv9-linux +%endif +%if %isarch x86_64 +ALT_ARCH=i686-linux +%endif +%if %isarch ppc64 +ALT_ARCH=ppc-linux +%endif +mkdir -p $RPM_BUILD_ROOT/$ALT_ARCH +make install_root=$RPM_BUILD_ROOT/$ALT_ARCH install -C build-$ALT_ARCH + +# Dispatch */lib only +mv $RPM_BUILD_ROOT/$ALT_ARCH/lib $RPM_BUILD_ROOT/ +mv $RPM_BUILD_ROOT/$ALT_ARCH%{_prefix}/libexec/getconf/* \ + $RPM_BUILD_ROOT%{_prefix}/libexec/getconf/ +mkdir $RPM_BUILD_ROOT%{_prefix}/lib +mv $RPM_BUILD_ROOT/$ALT_ARCH%{_prefix}/lib/* $RPM_BUILD_ROOT%{_prefix}/lib/ +# We want 32-bit binaries on sparc64 +%if %isarch sparc64 +mv -f $RPM_BUILD_ROOT/$ALT_ARCH/sbin/* $RPM_BUILD_ROOT/sbin +mv -f $RPM_BUILD_ROOT/$ALT_ARCH/%{_bindir}/* $RPM_BUILD_ROOT%{_bindir} +mv -f $RPM_BUILD_ROOT/$ALT_ARCH/%{_sbindir}/* $RPM_BUILD_ROOT%{_sbindir} +%endif +rm -rf $RPM_BUILD_ROOT/$ALT_ARCH +# XXX Dispatch 32-bit stubs +(sed '/^@/d' include/stubs-prologue.h; LC_ALL=C sort $(find build-$ALT_ARCH -name stubs)) \ +> $RPM_BUILD_ROOT%{_includedir}/gnu/stubs-32.h +%endif + +# Install extra glibc libraries +function InstallGlibc() { + local BuildDir="$1" + local SubDir="$2" + local LibDir="$3" + + case $BuildDir in + *) Pthreads=nptl ;; + esac + + [[ -z "$LibDir" ]] && LibDir="%{_slibdir}" + + pushd $BuildDir + mkdir -p $RPM_BUILD_ROOT$LibDir/$SubDir/ + install -m755 libc.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libc-*.so` + ln -sf `basename $RPM_BUILD_ROOT$LibDir/libc-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libc.so.*` + install -m755 math/libm.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libm-*.so` + ln -sf `basename $RPM_BUILD_ROOT$LibDir/libm-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libm.so.*` + install -m755 $Pthreads/libpthread.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libpthread-*.so` + ln -sf `basename $RPM_BUILD_ROOT$LibDir/libpthread-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libpthread.so.*` + install -m755 ${Pthreads}_db/libthread_db.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libthread_db-*.so` + ln -sf `basename $RPM_BUILD_ROOT$LibDir/libthread_db-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libthread_db.so.*` + install -m755 rt/librt.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/librt-*.so` + ln -sf `basename $RPM_BUILD_ROOT$LibDir/librt-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/librt.so.*` + echo "%dir $LibDir/$SubDir" >> ../extralibs.filelist + find $RPM_BUILD_ROOT$LibDir/$SubDir -maxdepth 1 -type f -o -type l | sed -e "s|$RPM_BUILD_ROOT||" >> ../extralibs.filelist + popd +} + +# Install arch-specific optimized libraries +%if %isarch %{ix86} +case %{target_cpu} in +i[3-5]86) + InstallGlibc build-i686-linux i686 + ;; +esac +%endif +%if %isarch ppc ppc64 +for cpu in %{powerpc_cpu_list}; do + [[ "$cpu" = "noarch" ]] && continue + InstallGlibc build-$cpu-linux $cpu +done +# Use hardlinks, not symlinks +# see upper NOTE if you really want dedicated power5+ hwcap... +[[ -d "$RPM_BUILD_ROOT/%{_lib}/power5" ]] && { + mkdir -p $RPM_BUILD_ROOT/%{_lib}/power5+ + ln -v $RPM_BUILD_ROOT/%{_lib}/power5/*.so \ + $RPM_BUILD_ROOT/%{_lib}/power5+/ + $RPM_BUILD_ROOT/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power5+/ + echo "%dir /%{_lib}/power5+" >> extralibs.filelist + find $RPM_BUILD_ROOT$LibDir/%{_lib}/power5+/ -maxdepth 1 -type f -o -type l | sed -e "s|$RPM_BUILD_ROOT||" >> extralibs.filelist +} +%endif + +# NPTL is not usable outside of glibc, so include +# the generic one (RH#162634) +install -m644 bits/stdio-lock.h $RPM_BUILD_ROOT%{_includedir}/bits/stdio-lock.h + +# Compatibility hack: this locale has vanished from glibc, but some other +# programs are still using it. Normally we would handle it in the %pre +# section but with glibc that is simply not an option +mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/ru_RU/LC_MESSAGES + +# Remove the files we don't want to distribute +rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion* +rm -f $RPM_BUILD_ROOT%{_slibdir}/libNoVersion* + +ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_libdir}/libbsd.a +%if %{build_biarch} +ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_prefix}/lib/libbsd.a +%endif + +%if "%{name}" == "glibc" +install -m 644 mandriva/nsswitch.conf $RPM_BUILD_ROOT%{_sysconfdir}/nsswitch.conf +%endif + +# This is for ncsd - in glibc 2.2 +%if %{build_nscd} +install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT%{_sysconfdir} +mkdir -p $RPM_BUILD_ROOT%{_initrddir} +install -m 755 nscd/nscd.init $RPM_BUILD_ROOT%{_initrddir}/nscd +%endif + +# These man pages require special attention +mkdir -p %{buildroot}%{_mandir}/man3 +install -p -m 0644 crypt_blowfish-%{crypt_bf_ver}/*.3 %{buildroot}%{_mandir}/man3/ + +# Useless and takes place +rm -rf %buildroot/%{_datadir}/zoneinfo/{posix,right} + +# Include ld.so.conf +%if "%{name}" == "glibc" +echo "include /etc/ld.so.conf.d/*.conf" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf +chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d +%endif + +# ldconfig cache +mkdir -p $RPM_BUILD_ROOT%{_var}/cache/ldconfig +touch $RPM_BUILD_ROOT%{_var}/cache/ldconfig/aux-cache + +# automatic ldconfig cache update on rpm installs/removals +# (see http://wiki.mandriva.com/en/Rpm_filetriggers) +install -d %buildroot%{_var}/lib/rpm/filetriggers +cat > %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.filter << EOF +^.((/lib|/usr/lib)(64)?/[^/]*\.so\.|/etc/ld.so.conf.d/[^/]*\.conf) +EOF +cat > %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.script << EOF +#!/bin/sh +ldconfig -X +EOF +chmod 755 %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.script + +# Include %{_libdir}/gconv/gconv-modules.cache +> $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache +chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache + +touch $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.cache + +# Add libraries to debug sub-package +%if %{build_debug} +mkdir $RPM_BUILD_ROOT%{_libdir}/debug +#cp -a $RPM_BUILD_ROOT%{_libdir}/*.a $RPM_BUILD_ROOT%{_libdir}/debug/ +#rm -f $RPM_BUILD_ROOT%{_libdir}/debug/*_p.a +cp -a $RPM_BUILD_ROOT%{_slibdir}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/debug/ + +pushd $RPM_BUILD_ROOT%{_libdir}/debug +for lib in *.so*; do + [[ -f "$lib" ]] && DEBUG_LIBS="$DEBUG_LIBS %{_libdir}/debug/$lib" +done +popd +%endif + +# Are we cross-compiling? +Strip="strip" +if [[ "%{_target_cpu}" != "%{target_cpu}" ]]; then + Strip="%{target_cpu}-linux-$Strip" +fi + +# Strip libpthread but keep some symbols +find $RPM_BUILD_ROOT%{_slibdir} -type f -name "libpthread-*.so" \ + -o -type f -name "libc-*.so" | \ + xargs $Strip -g -R .comment + +%if %{build_biarch} +find $RPM_BUILD_ROOT/lib -type f -name "libpthread-*.so" \ + -o -type f -name "libc-*.so" | \ + xargs $Strip -g -R .comment +%endif + +# Strip debugging info from all static libraries +pushd $RPM_BUILD_ROOT%{_libdir} +for i in *.a; do + if [ -f "$i" ]; then + case "$i" in + *_p.a) ;; + *) $Strip -g -R .comment $i ;; + esac + fi +done +popd + +# post install wrapper +%__cc -Os -DSLIBDIR="\"%{_slibdir}\"" -DASH_BIN="\"%{ash_bin}\"" %{SOURCE14} -static \ + -L $RPM_BUILD_ROOT%{_libdir}/ \ + -o $RPM_BUILD_ROOT%{_sbindir}/glibc-post-wrapper +chmod 700 $RPM_BUILD_ROOT%{_sbindir}/glibc-post-wrapper + +# rquota.x and rquota.h are now provided by quota +rm -f $RPM_BUILD_ROOT%{_includedir}/rpcsvc/rquota.[hx] + +# Hardlink identical locale files together +%if %{build_i18ndata} +gcc -O2 -o build-%{_target_cpu}-linux/hardlink redhat/hardlink.c +build-%{_target_cpu}-linux/hardlink -vc $RPM_BUILD_ROOT%{_datadir}/locale +%endif + +rm -rf $RPM_BUILD_ROOT%{_includedir}/netatalk/ + +# Build file list for devel package +find $RPM_BUILD_ROOT%{_includedir} -type f -or -type l > devel.filelist +find $RPM_BUILD_ROOT%{_includedir} -type d | sed "s/^/%dir /" | \ + grep -v "%{_libdir}/libnss1.*.so$" | \ + grep -v "%{_includedir}$" | >> devel.filelist +find $RPM_BUILD_ROOT%{_libdir} -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist +# biarch libs +%if %{build_biarch} +find $RPM_BUILD_ROOT%{_prefix}/lib -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist +%endif +perl -pi -e "s|$RPM_BUILD_ROOT||" devel.filelist + +# /etc/localtime - we're proud of our timezone #Well we(mdk) may put Paris +%if %{build_timezone} +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime +cp -f $RPM_BUILD_ROOT%{_datadir}/zoneinfo/US/Eastern $RPM_BUILD_ROOT%{_sysconfdir}/localtime +#ln -sf ..%{_datadir}/zoneinfo/US/Eastern $RPM_BUILD_ROOT%{_sysconfdir}/localtime +%endif + +# [gg] build PDF documentation +%if %{build_pdf_doc} +(cd manual; texi2dvi -p -t @afourpaper -t @finalout libc.texinfo) +%endif + +# the last bit: more documentation +rm -rf documentation +mkdir documentation +cp timezone/README documentation/README.timezone +cp ChangeLog* documentation +gzip -9 documentation/ChangeLog* +mkdir documentation/crypt_blowfish-%{crypt_bf_ver} +install -m 644 crypt_blowfish-%{crypt_bf_ver}/{README,LINKS,PERFORMANCE} \ + documentation/crypt_blowfish-%{crypt_bf_ver} + +# Generate final rpm filelist, with localized libc.mo files +rm -f rpm.filelist +%if "%{name}" == "glibc" +%find_lang libc +perl -ne '/^\s*$/ or print' libc.lang > rpm.filelist +%endif +cat extralibs.filelist >> rpm.filelist + +# Remove unpackaged files +rm -f $RPM_BUILD_ROOT%{_infodir}/dir.old* +rm -rf $RPM_BUILD_ROOT%{_includedir}/asm-*/mach-*/ +rm -f $RPM_BUILD_ROOT%{_datadir}/locale/locale-archive* + +%if !%{build_utils} +%if %{build_biarch} +rm -f $RPM_BUILD_ROOT%{_slibdir32}/libmemusage.so +rm -f $RPM_BUILD_ROOT%{_slibdir32}/libpcprofile.so +%endif +rm -f $RPM_BUILD_ROOT%{_slibdir}/libmemusage.so +rm -f $RPM_BUILD_ROOT%{_slibdir}/libpcprofile.so +rm -f $RPM_BUILD_ROOT%{_bindir}/memusage +rm -f $RPM_BUILD_ROOT%{_bindir}/memusagestat +rm -f $RPM_BUILD_ROOT%{_bindir}/mtrace +rm -f $RPM_BUILD_ROOT%{_bindir}/pcprofiledump +rm -f $RPM_BUILD_ROOT%{_bindir}/xtrace +%endif + +%if !%{build_timezone} +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime +rm -f $RPM_BUILD_ROOT%{_sbindir}/zdump +rm -f $RPM_BUILD_ROOT%{_sbindir}/zic +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/zdump.1* +rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo +%endif + +%if !%{build_i18ndata} +rm -rf $RPM_BUILD_ROOT%{_datadir}/i18n +%endif + +%if "%{name}" != "glibc" +rm -rf $RPM_BUILD_ROOT/boot +rm -rf $RPM_BUILD_ROOT/sbin +rm -rf $RPM_BUILD_ROOT/usr/share +rm -rf $RPM_BUILD_ROOT%{_bindir} +rm -rf $RPM_BUILD_ROOT%{_sbindir} +rm -rf $RPM_BUILD_ROOT%{_datadir} +rm -rf $RPM_BUILD_ROOT%{_mandir} +rm -rf $RPM_BUILD_ROOT%{_infodir} +rm -rf $RPM_BUILD_ROOT%{_prefix}/etc +rm -rf $RPM_BUILD_ROOT%{_libdir}/gconv +%endif + +# In case we are cross-compiling, don't bother to remake symlinks and +# fool spec-helper when stripping files +%if "%{name}" != "glibc" +export DONT_SYMLINK_LIBS=1 +export PATH=%{_bindir}:$PATH +%endif + +EXCLUDE_FROM_STRIP="ld-%{glibcversion}.so libpthread libc-%{glibcversion}.so $DEBUG_LIBS" +export EXCLUDE_FROM_STRIP + +%if "%{name}" == "glibc" +%define upgradestamp %{_slibdir}/glibc.upgraded +%define broken_link %{_slibdir}/libnss_nis.so.1 %{_slibdir}/libnss_files.so.1 %{_slibdir}/libnss_dns.so.1 %{_slibdir}/libnss_compat.so.1 + +%pre -p %{ash_bin} +# test(1) and echo(1) are built-ins +if [ -d %{_slibdir} ] && [ ! -f %{_slibdir}/libnss_files-%{glibcversion}.so ]; then + echo > %{upgradestamp} +fi + +%post -p %{_sbindir}/glibc-post-wrapper +export LC_ALL=C + +if [ "$1" -gt 1 ]; then + # migrate /etc/ld.so.conf to include the new /etc/ld.so.conf.d/ + # without external commands but for removing the temporary file + ldso_conf=/etc/ld.so.conf + while read i; do + [ "$i" = "include /etc/ld.so.conf.d/*.conf" ] && keep=1 + # Remove previously used include line without absolute path + [ "$i" = "include ld.so.conf.d/*.conf" ] || echo $i + done < $ldso_conf > $ldso_conf- + if [ -z "$keep" ]; then + echo "include /etc/ld.so.conf.d/*.conf" > $ldso_conf + while read i; do + echo $i + done < $ldso_conf- >> $ldso_conf + fi + [ -x /bin/rm ] && /bin/rm -f $ldso_conf- +fi +/sbin/ldconfig + +if [ "$1" -gt 1 ]; then + # On upgrade the services doesn't work because libnss couldn't be + # loaded anymore. + if [ -f %{upgradestamp} ]; then + if /usr/bin/readlink /proc/1/exe >/dev/null && \ + /usr/bin/readlink /proc/1/root >/dev/null; then + if [ -x /sbin/telinit -a -p /dev/initctl ]; then + /sbin/telinit u + fi + if [ -x /etc/init.d/sshd -a \ + -x /usr/sbin/sshd -a \ + -x /bin/bash ]; then + /etc/init.d/sshd condrestart + fi + fi + fi + if [ -f /bin/rm ]; then + for i in %broken_link; do + if [ -e $i ] && [ ! -L $i ]; then + /bin/rm -f $i + fi + done + fi +fi +[ -x /bin/rm ] && /bin/rm -f %{upgradestamp} + +# always generate the gconv-modules.cache +%{_sbindir}/iconvconfig -o %{_libdir}/gconv/gconv-modules.cache --nostdlib %{_libdir}/gconv + +%if %mdkversion < 200900 +%postun -p /sbin/ldconfig +%endif +%endif + +%pre devel +if [ -L %{_includedir}/scsi ]; then + rm -f %{_includedir}/scsi +fi +if [ -L %{_includedir}/sound ]; then + rm -f %{_includedir}/sound +fi +if [ -L %{_includedir}/linux ]; then + rm -f %{_includedir}/linux +fi +if [ -L %{_includedir}/asm ]; then + rm -f %{_includedir}/asm +fi +if [ -L %{_includedir}/asm-generic ]; then + rm -f %{_includedir}/asm-generic +fi +%if %isarch x86_64 +if [ -L %{_includedir}/asm-x86_64 ]; then + rm -f %{_includedir}/asm-x86_64 +fi +if [ -L %{_includedir}/asm-i386 ]; then + rm -f %{_includedir}/asm-i386 +fi +%endif +%if %isarch ppc64 +if [ -L %{_includedir}/asm-ppc64 ]; then + rm -f %{_includedir}/asm-ppc64 +fi +if [ -L %{_includedir}/asm-ppc ]; then + rm -f %{_includedir}/asm-ppc +fi +%endif +%if %isarch sparc64 +if [ -L %{_includedir}/asm-sparc64 ]; then + rm -f %{_includedir}/asm-sparc64 +fi +if [ -L %{_includedir}/asm-sparc ]; then + rm -f %{_includedir}/asm-sparc +fi +%if %isarch %arm +if [ -L %{_includedir}/asm-arm ]; then + rm -f %{_includedir}/asm-arm +fi +%endif +%endif +exit 0 + +%if %{build_doc} +%post doc +%_install_info libc.info + +%preun doc +%_remove_install_info libc.info +%endif + +%if %{build_utils} +%if %mdkversion < 200900 +%post utils -p /sbin/ldconfig +%endif +%if %mdkversion < 200900 +%postun utils -p /sbin/ldconfig +%endif +%endif + +%if %{build_nscd} +%pre -n nscd +%_pre_useradd nscd / /bin/false + +%post -n nscd +%_post_service nscd + +%preun -n nscd +%_preun_service nscd + +%postun -n nscd +%_postun_userdel nscd + +if [ "$1" -ge "1" ]; then + /sbin/service nscd condrestart > /dev/null 2>&1 || : +fi +%endif + +%clean +#rm -rf "$RPM_BUILD_ROOT" +#rm -f *.filelist* + +# +# glibc +# +%files -f rpm.filelist +%defattr(-,root,root) +%if "%{name}" == "glibc" +%if %{build_timezone} +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/localtime +%endif +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/nsswitch.conf +%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ld.so.conf +%dir %{_sysconfdir}/ld.so.conf.d +%config(noreplace) %{_sysconfdir}/rpc +%doc nis/nss +%doc posix/gai.conf +%{_mandir}/man1/* +%{_mandir}/man8/rpcinfo.8* +%{_mandir}/man8/ld.so* +%{_datadir}/locale/locale.alias +/sbin/sln +%dir %{_prefix}/libexec/getconf +%{_prefix}/libexec/getconf/* +%endif +%{_slibdir}/ld-%{glibcversion}.so +%if %isarch i386 alpha sparc sparc64 +%{_slibdir}/ld-linux.so.2 +%endif +%if %isarch ppc +%{_slibdir}/ld.so.1 +%endif +%if %isarch ppc64 +%{_slibdir}/ld64.so.1 +%endif +%if %isarch ia64 +%{_slibdir}/ld-linux-ia64.so.2 +%endif +%if %isarch x86_64 +%{_slibdir}/ld-linux-x86-64.so.2 +%endif +%if %isarch m68k +%{_slibdir}/ld.so.1 +%endif +%if %isarch %arm +%{_slibdir}/ld-linux.so.3 +%endif +%{_slibdir}/lib*-[.0-9]*.so +%{_slibdir}/lib*.so.[0-9]* +%{_slibdir}/libSegFault.so +%if "%{name}" == "glibc" +%dir %{_libdir}/gconv +%{_libdir}/gconv/*.so +%{_libdir}/gconv/gconv-modules +%ghost %{_libdir}/gconv/gconv-modules.cache +%attr(4755,root,root) %{_prefix}/libexec/pt_chown +%{_bindir}/catchsegv +%{_bindir}/gencat +%{_bindir}/getconf +%{_bindir}/getent +#%{_bindir}/glibcbug +%{_bindir}/iconv +%{_bindir}/ldd +%if %isarch i386 ppc sparc sparc64 +%{_bindir}/lddlibc4 +%endif +%{_bindir}/locale +%{_bindir}/localedef +%{_bindir}/rpcgen +%{_bindir}/sprof +%{_bindir}/tzselect +%{_sbindir}/rpcinfo +%{_sbindir}/iconvconfig +%{_sbindir}/glibc-post-wrapper +%endif + +%if %{build_biarch} +%{_slibdir32}/ld-%{glibcversion}.so +%if %isarch ppc64 +%{_slibdir32}/ld.so.1 +%else +%{_slibdir32}/ld-linux*.so.2 +%endif +%{_slibdir32}/lib*-[.0-9]*.so +%{_slibdir32}/lib*.so.[0-9]* +%{_slibdir32}/libSegFault.so +%dir %{_prefix}/lib/gconv +%{_prefix}/lib/gconv/* +%endif +# +# ldconfig +# +%if "%{name}" == "glibc" +%defattr(-,root,root) +/sbin/ldconfig +%{_mandir}/man8/ldconfig* +%ghost %{_sysconfdir}/ld.so.cache +%dir %{_var}/cache/ldconfig +%ghost %{_var}/cache/ldconfig/aux-cache +%{_var}/lib/rpm/filetriggers/ldconfig.* +%endif + +# +# glibc-devel +# +%files devel -f devel.filelist +%defattr(-,root,root) +%doc README NEWS INSTALL FAQ BUGS NOTES PROJECTS CONFORMANCE +%doc COPYING COPYING.LIB +%doc documentation/* README.libm +%doc hesiod/README.hesiod +%doc crypt/README.ufc-crypt +%{_mandir}/man3/* +%{_libdir}/libbsd-compat.a +%{_libdir}/libbsd.a +%{_libdir}/libc_nonshared.a +%{_libdir}/libg.a +%{_libdir}/libieee.a +%{_libdir}/libmcheck.a +%{_libdir}/libpthread_nonshared.a +%if "%{name}" == "glibc" +%{_libdir}/librpcsvc.a +%endif +%if %isarch ppc ppc64 sparc +%{_libdir}/libnldbl_nonshared.a +%endif + +%if %{build_biarch} +%{_prefix}/lib/libbsd-compat.a +%{_prefix}/lib/libbsd.a +%{_prefix}/lib/libc_nonshared.a +%{_prefix}/lib/libg.a +%{_prefix}/lib/libieee.a +%{_prefix}/lib/libmcheck.a +%{_prefix}/lib/libpthread_nonshared.a +%{_prefix}/lib/librpcsvc.a +%if %isarch ppc64 sparc64 +%{_prefix}/lib/libnldbl_nonshared.a +%endif +%endif + +# +# glibc-static-devel +# +%files static-devel +%defattr(-,root,root) +%doc COPYING COPYING.LIB +%{_libdir}/libBrokenLocale.a +%{_libdir}/libanl.a +%{_libdir}/libc.a +%{_libdir}/libcrypt.a +%{_libdir}/libdl.a +%{_libdir}/libm.a +%{_libdir}/libnsl.a +%{_libdir}/libpthread.a +%{_libdir}/libresolv.a +%{_libdir}/librt.a +%{_libdir}/libutil.a + +%if %{build_biarch} +%{_prefix}/lib/libBrokenLocale.a +%{_prefix}/lib/libanl.a +%{_prefix}/lib/libc.a +%{_prefix}/lib/libcrypt.a +%{_prefix}/lib/libdl.a +%{_prefix}/lib/libm.a +%{_prefix}/lib/libnsl.a +%{_prefix}/lib/libpthread.a +%{_prefix}/lib/libresolv.a +%{_prefix}/lib/librt.a +%{_prefix}/lib/libutil.a +%endif + +# +# glibc-doc +# +%if %{build_doc} +%files doc +%defattr(-,root,root) +%{_infodir}/libc.info* +%endif + +# +# glibc-doc-pdf +# +%if %{build_pdf_doc} +%files doc-pdf +%defattr(-,root,root) +%doc manual/libc.pdf +%endif + +# +# glibc-debug +# +%if %{build_debug} +%files debug +%defattr(-,root,root) +%dir %{_libdir}/debug +%{_libdir}/debug/*.so +%{_libdir}/debug/*.so.* +%endif + +# +# glibc-profile +# +%if %{build_profile} +%files profile +%defattr(-,root,root) +%{_libdir}/lib*_p.a +%if %{build_biarch} +%{_prefix}/lib/lib*_p.a +%endif +%endif + +# +# glibc-utils +# +%if %{build_utils} +%files utils +%defattr(-,root,root) +%if %{build_biarch} +%{_slibdir32}/libmemusage.so +%{_slibdir32}/libpcprofile.so +%endif +%{_slibdir}/libmemusage.so +%{_slibdir}/libpcprofile.so +%{_bindir}/memusage +%{_bindir}/memusagestat +%{_bindir}/mtrace +%{_bindir}/pcprofiledump +%{_bindir}/xtrace +%endif + +# +# nscd +# +%if %{build_nscd} +%files -n nscd +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/nscd.conf +%config(noreplace) %{_initrddir}/nscd +%{_sbindir}/nscd +%endif + +# +# timezone +# +%if %{build_timezone} +%files -n timezone +%defattr(-,root,root) +%{_sbindir}/zdump +%{_sbindir}/zic +%{_mandir}/man1/zdump.1* +%dir %{_datadir}/zoneinfo +%{_datadir}/zoneinfo/* +%endif + +# +# glibc-i18ndata +# +%if %{build_i18ndata} +%files i18ndata +%defattr(-,root,root) +%dir %{_datadir}/i18n +%dir %{_datadir}/i18n/charmaps +%{_datadir}/i18n/charmaps/* +%dir %{_datadir}/i18n/locales +%{_datadir}/i18n/locales/* +%{_datadir}/i18n/SUPPORTED +%endif + + + + +%changelog +* Fri Aug 19 2011 Paulo Andrade 6:2.13-6mnb2 ++ Revision: 695609 +- Install gconv modules (#64019) + CCBUG: 64019 silent +- Add changes required for an arm port. + + + Per Øyvind Karlsen + - don't ship useless /usr/lib/gconv with 64 bit biarch build (saves 6,3MB) + +* Sat Apr 16 2011 Paulo Andrade 6:2.13-4 ++ Revision: 653656 +- Rebuild with workaround to programs that call memcpy with overlapping pointers + +* Thu Apr 14 2011 Paulo Andrade 6:2.13-3 ++ Revision: 653054 +- Add workaround for buggy programs that do not work with backwards memcpy + +* Fri Apr 08 2011 Paulo Andrade 6:2.13-2 ++ Revision: 651893 +- Correct prelink problem (#62986) + + + Alexandre Felipe Muller de Souza + - Fixing build for x86_64 + - Updating glibc to 2.13 + - Resolving problem for bug 62776 + +* Mon Dec 27 2010 Herton Ronaldo Krzesinski 6:2.12.1-8mnb2 ++ Revision: 625383 +- Fix _PATH_VI for Mandriva also in sysdeps/unix/sysv/linux/paths.h + (MDV #60929). + +* Tue Nov 23 2010 Herton Ronaldo Krzesinski 6:2.12.1-7mnb2 ++ Revision: 600264 +- Include getlogin_r fixes from glibc head (MDV #61145). + +* Sun Oct 24 2010 Oden Eriksson 6:2.12.1-6mnb2 ++ Revision: 587863 +- P45: security fix for CVE-2010-3856 (redhat) + +* Wed Oct 20 2010 Herton Ronaldo Krzesinski 6:2.12.1-5mnb2 ++ Revision: 586990 +- Add fix for CVE-2010-3847 + (http://sourceware.org/ml/libc-hacker/2010-10/msg00007.html) + +* Sat Oct 16 2010 Herton Ronaldo Krzesinski 6:2.12.1-4mnb2 ++ Revision: 585932 +- Add patch from Andreas Schwab, posted on libc-hacker, that fixes + another make 3.82 issue in glibc, detected by tst-xmmymm failure + (http://sources.redhat.com/ml/libc-hacker/2010-09/msg00001.html) + +* Wed Sep 29 2010 Anssi Hannula 6:2.12.1-3mnb2 ++ Revision: 582103 +- fix regression of ldconfig -r when /var/cache/ldconfig does not exist + inside the chroot and running as non-root (as used by e.g. icecream) + (upstream bug #11149, patch by Petr Baudis) + +* Tue Sep 28 2010 Anssi Hannula 6:2.12.1-2mnb2 ++ Revision: 581834 +- fix build of locales package by adding transliteration for U20A1 + (COLON SIGN) (patch by Aurelien Jarno from Debian tree as spotted by + Thomas Backlund) + +* Fri Aug 27 2010 Herton Ronaldo Krzesinski 6:2.12.1-0.1mnb2 ++ Revision: 573446 +- Updated to version 2.12.1 +- Fix build with make 3.82 +- Rediffed assign-global-scope-to-RFC-1918-addresses patch +- Include nss config file template for /etc/default in documentation +- Dropped merged/obsolete patches: + glibc-2.11-Prevent-silent-errors-should-x86-64-strncmp-be-neede.patch + glibc-2.11-Avoid-ELF-lookup-race.patch + glibc-2.11-Fix-malloc_info-without-prioor-allocations.patch + glibc-2.11-Pass-sysdep-LDFLAGS-when-using-print-file-name.patch + glibc-2.11-_nl_load_locale-incorrectly-handles-mmap-failures.patch + glibc-2.11-sysdeps-ieee754-ldbl-128-fixes.patch + glibc-2.11-Don-t-map-U00DF-to-U1E9E-in-toupper-table.patch + glibc-2.11-check-fd-arg-in-futimens.patch + glibc-2.11-Add-nonnull-attribute-to-unsetenv-declaration.patch + glibc-2.11-Additional-setcontext-etc.-conformance-tests.patch + glibc-2.11-Make-unistd.h-pre-c-safe.patch + glibc-2.6.1-CVE-2010-0296.diff + glibc-2.11-Remove-unnecessary-returns.patch + glibc-2.11-Always-use-IPv4-sockets-for-IPv4-addresses.patch + glibc-2.11-Fix-error-checking-in-iconv.patch + glibc-2.11-Redefine-O_SYNC-and-O_DSYNC-to-match-2.6.33-kernels.patch + glibc-2.11-regcomp.c-do-not-ignore-memory-allocation-failure.patch + glibc-2.6.1-CVE-2010-0015.diff + glibc-2.11-Use-struct-timespec-for-timestamps-in-struct-stat-al.patch + glibc-2.11-Remove-duplicate-definitions-of-O_DSYNC-and-O_RSYNC.patch + glibc-2.11-Fix-typo-in-feature-selection-macro-use.patch + glibc-2.11-Fix-file-descriotor-leak-in-nftw-with-FTW_CHDIR.patch + glibc-2.11-Try-harder-to-re-exec-nscd-in-paranoia-mode.patch + glibc-2.11-assign-global-scope-to-RFC-1918-addresses.patch + glibc-2.11-Fix-a-few-more-cases-of-ignored-return-values-in-reg.patch + glibc-2.11-Fix-endless-loop-with-invalid-etc-shells-file.patch + glibc-2.11-Follow-kernel-F_OWNER_-GID-PGRP-change.patch + glibc-2.11-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch + glibc-2.11-Use-correct-type-when-casting-d_tag.patch + glibc-2.11-Invalid-timeouts-in-i386-sem_timedwait.patch + glibc-2.11-more-re-fixes.patch + glibc-2.11-Define-SCHED_IDLE-and-SCHED_RESET_ON_FORK-for-Linux.patch + glibc-2.11-Fix-sorting-of-malayalam-letter-na.patch + glibc-2.11-Update-constants-for-current-kernels.patch + glibc-2.11-Ignore-negative-dynamic-entry-types.patch + glibc-2.11-Avoid-alloca-in-setenv-for-long-strings.patch + glibc-2.11-Update-poll.h-header-for-POSIX-2008.patch + +* Tue Jun 08 2010 Oden Eriksson 6:2.11.1-8mnb2 ++ Revision: 547264 +- P95: security fix for CVE-2010-0015 +- P96: security fix for CVE-2010-0296 + +* Mon May 31 2010 Herton Ronaldo Krzesinski 6:2.11.1-7mnb2 ++ Revision: 546806 +- Fix permission of /usr/share/doc/glibc-devel/crypt_blowfish-1.0.2/* + files (#59585). + +* Fri May 14 2010 Eugeni Dodonov 6:2.11.1-6mnb2 ++ Revision: 544813 +- Bump release. + + + Herton Ronaldo Krzesinski + - Revert removal of exclusion list to avoid stripping of some of glibc + libraries and loader (#59247). + - Removal of more unwanted patch backup files shipped in created packages. + +* Tue Apr 27 2010 Herton Ronaldo Krzesinski 6:2.11.1-4mnb2 ++ Revision: 539689 +- Rebuild with rpm-mandriva-setup-build >= 1.104, with fixed stripping + of shared libraries (reported/requested by Christophe Fergeau). + +* Mon Apr 19 2010 Herton Ronaldo Krzesinski 6:2.11.1-3mnb2 ++ Revision: 536772 +- Assign global scope to RFC 1918 addresses in getaddrinfo (MDV #58834). + +* Thu Apr 08 2010 Herton Ronaldo Krzesinski 6:2.11.1-2mnb2 ++ Revision: 533159 +- Fix localedef --add-to-archive with locales which have symlinked + common files to optimize disk space usage. + +* Wed Mar 31 2010 Herton Ronaldo Krzesinski 6:2.11.1-1mnb2 ++ Revision: 530536 +- Updated to glibc 2.11.1, dropped merged patches: + glibc-2.11-restore-locking-in-free_check.patch + glibc-2.11-Add-missing-Linux-MADV_-definitions.patch + glibc-2.11-Fix-getwc-and-putwc-on-non-wide-streams.patch + glibc-2.11-Avoid-warnings-in-CPU_-macros-when-using-const-bitsets.patch + glibc-2.11-Fix-startup-to-security-relevant-static-binaries.patch + glibc-2.11-Fix-F_SETOWN_EX-and-F_GETOWN_EX-definitions.patch + glibc-2.11-Fix-spelling-in-memusagestat.c.patch + glibc-2.11-Fix-week-information-for-nl_NL-locale.patch + glibc-2.11-Properly-handle-STT_GNU_IFUNC-symbols-in-do_sym.patch + glibc-2.11-Prevent-unintended-file-desriptor-leak-in-grantpt.patch + glibc-2.11-Handle-running-out-of-buffer-space-with-IPv6-mapping.patch + glibc-2.11-Fixes-for-bz10968-bz10969.patch + glibc-2.11-Reinitialize-_create_xid-state-after-fork.patch + glibc-2.11-Define-week-first_weekday-and-first_workday-for-en_DK.patch + glibc-2.11-Define-week-first_weekday-and-first_workday-for-hsb_DE.patch + glibc-2.10.1-fix-preadv-pwritev-fallocate-__off_t.patch + glibc-2.11-Fix-ranges-with-multibyte-characters-as-endpoints.patch + glibc-2.11-Fix-infloop-in-__pthread_disable_asynccancel-on-x86_64.patch + +* Fri Mar 05 2010 Per Øyvind Karlsen 6:2.11-2mnb2 ++ Revision: 514736 +- fix #57754 at the source in rpm-mandriva-setup-build & spec-helper in stead +- don't strip away symbols needed for ie. valgrind (fixes #57754) + + + Herton Ronaldo Krzesinski + - Apply fixes/additions from glibc git master in glibc 2.11 for + following upstream tickets: bz11126, bz11120, bz11200, bz10992, + bz11115, bz11194, bz11141, bz11127, bz11271, bz11242, bz11027, + bz11183, bz11184, bz11185, bz11186, bz11187, bz11188, bz11189, + bz11190, bz11191, bz11192, bz11193, bz10414, bz11235, bz11093. + - Apply following fixes from glibc git master: + * Avoid ELF lookup race + * Pass $(sysdep-LDFLAGS) when using --print-file-name + * sysdeps/ieee754/ldbl-128/ fixes + * Don't map U00DF to U1E9E in toupper table + * Add nonnull attribute to unsetenv declaration + * Make unistd.h pre-c99-safe + * Fix error checking in iconv + * Redefine O_SYNC and O_DSYNC to match 2.6.33+ kernels + * Remove duplicate definitions of O_DSYNC and O_RSYNC for Linux/sparc + * Fix typo in feature selection macro use + * Fix a few more cases of ignored return values in regex + * Use correct type when casting d_tag + * Invalid timeouts in i386 sem_timedwait + * Simplify test in re_string_skip_chars + * Ignore negative dynamic entry types + * Avoid alloca in setenv for long strings + +* Thu Dec 03 2009 Herton Ronaldo Krzesinski 6:2.11-1mnb2 ++ Revision: 472873 +- Added conflicts for old prelink versions that brakes the system with + glibc 2.11 +- Added fix for bz10851, patch from upstream bugzilla. +- Apply upstream fixes/testcases after glibc 2.11, consisting in the + following patches: + glibc-2.11-Properly-handle-STT_GNU_IFUNC-symbols-in-do_sym.patch + glibc-2.11-Fix-spelling-in-memusagestat.c.patch + glibc-2.11-Handle-running-out-of-buffer-space-with-IPv6-mapping.patch + glibc-2.11-Fix-F_SETOWN_EX-and-F_GETOWN_EX-definitions.patch + glibc-2.11-Add-missing-Linux-MADV_-definitions.patch + glibc-2.11-Fixes-for-bz10968-bz10969.patch + glibc-2.11-Fix-ranges-with-multibyte-characters-as-endpoints.patch + glibc-2.11-Follow-kernel-F_OWNER_-GID-PGRP-change.patch + glibc-2.11-Avoid-warnings-in-CPU_-macros-when-using-const-bitsets.patch + glibc-2.11-Fix-getwc-and-putwc-on-non-wide-streams.patch + glibc-2.11-Reinitialize-_create_xid-state-after-fork.patch + glibc-2.11-Fix-week-information-for-nl_NL-locale.patch + glibc-2.11-Try-harder-to-re-exec-nscd-in-paranoia-mode.patch + glibc-2.11-Use-struct-timespec-for-timestamps-in-struct-stat-al.patch + glibc-2.11-Define-week-first_weekday-and-first_workday-for-en_DK.patch + glibc-2.11-Define-week-first_weekday-and-first_workday-for-hsb_DE.patch + glibc-2.11-Fix-startup-to-security-relevant-static-binaries.patch + glibc-2.11-Prevent-unintended-file-desriptor-leak-in-grantpt.patch + glibc-2.11-Fix-infloop-in-__pthread_disable_asynccancel-on-x86_64.patch + glibc-2.11-Define-SCHED_IDLE-and-SCHED_RESET_ON_FORK-for-Linux.patch +- Enable experimental-malloc, and replace mdv51545 patch by "Restore + locking in free_check" upstream fix. +- Enable multi-arch for i686 and x86_64. +- Enable verbose build for checking. +- Do not build with -U_FORTIFY_SOURCE +- kernel-headers was renamed to linux-userspace-headers, update + BuildRequires/Requires. +- Use /usr/libexec as libexec directory. +- Add BuildRequires for libcap-devel +- Updated to 2.11 + * dropped merged patches: + glibc-2.10-branch.patch + glibc-2.10.1-branch-revert-fix-permission-slave-dev-on-devpts.patch + * dropped libidn tarballs, libidn is now included in main glibc 2.11 + * provide againt pt_chown after grantpt/pt_chown changes in 2.11, also + allow libcap to be used without selinux. + +* Tue Nov 17 2009 Herton Ronaldo Krzesinski 6:2.10.1-8mnb2 ++ Revision: 467050 +- Ship SUPPORTED localedata file with glibc-i18ndata + +* Mon Nov 09 2009 Herton Ronaldo Krzesinski 6:2.10.1-7mnb2 ++ Revision: 463354 +- Apply "Fix preadv, pwritev and fallocate for -D_FILE_OFFSET_BITS=64" + change from glibc upstream. + +* Fri Oct 09 2009 Herton Ronaldo Krzesinski 6:2.10.1-6mnb2 ++ Revision: 456468 +- glibc-manpages.tar.bz2: remove tzselect man page, it's outdated, newer + versions are provided by man-pages* packages (#20326). + + + Pascal Terjan + - Fix service name for mysql (Guillaume Rousse) + +* Fri Jul 31 2009 Herton Ronaldo Krzesinski 6:2.10.1-5mnb2 ++ Revision: 405246 +- Mandriva does not ship pt_chown with glibc, not supporting system + without devpts. After glibc 2.10.1 we will must ship it again with + suid because of grantpt changes upstream, but for now just revert the + grantpt commit cherry pick from upstream changes with bug fixes in + glibc-2.10-branch.patch (patch with pull from Petr Baudis repository + at git://repo.or.cz/glibc/pb-stable.git glibc-2.10-branch). +- Updated glibc-2.10-branch.patch, and drop i386-futex-typo patch merged + at it. + +* Thu Jun 25 2009 Per Øyvind Karlsen 6:2.10.1-4mnb2 ++ Revision: 389221 +- add a versioned buildrequires on spec-helper just to be on the safe side :) +- with the mystery of the missing debug symbols solved in spec-helper 0.30.5, + rebuild to really solve this one (closes #51374) + +* Tue Jun 23 2009 Pascal Terjan 6:2.10.1-3mnb2 ++ Revision: 388677 +- Rebuild to hopefuly get -debug + +* Thu Jun 11 2009 Herton Ronaldo Krzesinski 6:2.10.1-2mnb2 ++ Revision: 385040 +- Fixed free_check locking issue (#51545). +- Fixed typo in i386 version of LOAD_FUTEX_WAIT_ABS macro. +- Updated glibc 2.10.1 branch patch (glibc-2.10-branch.patch). + +* Wed May 27 2009 Herton Ronaldo Krzesinski 6:2.10.1-1mnb2 ++ Revision: 380201 +- Updated to version 2.10.1 +- Dropped merged patches: + glibc-2.9-bz7067.patch + glibc-2.9-bz9741.patch + glibc-2.9-fedora_upstream_fixes.patch + glibc-2.9-expm1-error.patch + glibc-2.9-bz6545.patch + glibc-2.9-bz9750.patch + glibc-2.9-bz9694.patch + glibc-2.9-en_GB-first-week-work-day.patch + glibc-2.9-newer-link-scripts-insert-_begin.patch + glibc-2.9-SHM_EXEC.patch + glibc-2.9-dup2_avoid_access_through_PLT.patch + glibc-2.9-bz7056.patch + glibc-2.9-_nss_dns_gethostbyaddr2_r-buffer-aligment.patch + glibc-2.9-bug-hsearch1.patch + glibc-2.9-bz7040.patch +- Include patch with pull from "git://repo.or.cz/glibc/pb-stable.git + glibc-2.10-branch", glibc 2.10.1 branch provided by Petr Baudis from + Suse (http://sources.redhat.com/ml/libc-alpha/2009-05/msg00117.html) +- Rediffed patches: mdv-avx-owl-crypt, mdv-owl-crypt_freesec, multiarch, + biarch-cpp-defines +- Drop glibc-2.9-dns-no-gethostbyname4.patch, newer glibc has handling + now to workaround IPv4-IPv6 parallel lookup problems with broken DNS + servers. + +* Mon Apr 06 2009 Herton Ronaldo Krzesinski 6:2.9-0.20081113.5mnb2 ++ Revision: 364483 +- Fix first_weekday/first_workday for en_GB locale (#49506). + +* Mon Apr 06 2009 Herton Ronaldo Krzesinski 6:2.9-0.20081113.4mnb2 ++ Revision: 364480 +- Conflict with fileutils < 4.3.5 to avoid problems when upgrading + (#49589). + +* Thu Mar 26 2009 Herton Ronaldo Krzesinski 6:2.9-0.20081113.3mnb2 ++ Revision: 361466 +- Added fixes from glibc cvs for: + * upstream glibc bz7056 (closes also mdv bug #49142). + * build issue with binutils 2.19.51.0.2, reference: + http://sourceware.org/bugzilla/show_bug.cgi?id=9843 + +* Fri Feb 06 2009 Herton Ronaldo Krzesinski 6:2.9-0.20081113.2mnb2 ++ Revision: 338006 +- Add fixes from glibc cvs that deals with following upstream tickets: + bz7067, bz9741, bz6545, bz9750, bz9694, bz7040. Also another + miscellaneous fixes included (patches expm1-error, SHM_EXEC, + _nss_dns_gethostbyaddr2_r-buffer-aligment bug-hsearch1). +- Avoid backup file created with patch glibc-2.9-fedora_upstream_fixes.patch to + end up in glibc-i18ndata package. + +* Mon Jan 19 2009 Herton Ronaldo Krzesinski 6:2.9-0.20081113.1mnb2 ++ Revision: 331180 +- Additional fix on top of fedora_upstream_fixes added from glibc cvs to + avoid local plt check error (make check). +- Removed some uneeded old patches. +- Update glibc to version 2.9 (20081113). +- Unfuzz following patches: + glibc-2.9-ldd-non-exec.patch + glibc-2.9-share-locale.patch + glibc-2.2.5-nscd-no-host-cache.patch + glibc-2.7-mdv-owl-crypt_freesec.patch + glibc-2.3.5-avx-relocate_fcrypt.patch +- Remove uneeded patch glibc-2.1.95-string2-pointer-arith.patch, there is no + need to force cast to char * for point arithmetic, as explicitely the gcc + extension for void * pointer arithmetic is being used. +- Removed patches already applied: + glibc-2.3.2-config-amd64-alias.patch + glibc-nscd_fixes.patch + glibc-2.8-tst-iconv-fixes.patch +- Apply 'hot fixes' from fedora/upstream and workaround for glibc bz7060 + +* Fri Aug 29 2008 Herton Ronaldo Krzesinski 6:2.8-1.20080520.5mnb2 ++ Revision: 277480 +- Handle properly upgrades from ld.so.conf with relative ld.so.conf.d + include path after previous commit. + + + Helio Chissini de Castro + - Lack of relative path on ld.so.conf is breaking usage of ldconfig -r. Reviewed by Herton + + + Per Øyvind Karlsen + - handle libraries in non-standard locations with ld.so.conf config in /etc/ld.so.conf.d/ + - fix file trigger filter match for lib64 + +* Wed Jul 02 2008 Herton Ronaldo Krzesinski 6:2.8-1.20080520.4mnb2 ++ Revision: 230820 +- Add more should start entries for nscd init service, reported by + Guillaume Rousse (#41055). +- Added more upstream nscd fixes. +- Add upstream change that replaces + glibc-2.8-bug-iconv6_tst-iconv7-localedata.patch (one of bug-iconv6 + and tst-iconv7 fixes). I didn't saw that there were already a change + that fixed the same issue. + + + Vincent Danen + - properly use conditionals for build_i18ndata and build_timezone so recent rpm doesn't complain + - update the wrapper_handle_sha patch to fully handle sha256c and sha512c; this makes sha256c viable with passwd (although sha512c still needs some work) + + + Pixel + - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers + +* Thu Jun 05 2008 Pixel 6:2.8-1.20080520.3mnb2 ++ Revision: 215279 +- add rpm filetrigger running "ldconfig -X" when rpm install/remove libraries +- drop patch5 since ldconfig is now nicely handled using rpm filetrigger + +* Mon May 26 2008 Herton Ronaldo Krzesinski 6:2.8-1.20080520.2mnb2 ++ Revision: 211410 +- Add bug-iconv6 and tst-iconv7 fixes from glibc cvs. Even with them + tests would fail: localedata isn't processed before iconvdata, so + de_DE.UTF-8 isn't available for the tests. Probably this wasn't + catched as this problem is masked if de_DE.UTF-8 is already installed + on main system. Made a patch to make iconvdata depend on localedata. +- nscd init service should start ldap service if present (mdv bug + 41055). +- Remove patches not needed anymore for glibc tests related to gcc 4.2 +- Cleanup mdkversion uses from spec: there is no reason for backporting + or using current package on older distro releases. +- Use different numbering scheme in package release for this glibc 2.8 + "stable-snapshot" release, discussed on Cooker mailing list (asked by + Anssi Hannula, Thierry Vignaud). +- Remove uneeded README.upgrade.urpmi message since addition of Provides + to "should-restart = system". +- Rediffed ENOTTY-fr-translation patch. + +* Wed May 21 2008 Herton Ronaldo Krzesinski 6:2.8-1mnb2 ++ Revision: 209635 +- Disable temporarily make check for x86_64. +- Update to glibc 2.8 (no official tarball, generated one from + glibc-2_8-branch glibc cvs branch). +- Drop glibc cvs patches already applied. +- Merge glibc-2.3.4-nscd-fixes.patch and glibc-2.6-nscd_HUP.patch into + glibc-nscd_fixes.patch and added more updates/fixes from RedHat. +- Removed update for perl 5.10 (mtrace-perl-5.10.0 patch), already + applied. + +* Tue May 06 2008 Vincent Danen 6:2.7-13mnb2 ++ Revision: 201765 +- bump release +- imported crypt-blowfish support from Annvix (2.6.1-8123avx): + - added crypt-blowfish 1.0.2 + - added crypt_freesec.[ch] source files + - crypt_freesec.patch which addes support for extended/new-style/BSDI hashes in crypt(3) + - relocate_fcrypt.patch relocates the fcrypt definition from crypt-entry.c to crypt_blowfish's wrapper.c to enable gcc4 builds + - increase_BF_FRAME.pach increases the BF_FRAME and BF_CLEAN values + - crypt.patch is the crypt_blowfish patch for glibc 2.4 (rediffed from the crypt_blowfish package) + - packages provide glibc-crypt_blowfish +- rediffed crypt.patch +- rediffed crypt_freesec.patch +- added wrapper_handle_sha.patch to add sha256-crypt and sha512-crypt support to the Openwall wrapper.c file, otherwise sha(256|512)-crypt support won't work + +* Thu Mar 20 2008 Toshihiro Yamagishi 6:2.7-12mnb1 ++ Revision: 189119 +- use %%_real_vendor macro instead of mandriva as rpmscripts directory name. + +* Wed Mar 12 2008 Herton Ronaldo Krzesinski 6:2.7-11mnb1 ++ Revision: 187259 +- Disable again make check failure for i[3456]8: failure happens on + build system but not locally here, and 32 bits on x86_64 fails too + because missing 32 libs (fixable later with BuildRequires etc.). +- Revert again change that causes java programs use too much memory on + x86_64 (#38830). +- Workaround test-double failure on x86 with gcc 4.2, found out by + Makoto Dei (#38794). Also reenable make check failure for i[3456]8. + +* Mon Mar 10 2008 Herton Ronaldo Krzesinski 6:2.7-10mnb1 ++ Revision: 183209 +- Added cacheinfo update for Intel Tolapai and fix for bz5541 from glibc + cvs. + + + Anssi Hannula + - add comments regarding _(provides|requires)_exceptions + +* Tue Mar 04 2008 Herton Ronaldo Krzesinski 6:2.7-9mnb1 ++ Revision: 178439 +- Provides should be used for previous change (not Suggests), reported + by Anssi Hannula. + +* Mon Mar 03 2008 Herton Ronaldo Krzesinski 6:2.7-8mnb1 ++ Revision: 178073 +- Added "Suggests: should-restart = system" to main glibc package, + proposed by Frederic Crozat (see "RFC: add support in packages for + notifying user about system reboot needed (or service restart needed)" + message on cooker ML). + +* Wed Feb 27 2008 Herton Ronaldo Krzesinski 6:2.7-7mnb1 ++ Revision: 175818 +- Require dash-static instead of dash, because dash requires glibc and + introduces dependency problems (reported by Pascal Rigaux - pixel). + +* Tue Feb 26 2008 Herton Ronaldo Krzesinski 6:2.7-6mnb1 ++ Revision: 175412 +- Added fixes from glibc cvs: bz5465, fix-tzh_version-check, + i486-memmove-with-fortify-fix, x86_64-memset-add-missing-sfence, + bz5439, bz5441, bz5346. + + + Pixel + - replace %%mkrel with %%manbo_mkrel for Manbo Core 1 + +* Sun Feb 10 2008 Herton Ronaldo Krzesinski 6:2.7-5mdv2008.1 ++ Revision: 164745 +- Rebuild glibc with kernel-headers-2.6.24-2mdv2008.1 + +* Fri Feb 08 2008 Herton Ronaldo Krzesinski 6:2.7-4mdv2008.1 ++ Revision: 164302 +- Removed kernel-headers, now provided by a standalone package. + +* Fri Feb 08 2008 Herton Ronaldo Krzesinski 6:2.7-3mdv2008.1 ++ Revision: 164149 +- Prepare to remove kernel-headers from glibc-devel package (removed + provides, obsoletes and header files, to be able to insert separated + kernel-headers package on distro). + +* Fri Feb 01 2008 Herton Ronaldo Krzesinski 6:2.7-2mdv2008.1 ++ Revision: 161195 +- Added patch to avoid $* deprecated warning when using perl 5.10.0 with + mtrace. +- Updated kernel-headers to version 2.6.24.1mdv +- Added manual fixes from glibc cvs (glibc-2.7-manual_update.patch). + Removed glibc-2.6-texi_buildpdf_fix.patch, as this obsoletes it. +- Added fixes for bz5222 and bz5600 from glibc cvs. + +* Fri Jan 04 2008 Herton Ronaldo Krzesinski 6:2.7-1mdv2008.1 ++ Revision: 144915 +- Updated to version 2.7 +- Updated kernel-headers to version 2.6.24-0.rc6.3mdv +- Removed glibc-2.4.90-powerpc-no-clock_gettime-vdso.patch, seems to be + not needed anymore. +- Added patch from upstream cvs to fix i586 build + (glibc-2.7-memcpy_chk_i586.patch). +- Removed already applied patches in glibc 2.7: + glibc-2.5-ldconfig-old-cache.diff + glibc-cvs-nscd_dont_cache_ttl0.patch + glibc-cvs-utimensat.patch + glibc-bz4599.patch + glibc-bz4125.patch + glibc-cvs-gcc_init_fini.patch + glibc-bz4647.patch + glibc-bz4773.patch + glibc-_nl_explode_name_segfault_fix.patch + glibc-bz4776.patch + glibc-bz4775.patch + glibc-cvs-popen_bug_fix.patch + glibc-bz4792.patch + glibc-cvs-_cs_posix_v6_width_restricted_envs.patch + glibc-bz4813.patch + glibc-bz4812.patch + glibc-bz4772.patch + glibc-cvs-warning_patrol_fixes.patch + glibc-cvs-getconf_add_missing_lvl4_cache_linesize.patch + glibc-cvs-libc_texinfo_update.patch + glibc-cvs-ix86_rwlock_fixes.patch + glibc-cvs-gettext_memleak_fixes.patch + glibc-cvs-strtod_handle_minuszero.patch + glibc-cvs-ar_SA-dz_BT-LC_TIME-fixes.patch + glibc-cvs-po_updates.patch + glibc-cvs-rh250492.patch +- Removed already applied kernel-headers-dvb-video-fix-includes.patch in + kernel headers. +- Fix test-ldouble with gcc 4.2 on x86. test-double still fails though, + so disable make check failure for i[3456]8; it passes on x86_64, not + sure if it's related to gcc 4.2, will need a better check later and + someone that knows better about complex math. +- Rebuild with new lzma to fix permissions of man pages (#36176). + + + Olivier Blin + - restore BuildRoot + + + Thierry Vignaud + - kill re-definition of %%buildroot on Pixel's request + +* Wed Oct 31 2007 Herton Ronaldo Krzesinski 6:2.6.1-5mdv2008.1 ++ Revision: 104208 +- gconv-modules.cache is volatile (always changed by iconvconfig on + post), mark it as ghost in rpm files section, so it's ignored in rpm + -V output. +- Fix installation of lib{memusage,pcprofile}.so files (#35178). Don't + move them around anymore and hack xtrace/memusage, just use upstream + defaults avoiding troubles like this in the future. + +* Thu Sep 27 2007 Herton Ronaldo Krzesinski 6:2.6.1-4mdv2008.0 ++ Revision: 93205 +- Revert pl_PL LC_TIME changes from glibc 2.6, it's causing problems for + polish users, see http://qa.mandriva.com/show_bug.cgi?id=34134 + +* Fri Aug 31 2007 Herton Ronaldo Krzesinski 6:2.6.1-3mdv2008.0 ++ Revision: 76895 +- Rebuild for fixed package changelog. + +* Mon Aug 27 2007 Herton Ronaldo Krzesinski 6:2.6.1-2mdv2008.0 ++ Revision: 72022 +- Added ldconfig cache speed up patch (added upstream, reported by + Pascal Rigaux). +- Make package own ld.so.cache. +- Added pt_BR-i18nfixes patch, minor translation fixes for + pt_BR, see patch for credits. +- Provide gai.conf sample. + + + Thierry Vignaud + - buildrequires obsoletes buildprereq + +* Wed Aug 08 2007 Herton Ronaldo Krzesinski 6:2.6.1-1mdv2008.0 ++ Revision: 60011 +- Updated to version 2.6.1 (technically with previously added patches we + were already there, this is more a cosmetic change). +- Removed patches already applied in 2.6.1: x86_64-memcpy_cacheinfo, + epoll, nscd_get_mapping_crash_fix, sparc_build_fix, + provide_CFI_for_the_outermost_function (reverted apply), + i386_sync_file_range, bz4745, branch_misc_fixes, malloc, + x86_64_dummy_files_prevent_stub, bz4512, bz4514, + ld_hwcap_mask_handling_fix, bz4858, pthread_getattr_np_fix, + tst_shm_fstat64, ldbl128ibm_fixes, bz4702. +- Added the following upstream fixes: rh250492, strtod_handle_minuszero, + libc_texinfo_update, ar_SA-dz_BT-LC_TIME-fixes, po_updates, + gettext_memleak_fixes, ix86_rwlock_fixes. +- Updated warning_patrol_fixes patch with more fixes. +- Really enable libidn addon. + +* Mon Aug 06 2007 Herton Ronaldo Krzesinski 6:2.6-6mdv2008.0 ++ Revision: 59528 +- Added patch texi_buildpdf_fix, to fix build when build_pdf_doc is + enabled (parse error fixes for texi2dvi). +- Re-enabled glibc-doc-pdf again (it was fixed in tetex 3.0-23mdk), from + Giuseppe Ghib?\195?\178 . + + + Anssi Hannula + - Really apply kernel-headers-dvb-video-fix-includes.patch. + +* Thu Aug 02 2007 Herton Ronaldo Krzesinski 6:2.6-5mdv2008.0 ++ Revision: 58194 +- Updated kernel-headers to version 2.6.22.3mdv. The only change inside + it is to add pci_ids.h file, needed by ldetect as reported by Thierry + Vignaud. + +* Mon Jul 30 2007 Herton Ronaldo Krzesinski 6:2.6-4mdv2008.0 ++ Revision: 56752 +- Fixed missing header on popen_bug_fix patch. +- Added one more fix that went upstream related to + _nl_explode_name_segfault_fix patch. +- Updated nscd_HUP patch from fedora. +- Added more fixes/additions that went upstream: bz4813, bz4772, + warning_patrol_fixes, sparc_build_fix, bz4812, bz4792, bz4858, + _cs_posix_v6_width_restricted_envs, + getconf_add_missing_lvl4_cache_linesize. + +* Wed Jul 25 2007 Herton Ronaldo Krzesinski 6:2.6-3mdv2008.0 ++ Revision: 55382 +- As reported and found out by Anssi Hannula, revert the following + upstream change: + 2006-11-30 Jan Kratochvil + * sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the + * outermost + `clone' function to ensure proper unwinding stop of gdb. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. + It is causing memory leaks with gcj 4.3 on some cases on x86_64, and + probably other problems, may be because of a binutils bug. +- Added fix for a popen bug from glibc cvs. + +* Fri Jul 20 2007 Herton Ronaldo Krzesinski 6:2.6-2mdv2008.0 ++ Revision: 53918 +- Added patch from Anssi Hannula to fix a kernel header issue + (kernel-headers-dvb-video-fix-includes.patch). +- Added missing fixes to ldbl128ibm_fixes patch. +- Removed hunk from kernel-headers-gnu-extensions.patch that patched + linux/byteorder/swab.h, as code changed and isn't needed anymore (no + need now for __extension__ as code no more uses "({ ... })" gcc + extension). +- Updated kernel-headers to version 2.6.22.1mdv. +- Replaced init_tls_calls with more complete branch_misc_fixes patch, + that includes it along with more fixes from upstream glibc 2.6 branch. +- Added upstream fix bz4775. +- Don't use echo on post, instead use README.upgrade.urpmi because of + rpmdrake, as reported by Anssi Hannula. Also use better warning + message. +- Removed glibc-post-upgrade, dont't restart all services on update + (#21730). Only re-exec init and sshd if possible/needed. + + + Ademar de Souza Reis Jr + - remove unecessary 'xset fp=[...]' from %%post, since xfs is not + used anymore (besides, it was pointing to the wrong location) + +* Fri Jul 13 2007 Herton Ronaldo Krzesinski 2.6-1mdv2008.0 ++ Revision: 51838 +- Only allow make check to fail if current running kernel version is + known to work. +- Added more fixes from Jakub Jelinek (upstream): + _nl_explode_name_segfault_fix, bz4776. +- Deal with LD_LIBRARY_PATH bug when building package between major + glibc versions. +- Added upstream fixes: nscd_get_mapping_crash_fix, bz4599, + gcc_init_fini, i386_sync_file_range, init_tls_calls, bz4745, bz4647, + x86_64_dummy_files_prevent_stub, ld_hwcap_mask_handling_fix, + bz4773, pthread_getattr_np_fix, tst_shm_fstat64, ldbl128ibm_fixes, + bz4125, bz4702, nscd_dont_cache_ttl0, utimensat, bz4586. +- Replaced amd64-string patch with x86_64-memcpy_cacheinfo that went + upstream. +- Replaced futex-waiters with bz4512 patch (only test cases added). +- Replaced printf diff with glibc-bz4514.patch. +- Use new gcc 4.2 -mtune=generic flags for BuildFlags on x86/x86_64. +- Updated kernel headers (2.6.21.2mdv). Because of this removed/modified + the following patches: + * avx-kernel-headers-audit_support: already applied. + * kernel-headers-include-2.6.17.1mdk, syscall-mem-clobbers: obsolete, + not needed anymore. + * gnu-extensions: modified, one hunk is not applying anymore as the + file it patches is gone. + This new kernel headers use the new scheme of sanitized upstream + kernel headers, the tarball is generated from make + headers_install_all. +- Updated create_asm_headers.sh script for new kernel headers. +- Added upstream/redhat patches printf, malloc, futex-waiters, epoll. + Fix bugs/incompatibility issues in glibc 2.6 (the diffs are from + suse). +- Updated to version 2.6. +- Redid patches that were not applying anymore: nscd_HUP, nice_fix, + multiarch, new-charsets. +- Drop patches already applied: hwcap-check-platform, brazil-daylight, + slovenia-euro, unicode5, all bz* patches, powerpc-ldbl-fixes, + powerpc-hwcaps, fix-nptl-testcases, powerpc-regdump, + ttyname-dont-use-isatty, fix-ppc32-setcontext, + fix-pthread_mutex_timedlock. +- Disabled amd64 patches new-libm, amd64-fix-ceil, amd64-string: don't + apply anymore, are not approved upstream yet, no updated version. + + + Andreas Hasenack + - added audit patch, from Vdanen, so we can build audit + + + Per Øyvind Karlsen + - merge ldconfig package with glibc package + - replace file dependency /sbin/install-info with package dependency info-install + - s/mandrake/mandriva/ + - do not build and install localedata for $ALT_ARCH too (fixes #27214) + - drop libnldbl_nonshared.a from sparc64 (fixes #30589) + - fix reckless usage of s/.bz2// that broke patch names + + + Pixel + - explicit file provide /sbin/ldconfig + + +* Wed Mar 07 2007 Gwenole Beauchesne 2.4-8mdv2007.1 ++ Revision: 134573 +- split timezone package off glibc +- fix pthread_mutex_timedlock() on x86_64 +- fix setcontext on ppc32 +- fix floor() and ceil() inlines on i386 (BZ#3451) +- fix cross-compilation and packaging + +* Thu Jan 18 2007 Gwenole Beauchesne 6:2.4-7mdv2007.1 ++ Revision: 110379 +- add Unicode 5.0 support (Pablo) +- use Euro in Slovenia +- enable DT_GNU_HASH support only for MDK >= 2007.1 +- explicitly optimize for Cell on powerpc + +* Fri Jan 12 2007 Gwenole Beauchesne 6:2.4-6mdv2007.1 ++ Revision: 108082 +- backport DT_GNU_HASH support +- sparc64 updates (Peroyvind) +- fix lsb T.ttyname_r (Stew, glibc head) + +* Tue Oct 24 2006 Gwenole Beauchesne 2.4-5mdv +- update Brazil tzdata (andreas, #26570) +- update powerpc-cpu add-on to 0.03 +- reintroduce dl-cache AT_PLATFORM check from glibc 2.2.5 +- really don't use -frename-registers (workaround rpmb bug) +- add selected fixes from 2.5-branch: + * fix ppc{32,64} libSegFault.so register dump + * fix 2 NPTL testcases + * fix ppc{32,64} longjmp (BZ#3225) + * use AT_PLATFORM and limit the number of important hwcaps on ppc + * fix ppc{32,64} lrintl/lroundl + * fix lrint on ppc32 (BZ#3155) + * fix lrint, llrint (BZ#2592) + * fix pthread_create() called from cancellation handlers (BZ#3124) + * fix pthread_cond_{,timed}wait() cancellation (BZ#3123) + * fix invalid free in error(3) (BZ#2998) + * fix printing of hexadecimal floating point numbers (BZ#2908) + * fix too large key check in pthread_setspecific (BZ#2892) + * fix pthread_join() in already cancelled thread (BZ#2843) + * fix UINT8_C and UINT16_C definitions in (BZ#2841) + * fix mktime() on 32-bit platforms for dates > 2038 (BZ#2821) + * fix uninitialized len for alloca in ld.so $ORIGIN/$PLATFORM handling (BZ#2792) + * fix malloc(0xFFFFnnnn) corruption from 32-bit wraparound (BZ#2775) + * fix insque() to conform to POSIX (BZ#2766) + * fix envz_strip() (BZ#2703) + * fix dladdr() with SHN_UNDEF symbols (BZ#2683) + * provide getlogin prototype even for -D_XOPEN_SOURCE=500 (BZ#2680) + * fix cacosh() (BZ#2182) + +* Mon Jul 24 2006 Gwenole Beauchesne 2.4-4mdk +- update kernel headers to 2.6.17 +- --enable-kernel=2.6.12 on powerpc arches +- add powerpc-cpu add-on and optimize for power5 and power6 +- install generic header (RH #162634) +- cleanups (use new %%isarch) +- sparc changes from Per Oyvind Karlsen +- buildrequires: texinfo (Christiaan Welvaart) +- build glibc-post-wrapper against newly installed libs (Christiaan) + +* Mon May 22 2006 Arnaud Patard 2.4-3mdk +- update kernel-headers to the 2.6.16-2mdk to be able to build applications + that are including linux/input.h + +* Fri May 19 2006 Gwenole Beauchesne 2.4-2mdk +- update new-charsets patch +- update kernel-headers to 2.6.16 +- update x86_64 strings library from AMD + +* Thu May 11 2006 Gwenole Beauchesne 2.4-1mdk +- update to glibc 2.4 + CVS (2006/05/11) minus 2.5-specific bits +- drop linuxthreads for now, nptl is the default +- update x86_64 math library from AMD + +* Mon Mar 20 2006 Gwenole Beauchesne 2.3.6-3mdk +- refactor nsswitch.conf +- fix ENOTTY fr translation (noticed by Rafael) +- fix build on sparc32 (Per Oyvind, from Debian) +- fix nftw with root directory and FTW_CHDIR (#9121) +- fix dlopen() memory leaks (#21691, BZ #2451, from CVS HEAD) + +* Mon Feb 20 2006 Gwenole Beauchesne 2.3.6-2mdk +- all tests pass on ppc64 +- fix localedef for complex LC_COLLATE rules (BZ #368, HEAD) +- make -mno-tls-direct-seg-refs the default for x86 Xen arches +- don't ship ppc64 asm headers for ppc32 builds +- don't provide ld-linux.so.2 on ppc (Christiaan Welvaart) + +* Thu Feb 16 2006 Gwenole Beauchesne 2.3.6-1mdk +- 2.3.6 +- kernel-headers fixes (ppc64, ethtool.h, rsbac_syscall4) +- use dedicated macros to handle nscd service (FredL) +- fix permissions for */lib/*.so +- fix glibc-devel deps (#19145) +- fix upgrades from conectiva, aka conflicts glibc-base <= 2.3.4 (#19256) + +* Wed Oct 19 2005 Gwenole Beauchesne 2.3.5-6mdk +- support kernel 2.6 series only on ppc64 +- add missing ppc64 asm headers for newer kernels + +* Mon Aug 29 2005 Gwenole Beauchesne 2.3.5-5mdk +- update to 2.6.12-11mdk kernel headers +- make glibc-utils scripts biarch capable +- ship with localised libc.mo files again +- ship with 32-bit profile libs on biarch platforms +- move Xen optimized libraries to their own subpackage +- check for /lib* prior to writing the upgrade stamp (G. Niemeyer) +- fix BZ #1188 (Sergio Gelato, mountd crash) + +* Sat Aug 06 2005 Gwenole Beauchesne 2.3.5-4mdk +- enable fortify with our gcc4 +- fix amd64 string routines (latest snapshot from SuSE) +- provide nptl libraries suitable when running under Xen +- drop build support with distcc, icecream is used instead +- run testsuite with _NPROCESSORS_ONLN jobs at most (i.e. local run) + +* Tue Aug 02 2005 Gwenole Beauchesne 2.3.5-3mdk +- fix requires for shiny new rpm... and its bugs +- update to 2.6.12-8mdk kernel headers +- support only 2.6+ kernel series on ppc64 +- minimal NPTL kernel for 2006 is >= 2.6.9, this brings the following: + * getdents syscall returns d_type information as well + * ppc adds signal/swapcontext support for VMX instructions & regstate + * x86 has a fixed version of posix_fadvise64 + * new syscalls: waitid, utimes, tgkill, statfs64 +- updates from 2.3-branch (2005/07/21): + * avoid dynamically sized stack arrays in regex (BZ #1101) + * fix sign-extension issues in xdr_stdio on 64-bit big endian + machines + xdr{,_u}_hyper fixes (BZ #1098, #1097) + * fix ISO-4217 spec for sr_CS locale, aka add CSD currency (BZ #549) + * correctly account for characters of decimal points right after +-, + aka scanf fixes (BZ #1110) + * fix recursive dlclose (BZ #1081) + * add %%z format to strptime (BZ #1105) + * fix age calculation in nscd cache pruning (BZ #1094) + * fix segfault in regexec (BZ #934) + * fix posix_fallocate semantics using ftruncate (BZ #1083) + * fix BZs #1099, #1108, #1100, #1103, #1095, #1101, #779, #1087, + +* Wed Jun 15 2005 Gwenole Beauchesne 2.3.5-2mdk +- generate gconv-modules.cache +- requires and post scripts tweaks +- add optimized AMD64 strings library +- fix tst-cancel17 with newer kernels (CVS HEAD) + +* Fri Jun 03 2005 Gwenole Beauchesne 2.3.5-1mdk +- factor out test matrix +- build 32-bit tls libs on x86_64 +- build tls libraries on sparc64 (Stefan) +- remove -fno-unit-at-a-time from build flags +- fix aliasing in AMD64 new libm +- updates from 2.3-branch (2005/04/27): + * update from Intel ia64 libm 2005-03-21 + * fix BZs #253, #776, #821, #822, #825, #851, #877 + +* Wed Mar 16 2005 Gwenole Beauchesne 2.3.4-8mdk +- fix initstate_r (#14591) + +* Thu Mar 10 2005 Gwenole Beauchesne 2.3.4-7mdk +- fix package url (MDK #14468, Zeb) +- update to 2.6.11-2mdk kernel headers (inotify 0.20) +- update to stable 2.3-branch (2005/03/01): + * fix BZs #284, #671, #719, #722, #726, #727, #729, #730, #731, + * fix segfault in open_path, aka fix rsync --daemon (BZ #738) + * fix powerpc64 set/swap context (BZ #700) + * support -mno-tls-direct-seg-refs builds (BZ #737) + * update to tz{code,data}2005c (BZ #736) + * do not allocate potentially large buffers on the stack + * futimes() should not fail with ENOENT (BZ #633) + * declare ftruncate for POSIX 2003 (BZ #640) + * fix rint on powerpc (BZ #602) + * update ia64 libm (BZ #592) + * fix round() to round return value to nearest (BZ #626) + * fix {,q}ecvt{,_r} on denormals (BZ #725) + * fix i386 stack alignment in clone and linuxthreads (BZ #723) + +* Wed Feb 23 2005 Gwenole Beauchesne 2.3.4-6mdk +- fix fdim() in x86_64 libm, use glibc implementation +- really stick with getconf files in /usr/lib/getconf +- update kernel headers to 2.6.10-3mdk for new inotify +- kernel header fixes (cdp, fddi) + +* Thu Feb 10 2005 Gwenole Beauchesne 2.3.4-5mdk +- kernel headers fixes (christiaan/ppc, directfb/x86_64, usbutils/any) + +* Thu Jan 27 2005 Gwenole Beauchesne 2.3.4-4mdk +- add missing getconf files +- always propagate pgoff_t definition (workaround kernel header) + +* Mon Jan 24 2005 Gwenole Beauchesne 2.3.4-3mdk +- relax __le64 and __be64 definitions in kernel headers + +* Fri Jan 21 2005 Gwenole Beauchesne 2.3.4-2mdk +- update to 2.6.10 kernel headers +- add memory clobbers in asm-i386 syscalls as arguments may be + pointers to modifiable memory and values need to be reloaded + (e.g. _llseek() in util-linux) + +* Tue Dec 28 2004 Gwenole Beauchesne 2.3.4-1mdk +- 2.3.4 +- fix kernel headers (videodev2.h, blkpg.h on ppc64) +- bring "compat" only to nsswitch.conf +- cosmetics to make check machinery + +* Thu Nov 25 2004 Gwenole Beauchesne 2.3.3-23mdk +- fix cross bootstrap builds +- enable biarch support on ppc64 +- enable tls and nptl on ia64 and ppc64 + +* Fri Oct 08 2004 Gwenole Beauchesne 2.3.3-22mdk +- revert nsswitch.conf change +- fix on non x86 platforms +- reread /etc/localtime even if just mtime has changed (CVS) + +* Thu Sep 16 2004 Gwenole Beauchesne 2.3.3-21mdk +- add pcc to nptl arches +- fix path to nscd socket +- bring "compat" mode to nsswitch.conf +- fix kernel headers for usbutils rebuild + +* Thu Sep 02 2004 Gwenole Beauchesne 2.3.3-20mdk +- add ppc to tls arches (Christiaan Welvaart) +- selected fixes from CVS (2004/09/01): + * fix locking issues in nscd + * fix some IPv6 related bugs + +* Wed Aug 25 2004 Gwenole Beauchesne 2.3.3-19mdk +- fix nice +- fix nscd runlevels +- selected fixes from CVS (2004/08/24): + * add O_NOATIME to linux from 2.6.8+ (BZ #341) + * fix nis nss_compat's initgroups handling + * fix possible problem with ld.so and brk management (BZ #227) + +* Wed Aug 18 2004 Gwenole Beauchesne 2.3.3-18mdk +- add missing glibc compat symlinks +- add sparc to TLS arches (Per Oyvind) +- fix standalone inclusion + +* Tue Aug 17 2004 Gwenole Beauchesne 2.3.3-17mdk +- enable AMD optimized libm for x86_64 +- add pow10 and friends in x86_64 libm + +* Fri Aug 13 2004 Gwenole Beauchesne 2.3.3-16mdk +- some minor build arrangements +- add compat glibc 2.0 for some ancient programs + +* Fri Aug 13 2004 Gwenole Beauchesne 2.3.3-15mdk +- fix +- update from CVS (2004/08/12): + * fix BZ #150, #198, #217, #218, #219, #230, #231, #232, #262, #263 + * fix pthread_rwlock_timedrdlock on x86_64 + * fix values for -m32 -D_FILE_OFFSET_BITS=64 on x86_64 + * fix psignal() changes from previous CVS syncs + * fix backtrace in statically linked programs on ia64/x86-64/s390{,x} + * fix possible buffer overflow in crypt() + * fix lowmem handling in chroot_canon() (BZ #199) + * handle more than 6 args correctly on x86_64 makecontext() + +* Wed Aug 11 2004 Gwenole Beauchesne 2.3.3-14mdk +- update to 2.6.8 kernel headers (fix #10693) +- selected fixes from CVS: + * make inet_pton() RFC2133 (BZ #295) + * fix strtold() on 32-bit arches with ldbl-96 (BZ #274) + * fix pow{,f,l}() on IA-32 and powl() on AMD64 (BZ #258) + +* Mon Jul 05 2004 Gwenole Beauchesne 2.3.3-13mdk +- fix upgrades for /etc/ld.so.conf.d/* +- update to 2.3.4 CVS snapshot (2004/06/01) +- update to 2.6.6+ kernel headers, I want POSIX message queues +- update patch to handle multiple types of libraries from one ld.so + +* Tue May 25 2004 Gwenole Beauchesne 2.3.3-12mdk +- Make ldconfig handle "include ld.so.conf.d/*.conf" (2.3.4-cvs) + +* Thu Apr 15 2004 Gwenole Beauchesne 2.3.3-11mdk +- Enable use of kernel timers for NPTL timer_create() +- Fix mathinline.h again +- alpha & sparc64 updates (Stefan) +- Merge from AMD64 branch: + * Fix rwlocks on AMD64 with NPTL + * Various fixes to kernel-headers + * Really fix build on AMD64 with 2.4 kernel + diff --git a/glibc_local-syscall-mcount.diff b/glibc_local-syscall-mcount.diff new file mode 100644 index 0000000..df71190 --- /dev/null +++ b/glibc_local-syscall-mcount.diff @@ -0,0 +1,27 @@ +Description: unset CALL_MCOUNT for __libc_do_syscall + unset CALL_MCOUNT before __libc_do_syscall, because it only supports Thumb-2 + and ARM mode, not Thumb-1; and because profiling this internal routine + is of dubious value. +Origin: https://bugs.launchpad.net/linaro-toolchain-misc/+bug/605030/+attachment/1484534/+files/libc-do-syscall.S +Author: Peter Pearse +Bug-Linaro: https://bugs.launchpad.net/linaro-toolchain-misc/+bug/605030 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/605030 +Reviewed-by: Steve Langasek + +Index: glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S +=================================================================== +--- glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S ++++ glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S +@@ -29,6 +29,12 @@ + .syntax unified + .hidden __libc_do_syscall + ++/* ++ * PMP Work round for https://bugs.launchpad.net/gcc-linaro/+bug/605030 ++ */ ++#undef CALL_MCOUNT ++#define CALL_MCOUNT ++ + ENTRY (__libc_do_syscall) + .fnstart + push {r7, lr}