From a0b9d45b7c7d8d5c2860b1794e255b2ce2a04ca6 Mon Sep 17 00:00:00 2001 From: Dmitry Mikhirev Date: Tue, 10 Jul 2012 14:20:40 +0400 Subject: [PATCH] update to 2.16 with latest fedora and mandriva patches --- .abf.yml | 9 +- crypt_blowfish-1.2.tar.gz.sign | 10 + glibc-2.10.1-multiarch.patch | 15 - ...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-prelink.patch | 32 - glibc-2.14-arm-thumb.patch | 13 + glibc-2.14.90-nss-upgrade.patch | 26 + ...fedora-not-installing-stream-headers.patch | 11 + glibc-2.15-fix-dns-with-broken-routers.patch | 12 + glibc-2.15-multiarch.patch | 11 + ...le.patch => glibc-2.16-share-locale.patch~ | 0 glibc-2.16.0-avx-increase_BF_FRAME.patch | 11 + glibc-2.16.0-avx-increase_BF_FRAME.patch~ | 11 + glibc-2.16.0-avx-relocate_fcrypt.patch | 24 + glibc-2.16.0-avx-relocate_fcrypt.patch~ | 24 + glibc-2.16.0-i586-hptiming.patch | 37 + glibc-2.16.0-i586-hptiming.patch~ | 37 + ... glibc-2.16.0-mdv-wrapper_handle_sha.patch | 23 +- glibc-2.16.0-mdv-wrapper_handle_sha.patch~ | 148 + glibc-2.16.0-multiarch.patch | 11 + glibc-2.16.0-multiarch.patch~ | 11 + glibc-2.16.0-rh740682.patch | 11 + glibc-2.16.0-rh740682.patch~ | 11 + glibc-2.16.0-share-locale.patch | 12 + glibc-2.16.0-string-format-fixes.patch | 77 + glibc-2.16.0-string-format-fixes.patch~ | 88 + glibc-2.16.0-testsuite-rt-notparallel.patch | 16 + glibc-2.16.0-testsuite-rt-notparallel.patch~ | 16 + glibc-2.16.0.tar.xz.sig | 11 + glibc-2.3.6-avx-increase_BF_FRAME.patch | 13 - glibc-2.3.6-ppc-build-lddlibc4.patch | 14 - glibc-2.4.90-compat-EUR-currencies.patch | 93 - glibc-2.4.90-gcc4-fortify.patch | 11 - glibc-2.4.90-i586-hptiming.patch | 132 - glibc-2.4.90-testsuite-rt-notparallel.patch | 24 - glibc-2.6-nice_fix.patch | 16 - ...ovide_CFI_for_the_outermost_function.patch | 58 - glibc-2.9-avx-relocate_fcrypt.patch | 49 - glibc-2.9-ldd-non-exec.patch | 40 - glibc-fedora.patch | 2395 +++++++++++++ glibc-find-requires.sh | 140 - glibc-no-leaf-attribute.patch | 36 + glibc-ports-2.16.0.tar.xz.sig | 11 + glibc-post-wrapper.c | 141 - glibc-rh179072.patch | 157 + glibc-rh564528.patch | 12 + glibc-rh657588.patch | 20 + glibc-rh688948.patch | 37 + glibc-rh691912.patch | 11 + glibc-rh697149.patch | 14 + glibc-rh697421.patch | 10 + glibc-rh730856.patch | 52 + glibc-rh739743.patch | 55 + glibc-rh741105.patch | 21 + glibc-rh757881.patch | 167 + glibc-rh767693-2.patch | 76 + glibc-rh769421.patch | 217 ++ glibc-rh770439.patch | 22 + glibc-rh770869.patch | 23 + glibc-rh787201.patch | 12 + glibc-rh788989-2.patch | 159 + glibc-rh789209.patch | 12 + glibc-rh789238-2.patch | 111 + glibc-rh789238.patch | 115 + glibc-rh790292.patch | 188 + glibc-rh790298.patch | 176 + glibc-rh791161.patch | 180 + glibc-rh800224.patch | 78 + glibc-rh803286.patch | 27 + glibc-rh804630.patch | 23 + glibc-rh819430.patch | 78 + glibc-rh825061.patch | 13 + glibc-rh827510.patch | 27 + glibc-stap-libm.patch | 72 + glibc-stap.patch | 12 + glibc.spec | 3096 ++++------------- glibc.spec~ | 1116 ++++++ glibc_local-syscall-mcount.diff | 27 - 82 files changed, 7162 insertions(+), 3418 deletions(-) create mode 100644 crypt_blowfish-1.2.tar.gz.sign delete mode 100644 glibc-2.10.1-multiarch.patch delete mode 100644 glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch delete mode 100644 glibc-2.12.1-fhs.patch delete mode 100644 glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch delete mode 100644 glibc-2.12.1-submitted-translit-colon.patch delete mode 100644 glibc-2.12.2-resolve-tls.patch delete mode 100644 glibc-2.13-prelink.patch create mode 100644 glibc-2.14-arm-thumb.patch create mode 100644 glibc-2.14.90-nss-upgrade.patch create mode 100644 glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch create mode 100644 glibc-2.15-fix-dns-with-broken-routers.patch create mode 100644 glibc-2.15-multiarch.patch rename glibc-2.9-share-locale.patch => glibc-2.16-share-locale.patch~ (100%) create mode 100644 glibc-2.16.0-avx-increase_BF_FRAME.patch create mode 100644 glibc-2.16.0-avx-increase_BF_FRAME.patch~ create mode 100644 glibc-2.16.0-avx-relocate_fcrypt.patch create mode 100644 glibc-2.16.0-avx-relocate_fcrypt.patch~ create mode 100644 glibc-2.16.0-i586-hptiming.patch create mode 100644 glibc-2.16.0-i586-hptiming.patch~ rename glibc-2.7-mdv-wrapper_handle_sha.patch => glibc-2.16.0-mdv-wrapper_handle_sha.patch (91%) create mode 100644 glibc-2.16.0-mdv-wrapper_handle_sha.patch~ create mode 100644 glibc-2.16.0-multiarch.patch create mode 100644 glibc-2.16.0-multiarch.patch~ create mode 100644 glibc-2.16.0-rh740682.patch create mode 100644 glibc-2.16.0-rh740682.patch~ create mode 100644 glibc-2.16.0-share-locale.patch create mode 100644 glibc-2.16.0-string-format-fixes.patch create mode 100644 glibc-2.16.0-string-format-fixes.patch~ create mode 100644 glibc-2.16.0-testsuite-rt-notparallel.patch create mode 100644 glibc-2.16.0-testsuite-rt-notparallel.patch~ create mode 100644 glibc-2.16.0.tar.xz.sig delete mode 100644 glibc-2.3.6-avx-increase_BF_FRAME.patch delete mode 100644 glibc-2.3.6-ppc-build-lddlibc4.patch delete mode 100644 glibc-2.4.90-compat-EUR-currencies.patch delete mode 100644 glibc-2.4.90-gcc4-fortify.patch delete mode 100644 glibc-2.4.90-i586-hptiming.patch delete mode 100644 glibc-2.4.90-testsuite-rt-notparallel.patch delete mode 100644 glibc-2.6-nice_fix.patch delete mode 100644 glibc-2.7-provide_CFI_for_the_outermost_function.patch delete mode 100644 glibc-2.9-avx-relocate_fcrypt.patch delete mode 100644 glibc-2.9-ldd-non-exec.patch create mode 100644 glibc-fedora.patch delete mode 100755 glibc-find-requires.sh create mode 100644 glibc-no-leaf-attribute.patch create mode 100644 glibc-ports-2.16.0.tar.xz.sig delete mode 100644 glibc-post-wrapper.c create mode 100644 glibc-rh179072.patch create mode 100644 glibc-rh564528.patch create mode 100644 glibc-rh657588.patch create mode 100644 glibc-rh688948.patch create mode 100644 glibc-rh691912.patch create mode 100644 glibc-rh697149.patch create mode 100644 glibc-rh697421.patch create mode 100644 glibc-rh730856.patch create mode 100644 glibc-rh739743.patch create mode 100644 glibc-rh741105.patch create mode 100644 glibc-rh757881.patch create mode 100644 glibc-rh767693-2.patch create mode 100644 glibc-rh769421.patch create mode 100644 glibc-rh770439.patch create mode 100644 glibc-rh770869.patch create mode 100644 glibc-rh787201.patch create mode 100644 glibc-rh788989-2.patch create mode 100644 glibc-rh789209.patch create mode 100644 glibc-rh789238-2.patch create mode 100644 glibc-rh789238.patch create mode 100644 glibc-rh790292.patch create mode 100644 glibc-rh790298.patch create mode 100644 glibc-rh791161.patch create mode 100644 glibc-rh800224.patch create mode 100644 glibc-rh803286.patch create mode 100644 glibc-rh804630.patch create mode 100644 glibc-rh819430.patch create mode 100644 glibc-rh825061.patch create mode 100644 glibc-rh827510.patch create mode 100644 glibc-stap-libm.patch create mode 100644 glibc-stap.patch create mode 100644 glibc.spec~ delete mode 100644 glibc_local-syscall-mcount.diff diff --git a/.abf.yml b/.abf.yml index d9e788d..3ed1251 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,8 +1,7 @@ --- sources: - crypt_blowfish-1.0.2.tar.gz: e83e798528e72695e610e2a6419b57272d00fa0b - glibc-2.13.tar.xz: 38e7d510b41a2c36eb392c79eb5c80e0ec35a7f2 - glibc-2.13.tar.xz.sig: c7953c5c032a3394af6711c21ee8972500f5667d + crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9 + glibc-2.16.0-fedora.tar.gz: 855662db6faaaa3d6c9a46346d8b6d20942f5b10 + glibc-2.16.0.tar.xz: 9d4fffc9c4ac93e7919e124fa38bb51dcaff5216 glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f - glibc-powerpc-cpu-addon-v0.03.tar.bz2: a88f5e1e7647f131984cb831d54ea885b820001e - glibc-redhat.tar.bz2: 4ac897d3bb2367d00bfed2c45a00e4a8a532e9fc + glibc-ports-2.16.0.tar.xz: 429b979b697a97befb56cce49b96ee47d708f20a diff --git a/crypt_blowfish-1.2.tar.gz.sign b/crypt_blowfish-1.2.tar.gz.sign new file mode 100644 index 0000000..1fb1e64 --- /dev/null +++ b/crypt_blowfish-1.2.tar.gz.sign @@ -0,0 +1,10 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.10 (GNU/Linux) +Comment: http://www.openwall.com/signatures/ + +iQCVAwUATiLawHK5fbEpUCnxAQIT4wP9GTUroM4r21oggeW0k3j5vICwSVHV5BbJ +MBOfliwa1tW9JNh/dEA9GHiPeVWXr/KNWm9/3bSYGDqfsYMlQ7x8w/CCUrS/gvpv +XtvwxUE5juAH5wy4+6oV1gBWiISWGOUcCqkgxPVZKOjlSV4c7kvr10JwqYdnqjK9 +RT/A2FgAxM4= +=K4Xs +-----END PGP SIGNATURE----- diff --git a/glibc-2.10.1-multiarch.patch b/glibc-2.10.1-multiarch.patch deleted file mode 100644 index 33fbdf7..0000000 --- a/glibc-2.10.1-multiarch.patch +++ /dev/null @@ -1,15 +0,0 @@ -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.12.1-assign-global-scope-to-RFC-1918-addresses.patch b/glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch deleted file mode 100644 index 9379131..0000000 --- a/glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 2049e65..0000000 --- a/glibc-2.12.1-fhs.patch +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 9b288fe..0000000 --- a/glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch +++ /dev/null @@ -1,92 +0,0 @@ -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 deleted file mode 100644 index c073821..0000000 --- a/glibc-2.12.1-submitted-translit-colon.patch +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index c509ddc..0000000 --- a/glibc-2.12.2-resolve-tls.patch +++ /dev/null @@ -1,64 +0,0 @@ -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-prelink.patch b/glibc-2.13-prelink.patch deleted file mode 100644 index 7c63b7a..0000000 --- a/glibc-2.13-prelink.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- 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.14-arm-thumb.patch b/glibc-2.14-arm-thumb.patch new file mode 100644 index 0000000..145cbc2 --- /dev/null +++ b/glibc-2.14-arm-thumb.patch @@ -0,0 +1,13 @@ +--- glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile.orig 2011-07-30 19:11:27.590451172 -0300 ++++ glibc-2.14-121-g5551a7b/ports/sysdeps/unix/sysv/linux/arm/eabi/Makefile 2011-07-30 19:11:57.813615252 -0300 +@@ -33,6 +33,10 @@ ifeq ($(subdir),nscd) + nscd-modules += libc-do-syscall + endif + ++ifeq ($(subdir),nss) ++libnss_db-sysdep_routines += libc-do-syscall ++endif ++ + ifeq ($(subdir),posix) + LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o + LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o diff --git a/glibc-2.14.90-nss-upgrade.patch b/glibc-2.14.90-nss-upgrade.patch new file mode 100644 index 0000000..0dc9e99 --- /dev/null +++ b/glibc-2.14.90-nss-upgrade.patch @@ -0,0 +1,26 @@ +--- glibc-2.14-121-g5551a7b/nss/nsswitch.c.nss-upgrade 2011-07-20 02:41:44.000000000 +0200 ++++ glibc-2.14-121-g5551a7b/nss/nsswitch.c 2011-07-24 01:06:25.658666115 +0200 +@@ -330,9 +330,20 @@ nss_load_library (service_user *ni) + 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); ++ } + } + else if (is_nscd) + { diff --git a/glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch b/glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch new file mode 100644 index 0000000..f708d2f --- /dev/null +++ b/glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch @@ -0,0 +1,11 @@ +--- glibc-2.14-121-g5551a7b/streams/Makefile.fed_streams~ 2011-07-27 15:13:29.702467500 +0000 ++++ glibc-2.14-121-g5551a7b/streams/Makefile 2011-07-27 15:13:33.772466409 +0000 +@@ -21,7 +21,7 @@ + # + subdir := streams + +-#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h ++headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h + routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach + + include ../Rules diff --git a/glibc-2.15-fix-dns-with-broken-routers.patch b/glibc-2.15-fix-dns-with-broken-routers.patch new file mode 100644 index 0000000..ab4d856 --- /dev/null +++ b/glibc-2.15-fix-dns-with-broken-routers.patch @@ -0,0 +1,12 @@ +--- glibc-2.15-a316c1f/sysdeps/unix/sysv/linux/check_pf.c.orig 2012-02-11 15:25:40.066658360 -0200 ++++ glibc-2.15-a316c1f/sysdeps/unix/sysv/linux/check_pf.c 2012-02-11 15:25:53.953718622 -0200 +@@ -209,7 +209,8 @@ make_request (int fd, pid_t pid) + } + else + { +- if (!IN6_IS_ADDR_LOOPBACK (address)) ++ if (!IN6_IS_ADDR_LOOPBACK (address) && ++ !IN6_IS_ADDR_LINKLOCAL (address)) + seen_ipv6 = true; + } + } diff --git a/glibc-2.15-multiarch.patch b/glibc-2.15-multiarch.patch new file mode 100644 index 0000000..f23f9f7 --- /dev/null +++ b/glibc-2.15-multiarch.patch @@ -0,0 +1,11 @@ +--- glibc-2.15-a316c1f/scripts/check-local-headers.sh.orig 2012-02-11 17:00:16.708816468 -0200 ++++ glibc-2.15-a316c1f/scripts/check-local-headers.sh 2012-02-11 17:00:35.235895337 -0200 +@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir" + BEGIN { + status = 0 + exclude = "^" includedir \ +- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" ++ "/(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" + } + /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } + { diff --git a/glibc-2.9-share-locale.patch b/glibc-2.16-share-locale.patch~ similarity index 100% rename from glibc-2.9-share-locale.patch rename to glibc-2.16-share-locale.patch~ diff --git a/glibc-2.16.0-avx-increase_BF_FRAME.patch b/glibc-2.16.0-avx-increase_BF_FRAME.patch new file mode 100644 index 0000000..191ba6b --- /dev/null +++ b/glibc-2.16.0-avx-increase_BF_FRAME.patch @@ -0,0 +1,11 @@ +--- glibc-2.16.0/crypt/x86.S.orig 2011-07-16 19:09:42.000000000 +0400 ++++ glibc-2.16.0/crypt/x86.S 2012-07-04 15:08:57.743556929 +0400 +@@ -42,7 +42,7 @@ + #define DO_ALIGN(log) .align (1 << (log)) + #endif + +-#define BF_FRAME 0x200 ++#define BF_FRAME 0x400 + #define ctx %esp + + #define BF_ptr (ctx) diff --git a/glibc-2.16.0-avx-increase_BF_FRAME.patch~ b/glibc-2.16.0-avx-increase_BF_FRAME.patch~ new file mode 100644 index 0000000..c8de6f3 --- /dev/null +++ b/glibc-2.16.0-avx-increase_BF_FRAME.patch~ @@ -0,0 +1,11 @@ +--- /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/x86.S.orig 2011-07-16 19:09:42.000000000 +0400 ++++ /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/x86.S 2012-07-04 15:08:57.743556929 +0400 +@@ -42,7 +42,7 @@ + #define DO_ALIGN(log) .align (1 << (log)) + #endif + +-#define BF_FRAME 0x200 ++#define BF_FRAME 0x400 + #define ctx %esp + + #define BF_ptr (ctx) diff --git a/glibc-2.16.0-avx-relocate_fcrypt.patch b/glibc-2.16.0-avx-relocate_fcrypt.patch new file mode 100644 index 0000000..f9aeeae --- /dev/null +++ b/glibc-2.16.0-avx-relocate_fcrypt.patch @@ -0,0 +1,24 @@ +--- glibc-2.16.0/crypt/wrapper.c.orig 2012-07-03 18:32:29.000000000 +0400 ++++ glibc-2.16.0/crypt/wrapper.c 2012-07-03 18:42:56.935595814 +0400 +@@ -326,6 +326,21 @@ + weak_alias(__crypt_gensalt, crypt_gensalt) + weak_alias(crypt, fcrypt) + #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 const char *tests[][3] = { diff --git a/glibc-2.16.0-avx-relocate_fcrypt.patch~ b/glibc-2.16.0-avx-relocate_fcrypt.patch~ new file mode 100644 index 0000000..204e94c --- /dev/null +++ b/glibc-2.16.0-avx-relocate_fcrypt.patch~ @@ -0,0 +1,24 @@ +--- /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/wrapper.c.orig 2012-07-03 18:32:29.000000000 +0400 ++++ /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/wrapper.c 2012-07-03 18:42:56.935595814 +0400 +@@ -326,6 +326,21 @@ + weak_alias(__crypt_gensalt, crypt_gensalt) + weak_alias(crypt, fcrypt) + #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 const char *tests[][3] = { diff --git a/glibc-2.16.0-i586-hptiming.patch b/glibc-2.16.0-i586-hptiming.patch new file mode 100644 index 0000000..d17249b --- /dev/null +++ b/glibc-2.16.0-i586-hptiming.patch @@ -0,0 +1,37 @@ +--- glibc-2.16.0/elf/rtld.c.orig 2012-07-03 14:45:24.564837876 +0400 ++++ glibc-2.16.0/elf/rtld.c 2012-07-03 14:50:58.156918323 +0400 +@@ -16,6 +16,9 @@ + License along with the GNU C Library; if not, see + . */ + ++/* Early statistics require high-precision timing. */ ++#define NEED_HP_TIMING_HWCAP_AVAIL 1 ++ + #include + #include + #include +@@ -190,6 +193,12 @@ + 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 +@@ -321,9 +330,8 @@ + + #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); diff --git a/glibc-2.16.0-i586-hptiming.patch~ b/glibc-2.16.0-i586-hptiming.patch~ new file mode 100644 index 0000000..1fa8cbe --- /dev/null +++ b/glibc-2.16.0-i586-hptiming.patch~ @@ -0,0 +1,37 @@ +--- /home/m/rpmbuild/BUILD/glibc-2.16.0/elf/rtld.c.orig 2012-07-03 14:45:24.564837876 +0400 ++++ /home/m/rpmbuild/BUILD/glibc-2.16.0/elf/rtld.c 2012-07-03 14:50:58.156918323 +0400 +@@ -16,6 +16,9 @@ + License along with the GNU C Library; if not, see + . */ + ++/* Early statistics require high-precision timing. */ ++#define NEED_HP_TIMING_HWCAP_AVAIL 1 ++ + #include + #include + #include +@@ -190,6 +193,12 @@ + 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 +@@ -321,9 +330,8 @@ + + #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); diff --git a/glibc-2.7-mdv-wrapper_handle_sha.patch b/glibc-2.16.0-mdv-wrapper_handle_sha.patch similarity index 91% rename from glibc-2.7-mdv-wrapper_handle_sha.patch rename to glibc-2.16.0-mdv-wrapper_handle_sha.patch index 44db632..2184c77 100644 --- a/glibc-2.7-mdv-wrapper_handle_sha.patch +++ b/glibc-2.16.0-mdv-wrapper_handle_sha.patch @@ -1,16 +1,5 @@ --- 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); @@ -145,3 +134,15 @@ + + return output; +} +--- crypt/crypt_gensalt.h.orig 2012-07-04 17:42:27.151565561 +0400 ++++ crypt/crypt_gensalt.h 2012-07-04 17:44:20.351588292 +0400 +@@ -26,5 +26,9 @@ + const char *input, int size, char *output, int output_size); + extern char *_crypt_gensalt_md5_rn(const char *prefix, 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); + + #endif diff --git a/glibc-2.16.0-mdv-wrapper_handle_sha.patch~ b/glibc-2.16.0-mdv-wrapper_handle_sha.patch~ new file mode 100644 index 0000000..9ebd386 --- /dev/null +++ b/glibc-2.16.0-mdv-wrapper_handle_sha.patch~ @@ -0,0 +1,148 @@ +--- crypt/wrapper.c.org 2008-06-17 13:29:30.000000000 -0600 ++++ crypt/wrapper.c 2008-06-17 15:33:47.000000000 -0600 +@@ -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; ++} +--- /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/crypt_gensalt.h.orig 2012-07-04 17:42:27.151565561 +0400 ++++ /home/m/rpmbuild/BUILD/glibc-2.16.0/crypt/crypt_gensalt.h 2012-07-04 17:44:20.351588292 +0400 +@@ -26,5 +26,9 @@ + const char *input, int size, char *output, int output_size); + extern char *_crypt_gensalt_md5_rn(const char *prefix, 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); + + #endif diff --git a/glibc-2.16.0-multiarch.patch b/glibc-2.16.0-multiarch.patch new file mode 100644 index 0000000..1c62f15 --- /dev/null +++ b/glibc-2.16.0-multiarch.patch @@ -0,0 +1,11 @@ +--- glibc-2.16.0/scripts/check-local-headers.sh.orig 2012-07-03 13:31:41.000000000 +0400 ++++ glibc-2.16.0/scripts/check-local-headers.sh 2012-07-03 13:58:54.527563305 +0400 +@@ -28,7 +28,7 @@ + BEGIN { + status = 0 + exclude = "^" includedir \ +- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" ++ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" + } + /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } + { diff --git a/glibc-2.16.0-multiarch.patch~ b/glibc-2.16.0-multiarch.patch~ new file mode 100644 index 0000000..897a879 --- /dev/null +++ b/glibc-2.16.0-multiarch.patch~ @@ -0,0 +1,11 @@ +--- scripts/check-local-headers.sh.orig 2012-07-03 13:31:41.000000000 +0400 ++++ scripts/check-local-headers.sh 2012-07-03 13:58:54.527563305 +0400 +@@ -28,7 +28,7 @@ + BEGIN { + status = 0 + exclude = "^" includedir \ +- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" ++ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|multiarch-|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" + } + /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } + { diff --git a/glibc-2.16.0-rh740682.patch b/glibc-2.16.0-rh740682.patch new file mode 100644 index 0000000..0800a1e --- /dev/null +++ b/glibc-2.16.0-rh740682.patch @@ -0,0 +1,11 @@ +--- glibc-2.16.0/time/sys/time.h.orig 2012-06-30 23:12:34.000000000 +0400 ++++ glibc-2.16.0/time/sys/time.h 2012-07-03 15:55:56.473832226 +0400 +@@ -77,7 +77,7 @@ + This call is restricted to the super-user. */ + extern int settimeofday (const struct timeval *__tv, + const struct timezone *__tz) +- __THROW __nonnull ((1)); ++ __THROW; + + /* Adjust the current time of day by the amount in DELTA. + If OLDDELTA is not NULL, it is filled in with the amount diff --git a/glibc-2.16.0-rh740682.patch~ b/glibc-2.16.0-rh740682.patch~ new file mode 100644 index 0000000..91c2cd5 --- /dev/null +++ b/glibc-2.16.0-rh740682.patch~ @@ -0,0 +1,11 @@ +--- /home/m/rpmbuild/BUILD/glibc-2.16.0/time/sys/time.h.orig 2012-06-30 23:12:34.000000000 +0400 ++++ /home/m/rpmbuild/BUILD/glibc-2.16.0/time/sys/time.h 2012-07-03 15:55:56.473832226 +0400 +@@ -77,7 +77,7 @@ + This call is restricted to the super-user. */ + extern int settimeofday (const struct timeval *__tv, + const struct timezone *__tz) +- __THROW __nonnull ((1)); ++ __THROW; + + /* Adjust the current time of day by the amount in DELTA. + If OLDDELTA is not NULL, it is filled in with the amount diff --git a/glibc-2.16.0-share-locale.patch b/glibc-2.16.0-share-locale.patch new file mode 100644 index 0000000..0d850a9 --- /dev/null +++ b/glibc-2.16.0-share-locale.patch @@ -0,0 +1,12 @@ +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 --git a/glibc-2.16.0-string-format-fixes.patch b/glibc-2.16.0-string-format-fixes.patch new file mode 100644 index 0000000..71acf1e --- /dev/null +++ b/glibc-2.16.0-string-format-fixes.patch @@ -0,0 +1,77 @@ +--- glibc-2.14-394-g8f3b1ff/misc/tst-error1.c.str_fmt~ 2011-12-10 21:54:40.788761731 +0100 ++++ glibc-2.14-394-g8f3b1ff/misc/tst-error1.c 2011-12-10 21:54:42.945752731 +0100 +@@ -16,8 +16,8 @@ do_test (int argc, char *argv[]) + for (int i = 0; i < 1000; ++i) + memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str)); + error (0, 0, str); +- error (0, 0, buf); +- error (0, 0, buf); ++ error (0, 0, "%s", buf); ++ error (0, 0, "%s", buf); + error (0, 0, str); + return 0; + } +--- glibc-2.14-394-g8f3b1ff/posix/regexbug1.c.str_fmt~ 2011-12-10 21:53:53.809968992 +0100 ++++ glibc-2.14-394-g8f3b1ff/posix/regexbug1.c 2011-12-10 21:53:56.247957690 +0100 +@@ -18,7 +18,7 @@ main (void) + { + char buf[100]; + regerror (reerr, &re, buf, sizeof buf); +- error (EXIT_FAILURE, 0, buf); ++ error (EXIT_FAILURE, 0, "%s", buf); + } + + if (regexec (&re, "002", 2, ma, 0) != 0) +@@ -35,7 +35,7 @@ main (void) + { + char buf[100]; + regerror (reerr, &re, buf, sizeof buf); +- error (EXIT_FAILURE, 0, buf); ++ error (EXIT_FAILURE, 0, "%s", buf); + } + + if (regexec (&re, "002", 2, ma, 0) != 0) +--- glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c.str_fmt~ 2011-12-10 21:54:12.799882569 +0100 ++++ glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c 2011-12-10 21:55:02.557672892 +0100 +@@ -93,7 +93,7 @@ main (void) + fprintf (fp, "%s", large); + fprintf (fp, "%.*s", 30000, large); + large[20000] = '\0'; +- fprintf (fp, large); ++ fprintf (fp, "%s", large); + fprintf (fp, "%-1.300000000s", "hello"); + + if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0) +--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c 2011-12-10 20:44:52.677364034 +0100 +@@ -579,7 +579,7 @@ pdeclaration (const char *name, declarat + break; + } + } +- f_print (fout, separator); ++ f_print (fout, "%s", separator); + } + + static int +--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c 2011-12-10 20:44:52.683364028 +0100 +@@ -651,7 +651,7 @@ h_output (const char *infile, const char + } + else if (tblflag) + { +- fprintf (fout, rpcgen_table_dcl); ++ fprintf (fout, "%s", rpcgen_table_dcl); + } + + if (Cflag) +--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c 2011-12-10 20:44:52.707364008 +0100 +@@ -361,7 +361,7 @@ write_real_program (const definition * d + f_print (fout, " ("); + /* arg name */ + if (proc->arg_num > 1) +- f_print (fout, proc->args.argname); ++ f_print (fout, "%s", proc->args.argname); + else + ptype (proc->args.decls->decl.prefix, + proc->args.decls->decl.type, 0); diff --git a/glibc-2.16.0-string-format-fixes.patch~ b/glibc-2.16.0-string-format-fixes.patch~ new file mode 100644 index 0000000..43b29e0 --- /dev/null +++ b/glibc-2.16.0-string-format-fixes.patch~ @@ -0,0 +1,88 @@ +--- glibc-2.14-394-g8f3b1ff/misc/tst-error1.c.str_fmt~ 2011-12-10 21:54:40.788761731 +0100 ++++ glibc-2.14-394-g8f3b1ff/misc/tst-error1.c 2011-12-10 21:54:42.945752731 +0100 +@@ -16,8 +16,8 @@ do_test (int argc, char *argv[]) + for (int i = 0; i < 1000; ++i) + memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str)); + error (0, 0, str); +- error (0, 0, buf); +- error (0, 0, buf); ++ error (0, 0, "%s", buf); ++ error (0, 0, "%s", buf); + error (0, 0, str); + return 0; + } +--- glibc-2.14-394-g8f3b1ff/posix/regexbug1.c.str_fmt~ 2011-12-10 21:53:53.809968992 +0100 ++++ glibc-2.14-394-g8f3b1ff/posix/regexbug1.c 2011-12-10 21:53:56.247957690 +0100 +@@ -18,7 +18,7 @@ main (void) + { + char buf[100]; + regerror (reerr, &re, buf, sizeof buf); +- error (EXIT_FAILURE, 0, buf); ++ error (EXIT_FAILURE, 0, "%s", buf); + } + + if (regexec (&re, "002", 2, ma, 0) != 0) +@@ -35,7 +35,7 @@ main (void) + { + char buf[100]; + regerror (reerr, &re, buf, sizeof buf); +- error (EXIT_FAILURE, 0, buf); ++ error (EXIT_FAILURE, 0, "%s", buf); + } + + if (regexec (&re, "002", 2, ma, 0) != 0) +--- glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c.str_fmt~ 2011-12-10 21:54:12.799882569 +0100 ++++ glibc-2.14-394-g8f3b1ff/stdio-common/test-vfprintf.c 2011-12-10 21:55:02.557672892 +0100 +@@ -93,7 +93,7 @@ main (void) + fprintf (fp, "%s", large); + fprintf (fp, "%.*s", 30000, large); + large[20000] = '\0'; +- fprintf (fp, large); ++ fprintf (fp, "%s", large); + fprintf (fp, "%-1.300000000s", "hello"); + + if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0) +--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_hout.c 2011-12-10 20:44:52.677364034 +0100 +@@ -579,7 +579,7 @@ pdeclaration (const char *name, declarat + break; + } + } +- f_print (fout, separator); ++ f_print (fout, "%s", separator); + } + + static int +--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_main.c 2011-12-10 20:44:52.683364028 +0100 +@@ -651,7 +651,7 @@ h_output (const char *infile, const char + } + else if (tblflag) + { +- fprintf (fout, rpcgen_table_dcl); ++ fprintf (fout, "%s", rpcgen_table_dcl); + } + + if (Cflag) +--- glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sunrpc/rpc_svcout.c 2011-12-10 20:44:52.707364008 +0100 +@@ -361,7 +361,7 @@ write_real_program (const definition * d + f_print (fout, " ("); + /* arg name */ + if (proc->arg_num > 1) +- f_print (fout, proc->args.argname); ++ f_print (fout, "%s", proc->args.argname); + else + ptype (proc->args.decls->decl.prefix, + proc->args.decls->decl.type, 0); +--- glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h.str_fmt~ 2011-10-19 13:03:31.000000000 +0200 ++++ glibc-2.14-394-g8f3b1ff/sysdeps/unix/sysv/linux/dl-osinfo.h 2011-12-10 20:44:52.713364002 +0100 +@@ -35,7 +35,7 @@ static void + __attribute__ ((__noreturn__)) + dl_fatal (const char *str) + { +- _dl_dprintf (2, str); ++ _dl_dprintf (2, "%s", str); + _exit (1); + } + #endif diff --git a/glibc-2.16.0-testsuite-rt-notparallel.patch b/glibc-2.16.0-testsuite-rt-notparallel.patch new file mode 100644 index 0000000..fd57431 --- /dev/null +++ b/glibc-2.16.0-testsuite-rt-notparallel.patch @@ -0,0 +1,16 @@ +--- glibc-2.16.0/rt/Makefile.orig 2012-06-30 23:12:34.000000000 +0400 ++++ glibc-2.16.0/rt/Makefile 2012-07-03 15:09:01.696678685 +0400 +@@ -78,3 +78,13 @@ + 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 diff --git a/glibc-2.16.0-testsuite-rt-notparallel.patch~ b/glibc-2.16.0-testsuite-rt-notparallel.patch~ new file mode 100644 index 0000000..4aaf73b --- /dev/null +++ b/glibc-2.16.0-testsuite-rt-notparallel.patch~ @@ -0,0 +1,16 @@ +--- /home/m/rpmbuild/BUILD/glibc-2.16.0/rt/Makefile.orig 2012-06-30 23:12:34.000000000 +0400 ++++ /home/m/rpmbuild/BUILD/glibc-2.16.0/rt/Makefile 2012-07-03 15:09:01.696678685 +0400 +@@ -78,3 +78,13 @@ + 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 diff --git a/glibc-2.16.0.tar.xz.sig b/glibc-2.16.0.tar.xz.sig new file mode 100644 index 0000000..2d05f3f --- /dev/null +++ b/glibc-2.16.0.tar.xz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iQEcBAABAgAGBQJP71ojAAoJECXvCkNsKkr/hW8IANUeX+DLwWU5lJuPTTsl6C3M +GHa3S8h7zV8uIaJPonmX4DumiacQZQLX65A2utoi90s2Y4xBrQQwmlqBzNmJGr0q +HALR14V1kp9b5xF+ovtUE41hUTaCwUBXYUp0ODXwFCJqdYJJFWJ1mUI7rWcE3AHM +MGMVyIKm5gtvRNdxSmR96S2V+5hudavChRGCgwdVy301QvqV8qnizf1WCTmxV3vC +mxjVfqZRnh0721eArz19YtnX7eU86SGWP3QaeIo+7xfpoyqwhh5Y+5yfh6MqZNZk +yCDD9jUfjhcejBTSSMaUKc3ZNssaHKm4FfQeQqCayiGGLzpbdB/WKkPV7wHlebM= +=l5tZ +-----END PGP SIGNATURE----- diff --git a/glibc-2.3.6-avx-increase_BF_FRAME.patch b/glibc-2.3.6-avx-increase_BF_FRAME.patch deleted file mode 100644 index 3056698..0000000 --- a/glibc-2.3.6-avx-increase_BF_FRAME.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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-ppc-build-lddlibc4.patch b/glibc-2.3.6-ppc-build-lddlibc4.patch deleted file mode 100644 index 4f4fedf..0000000 --- a/glibc-2.3.6-ppc-build-lddlibc4.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- 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.4.90-compat-EUR-currencies.patch b/glibc-2.4.90-compat-EUR-currencies.patch deleted file mode 100644 index eede980..0000000 --- a/glibc-2.4.90-compat-EUR-currencies.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- 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 deleted file mode 100644 index 03dafaa..0000000 --- a/glibc-2.4.90-gcc4-fortify.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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-i586-hptiming.patch b/glibc-2.4.90-i586-hptiming.patch deleted file mode 100644 index 2378f7e..0000000 --- a/glibc-2.4.90-i586-hptiming.patch +++ /dev/null @@ -1,132 +0,0 @@ -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-rt-notparallel.patch b/glibc-2.4.90-testsuite-rt-notparallel.patch deleted file mode 100644 index 9a08847..0000000 --- a/glibc-2.4.90-testsuite-rt-notparallel.patch +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index 8f3558f..0000000 --- a/glibc-2.6-nice_fix.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- 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-provide_CFI_for_the_outermost_function.patch b/glibc-2.7-provide_CFI_for_the_outermost_function.patch deleted file mode 100644 index ae8a2e7..0000000 --- a/glibc-2.7-provide_CFI_for_the_outermost_function.patch +++ /dev/null @@ -1,58 +0,0 @@ -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.9-avx-relocate_fcrypt.patch b/glibc-2.9-avx-relocate_fcrypt.patch deleted file mode 100644 index d92cba6..0000000 --- a/glibc-2.9-avx-relocate_fcrypt.patch +++ /dev/null @@ -1,49 +0,0 @@ -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 deleted file mode 100644 index f24b014..0000000 --- a/glibc-2.9-ldd-non-exec.patch +++ /dev/null @@ -1,40 +0,0 @@ -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-fedora.patch b/glibc-fedora.patch new file mode 100644 index 0000000..7b58d3b --- /dev/null +++ b/glibc-fedora.patch @@ -0,0 +1,2395 @@ +diff -Nrup a/ChangeLog b/ChangeLog +--- a/ChangeLog 2012-06-05 07:42:49.000000000 -0600 ++++ b/ChangeLog 2012-06-07 12:15:21.516319798 -0600 +@@ -12178,6 +12178,11 @@ + + * sysdeps/mach/hurd/sys/param.h (DEV_BSIZE): New macro. + ++2011-09-02 Andreas Schwab ++ ++ * nscd/selinux.c (avc_create_thread): Set PR_SET_KEEPCAPS before ++ spawning AVC thread. ++ + 2011-09-08 Andreas Schwab + + * elf/dl-load.c (lose): Check for non-null L. +@@ -12440,6 +12445,11 @@ + * sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi + directive. + ++2011-08-31 Andreas Schwab ++ ++ * include/link.h (FORCED_DYNAMIC_TLS_OFFSET) [NO_TLS_OFFSET == 0]: ++ Change to -1. ++ + 2011-08-24 David S. Miller + + * sysdeps/sparc/sparc64/strcmp.S: Rewrite. +@@ -13245,6 +13255,14 @@ + * config.make.in: Likewise. + * malloc/Makefile: Likewise. + ++2011-06-28 Andreas Schwab ++ ++ * iconvdata/gb18030.c: Update tables. ++ (BODY for FROM_LOOP): Handle non-BMP characters specially. ++ ++ * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use gethostbyaddr ++ to determine canonical name. ++ + 2011-06-27 Andreas Schwab + + * iconvdata/gb18030.c (BODY for TO_LOOP): Fix encoding of non-BMP +@@ -13376,6 +13394,10 @@ + + * inet/getnetgrent_r.c: Use DL_CALL_FCT in several places. + ++2011-06-21 Andreas Schwab ++ ++ * iconvdata/gb18030.c: Regenerate tables. ++ + 2011-06-20 David S. Miller + + * sysdeps/sparc/sparc32/dl-plt.h: Protect against multiple +@@ -13998,6 +14020,13 @@ + * libio/Makefile (tests): Add bug-fclose1. + * libio/bug-fclose1.c: New file. + ++2011-05-13 Andreas Schwab ++ ++ * elf/dl-load.c (is_dst): Remove parameter secure, all callers ++ changed. Move check for valid use of $ORIGIN ... ++ (_dl_dst_substitute): ... here. Reset check_for_trusted when a ++ path element is skipped. ++ + 2011-05-12 Ulrich Drepper + + [BZ #12511] +@@ -14275,13 +14304,6 @@ + * stdlib/bug-getcontext.c: New file. + * stdlib/Makefile: Add rules to build and run bug-getcontext. + +-2011-04-13 Andreas Krebbel +- +- * sysdeps/s390/s390-64/utf16-utf32-z9.c: Wrap the z9-109 +- instructions into .machine "z9-109". +- * sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise. +- * sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise. +- + 2011-04-11 Andreas Krebbel + + * sysdeps/s390/s390-32/elf/start.S (_start): Skip extra zeroes +@@ -14579,6 +14601,10 @@ + $LDFLAGS and -nostdlib -nostartfiles to linking step. Change main + to _start. + ++2011-03-18 Andreas Schwab ++ ++ * elf/ldd.bash.in: Never run file directly. ++ + 2011-03-06 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object): If we are looking for the first +@@ -14795,6 +14821,12 @@ + * shadow/sgetspent.c: Check return value of __sgetspent_r instead + of errno. + ++2011-02-03 Andreas Schwab ++ ++ * login/programs/pt_chown.c (main): Check for valid file ++ descriptor instead of privileges. Be careful to drop all ++ capabilities when not needed. ++ + 2011-01-19 Ulrich Drepper + + [BZ #11724] +@@ -15482,6 +15514,19 @@ + * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS): + Mask out sign-bit copies when constructing f_fsid. + ++2010-09-27 Andreas Schwab ++ ++ [BZ #11561] ++ * posix/regcomp.c (parse_bracket_exp): When looking up collating ++ elements compare against the byte sequence of it, not its name. ++ ++ [BZ #6530] ++ * stdio-common/vfprintf.c (process_string_arg): Revert 2000-07-22 ++ change. ++ ++ * nss/nss_files/files-XXX.c (internal_getent): Declare linebuflen ++ as size_t. ++ + 2010-09-24 Petr Baudis + + * debug/stack_chk_fail_local.c: Add missing licence exception. +@@ -16274,6 +16319,17 @@ + call returning > 0 value. + * sysdeps/unix/sysv/linux/getlogin.c (getlogin): Likewise. + ++2010-07-01 Andreas Schwab ++ ++ * include/sys/resource.h (__getrlimit): Add hidden proto. ++ * sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak. ++ * sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def. ++ * resource/getrlimit.c: Likewise. ++ ++2010-06-21 Andreas Schwab ++ ++ * sysdeps/i386/i686/Makefile: Don't pass -mtune to assembler. ++ + 2010-06-07 Andreas Schwab + + * dlfcn/Makefile: Remove explicit dependencies on libc.so and +@@ -16326,6 +16382,21 @@ + * hurd/hurd/fd.h (__file_name_lookup_at): Update comment. + * sysdeps/mach/hurd/linkat.c (linkat): Pass O_NOLINK in FLAGS. + ++2010-06-11 Andreas Schwab ++ ++ * elf/rtld.c (_dl_starting_up): Always define. ++ (dl_main): Always set _dl_starting_up. ++ * elf/dl-support.c (_dl_starting_up): Always define. ++ * elf/dl-init.c (_dl_init): Always clear _dl_starting_up. ++ ++2010-06-10 Andreas Schwab ++ ++ * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under ++ GLIBC_PRIVATE. ++ * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE. ++ * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname. ++ * nptl/nptl-init.c: Call __getrlimit instead of getrlimit. ++ + 2010-05-28 Luis Machado + + * sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi. +diff -Nrup a/ChangeLog.15 b/ChangeLog.15 +--- a/ChangeLog.15 2012-06-05 07:42:49.000000000 -0600 ++++ b/ChangeLog.15 2012-06-07 12:15:21.518319790 -0600 +@@ -477,6 +477,14 @@ + + 2004-11-26 Jakub Jelinek + ++ * posix/Makefile (generated: Add getconf.speclist. ++ ($(inst_libexecdir)/getconf): Use getconf.speclist instead of ++ getconf output. ++ ($(objpfx)getconf.speclist): New rule. ++ * posix/getconf.speclist.h: New file. ++ ++2004-11-26 Jakub Jelinek ++ + * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR. + + 2004-11-26 Kaz Kojima +@@ -3182,6 +3190,17 @@ + before return type. + * locale/localename.c (__current_locale_name): Likewise. + ++2004-08-31 Jakub Jelinek ++ ++ * elf/ldconfig.c (parse_conf): Add prefix argument, prepend it ++ before arguments to add_dir and pass to parse_conf_include. ++ (parse_conf_include): Add prefix argument, pass it down to ++ parse_conf. ++ (main): Call arch_startup. Adjust parse_conf caller. ++ Call add_arch_dirs. ++ * sysdeps/generic/dl-cache.h (arch_startup, add_arch_dirs): Define. ++ * sysdeps/unix/sysv/linux/i386/dl-cache.h: New file. ++ + 2004-08-30 Roland McGrath + + * scripts/extract-abilist.awk: If `lastversion' variable defined, omit +diff -Nrup a/ChangeLog.16 b/ChangeLog.16 +--- a/ChangeLog.16 2012-06-05 07:42:49.000000000 -0600 ++++ b/ChangeLog.16 2012-06-07 12:15:21.523319772 -0600 +@@ -2042,6 +2042,9 @@ + (__MATHDECL_2): Use __REDIRECT_NTH instead of __REDIRECT + followed by __THROW. + ++ * sysdeps/unix/sysv/linux/futimesat.c (futimesat): If ++ file == NULL, use __futimes unconditionally. ++ + 2006-02-02 Ulrich Drepper + + * sysdeps/unix/sysv/linux/futimesat.c [__NR_futimesat] +@@ -2101,6 +2104,11 @@ + * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Fix a typo. + * sysdeps/s390/fpu/libm-test-ulps: Remove llrint ulps. + ++2006-01-30 Jakub Jelinek ++ ++ * include/bits/stdlib-ldbl.h: New file. ++ * include/bits/wchar-ldbl.h: New file. ++ + 2006-01-19 Thomas Schwinge + + * libio/genops.c: Include . +diff -Nrup a/ChangeLog.17 b/ChangeLog.17 +--- a/ChangeLog.17 2012-06-05 07:42:49.000000000 -0600 ++++ b/ChangeLog.17 2012-06-07 12:15:21.564319619 -0600 +@@ -256,6 +256,12 @@ + + * Makerules (libc-abis): Fix search for libc-abis in add-ons. + ++2010-04-06 Ulrich Drepper ++ ++ * sysdeps/posix/getaddrinfo.c (default_scopes): Assign global ++ scope to RFC 1918 addresses. ++ * posix/gai.conf: Document difference from RFC 3484. ++ + 2010-04-05 Thomas Schwinge + + * sysdeps/gnu/unwind-resume.c: New, moved from nptl/sysdeps/pthread/. +@@ -2953,6 +2959,11 @@ d2009-10-30 Ulrich Drepper ++ ++ * Makeconfig (ASFLAGS): Append $(sysdep-ASFLAGS). ++ * sysdeps/i386/Makefile (sysdep-ASFLAGS): Add -U__i686. ++ + 2009-07-21 Ulrich Drepper + + * sysdeps/x86_64/multiarch/strstr.c: Minor cleanups. Remove +@@ -11818,6 +11829,10 @@ d2009-10-30 Ulrich Drepper ++ ++ * locale/programs/locarchive.c (add_alias, insert_name): Remove static. ++ + 2007-04-16 Ulrich Drepper + + [BZ #4364] +@@ -13075,6 +13090,15 @@ d2009-10-30 Ulrich Drepper ++ ++ * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h ++ if IFA_MAX is not defined. ++ (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not ++ defined. ++ * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h ++ instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h. ++ + 2006-12-09 Ulrich Drepper + + [BZ #3632] +diff -Nrup a/Makeconfig b/Makeconfig +--- a/Makeconfig 2012-06-05 07:42:49.000000000 -0600 ++++ b/Makeconfig 2012-06-07 12:15:21.568319604 -0600 +@@ -753,12 +753,12 @@ endif + # The assembler can generate debug information too. + ifndef ASFLAGS + ifeq ($(have-cpp-asm-debuginfo),yes) +-ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS)) ++ASFLAGS = $(filter -g% -fdebug-prefix-map=%,$(CFLAGS)) + else +-ASFLAGS := ++ASFLAGS = + endif + endif +-ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) ++ASFLAGS += $(ASFLAGS-config) $(asflags-cpu) $(sysdep-ASFLAGS) + + ifndef BUILD_CC + BUILD_CC = $(CC) +diff -Nrup a/NEWS b/NEWS +--- a/NEWS 2012-06-05 07:42:49.000000000 -0600 ++++ b/NEWS 2012-06-07 12:15:21.569319601 -0600 +@@ -196,16 +196,6 @@ Version 2.14 + 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792, + 12795, 12811, 12813, 12814, 12841 + +-* The RPC implementation in libc is obsoleted. Old programs keep working +- but new programs cannot be linked with the routines in libc anymore. +- Programs in need of RPC functionality must be linked against TI-RPC. +- The TI-RPC implementation is IPv6 enabled and there are other benefits. +- +- Visible changes of this change include (obviously) the inability to link +- programs using RPC functions without referencing the TI-RPC library and the +- removal of the RPC headers from the glibc headers. +- Implemented by Ulrich Drepper. +- + * New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at, + syncfs, setns, sendmmsg + +diff -Nrup a/csu/elf-init.c b/csu/elf-init.c +--- a/csu/elf-init.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/csu/elf-init.c 2012-06-07 12:15:21.570319597 -0600 +@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int, + extern void (*__fini_array_start []) (void) attribute_hidden; + extern void (*__fini_array_end []) (void) attribute_hidden; + ++#if defined HAVE_VISIBILITY_ATTRIBUTE \ ++ && (defined SHARED || defined LIBC_NONSHARED) ++# define hidden_undef_2(x) #x ++# define hidden_undef_1(x) hidden_undef_2 (x) ++# define hidden_undef(x) \ ++ __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \ ++ __asm (".hidden " #x); ++#else ++# define hidden_undef(x) ++#endif ++ ++hidden_undef (__preinit_array_start) ++hidden_undef (__preinit_array_end) ++hidden_undef (__init_array_start) ++hidden_undef (__init_array_end) ++hidden_undef (__fini_array_start) ++hidden_undef (__fini_array_end) + + /* These function symbols are provided for the .init/.fini section entry + points automagically by the linker. */ +diff -Nrup a/debug/tst-chk1.c b/debug/tst-chk1.c +--- a/debug/tst-chk1.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/debug/tst-chk1.c 2012-06-07 12:15:21.571319593 -0600 +@@ -16,6 +16,9 @@ + License along with the GNU C Library; if not, see + . */ + ++/* Hack: make sure GCC doesn't know __chk_fail () will not return. */ ++#define __noreturn__ ++ + #include + #include + #include +@@ -244,7 +247,7 @@ do_test (void) + if (memcmp (a.buf1, "aabcdabcjj", 10)) + FAIL (); + +-#if __USE_FORTIFY_LEVEL < 2 ++#if __USE_FORTIFY_LEVEL < 2 || !__GNUC_PREREQ (4, 0) + /* The following tests are supposed to crash with -D_FORTIFY_SOURCE=2 + and sufficient GCC support, as the string operations overflow + from a.buf1 into a.buf2. */ +@@ -359,7 +362,7 @@ do_test (void) + memset (a.buf1 + 9, 'j', l0 + 2); + CHK_FAIL_END + +-# if __USE_FORTIFY_LEVEL >= 2 ++# if __USE_FORTIFY_LEVEL >= 2 && __GNUC_PREREQ (4, 0) + # define O 0 + # else + # define O 1 +diff -Nrup a/elf/Makefile b/elf/Makefile +--- a/elf/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/Makefile 2012-06-07 12:15:21.572319589 -0600 +@@ -50,6 +50,7 @@ include ../Makeconfig + ifeq ($(unwind-find-fde),yes) + routines += unwind-dw2-fde-glibc + shared-only-routines += unwind-dw2-fde-glibc ++CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing + endif + + before-compile = $(objpfx)trusted-dirs.h +diff -Nrup a/elf/dl-init.c b/elf/dl-init.c +--- a/elf/dl-init.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/dl-init.c 2012-06-07 12:15:21.573319585 -0600 +@@ -23,11 +23,9 @@ + /* Type of the initializer. */ + typedef void (*init_t) (int, char **, char **); + +-#ifndef HAVE_INLINED_SYSCALLS + /* Flag, nonzero during startup phase. */ + extern int _dl_starting_up; + extern int _dl_starting_up_internal attribute_hidden; +-#endif + + + static void +@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int + while (i-- > 0) + call_init (main_map->l_initfini[i], argc, argv, env); + +-#ifndef HAVE_INLINED_SYSCALLS + /* Finished starting up. */ + INTUSE(_dl_starting_up) = 0; +-#endif + } + INTDEF (_dl_init) +diff -Nrup a/elf/dl-load.c b/elf/dl-load.c +--- a/elf/dl-load.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/dl-load.c 2012-06-07 12:15:21.575319577 -0600 +@@ -249,8 +249,7 @@ is_trusted_path_normalize (const char *p + + + 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; +@@ -279,12 +278,6 @@ is_dst (const char *start, const char *n + && (!is_path || name[len] != ':')) + return 0; + +- if (__builtin_expect (secure, 0) +- && ((name[len] != '\0' && name[len] != '/' +- && (!is_path || name[len] != ':')) +- || (name != start + 1 && (!is_path || name[-2] != ':')))) +- return 0; +- + return len; + } + +@@ -299,13 +292,10 @@ _dl_dst_count (const char *name, int is_ + { + 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. */ + ++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 ++ || (len = is_dst (start, name, "PLATFORM", is_path)) != 0 ++ || (len = is_dst (start, name, "LIB", is_path)) != 0) + ++cnt; + + name = strchr (name + len, '$'); +@@ -338,9 +328,16 @@ _dl_dst_substitute (struct link_map *l, + 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) + { ++ /* For SUID/GUID programs $ORIGIN must always appear ++ first in a path element. */ ++ if (__builtin_expect (INTUSE(__libc_enable_secure), 0) ++ && ((name[len] != '\0' && name[len] != '/' ++ && (!is_path || name[len] != ':')) ++ || (name != start + 1 && (!is_path || name[-2] != ':')))) ++ repl = (const char *) -1; ++ else + #ifndef SHARED + if (l == NULL) + repl = _dl_get_origin (); +@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, + check_for_trusted = (INTUSE(__libc_enable_secure) + && l->l_type == lt_executable); + } +- 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) +@@ -373,6 +370,7 @@ _dl_dst_substitute (struct link_map *l, + element, but keep an empty element at the end. */ + if (wp == result && is_path && *name == ':' && name[1] != '\0') + ++name; ++ check_for_trusted = false; + } + else + /* No DST we recognize. */ +diff -Nrup a/elf/dl-support.c b/elf/dl-support.c +--- a/elf/dl-support.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/dl-support.c 2012-06-07 12:15:21.576319573 -0600 +@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds; + create a fake scope containing nothing. */ + struct r_scope_elem _dl_initial_searchlist; + +-#ifndef HAVE_INLINED_SYSCALLS + /* Nonzero during startup. */ + int _dl_starting_up = 1; +-#endif + + /* Random data provided by the kernel. */ + void *_dl_random; +diff -Nrup a/elf/ldconfig.c b/elf/ldconfig.c +--- a/elf/ldconfig.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/ldconfig.c 2012-06-07 12:15:21.577319570 -0600 +@@ -1033,17 +1033,19 @@ search_dirs (void) + + + static void parse_conf_include (const char *config_file, unsigned int lineno, +- bool do_chroot, const char *pattern); ++ const char *prefix, bool do_chroot, ++ const char *pattern); + + /* Parse configuration file. */ + static void +-parse_conf (const char *filename, bool do_chroot) ++parse_conf (const char *filename, const char *prefix, bool do_chroot) + { + FILE *file = NULL; + char *line = NULL; + const char *canon; + size_t len = 0; + unsigned int lineno; ++ size_t prefix_len = prefix ? strlen (prefix) : 0; + + if (do_chroot && opt_chroot) + { +@@ -1106,7 +1108,14 @@ Warning: ignoring configuration file tha + cp += 8; + while ((dir = strsep (&cp, " \t")) != NULL) + if (dir[0] != '\0') +- parse_conf_include (filename, lineno, do_chroot, dir); ++ parse_conf_include (filename, lineno, prefix, do_chroot, dir); ++ } ++ else if (prefix != NULL) ++ { ++ size_t cp_len = strlen (cp); ++ char new_cp [prefix_len + cp_len + 1]; ++ memcpy (mempcpy (new_cp, prefix, prefix_len), cp, cp_len + 1); ++ add_dir (new_cp); + } + else if (!strncasecmp (cp, "hwcap", 5) && isblank (cp[5])) + { +@@ -1169,7 +1178,7 @@ Warning: ignoring configuration file tha + config files to read. */ + static void + parse_conf_include (const char *config_file, unsigned int lineno, +- bool do_chroot, const char *pattern) ++ const char *prefix, bool do_chroot, const char *pattern) + { + if (opt_chroot && pattern[0] != '/') + error (EXIT_FAILURE, 0, +@@ -1201,7 +1210,7 @@ parse_conf_include (const char *config_f + { + case 0: + for (size_t i = 0; i < gl.gl_pathc; ++i) +- parse_conf (gl.gl_pathv[i], false); ++ parse_conf (gl.gl_pathv[i], prefix, false); + globfree64 (&gl); + break; + +@@ -1244,6 +1253,8 @@ main (int argc, char **argv) + /* Set the text message domain. */ + textdomain (_libc_intl_domainname); + ++ arch_startup (argc, argv); ++ + /* Parse and process arguments. */ + int remaining; + argp_parse (&argp, argc, argv, 0, &remaining, NULL); +@@ -1353,12 +1364,14 @@ main (int argc, char **argv) + + if (!opt_only_cline) + { +- parse_conf (config_file, true); ++ parse_conf (config_file, NULL, true); + + /* Always add the standard search paths. */ + add_system_dir (SLIBDIR); + if (strcmp (SLIBDIR, LIBDIR)) + add_system_dir (LIBDIR); ++ ++ add_arch_dirs (config_file); + } + + const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE; +diff -Nrup a/elf/ldd.bash.in b/elf/ldd.bash.in +--- a/elf/ldd.bash.in 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/ldd.bash.in 2012-06-07 12:15:21.577319570 -0600 +@@ -166,18 +166,6 @@ warning: you do not have execution permi + fi + done + case $ret in +- 0) +- # 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 [ $rc = 5 ]; then +- try_trace "$RTLD" "$file" +- rc=$? +- fi +- [ $rc = 0 ] || result=1 +- ;; + 1) + # This can be a non-ELF binary or no binary at all. + nonelf "$file" || { +@@ -185,7 +173,7 @@ warning: you do not have execution permi + result=1 + } + ;; +- 2) ++ 0|2) + try_trace "$RTLD" "$file" || result=1 + ;; + *) +diff -Nrup a/elf/rtld.c b/elf/rtld.c +--- a/elf/rtld.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/elf/rtld.c 2012-06-07 12:15:21.579319564 -0600 +@@ -106,7 +106,6 @@ static struct audit_list + struct audit_list *next; + } *audit_list; + +-#ifndef HAVE_INLINED_SYSCALLS + /* Set nonzero during loading and initialization of executable and + libraries, cleared before the executable's entry point runs. This + must not be initialized to nonzero, because the unused dynamic +@@ -116,7 +115,6 @@ static struct audit_list + never be called. */ + int _dl_starting_up = 0; + INTVARDEF(_dl_starting_up) +-#endif + + /* This is the structure which defines all variables global to ld.so + (except those which cannot be added for some reason). */ +@@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr, + /* Process the environment variable which control the behaviour. */ + process_envvars (&mode); + +-#ifndef HAVE_INLINED_SYSCALLS + /* Set up a flag which tells we are just starting. */ + INTUSE(_dl_starting_up) = 1; +-#endif + + if (*user_entry == (ElfW(Addr)) ENTRY_POINT) + { +@@ -1408,7 +1404,9 @@ of this helper program; chances are you + char *copy = malloc (len); + if (copy == NULL) + _dl_fatal_printf ("out of memory\n"); +- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); ++ l->l_libname->name = memcpy (copy, dsoname, len); ++ if (GLRO(dl_debug_mask)) ++ l->l_name = copy; + } + + /* Add the vDSO to the object list. */ +@@ -2343,7 +2341,6 @@ ERROR: ld.so: object '%s' cannot be load + + /* Make sure no new search directories have been added. */ + assert (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 -Nrup a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h +--- a/include/bits/stdlib-ldbl.h 1969-12-31 17:00:00.000000000 -0700 ++++ b/include/bits/stdlib-ldbl.h 2012-06-07 12:15:21.580319560 -0600 +@@ -0,0 +1 @@ ++#include +diff -Nrup a/include/bits/wchar-ldbl.h b/include/bits/wchar-ldbl.h +--- a/include/bits/wchar-ldbl.h 1969-12-31 17:00:00.000000000 -0700 ++++ b/include/bits/wchar-ldbl.h 2012-06-07 12:15:21.580319560 -0600 +@@ -0,0 +1 @@ ++#include +diff -Nrup a/include/link.h b/include/link.h +--- a/include/link.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/include/link.h 2012-06-07 12:15:21.581319556 -0600 +@@ -289,7 +289,7 @@ struct link_map + #endif + #ifndef FORCED_DYNAMIC_TLS_OFFSET + # if NO_TLS_OFFSET == 0 +-# define FORCED_DYNAMIC_TLS_OFFSET 1 ++# define FORCED_DYNAMIC_TLS_OFFSET -1 + # elif NO_TLS_OFFSET == -1 + # define FORCED_DYNAMIC_TLS_OFFSET -2 + # else +diff -Nrup a/include/sys/resource.h b/include/sys/resource.h +--- a/include/sys/resource.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/include/sys/resource.h 2012-06-07 12:15:21.582319552 -0600 +@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_wh + + extern int __setrlimit (enum __rlimit_resource __resource, + const struct rlimit *__rlimits); ++libc_hidden_proto (__getrlimit) + #endif + #endif +diff -Nrup a/inet/Makefile b/inet/Makefile +--- a/inet/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/inet/Makefile 2012-06-07 12:15:21.582319552 -0600 +@@ -54,6 +54,8 @@ tests := htontest test_ifindex tst-ntoa + + include ../Rules + ++CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing ++ + ifeq ($(have-thread-library),yes) + + CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions +diff -Nrup a/intl/locale.alias b/intl/locale.alias +--- a/intl/locale.alias 2012-06-05 07:42:49.000000000 -0600 ++++ b/intl/locale.alias 2012-06-07 12:15:21.583319548 -0600 +@@ -56,8 +56,6 @@ korean ko_KR.eucKR + korean.euc ko_KR.eucKR + ko_KR ko_KR.eucKR + lithuanian lt_LT.ISO-8859-13 +-no_NO nb_NO.ISO-8859-1 +-no_NO.ISO-8859-1 nb_NO.ISO-8859-1 + norwegian nb_NO.ISO-8859-1 + nynorsk nn_NO.ISO-8859-1 + polish pl_PL.ISO-8859-2 +diff -Nrup a/libio/stdio.h b/libio/stdio.h +--- a/libio/stdio.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/libio/stdio.h 2012-06-07 12:15:21.584319544 -0600 +@@ -168,10 +168,12 @@ typedef _G_fpos64_t fpos64_t; + extern struct _IO_FILE *stdin; /* Standard input stream. */ + extern struct _IO_FILE *stdout; /* Standard output stream. */ + extern struct _IO_FILE *stderr; /* Standard error output stream. */ ++#ifdef __STDC__ + /* C89/C99 say they're macros. Make them happy. */ + #define stdin stdin + #define stdout stdout + #define stderr stderr ++#endif + + __BEGIN_NAMESPACE_STD + /* Remove file FILENAME. */ +diff -Nrup a/locale/iso-4217.def b/locale/iso-4217.def +--- a/locale/iso-4217.def 2012-06-05 07:42:49.000000000 -0600 ++++ b/locale/iso-4217.def 2012-06-07 12:15:21.584319544 -0600 +@@ -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 -> EUR */ + 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 */ +@@ -44,6 +47,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 */ +@@ -51,16 +55,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 */ +@@ -69,12 +77,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 */ +@@ -94,6 +104,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 */ +@@ -114,6 +125,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 */ +@@ -124,6 +136,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 -Nrup a/locale/programs/locarchive.c b/locale/programs/locarchive.c +--- a/locale/programs/locarchive.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/locale/programs/locarchive.c 2012-06-07 12:15:21.585319540 -0600 +@@ -252,9 +252,9 @@ oldlocrecentcmp (const void *a, const vo + /* forward decls for below */ + static uint32_t add_locale (struct locarhandle *ah, const char *name, + locale_data_t data, bool replace); +-static void add_alias (struct locarhandle *ah, const char *alias, +- bool replace, const char *oldname, +- uint32_t *locrec_offset_p); ++void add_alias (struct locarhandle *ah, const char *alias, ++ bool replace, const char *oldname, ++ uint32_t *locrec_offset_p); + + + static bool +@@ -635,7 +635,7 @@ close_archive (struct locarhandle *ah) + #include "../../intl/explodename.c" + #include "../../intl/l10nflist.c" + +-static struct namehashent * ++struct namehashent * + insert_name (struct locarhandle *ah, + const char *name, size_t name_len, bool replace) + { +@@ -693,7 +693,7 @@ insert_name (struct locarhandle *ah, + return &namehashtab[idx]; + } + +-static void ++void + add_alias (struct locarhandle *ah, const char *alias, bool replace, + const char *oldname, uint32_t *locrec_offset_p) + { +diff -Nrup a/localedata/ChangeLog b/localedata/ChangeLog +--- a/localedata/ChangeLog 2012-06-05 07:42:49.000000000 -0600 ++++ b/localedata/ChangeLog 2012-06-07 12:15:21.683319174 -0600 +@@ -181,6 +181,14 @@ + * tests-mbwc/tst_funcs.h (TST_DECL_VARS, TST_HEAD_LOCALE): + Remove unused variable. + ++2011-06-28 Andreas Schwab ++ ++ * charmaps/GB18030: Correct some entries. ++ ++2011-06-21 Andreas Schwab ++ ++ * charmaps/GB18030: Readd lost characters. ++ + 2011-05-21 Ulrich Drepper + + [BZ #12788] +diff -Nrup a/localedata/Makefile b/localedata/Makefile +--- a/localedata/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/localedata/Makefile 2012-06-07 12:15:21.776318827 -0600 +@@ -211,6 +211,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo + echo -n '...'; \ + input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ + $(LOCALEDEF) --alias-file=../intl/locale.alias \ ++ --no-archive \ + -i locales/$$input -c -f charmaps/$$charset \ + $(addprefix --prefix=,$(install_root)) $$locale; \ + echo ' done'; \ +diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED +--- a/localedata/SUPPORTED 2012-06-05 07:42:49.000000000 -0600 ++++ b/localedata/SUPPORTED 2012-06-07 12:15:21.805318719 -0600 +@@ -88,6 +88,7 @@ cy_GB.UTF-8/UTF-8 \ + cy_GB/ISO-8859-14 \ + da_DK.UTF-8/UTF-8 \ + da_DK/ISO-8859-1 \ ++da_DK.ISO-8859-15/ISO-8859-15 \ + de_AT.UTF-8/UTF-8 \ + de_AT/ISO-8859-1 \ + de_AT@euro/ISO-8859-15 \ +@@ -119,6 +120,7 @@ en_DK.UTF-8/UTF-8 \ + en_DK/ISO-8859-1 \ + en_GB.UTF-8/UTF-8 \ + en_GB/ISO-8859-1 \ ++en_GB.ISO-8859-15/ISO-8859-15 \ + en_HK.UTF-8/UTF-8 \ + en_HK/ISO-8859-1 \ + en_IE.UTF-8/UTF-8 \ +@@ -134,6 +136,7 @@ en_SG.UTF-8/UTF-8 \ + en_SG/ISO-8859-1 \ + en_US.UTF-8/UTF-8 \ + en_US/ISO-8859-1 \ ++en_US.ISO-8859-15/ISO-8859-15 \ + en_ZA.UTF-8/UTF-8 \ + en_ZA/ISO-8859-1 \ + en_ZM/UTF-8 \ +@@ -317,6 +320,8 @@ nl_NL/ISO-8859-1 \ + nl_NL@euro/ISO-8859-15 \ + nn_NO.UTF-8/UTF-8 \ + nn_NO/ISO-8859-1 \ ++no_NO.UTF-8/UTF-8 \ ++no_NO/ISO-8859-1 \ + nr_ZA/UTF-8 \ + nso_ZA/UTF-8 \ + oc_FR.UTF-8/UTF-8 \ +@@ -378,6 +383,7 @@ sv_FI/ISO-8859-1 \ + sv_FI@euro/ISO-8859-15 \ + sv_SE.UTF-8/UTF-8 \ + sv_SE/ISO-8859-1 \ ++sv_SE.ISO-8859-15/ISO-8859-15 \ + sw_KE/UTF-8 \ + sw_TZ/UTF-8 \ + ta_IN/UTF-8 \ +diff -Nrup a/localedata/locales/cy_GB b/localedata/locales/cy_GB +--- a/localedata/locales/cy_GB 2012-06-05 07:42:49.000000000 -0600 ++++ b/localedata/locales/cy_GB 2012-06-07 12:15:21.805318719 -0600 +@@ -248,9 +248,9 @@ mon "" + d_fmt "" + t_fmt "" +-am_pm "";"" ++am_pm "";"" + t_fmt_ampm "" +-date_fmt "/ ++date_fmt "/ + / + " + first_workday 2 +diff -Nrup a/localedata/locales/en_GB b/localedata/locales/en_GB +--- a/localedata/locales/en_GB 2012-06-05 07:42:49.000000000 -0600 ++++ b/localedata/locales/en_GB 2012-06-07 12:15:21.806318715 -0600 +@@ -116,7 +116,7 @@ mon "" + d_fmt "" + t_fmt "" +-am_pm "";"" ++am_pm "";"" + t_fmt_ampm "" + date_fmt "/ + / +diff -Nrup a/localedata/locales/no_NO b/localedata/locales/no_NO +--- a/localedata/locales/no_NO 1969-12-31 17:00:00.000000000 -0700 ++++ b/localedata/locales/no_NO 2012-06-07 12:15:21.806318715 -0600 +@@ -0,0 +1,69 @@ ++escape_char / ++comment_char % ++ ++% Norwegian language locale for Norway ++% Source: Norsk Standardiseringsforbund ++% Address: University Library, ++% Drammensveien 41, N-9242 Oslo, Norge ++% Contact: Kolbjoern Aamboe ++% Tel: +47 - 22859109 ++% Fax: +47 - 22434497 ++% Email: kolbjorn.aambo@usit.uio.no ++% Language: no ++% Territory: NO ++% Revision: 4.3 ++% Date: 1996-10-15 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic.ds ++% Charset: ISO-8859-1 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++copy "nb_NO" ++END LC_IDENTIFICATION ++ ++LC_COLLATE ++copy "nb_NO" ++END LC_COLLATE ++ ++LC_CTYPE ++copy "nb_NO" ++END LC_CTYPE ++ ++LC_MONETARY ++copy "nb_NO" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "nb_NO" ++END LC_NUMERIC ++ ++LC_TIME ++copy "nb_NO" ++END LC_TIME ++ ++LC_MESSAGES ++copy "nb_NO" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "nb_NO" ++END LC_PAPER ++ ++LC_TELEPHONE ++copy "nb_NO" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "nb_NO" ++END LC_MEASUREMENT ++ ++LC_NAME ++copy "nb_NO" ++END LC_NAME ++ ++LC_ADDRESS ++copy "nb_NO" ++END LC_ADDRESS +diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW +--- a/localedata/locales/zh_TW 2012-06-05 07:42:49.000000000 -0600 ++++ b/localedata/locales/zh_TW 2012-06-07 12:15:21.807318711 -0600 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ escape_char / + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org" + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % +diff -Nrup a/login/programs/pt_chown.c b/login/programs/pt_chown.c +--- a/login/programs/pt_chown.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/login/programs/pt_chown.c 2012-06-07 12:15:21.807318711 -0600 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_LIBCAP + # include + # include +@@ -142,7 +143,7 @@ main (int argc, char *argv[]) + uid_t uid = getuid (); + int remaining; + +- if (argc == 1 && euid == 0) ++ if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0) + { + #ifdef HAVE_LIBCAP + /* Drop privileges. */ +@@ -175,6 +176,13 @@ main (int argc, char *argv[]) + + /* We aren't going to be using privileges, so drop them right now. */ + setuid (uid); ++#ifdef HAVE_LIBCAP ++ cap_t caps = cap_init (); ++ if (caps == NULL) ++ error (1, errno, "cap_init"); ++ cap_set_proc (caps); ++ cap_free (caps); ++#endif + + /* Set locale via LC_ALL. */ + setlocale (LC_ALL, ""); +@@ -194,9 +202,5 @@ main (int argc, char *argv[]) + return EXIT_FAILURE; + } + +- /* Check if we are properly installed. */ +- if (euid != 0) +- error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'")); +- + return EXIT_SUCCESS; + } +diff -Nrup a/manual/libc.texinfo b/manual/libc.texinfo +--- a/manual/libc.texinfo 2012-06-05 07:42:49.000000000 -0600 ++++ b/manual/libc.texinfo 2012-06-07 12:15:21.808318708 -0600 +@@ -7,7 +7,7 @@ + @include macros.texi + + @comment Tell install-info what to do. +-@dircategory Software libraries ++@dircategory Libraries + @direntry + * Libc: (libc). C library. + @end direntry +diff -Nrup a/misc/sys/cdefs.h b/misc/sys/cdefs.h +--- a/misc/sys/cdefs.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/misc/sys/cdefs.h 2012-06-07 12:15:21.808318708 -0600 +@@ -142,7 +142,10 @@ + #define __bos0(ptr) __builtin_object_size (ptr, 0) + #define __fortify_function __extern_always_inline __attribute_artificial__ + +-#if __GNUC_PREREQ (4,3) ++#if __GNUC_PREREQ (4,3) \ ++ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \ ++ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \ ++ && __GNUC_RH_RELEASE__ >= 31) + # define __warndecl(name, msg) \ + extern void name (void) __attribute__((__warning__ (msg))) + # define __warnattr(msg) __attribute__((__warning__ (msg))) +@@ -320,7 +323,10 @@ + + /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. */ +-#if !defined __cplusplus || __GNUC_PREREQ (4,3) ++#if !defined __cplusplus || __GNUC_PREREQ (4,3) \ ++ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \ ++ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \ ++ && __GNUC_RH_RELEASE__ >= 31) + # if defined __GNUC_STDC_INLINE__ || defined __cplusplus + # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) + # define __extern_always_inline \ +@@ -333,7 +339,10 @@ + + /* GCC 4.3 and above allow passing all anonymous arguments of an + __extern_always_inline function to some other vararg function. */ +-#if __GNUC_PREREQ (4,3) ++#if __GNUC_PREREQ (4,3) \ ++ || (defined __GNUC_RH_RELEASE__ && __GNUC__ == 4 \ ++ && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 2 \ ++ && __GNUC_RH_RELEASE__ >= 31) + # define __va_arg_pack() __builtin_va_arg_pack () + # define __va_arg_pack_len() __builtin_va_arg_pack_len () + #endif +diff -Nrup a/nis/Makefile b/nis/Makefile +--- a/nis/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/nis/Makefile 2012-06-07 12:15:21.810318702 -0600 +@@ -71,6 +71,8 @@ libnss_nisplus-inhibit-o = $(filter-out + + include ../Rules + ++CFLAGS-nis_findserv.c += -fno-strict-aliasing ++CFLAGS-ypclnt.c += -fno-strict-aliasing + + $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version) + $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \ +diff -Nrup a/nis/nss b/nis/nss +--- a/nis/nss 2012-06-05 07:42:49.000000000 -0600 ++++ b/nis/nss 2012-06-07 12:15:21.811318698 -0600 +@@ -25,7 +25,7 @@ + # memory with every getXXent() call. Otherwise each getXXent() call + # might result into a network communication with the server to get + # the next entry. +-#SETENT_BATCH_READ=TRUE ++SETENT_BATCH_READ=TRUE + # + # ADJUNCT_AS_SHADOW + # If set to TRUE, the passwd routines in the NIS NSS module will not +diff -Nrup a/nptl/ChangeLog b/nptl/ChangeLog +--- a/nptl/ChangeLog 2012-06-05 07:42:49.000000000 -0600 ++++ b/nptl/ChangeLog 2012-06-07 12:15:21.813318690 -0600 +@@ -5562,6 +5562,11 @@ + Move definition inside libpthread, libc, librt check. Provide + definition for rtld. + ++2004-09-02 Jakub Jelinek ++ ++ * pthread_cond_destroy.c (__pthread_cond_destroy): If there are ++ waiters, awake all waiters on the associated mutex. ++ + 2004-09-02 Ulrich Drepper + + * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp. +@@ -7636,6 +7641,11 @@ + + * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules). + ++2003-07-22 Jakub Jelinek ++ ++ * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h ++ if __need_struct_pthread_size, instead define lll_lock_t. ++ + 2003-07-25 Jakub Jelinek + + * tst-cancel17.c (do_test): Check if aio_cancel failed. +diff -Nrup a/nptl/Makefile b/nptl/Makefile +--- a/nptl/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/nptl/Makefile 2012-06-07 12:15:21.816318678 -0600 +@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \ + $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \ + $(objpfx)libpthread_nonshared.a + $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so +-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so, ++# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so, + # since otherwise libpthread.so comes before libc.so when linking. + $(addprefix $(objpfx), $(tests-reverse)): \ +- $(objpfx)../libc.so $(objpfx)libpthread.so \ ++ $(objpfx)linklibc.so $(objpfx)libpthread.so \ + $(objpfx)libpthread_nonshared.a + $(objpfx)../libc.so: $(common-objpfx)libc.so ; + $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a + + $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so ++ ++$(objpfx)linklibc.so: $(common-objpfx)libc.so ++ ln -s ../libc.so $@ ++generated += libclink.so + else + $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a + endif +diff -Nrup a/nptl/Versions b/nptl/Versions +--- a/nptl/Versions 2012-06-05 07:42:49.000000000 -0600 ++++ b/nptl/Versions 2012-06-07 12:15:21.817318674 -0600 +@@ -30,6 +30,7 @@ libc { + __libc_alloca_cutoff; + # Internal libc interface to libpthread + __libc_dl_error_tsd; ++ __getrlimit; + } + } + +diff -Nrup a/nptl/nptl-init.c b/nptl/nptl-init.c +--- a/nptl/nptl-init.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/nptl/nptl-init.c 2012-06-07 12:15:21.817318674 -0600 +@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (v + /* Determine the default allowed stack size. This is the size used + in case the user does not specify one. */ + struct rlimit limit; +- if (getrlimit (RLIMIT_STACK, &limit) != 0 ++ if (__getrlimit (RLIMIT_STACK, &limit) != 0 + || limit.rlim_cur == RLIM_INFINITY) + /* The system limit is not usable. Use an architecture-specific + default. */ +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h +--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-07 12:15:21.817318674 -0600 +@@ -188,4 +188,7 @@ + /* Typed memory objects are not available. */ + #define _POSIX_TYPED_MEMORY_OBJECTS -1 + ++/* Streams are not available. */ ++#define _XOPEN_STREAMS -1 ++ + #endif /* bits/posix_opt.h */ +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions +--- a/nptl/sysdeps/unix/sysv/linux/i386/Versions 1969-12-31 17:00:00.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions 2012-06-07 12:15:21.818318670 -0600 +@@ -0,0 +1,6 @@ ++libc { ++ GLIBC_PRIVATE { ++ # Internal libc interface to libpthread ++ __uname; ++ } ++} +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h +--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-06-07 12:15:21.818318670 -0600 +@@ -36,7 +36,7 @@ is_smp_system (void) + char *cp; + + /* Try reading the number using `sysctl' first. */ +- if (uname (&u.uts) == 0) ++ if (__uname (&u.uts) == 0) + cp = u.uts.version; + else + { +diff -Nrup a/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/nptl/sysdeps/unix/sysv/linux/kernel-features.h +--- a/nptl/sysdeps/unix/sysv/linux/kernel-features.h 1969-12-31 17:00:00.000000000 -0700 ++++ b/nptl/sysdeps/unix/sysv/linux/kernel-features.h 2012-06-07 12:15:21.818318670 -0600 +@@ -0,0 +1,6 @@ ++#include_next ++ ++/* NPTL can always assume all clone thread flags work. */ ++#ifndef __ASSUME_CLONE_THREAD_FLAGS ++# define __ASSUME_CLONE_THREAD_FLAGS 1 ++#endif +diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf +--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600 ++++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600 +@@ -33,7 +33,7 @@ + # logfile /var/log/nscd.log + # threads 4 + # max-threads 32 +-# server-user nobody ++ server-user nscd + # stat-user somebody + debug-level 0 + # reload-count 5 +diff -Nrup a/nscd/nscd.init b/nscd/nscd.init +--- a/nscd/nscd.init 2012-06-05 07:42:49.000000000 -0600 ++++ b/nscd/nscd.init 2012-06-07 12:15:21.818318670 -0600 +@@ -9,6 +9,7 @@ + # slow naming services like NIS, NIS+, LDAP, or hesiod. + # processname: /usr/sbin/nscd + # config: /etc/nscd.conf ++# config: /etc/sysconfig/nscd + # + ### BEGIN INIT INFO + # Provides: nscd +@@ -28,20 +29,8 @@ + # Source function library. + . /etc/init.d/functions + +-# nscd does not run on any kernel lower than 2.2.0 because of threading +-# problems, so we require that in first place. +-case $(uname -r) in +- 2.[2-9].*) +- # this is okay +- ;; +- [3-9]*) +- # these are of course also okay +- ;; +- *) +- #this is not +- exit 1 +- ;; +-esac ++# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS. ++[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd + + RETVAL=0 + prog=nscd +@@ -50,7 +39,7 @@ start () { + [ -d /var/run/nscd ] || mkdir /var/run/nscd + [ -d /var/db/nscd ] || mkdir /var/db/nscd + echo -n $"Starting $prog: " +- daemon /usr/sbin/nscd ++ daemon /usr/sbin/nscd $NSCD_OPTIONS + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd +@@ -83,11 +72,11 @@ restart() { + # See how we were called. + case "$1" in + start) +- start ++ [ -e /var/lock/subsys/nscd ] || start + RETVAL=$? + ;; + stop) +- stop ++ [ ! -e /var/lock/subsys/nscd ] || stop + RETVAL=$? + ;; + status) +@@ -99,14 +88,17 @@ case "$1" in + RETVAL=$? + ;; + try-restart | condrestart) +- [ -e /var/lock/subsys/nscd ] && restart ++ [ ! -e /var/lock/subsys/nscd ] || restart + RETVAL=$? + ;; + force-reload | reload) + echo -n $"Reloading $prog: " +- killproc /usr/sbin/nscd -HUP +- RETVAL=$? +- echo ++ RETVAL=0 ++ /usr/sbin/nscd -i passwd || RETVAL=$? ++ /usr/sbin/nscd -i group || RETVAL=$? ++ /usr/sbin/nscd -i hosts || RETVAL=$? ++ /usr/sbin/nscd -i services || RETVAL=$? ++ echo + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" +diff -Nrup a/nscd/selinux.c b/nscd/selinux.c +--- a/nscd/selinux.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/nscd/selinux.c 2012-06-07 12:15:21.819318667 -0600 +@@ -269,6 +269,18 @@ avc_create_thread (void (*run) (void)) + { + int rc; + ++#if defined HAVE_LIBAUDIT && defined HAVE_LIBCAP ++ if (server_user != NULL && getuid () == 0) ++ { ++ /* We need to preserve the capabilities in the AVC thread. */ ++ if (prctl (PR_SET_KEEPCAPS, 1) == -1) ++ { ++ dbg_log (_("Failed to set keep-capabilities")); ++ error (EXIT_FAILURE, errno, _("prctl(KEEPCAPS) failed")); ++ } ++ } ++#endif ++ + rc = + pthread_create (&avc_notify_thread, NULL, (void *(*) (void *)) run, NULL); + if (rc != 0) +diff -Nrup a/nss/Makefile b/nss/Makefile +--- a/nss/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/nss/Makefile 2012-06-07 12:15:21.819318667 -0600 +@@ -101,6 +101,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf + echo '#include "$<"') > $@.new + mv -f $@.new $@ + ++CFLAGS-files-hosts.c += -fno-strict-aliasing + + $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o) + +diff -Nrup a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c +--- a/nss/nss_files/files-XXX.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/nss/nss_files/files-XXX.c 2012-06-07 12:15:21.819318667 -0600 +@@ -189,7 +189,7 @@ internal_getent (struct STRUCTURE *resul + { + char *p; + struct parser_data *data = (void *) buffer; +- int linebuflen = buffer + buflen - data->linebuffer; ++ size_t linebuflen = buffer + buflen - data->linebuffer; + int parse_result; + + if (buflen < sizeof *data + 2) +diff -Nrup a/posix/Makefile b/posix/Makefile +--- a/posix/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/posix/Makefile 2012-06-07 12:15:21.820318664 -0600 +@@ -305,15 +305,8 @@ $(inst_libexecdir)/getconf: $(inst_bindi + mv -f $@/$$spec.new $@/$$spec; \ + done < $(objpfx)getconf.speclist + +-$(objpfx)getconf.speclist: $(objpfx)getconf +-ifeq (no,$(cross-compiling)) +- LC_ALL=C GETCONF_DIR=/dev/null \ +- $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new +- LC_ALL=C GETCONF_DIR=/dev/null \ +- $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new +- LC_ALL=C GETCONF_DIR=/dev/null \ +- $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new +-else +- > $@.new +-endif ++$(objpfx)getconf.speclist: getconf.speclist.h ++ $(CC) -E $(CFLAGS) $(CPPFLAGS) $< \ ++ | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \ ++ > $@.new + mv -f $@.new $@ +diff -Nrup a/posix/gai.conf b/posix/gai.conf +--- a/posix/gai.conf 2012-06-05 07:42:49.000000000 -0600 ++++ b/posix/gai.conf 2012-06-07 12:15:21.820318664 -0600 +@@ -41,7 +41,7 @@ + # + # precedence + # Add another rule to the RFC 3484 precedence table. See section 2.1 +-# and 10.3 in RFC 3484. The default is: ++# and 10.3 in RFC 3484. The RFC requires: + # + #precedence ::1/128 50 + #precedence ::/0 40 +@@ -58,7 +58,7 @@ + # 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 1918 are equivalent to: + # + #scopev4 ::ffff:169.254.0.0/112 2 + #scopev4 ::ffff:127.0.0.0/104 2 +@@ -75,3 +75,5 @@ + #scopev4 ::ffff:169.254.0.0/112 2 + #scopev4 ::ffff:127.0.0.0/104 2 + #scopev4 ::ffff:0.0.0.0/96 14 ++# ++# This is what the Red Hat setting currently uses. +diff -Nrup a/posix/getconf.speclist.h b/posix/getconf.speclist.h +--- a/posix/getconf.speclist.h 1969-12-31 17:00:00.000000000 -0700 ++++ b/posix/getconf.speclist.h 2012-06-07 12:15:21.820318664 -0600 +@@ -0,0 +1,39 @@ ++#include ++const char *START_OF_STRINGS = ++#if _POSIX_V7_ILP32_OFF32 == 1 ++"POSIX_V7_ILP32_OFF32" ++#endif ++#if _POSIX_V7_ILP32_OFFBIG == 1 ++"POSIX_V7_ILP32_OFFBIG" ++#endif ++#if _POSIX_V7_LP64_OFF64 == 1 ++"POSIX_V7_LP64_OFF64" ++#endif ++#if _POSIX_V7_LPBIG_OFFBIG == 1 ++"POSIX_V7_LPBIG_OFFBIG" ++#endif ++#if _POSIX_V6_ILP32_OFF32 == 1 ++"POSIX_V6_ILP32_OFF32" ++#endif ++#if _POSIX_V6_ILP32_OFFBIG == 1 ++"POSIX_V6_ILP32_OFFBIG" ++#endif ++#if _POSIX_V6_LP64_OFF64 == 1 ++"POSIX_V6_LP64_OFF64" ++#endif ++#if _POSIX_V6_LPBIG_OFFBIG == 1 ++"POSIX_V6_LPBIG_OFFBIG" ++#endif ++#if _XBS5_ILP32_OFF32 == 1 ++"XBS5_ILP32_OFF32" ++#endif ++#if _XBS5_ILP32_OFFBIG == 1 ++"XBS5_ILP32_OFFBIG" ++#endif ++#if _XBS5_LP64_OFF64 == 1 ++"XBS5_LP64_OFF64" ++#endif ++#if _XBS5_LPBIG_OFFBIG == 1 ++"XBS5_LPBIG_OFFBIG" ++#endif ++""; +diff -Nrup a/posix/regcomp.c b/posix/regcomp.c +--- a/posix/regcomp.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/posix/regcomp.c 2012-06-07 12:15:21.821318661 -0600 +@@ -2772,40 +2772,29 @@ parse_bracket_exp (re_string_t *regexp, + + /* Local function for parse_bracket_exp used in _LIBC environement. + Seek the collating symbol entry correspondings to NAME. +- Return the index of the symbol in the SYMB_TABLE. */ ++ Return the index of the symbol in the SYMB_TABLE, ++ or -1 if not found. */ + + auto inline int32_t + __attribute ((always_inline)) +- seek_collating_symbol_entry (name, name_len) +- const unsigned char *name; +- size_t name_len; ++ seek_collating_symbol_entry (const unsigned char *name, size_t name_len) + { +- int32_t hash = elem_hash ((const char *) name, name_len); +- int32_t elem = hash % table_size; +- if (symb_table[2 * elem] != 0) +- { +- int32_t second = hash % (table_size - 2) + 1; ++ int32_t elem; + +- do +- { +- /* First compare the hashing value. */ +- if (symb_table[2 * elem] == hash +- /* Compare the length of the name. */ +- && name_len == extra[symb_table[2 * elem + 1]] +- /* Compare the name. */ +- && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], +- name_len) == 0) +- { +- /* Yep, this is the entry. */ +- break; +- } +- +- /* Next entry. */ +- elem += second; +- } +- while (symb_table[2 * elem] != 0); +- } +- return elem; ++ for (elem = 0; elem < table_size; elem++) ++ if (symb_table[2 * elem] != 0) ++ { ++ int32_t idx = symb_table[2 * elem + 1]; ++ /* Skip the name of collating element name. */ ++ idx += 1 + extra[idx]; ++ if (/* Compare the length of the name. */ ++ name_len == extra[idx] ++ /* Compare the name. */ ++ && memcmp (name, &extra[idx + 1], name_len) == 0) ++ /* Yep, this is the entry. */ ++ return elem; ++ } ++ return -1; + } + + /* Local function for parse_bracket_exp used in _LIBC environment. +@@ -2814,8 +2803,7 @@ parse_bracket_exp (re_string_t *regexp, + + auto inline unsigned int + __attribute ((always_inline)) +- lookup_collation_sequence_value (br_elem) +- bracket_elem_t *br_elem; ++ lookup_collation_sequence_value (bracket_elem_t *br_elem) + { + if (br_elem->type == SB_CHAR) + { +@@ -2843,7 +2831,7 @@ parse_bracket_exp (re_string_t *regexp, + int32_t elem, idx; + elem = seek_collating_symbol_entry (br_elem->opr.name, + sym_name_len); +- if (symb_table[2 * elem] != 0) ++ if (elem != -1) + { + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; +@@ -2861,7 +2849,7 @@ parse_bracket_exp (re_string_t *regexp, + /* Return the collation sequence value. */ + return *(unsigned int *) (extra + idx); + } +- else if (symb_table[2 * elem] == 0 && sym_name_len == 1) ++ else if (sym_name_len == 1) + { + /* No valid character. Match it as a single byte + character. */ +@@ -2883,11 +2871,8 @@ parse_bracket_exp (re_string_t *regexp, + + auto inline reg_errcode_t + __attribute ((always_inline)) +- build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) +- re_charset_t *mbcset; +- int *range_alloc; +- bitset_t sbcset; +- bracket_elem_t *start_elem, *end_elem; ++ build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, ++ bracket_elem_t *start_elem, bracket_elem_t *end_elem) + { + unsigned int ch; + uint32_t start_collseq; +@@ -2966,25 +2951,22 @@ parse_bracket_exp (re_string_t *regexp, + + auto inline reg_errcode_t + __attribute ((always_inline)) +- build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) +- re_charset_t *mbcset; +- int *coll_sym_alloc; +- bitset_t sbcset; +- const unsigned char *name; ++ build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, ++ int *coll_sym_alloc, const unsigned char *name) + { + int32_t elem, idx; + size_t name_len = strlen ((const char *) name); + if (nrules != 0) + { + elem = seek_collating_symbol_entry (name, name_len); +- if (symb_table[2 * elem] != 0) ++ if (elem != -1) + { + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + } +- else if (symb_table[2 * elem] == 0 && name_len == 1) ++ else if (name_len == 1) + { + /* No valid character, treat it as a normal + character. */ +diff -Nrup a/resolv/Makefile b/resolv/Makefile +--- a/resolv/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/resolv/Makefile 2012-06-07 12:15:21.822318657 -0600 +@@ -80,6 +80,7 @@ ifeq (yes,$(have-ssp)) + CFLAGS-libresolv += -fstack-protector + endif + CFLAGS-res_hconf.c = -fexceptions ++CFLAGS-res_send.c += -fno-strict-aliasing + + # The BIND code elicits some harmless warnings. + +cflags += -Wno-strict-prototypes -Wno-write-strings +diff -Nrup a/resource/getrlimit.c b/resource/getrlimit.c +--- a/resource/getrlimit.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/resource/getrlimit.c 2012-06-07 12:15:21.823318653 -0600 +@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource reso + __set_errno (ENOSYS); + return -1; + } ++libc_hidden_def (__getrlimit) + weak_alias (__getrlimit, getrlimit) + + stub_warning (getrlimit) +diff -Nrup a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c +--- a/stdio-common/vfprintf.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/stdio-common/vfprintf.c 2012-06-07 12:15:21.823318653 -0600 +@@ -1168,42 +1168,9 @@ vfprintf (FILE *s, const CHAR_T *format, + else if (!is_long && spec != L_('S')) \ + { \ + if (prec != -1) \ +- { \ +- /* Search for the end of the string, but don't search past \ +- the length (in bytes) specified by the precision. Also \ +- don't use incomplete characters. */ \ +- if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \ +- len = __strnlen (string, prec); \ +- else \ +- { \ +- /* In case we have a multibyte character set the \ +- situation is more complicated. We must not copy \ +- bytes at the end which form an incomplete character. */\ +- size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\ +- wchar_t ignore[ignore_size]; \ +- const char *str2 = string; \ +- const char *strend = string + prec; \ +- if (strend < string) \ +- strend = (const char *) UINTPTR_MAX; \ +- \ +- mbstate_t ps; \ +- memset (&ps, '\0', sizeof (ps)); \ +- \ +- while (str2 != NULL && str2 < strend) \ +- if (__mbsnrtowcs (ignore, &str2, strend - str2, \ +- ignore_size, &ps) == (size_t) -1) \ +- { \ +- /* Conversion function has set errno. */ \ +- done = -1; \ +- goto all_done; \ +- } \ +- \ +- if (str2 == NULL) \ +- len = strlen (string); \ +- else \ +- len = str2 - string - (ps.__count & 7); \ +- } \ +- } \ ++ /* Search for th eend of the string, but don't search past \ ++ the length (in bytes) specified by the precision. */ \ ++ len = __strnlen (string, prec); \ + else \ + len = strlen (string); \ + } \ +diff -Nrup a/streams/Makefile b/streams/Makefile +--- a/streams/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/streams/Makefile 2012-06-07 12:15:21.824318649 -0600 +@@ -20,7 +20,7 @@ + # + subdir := streams + +-headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h ++#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h + routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach + + include ../Rules +diff -Nrup a/sunrpc/Makefile b/sunrpc/Makefile +--- a/sunrpc/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/sunrpc/Makefile 2012-06-07 12:15:21.825318645 -0600 +@@ -52,7 +52,7 @@ headers-in-tirpc = $(addprefix rpc/,auth + des_crypt.h) + headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ + $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h +-headers = rpc/netdb.h ++headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc) + install-others = $(inst_sysconfdir)/rpc + generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ + $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen +@@ -150,6 +150,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_ + CPPFLAGS += $(sunrpc-CPPFLAGS) + BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS) + ++CFLAGS-clnt_tcp.c += -fno-strict-aliasing ++CFLAGS-clnt_udp.c += -fno-strict-aliasing ++CFLAGS-clnt_unix.c += -fno-strict-aliasing ++ + $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so + $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so + $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so +diff -Nrup a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h +--- a/sysdeps/generic/dl-cache.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/generic/dl-cache.h 2012-06-07 12:15:21.825318645 -0600 +@@ -35,6 +35,14 @@ + # define add_system_dir(dir) add_dir (dir) + #endif + ++#ifndef arch_startup ++# define arch_startup(argc, argv) do { } while (0) ++#endif ++ ++#ifndef add_arch_dirs ++# define add_arch_dirs(config_file) do { } while (0) ++#endif ++ + #define CACHEMAGIC "ld.so-1.7.0" + + /* libc5 and glibc 2.0/2.1 use the same format. For glibc 2.2 another +diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile +--- a/sysdeps/i386/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/i386/Makefile 2012-06-07 12:15:21.826318641 -0600 +@@ -2,6 +2,8 @@ + # Every i386 port in use uses gas syntax (I think). + asm-CPPFLAGS += -DGAS_SYNTAX + ++sysdep-ASFLAGS += -U__i686 ++ + # The i386 `long double' is a distinct type we support. + long-double-fcts = yes + +@@ -62,6 +64,14 @@ endif + + ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS))) + defines += -DNO_TLS_DIRECT_SEG_REFS ++else ++# .a libraries are not performance critical and so we ++# build them without direct TLS segment references ++# always. ++CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS ++CFLAGS-.o += -mno-tls-direct-seg-refs ++CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS ++CFLAGS-.oS += -mno-tls-direct-seg-refs + endif + + ifeq ($(subdir),elf) +diff -Nrup a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile +--- a/sysdeps/i386/i686/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/i386/i686/Makefile 2012-06-07 12:15:21.826318641 -0600 +@@ -9,19 +9,3 @@ stack-align-test-flags += -msse + ifeq ($(subdir),string) + sysdep_routines += cacheinfo + endif +- +-ifeq (yes,$(config-asflags-i686)) +-CFLAGS-.o += -Wa,-mtune=i686 +-CFLAGS-.os += -Wa,-mtune=i686 +-CFLAGS-.op += -Wa,-mtune=i686 +-CFLAGS-.og += -Wa,-mtune=i686 +-CFLAGS-.ob += -Wa,-mtune=i686 +-CFLAGS-.oS += -Wa,-mtune=i686 +- +-ASFLAGS-.o += -Wa,-mtune=i686 +-ASFLAGS-.os += -Wa,-mtune=i686 +-ASFLAGS-.op += -Wa,-mtune=i686 +-ASFLAGS-.og += -Wa,-mtune=i686 +-ASFLAGS-.ob += -Wa,-mtune=i686 +-ASFLAGS-.oS += -Wa,-mtune=i686 +-endif +diff -Nrup a/sysdeps/ia64/libgcc-compat.c b/sysdeps/ia64/libgcc-compat.c +--- a/sysdeps/ia64/libgcc-compat.c 1969-12-31 17:00:00.000000000 -0700 ++++ b/sysdeps/ia64/libgcc-compat.c 2012-06-07 12:15:21.826318641 -0600 +@@ -0,0 +1,84 @@ ++/* pre-.hidden libgcc compatibility ++ Copyright (C) 2002 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ 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. */ ++ ++ ++#include ++#include ++ ++#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6) ++ ++typedef int int128_t __attribute__((__mode__(TI))); ++ ++extern long double __divtf3 (long double, long double) attribute_hidden; ++long double INTUSE (__divtf3) (long double x, long double y) ++{ ++ return __divtf3 (x, y); ++} ++symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2); ++ ++extern double __divdf3 (double, double) attribute_hidden; ++double INTUSE (__divdf3) (double x, double y) ++{ ++ return __divdf3 (x, y); ++} ++symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2); ++ ++extern float __divsf3 (float, float) attribute_hidden; ++float INTUSE (__divsf3) (float x, float y) ++{ ++ return __divsf3 (x, y); ++} ++symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2); ++ ++extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden; ++int64_t INTUSE (__divdi3) (int64_t x, int64_t y) ++{ ++ return __divdi3 (x, y); ++} ++symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2); ++ ++extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden; ++int64_t INTUSE (__moddi3) (int64_t x, int64_t y) ++{ ++ return __moddi3 (x, y); ++} ++symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2); ++ ++extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden; ++uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y) ++{ ++ return __udivdi3 (x, y); ++} ++symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2); ++ ++extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden; ++uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y) ++{ ++ return __umoddi3 (x, y); ++} ++symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2); ++ ++extern int128_t __multi3 (int128_t, int128_t) attribute_hidden; ++int128_t INTUSE (__multi3) (int128_t x, int128_t y) ++{ ++ return __multi3 (x, y); ++} ++symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2); ++ ++#endif +diff -Nrup a/sysdeps/mach/hurd/getrlimit.c b/sysdeps/mach/hurd/getrlimit.c +--- a/sysdeps/mach/hurd/getrlimit.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/mach/hurd/getrlimit.c 2012-06-07 12:15:21.826318641 -0600 +@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource reso + + return 0; + } ++libc_hidden_def (__getrlimit) + weak_alias (__getrlimit, getrlimit) +diff -Nrup a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +--- a/sysdeps/posix/getaddrinfo.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/posix/getaddrinfo.c 2012-06-07 12:15:21.827318637 -0600 +@@ -565,8 +565,8 @@ gaih_inet (const char *name, const struc + + /* If we do not have to look for IPv6 addresses, use + the simple, old functions, which do not support +- IPv6 scope ids. */ +- if (req->ai_family == AF_INET) ++ IPv6 scope ids, nor retrieving the canonical name. */ ++ if (req->ai_family == AF_INET && (req->ai_flags & AI_CANONNAME) == 0) + { + size_t tmpbuflen = 512; + assert (tmpbuf == NULL); +@@ -1105,68 +1105,10 @@ gaih_inet (const char *name, const struc + /* Only the first entry gets the canonical name. */ + if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0) + { +- char *tmpbuf2 = NULL; +- bool malloc_tmpbuf2 = false; +- + if (canon == NULL) +- { +- struct hostent *h = NULL; +- int herrno; +- struct hostent th; +- size_t tmpbuf2len = 512; +- +- do +- { +- if (__libc_use_alloca (alloca_used + 2 * tmpbuf2len)) +- tmpbuf2 = extend_alloca_account (tmpbuf2, tmpbuf2len, +- tmpbuf2len * 2, +- alloca_used); +- else +- { +- char *newp = realloc (malloc_tmpbuf2 ? tmpbuf2 : NULL, +- 2 * tmpbuf2len); +- if (newp == NULL) +- { +- if (malloc_tmpbuf2) +- free (tmpbuf2); +- result = -EAI_MEMORY; +- goto free_and_return; +- } +- +- tmpbuf2 = newp; +- tmpbuf2len = 2 * tmpbuf2len; +- malloc_tmpbuf2 = true; +- } +- +- rc = __gethostbyaddr_r (at2->addr, +- ((at2->family == AF_INET6) +- ? sizeof (struct in6_addr) +- : sizeof (struct in_addr)), +- at2->family, &th, tmpbuf2, +- tmpbuf2len, &h, &herrno); +- } +- while (rc == ERANGE && herrno == NETDB_INTERNAL); +- +- if (rc != 0 && herrno == NETDB_INTERNAL) +- { +- if (malloc_tmpbuf2) +- free (tmpbuf2); +- +- __set_h_errno (herrno); +- result = -EAI_SYSTEM; +- goto free_and_return; +- } +- +- if (h != NULL) +- canon = h->h_name; +- else +- { +- assert (orig_name != NULL); +- /* If the canonical name cannot be determined, use +- the passed in string. */ +- canon = orig_name; +- } +- } ++ /* If the canonical name cannot be determined, use ++ the passed in string. */ ++ canon = orig_name; + + #ifdef HAVE_LIBIDN + if (req->ai_flags & AI_CANONIDN) +@@ -1181,9 +1123,6 @@ gaih_inet (const char *name, const struc + int rc = __idna_to_unicode_lzlz (canon, &out, idn_flags); + if (rc != IDNA_SUCCESS) + { +- if (malloc_tmpbuf2) +- free (tmpbuf2); +- + if (rc == IDNA_MALLOC_ERROR) + result = -EAI_MEMORY; + else if (rc == IDNA_DLOPEN_ERROR) +@@ -1213,17 +1152,11 @@ gaih_inet (const char *name, const struc + canon = strdup (canon); + if (canon == NULL) + { +- if (malloc_tmpbuf2) +- free (tmpbuf2); +- + result = -EAI_MEMORY; + goto free_and_return; + } + } + } +- +- if (malloc_tmpbuf2) +- free (tmpbuf2); + } + + family = at2->family; +@@ -1360,10 +1293,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 -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile +--- a/sysdeps/powerpc/powerpc64/Makefile 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/powerpc/powerpc64/Makefile 2012-06-07 12:15:21.828318633 -0600 +@@ -35,6 +35,9 @@ CFLAGS-rtld-memmove.os = $(no-special-re + CFLAGS-rtld-memchr.os = $(no-special-regs) + CFLAGS-rtld-strnlen.os = $(no-special-regs) + ++CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables ++CFLAGS-gmon-start.c = -fno-strict-aliasing ++ + ifeq ($(subdir),csu) + sysdep_routines += hp-timing + elide-routines.os += hp-timing +diff -Nrup a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16-utf32-z9.c +--- a/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c 2012-06-07 12:15:21.829318630 -0600 +@@ -168,10 +168,7 @@ gconv_end (struct __gconv_step *data) + register unsigned long long outlen asm("11") = outend - outptr; \ + uint64_t cc = 0; \ + \ +- asm volatile (".machine push \n\t" \ +- ".machine \"z9-109\" \n\t" \ +- "0: " INSTRUCTION " \n\t" \ +- ".machine pop \n\t" \ ++ asm volatile ("0: " INSTRUCTION " \n\t" \ + " jo 0b \n\t" \ + " ipm %2 \n" \ + : "+a" (pOutput), "+a" (pInput), "+d" (cc), \ +diff -Nrup a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c +--- a/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c 2012-06-07 12:15:21.829318630 -0600 +@@ -150,10 +150,7 @@ gconv_end (struct __gconv_step *data) + register unsigned long long outlen asm("11") = outend - outptr; \ + uint64_t cc = 0; \ + \ +- asm volatile (".machine push \n\t" \ +- ".machine \"z9-109\" \n\t" \ +- "0: " INSTRUCTION " \n\t" \ +- ".machine pop \n\t" \ ++ asm volatile ("0: " INSTRUCTION " \n\t" \ + " jo 0b \n\t" \ + " ipm %2 \n" \ + : "+a" (pOutput), "+a" (pInput), "+d" (cc), \ +diff -Nrup a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-utf32-z9.c +--- a/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c 2012-06-07 12:15:21.829318630 -0600 +@@ -154,10 +154,7 @@ gconv_end (struct __gconv_step *data) + register unsigned long long outlen asm("11") = outend - outptr; \ + uint64_t cc = 0; \ + \ +- asm volatile (".machine push \n\t" \ +- ".machine \"z9-109\" \n\t" \ +- "0: " INSTRUCTION " \n\t" \ +- ".machine pop \n\t" \ ++ asm volatile ("0: " INSTRUCTION " \n\t" \ + " jo 0b \n\t" \ + " ipm %2 \n" \ + : "+a" (pOutput), "+a" (pInput), "+d" (cc), \ +diff -Nrup a/sysdeps/unix/nice.c b/sysdeps/unix/nice.c +--- a/sysdeps/unix/nice.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/nice.c 2012-06-07 12:15:21.829318630 -0600 +@@ -41,7 +41,12 @@ nice (int incr) + __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 -Nrup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c +--- a/sysdeps/unix/sysv/linux/check_pf.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-06-07 12:15:21.830318627 -0600 +@@ -26,16 +26,14 @@ + #include + #include + +-#include +-#include +-#include +- + #include + #include + #include + #include + #include + ++#include "netlinkaccess.h" ++ + + #ifndef IFA_F_HOMEADDRESS + # define IFA_F_HOMEADDRESS 0 +diff -Nrup a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c +--- a/sysdeps/unix/sysv/linux/futimesat.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/futimesat.c 2012-06-07 12:15:21.830318627 -0600 +@@ -36,14 +36,14 @@ futimesat (fd, file, tvp) + { + int result; + ++ if (file == NULL) ++ return __futimes (fd, tvp); ++ + #ifdef __NR_futimesat + # ifndef __ASSUME_ATFCTS + if (__have_atfcts >= 0) + # endif + { +- if (file == NULL) +- return __futimes (fd, tvp); +- + result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp); + # ifndef __ASSUME_ATFCTS + if (result == -1 && errno == ENOSYS) +@@ -57,22 +57,7 @@ futimesat (fd, file, tvp) + #ifndef __ASSUME_ATFCTS + char *buf = NULL; + +- if (file == NULL) +- { +- static const char procfd[] = "/proc/self/fd/%d"; +- /* Buffer for the path name we are going to use. It consists of +- - the string /proc/self/fd/ +- - the file descriptor number. +- The final NUL is included in the sizeof. A bit of overhead +- due to the format elements compensates for possible negative +- numbers. */ +- size_t buflen = sizeof (procfd) + sizeof (int) * 3; +- buf = alloca (buflen); +- +- __snprintf (buf, buflen, procfd, fd); +- file = buf; +- } +- else if (fd != AT_FDCWD && file[0] != '/') ++ if (fd != AT_FDCWD && file[0] != '/') + { + size_t filelen = strlen (file); + if (__builtin_expect (filelen == 0, 0)) +diff -Nrup a/sysdeps/unix/sysv/linux/i386/dl-cache.h b/sysdeps/unix/sysv/linux/i386/dl-cache.h +--- a/sysdeps/unix/sysv/linux/i386/dl-cache.h 1969-12-31 17:00:00.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/i386/dl-cache.h 2012-06-07 12:15:21.830318627 -0600 +@@ -0,0 +1,59 @@ ++/* Support for reading /etc/ld.so.cache files written by Linux ldconfig. ++ Copyright (C) 2004 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ 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. */ ++ ++static inline int ++is_ia64 (void) ++{ ++ unsigned int fl1, fl2; ++ ++ /* See if we can use cpuid. */ ++ __asm__ ("pushfl; pushfl; popl %0; movl %0,%1; xorl %2,%0;" ++ "pushl %0; popfl; pushfl; popl %0; popfl" ++ : "=&r" (fl1), "=&r" (fl2) ++ : "i" (0x00200000)); ++ if (((fl1 ^ fl2) & 0x00200000) == 0) ++ return 0; ++ ++ /* Host supports cpuid. See if cpuid gives capabilities, try ++ CPUID(0). Preserve %ebx and %ecx; cpuid insn clobbers these, we ++ don't need their CPUID values here, and %ebx may be the PIC ++ register. */ ++ __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx" ++ : "=a" (fl1) : "0" (0) : "edx", "cc"); ++ if (fl1 == 0) ++ return 0; ++ ++ /* Invoke CPUID(1), return %edx; caller can examine bits to ++ determine what's supported. */ ++ __asm__ ("pushl %%ecx; pushl %%ebx; cpuid; popl %%ebx; popl %%ecx" ++ : "=d" (fl2), "=a" (fl1) : "1" (1) : "cc"); ++ return (fl2 & (1 << 30)) != 0; ++} ++ ++#define arch_startup(argc, argv) \ ++ do { \ ++ /* On IA-64, try to execute 64-bit ldconfig if possible. \ ++ This is because the badly designed /emul/ia32-linux hack \ ++ will cause 32-bit ldconfig to do all sorts of weird things. */ \ ++ if (is_ia64 ()) \ ++ execv ("/emul/ia32-linux/../../sbin/ldconfig", \ ++ (char *const *) argv); \ ++ } while (0) ++ ++#include_next +diff -Nrup a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/sysdeps/unix/sysv/linux/i386/getrlimit.c +--- a/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c 2012-06-07 12:15:21.830318627 -0600 +@@ -35,4 +35,5 @@ __new_getrlimit (enum __rlimit_resource + } + + weak_alias (__new_getrlimit, __getrlimit); ++libc_hidden_weak (__getrlimit) + versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2); +diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c +--- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 1969-12-31 17:00:00.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2012-06-07 12:15:21.831318623 -0600 +@@ -0,0 +1,5 @@ ++#ifdef IS_IN_ldconfig ++#include ++#else ++#include ++#endif +diff -Nrup a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h +--- a/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 1969-12-31 17:00:00.000000000 -0700 ++++ b/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2012-06-07 12:15:21.831318623 -0600 +@@ -0,0 +1,5 @@ ++#ifdef IS_IN_ldconfig ++#include ++#else ++#include ++#endif +diff -Nrup a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h +--- a/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/netlinkaccess.h 2012-06-07 12:15:21.831318623 -0600 +@@ -24,6 +24,24 @@ + + #include + ++#ifndef IFA_MAX ++/* 2.6.19 kernel headers helpfully removed some macros and ++ moved lots of stuff into new headers, some of which aren't ++ included by linux/rtnetlink.h. */ ++#include ++#endif ++ ++#ifndef IFA_RTA ++# define IFA_RTA(r) \ ++ ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg)))) ++# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg)) ++#endif ++ ++#ifndef IFLA_RTA ++# define IFLA_RTA(r) \ ++ ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg)))) ++# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg)) ++#endif + + struct netlink_res + { +diff -Nrup a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h +--- a/sysdeps/unix/sysv/linux/paths.h 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/paths.h 2012-06-07 12:15:21.831318623 -0600 +@@ -62,7 +62,7 @@ + #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. */ +diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c +--- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-05 07:42:49.000000000 -0600 ++++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-07 12:15:21.831318623 -0600 +@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios + { + struct __kernel_termios k_termios; + unsigned long int cmd; ++ int retval; + + switch (optional_actions) + { +@@ -79,6 +80,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-find-requires.sh b/glibc-find-requires.sh deleted file mode 100755 index 241e4e4..0000000 --- a/glibc-find-requires.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/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-no-leaf-attribute.patch b/glibc-no-leaf-attribute.patch new file mode 100644 index 0000000..bc7626a --- /dev/null +++ b/glibc-no-leaf-attribute.patch @@ -0,0 +1,36 @@ +--- glibc-2.15-a316c1f/misc/sys/cdefs.h.orig 2012-02-11 15:42:05.510993089 -0200 ++++ glibc-2.15-a316c1f/misc/sys/cdefs.h 2012-02-11 15:42:48.358183501 -0200 +@@ -38,30 +38,20 @@ + + #ifdef __GNUC__ + +-/* All functions, except those with callbacks or those that +- synchronize memory, are leaf functions. */ +-# if __GNUC_PREREQ (4, 6) && !defined _LIBC +-# define __LEAF , __leaf__ +-# define __LEAF_ATTR __attribute__ ((__leaf__)) +-# else +-# define __LEAF +-# define __LEAF_ATTR +-# endif +- + /* GCC can always grok prototypes. For C++ programs we add throw() + to help it optimize the function calls. But this works only with + gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions + as non-throwing using a function attribute since programs can use + the -fexceptions options for C code as well. */ + # if !defined __cplusplus && __GNUC_PREREQ (3, 3) +-# define __THROW __attribute__ ((__nothrow__ __LEAF)) ++# define __THROW __attribute__ ((__nothrow__)) + # define __THROWNL __attribute__ ((__nothrow__)) +-# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct ++# define __NTH(fct) __attribute__ ((__nothrow__)) fct + # else + # if defined __cplusplus && __GNUC_PREREQ (2,8) + # define __THROW throw () + # define __THROWNL throw () +-# define __NTH(fct) __LEAF_ATTR fct throw () ++# define __NTH(fct) fct throw () + # else + # define __THROW + # define __THROWNL diff --git a/glibc-ports-2.16.0.tar.xz.sig b/glibc-ports-2.16.0.tar.xz.sig new file mode 100644 index 0000000..46bed94 --- /dev/null +++ b/glibc-ports-2.16.0.tar.xz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iQEcBAABAgAGBQJP71okAAoJECXvCkNsKkr/sNQIAL9cDaYqmOuvl2dNQoAgZxHW +43BhiOG3gOSGzooEGFSwJZdR1QlT8Nk9/SMIpiR6m5v6EzT/UjmpXE9l8FgwR31X +aXZDGqWy+kvpAkPh+xGzPVTaGHHifuGTUQQctiEMfMiGdjl9sSV42YpTARb//xgE +qPA2MhBWZOCjJgY9D4rGlV9sopZ99jbntv69O0RcKDGNrciGE/DuuXXmLtnfSI3F +XxpZWVZMNUQDU73bWXCCbe/agVOmmvGz0SY9T+RA1ui4XBk705m+9JrWqe00xqJi +t9UkjU7DsTZ86q+lnCTMV4/LpAehUsgKYJnzgraI1t/bxrHZQk3BsmPqhxScO1Y= +=4OMI +-----END PGP SIGNATURE----- diff --git a/glibc-post-wrapper.c b/glibc-post-wrapper.c deleted file mode 100644 index b896ad0..0000000 --- a/glibc-post-wrapper.c +++ /dev/null @@ -1,141 +0,0 @@ -/* 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-rh179072.patch b/glibc-rh179072.patch new file mode 100644 index 0000000..d17fd13 --- /dev/null +++ b/glibc-rh179072.patch @@ -0,0 +1,157 @@ +diff -Nrup a/elf/dl-close.c b/elf/dl-close.c +--- a/elf/dl-close.c 2012-01-25 21:49:58.892869984 -0700 ++++ b/elf/dl-close.c 2012-01-25 21:50:22.283882509 -0700 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + + /* Type of the constructor functions. */ +@@ -469,6 +470,7 @@ _dl_close_worker (struct link_map *map) + struct r_debug *r = _dl_debug_initialize (0, nsid); + r->r_state = RT_DELETE; + _dl_debug_state (); ++ LIBC_PROBE (rtld_unmap_start, 2, nsid, r); + + if (unload_global) + { +@@ -738,6 +740,7 @@ _dl_close_worker (struct link_map *map) + /* Notify the debugger those objects are finalized and gone. */ + r->r_state = RT_CONSISTENT; + _dl_debug_state (); ++ LIBC_PROBE (rtld_unmap_complete, 2, nsid, r); + + /* Recheck if we need to retry, release the lock. */ + out: +diff -Nrup a/elf/dl-load.c b/elf/dl-load.c +--- a/elf/dl-load.c 2012-01-25 21:49:58.895869986 -0700 ++++ b/elf/dl-load.c 2012-01-25 21:50:22.288882511 -0700 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + +@@ -881,7 +882,7 @@ _dl_init_paths (const char *llp) + static void + __attribute__ ((noreturn, noinline)) + lose (int code, int fd, const char *name, char *realname, struct link_map *l, +- const char *msg, struct r_debug *r) ++ const char *msg, struct r_debug *r, Lmid_t nsid) + { + /* The file might already be closed. */ + if (fd != -1) +@@ -895,6 +896,7 @@ lose (int code, int fd, const char *name + { + r->r_state = RT_CONSISTENT; + _dl_debug_state (); ++ LIBC_PROBE (rtld_map_complete, 2, nsid, r); + } + + _dl_signal_error (code, name, NULL, msg); +@@ -933,7 +935,7 @@ _dl_map_object_from_fd (const char *name + errval = errno; + call_lose: + lose (errval, fd, name, realname, l, errstring, +- make_consistent ? r : NULL); ++ make_consistent ? r : NULL, nsid); + } + + /* Look again to see if the real name matched another already loaded. */ +@@ -1040,6 +1042,7 @@ _dl_map_object_from_fd (const char *name + linking has not been used before. */ + r->r_state = RT_ADD; + _dl_debug_state (); ++ LIBC_PROBE (rtld_map_start, 2, nsid, r); + make_consistent = true; + } + else +@@ -1735,7 +1738,7 @@ open_verify (const char *name, struct fi + name = strdupa (realname); + free (realname); + } +- lose (errval, fd, name, NULL, NULL, errstring, NULL); ++ lose (errval, fd, name, NULL, NULL, errstring, NULL, 0); + } + + /* See whether the ELF header is what we expect. */ +diff -Nrup a/elf/dl-open.c b/elf/dl-open.c +--- a/elf/dl-open.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-open.c 2012-01-25 21:50:22.291882514 -0700 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include + +@@ -292,6 +293,7 @@ dl_open_worker (void *a) + struct r_debug *r = _dl_debug_initialize (0, args->nsid); + r->r_state = RT_CONSISTENT; + _dl_debug_state (); ++ LIBC_PROBE (rtld_map_complete, 2, args->nsid, r); + + /* Print scope information. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0)) +@@ -308,10 +310,18 @@ dl_open_worker (void *a) + struct link_map *l = new; + while (l->l_next) + l = l->l_next; ++ int relocation_in_progress = 0; + while (1) + { + if (! l->l_real->l_relocated) + { ++ if (! relocation_in_progress) ++ { ++ /* Notify the debugger that relocations are about to happen. */ ++ LIBC_PROBE (rtld_reloc_start, 2, args->nsid, r); ++ relocation_in_progress = 1; ++ } ++ + #ifdef SHARED + if (__builtin_expect (GLRO(dl_profile) != NULL, 0)) + { +@@ -481,6 +491,10 @@ cannot load any more object with static + } + } + ++ /* Notify the debugger all new objects have been relocated. */ ++ if (relocation_in_progress) ++ LIBC_PROBE (rtld_reloc_complete, 2, args->nsid, r); ++ + /* Run the initializer functions of new objects. */ + _dl_init (new, args->argc, args->argv, args->env); + +diff -Nrup a/elf/rtld.c b/elf/rtld.c +--- a/elf/rtld.c 2012-01-25 21:49:58.898869987 -0700 ++++ b/elf/rtld.c 2012-01-25 21:53:42.262987201 -0700 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -1670,6 +1671,7 @@ ERROR: ld.so: object '%s' cannot be load + /* We start adding objects. */ + r->r_state = RT_ADD; + _dl_debug_state (); ++ LIBC_PROBE (rtld_init_start, 2, LM_ID_BASE, r); + + /* Auditing checkpoint: we are ready to signal that the initial map + is being constructed. */ +@@ -2382,6 +2384,7 @@ ERROR: ld.so: object '%s' cannot be load + r = _dl_debug_initialize (0, LM_ID_BASE); + r->r_state = RT_CONSISTENT; + _dl_debug_state (); ++ LIBC_PROBE (rtld_init_complete, 2, LM_ID_BASE, r); + + #ifndef MAP_COPY + /* We must munmap() the cache file. */ diff --git a/glibc-rh564528.patch b/glibc-rh564528.patch new file mode 100644 index 0000000..326157a --- /dev/null +++ b/glibc-rh564528.patch @@ -0,0 +1,12 @@ +diff -rup a/manual/stdio.texi b/manual/stdio.texi +--- a/manual/stdio.texi 2012-01-01 05:16:32.000000000 -0700 ++++ b/manual/stdio.texi 2012-02-09 23:46:31.660912211 -0700 +@@ -2324,6 +2324,8 @@ the @var{size} argument specifies the ma + produce. The trailing null character is counted towards this limit, so + you should allocate at least @var{size} characters for the string @var{s}. + ++The trailing null byte is added to @var{s}, unless @var{size} is zero. ++ + The return value is the number of characters which would be generated + for the given input, excluding the trailing null. If this value is + greater or equal to @var{size}, not all characters from the result have diff --git a/glibc-rh657588.patch b/glibc-rh657588.patch new file mode 100644 index 0000000..80ba5e8 --- /dev/null +++ b/glibc-rh657588.patch @@ -0,0 +1,20 @@ +diff -rup a/localedata/locales/zh_CN b/localedata/locales/zh_CN +--- a/localedata/locales/zh_CN 2006-07-30 16:19:43.000000000 -0600 ++++ b/localedata/locales/zh_CN 2012-01-30 21:24:46.905115483 -0700 +@@ -108,11 +108,11 @@ day "";/ + "";/ + "" + +-abmon "";"";/ +- "";"";/ +- "";"";/ +- "";"";/ +- "";"";/ ++abmon "";"";/ ++ "";"";/ ++ "";"";/ ++ "";"";/ ++ "";"";/ + "";"" + + mon "";"";"";/ diff --git a/glibc-rh688948.patch b/glibc-rh688948.patch new file mode 100644 index 0000000..f067a80 --- /dev/null +++ b/glibc-rh688948.patch @@ -0,0 +1,37 @@ +diff -rNup a/fedora/glibc_post_upgrade.c b/fedora/glibc_post_upgrade.c +--- a/fedora/glibc_post_upgrade.c 2011-10-19 05:04:41.000000000 -0600 ++++ b/fedora/glibc_post_upgrade.c 2012-02-06 11:02:03.236713830 -0700 +@@ -60,6 +60,7 @@ is_ia64 (void) + int + main (void) + { ++ struct stat statbuf; + char initpath[256]; + + char buffer[4096]; +@@ -170,12 +171,24 @@ main (void) + || ((!!access ("/dev/initctl", F_OK)) + ^ !access ("/sbin/initctl", X_OK))) + _exit (0); ++ + /* Check if we are not inside of some chroot, because we'd just +- timeout and leave /etc/initrunlvl. */ ++ timeout and leave /etc/initrunlvl. ++ ++ On more modern systems this test is not sufficient to detect ++ if we're in a chroot. */ + if (readlink ("/proc/1/exe", initpath, 256) <= 0 || + readlink ("/proc/1/root", initpath, 256) <= 0) + _exit (0); + ++ /* Here's another well known way to detect chroot, at least on an ++ ext and xfs filesystems and assuming nothing mounted on the chroot's ++ root. */ ++ if (stat ("/", &statbuf) != 0 ++ || (statbuf.st_ino != 2 ++ && statbuf.st_ino != 128)) ++ _exit (0); ++ + if (check_elf ("/proc/1/exe")) + verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u"); + diff --git a/glibc-rh691912.patch b/glibc-rh691912.patch new file mode 100644 index 0000000..53a968e --- /dev/null +++ b/glibc-rh691912.patch @@ -0,0 +1,11 @@ +diff -rup a/sunrpc/etc.rpc b/sunrpc/etc.rpc +--- a/sunrpc/etc.rpc 2012-01-01 05:16:32.000000000 -0700 ++++ b/sunrpc/etc.rpc 2012-02-03 14:24:45.615462110 -0700 +@@ -62,6 +62,7 @@ sadmind 100232 + nisd 100300 rpc.nisd + nispasswd 100303 rpc.nispasswdd + ufsd 100233 ufsd ++fedfs_admin 100418 + pcnfsd 150001 pcnfs + amd 300019 amq + sgi_fam 391002 fam diff --git a/glibc-rh697149.patch b/glibc-rh697149.patch new file mode 100644 index 0000000..e94e0a7 --- /dev/null +++ b/glibc-rh697149.patch @@ -0,0 +1,14 @@ +diff -rup a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c +--- a/sysdeps/unix/sysv/linux/check_pf.c 2012-02-16 22:51:17.148797741 -0700 ++++ b/sysdeps/unix/sysv/linux/check_pf.c 2012-02-17 10:55:26.513139941 -0700 +@@ -209,7 +209,8 @@ make_request (int fd, pid_t pid) + } + else + { +- if (!IN6_IS_ADDR_LOOPBACK (address)) ++ if (!IN6_IS_ADDR_LOOPBACK (address) ++ && !IN6_IS_ADDR_LINKLOCAL (address)) + seen_ipv6 = true; + } + } +Only in b/sysdeps/x86_64: .dl-trampoline.S.swp diff --git a/glibc-rh697421.patch b/glibc-rh697421.patch new file mode 100644 index 0000000..961c805 --- /dev/null +++ b/glibc-rh697421.patch @@ -0,0 +1,10 @@ +diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules +--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600 ++++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700 +@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8// + alias OSF10010004// HP-GREEK8// + module HP-GREEK8// INTERNAL HP-GREEK8 1 + module INTERNAL HP-GREEK8// HP-GREEK8 1 ++ ++alias ISO-10646-UCS-2// UNICODE// ++alias ISO-10646-UCS-2// ISO-10646/UTF8/ diff --git a/glibc-rh730856.patch b/glibc-rh730856.patch new file mode 100644 index 0000000..14270ed --- /dev/null +++ b/glibc-rh730856.patch @@ -0,0 +1,52 @@ +diff -rup a/resolv/res_query.c b/resolv/res_query.c +--- a/resolv/res_query.c 2012-02-16 22:51:17.451796009 -0700 ++++ b/resolv/res_query.c 2012-02-16 22:54:42.522623598 -0700 +@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp, + int *resplen2) + { + HEADER *hp = (HEADER *) answer; ++ HEADER *hp2; + int n, use_malloc = 0; + u_int oflags = statp->_flags; + +@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp, + /* __libc_res_nsend might have reallocated the buffer. */ + hp = (HEADER *) *answerp; + +- /* We simplify the following tests by assigning HP to HP2. It +- is easy to verify that this is the same as ignoring all +- tests of HP2. */ +- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp; +- +- if (n < (int) sizeof (HEADER) && answerp2 != NULL +- && *resplen2 > (int) sizeof (HEADER)) ++ /* We simplify the following tests by assigning HP to HP2 or ++ vice versa. It is easy to verify that this is the same as ++ ignoring all tests of HP or HP2. */ ++ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER)) + { +- /* Special case of partial answer. */ +- assert (hp != hp2); +- hp = hp2; ++ hp2 = hp; + } +- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER) +- && n > (int) sizeof (HEADER)) ++ else + { +- /* Special case of partial answer. */ +- assert (hp != hp2); +- hp2 = hp; ++ hp2 = (HEADER *) *answerp2; ++ if (n < (int) sizeof (HEADER)) ++ { ++ hp = hp2; ++ } + } + ++ /* Make sure both hp and hp2 are defined */ ++ assert((hp != NULL) && (hp2 != NULL)); ++ + if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0) + && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) { + #ifdef DEBUG diff --git a/glibc-rh739743.patch b/glibc-rh739743.patch new file mode 100644 index 0000000..c390b77 --- /dev/null +++ b/glibc-rh739743.patch @@ -0,0 +1,55 @@ +2009-04-26 Aurelien Jarno + + * sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native + result if the result has no associated interface. + +--- + sysdeps/posix/getaddrinfo.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -1456,13 +1456,13 @@ + + /* Fill in the results in all the records. */ + for (int i = 0; i < src->nresults; ++i) +- if (src->results[i].index == a1_index) ++ if (a1_index != -1 && src->results[i].index == a1_index) + { + assert (src->results[i].native == -1 + || src->results[i].native == a1_native); + src->results[i].native = a1_native; + } +- else if (src->results[i].index == a2_index) ++ else if (a2_index != -1 && src->results[i].index == a2_index) + { + assert (src->results[i].native == -1 + || src->results[i].native == a2_native); + +2009-03-15 Aurelien Jarno + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect + interface for all 127.X.Y.Z addresses. + +--- + sysdeps/posix/getaddrinfo.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -2265,7 +2265,14 @@ + tmp.addr[0] = 0; + tmp.addr[1] = 0; + tmp.addr[2] = htonl (0xffff); +- tmp.addr[3] = sinp->sin_addr.s_addr; ++ /* Special case for lo interface, the source address ++ being possibly different than the interface ++ address. */ ++ if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000) ++ == 0x7f000000) ++ tmp.addr[3] = htonl(0x7f000001); ++ else ++ tmp.addr[3] = sinp->sin_addr.s_addr; + } + else + { diff --git a/glibc-rh741105.patch b/glibc-rh741105.patch new file mode 100644 index 0000000..8252062 --- /dev/null +++ b/glibc-rh741105.patch @@ -0,0 +1,21 @@ +diff -rup a/elf/dl-load.c b/elf/dl-load.c +--- a/elf/dl-load.c 2012-02-03 10:59:58.917870716 -0700 ++++ b/elf/dl-load.c 2012-02-03 11:01:01.796580644 -0700 +@@ -1130,6 +1130,16 @@ _dl_map_object_from_fd (const char *name + = N_("ELF load command address/offset not properly aligned"); + goto call_lose; + } ++ if (__builtin_expect ((ph->p_offset + ph->p_filesz > st.st_size), 0)) ++ { ++ /* If the segment requires zeroing of part of its last ++ page, we'll crash when accessing the unmapped page. ++ There's still a possibility of a race, if the shared ++ object is truncated between the fxstat above and the ++ memset below. */ ++ errstring = N_("ELF load command past end of file"); ++ goto call_lose; ++ } + + c = &loadcmds[nloadcmds++]; + c->mapstart = ph->p_vaddr & ~(GLRO(dl_pagesize) - 1); +Only in b/elf: dl-load.c.orig diff --git a/glibc-rh757881.patch b/glibc-rh757881.patch new file mode 100644 index 0000000..9db0434 --- /dev/null +++ b/glibc-rh757881.patch @@ -0,0 +1,167 @@ +diff -Nrup a/malloc/arena.c b/malloc/arena.c +--- a/malloc/arena.c 2012-05-29 16:45:53.000000000 -0600 ++++ b/malloc/arena.c 2012-05-30 00:13:40.683514016 -0600 +@@ -673,7 +673,7 @@ heap_trim(heap_info *heap, size_t pad) + heap = prev_heap; + if(!prev_inuse(p)) { /* consolidate backward */ + p = prev_chunk(p); +- unlink(p, bck, fwd); ++ unlink(ar_ptr, p, bck, fwd); + } + assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0); + assert( ((char*)p + new_size) == ((char*)heap + heap->size) ); +diff -Nrup a/malloc/hooks.c b/malloc/hooks.c +--- a/malloc/hooks.c 2012-05-29 16:45:53.000000000 -0600 ++++ b/malloc/hooks.c 2012-05-30 00:13:40.684514011 -0600 +@@ -191,7 +191,9 @@ top_check(void) + (char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem))) + return 0; + ++ mutex_unlock(&main_arena); + malloc_printerr (check_action, "malloc: top chunk is corrupt", t); ++ mutex_lock(&main_arena); + + /* Try to set up a new top chunk. */ + brk = MORECORE(0); +diff -Nrup a/malloc/malloc.c b/malloc/malloc.c +--- a/malloc/malloc.c 2012-05-29 16:45:53.000000000 -0600 ++++ b/malloc/malloc.c 2012-05-30 00:13:40.686514001 -0600 +@@ -1424,12 +1424,14 @@ typedef struct malloc_chunk* mbinptr; + #define last(b) ((b)->bk) + + /* Take a chunk off a bin list */ +-#define unlink(P, BK, FD) { \ ++#define unlink(AV, P, BK, FD) { \ + FD = P->fd; \ + BK = P->bk; \ +- if (__builtin_expect (FD->bk != P || BK->fd != P, 0)) \ ++ if (__builtin_expect (FD->bk != P || BK->fd != P, 0)) { \ ++ mutex_unlock(&(AV)->mutex); \ + malloc_printerr (check_action, "corrupted double-linked list", P); \ +- else { \ ++ mutex_lock(&(AV)->mutex); \ ++ } else { \ + FD->bk = BK; \ + BK->fd = FD; \ + if (!in_smallbin_range (P->size) \ +@@ -2511,7 +2513,9 @@ static void* sysmalloc(INTERNAL_SIZE_T n + + else if (contiguous(av) && old_size && brk < old_end) { + /* Oops! Someone else killed our space.. Can't touch anything. */ ++ mutex_unlock(&av->mutex); + malloc_printerr (3, "break adjusted to free malloc space", brk); ++ mutex_lock(&av->mutex); + } + + /* +@@ -3345,7 +3349,9 @@ _int_malloc(mstate av, size_t bytes) + { + errstr = "malloc(): memory corruption (fast)"; + errout: ++ mutex_unlock(&av->mutex); + malloc_printerr (check_action, errstr, chunk2mem (victim)); ++ mutex_lock(&av->mutex); + return NULL; + } + check_remalloced_chunk(av, victim, nb); +@@ -3430,8 +3436,12 @@ _int_malloc(mstate av, size_t bytes) + bck = victim->bk; + if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0) + || __builtin_expect (victim->size > av->system_mem, 0)) +- malloc_printerr (check_action, "malloc(): memory corruption", +- chunk2mem (victim)); ++ { ++ void *p = chunk2mem(victim); ++ mutex_unlock(&av->mutex); ++ malloc_printerr (check_action, "malloc(): memory corruption", p); ++ mutex_lock(&av->mutex); ++ } + size = chunksize(victim); + + /* +@@ -3572,7 +3582,7 @@ _int_malloc(mstate av, size_t bytes) + victim = victim->fd; + + remainder_size = size - nb; +- unlink(victim, bck, fwd); ++ unlink(av, victim, bck, fwd); + + /* Exhaust */ + if (remainder_size < MINSIZE) { +@@ -3670,7 +3680,7 @@ _int_malloc(mstate av, size_t bytes) + remainder_size = size - nb; + + /* unlink */ +- unlink(victim, bck, fwd); ++ unlink(av, victim, bck, fwd); + + /* Exhaust */ + if (remainder_size < MINSIZE) { +@@ -3805,9 +3815,11 @@ _int_free(mstate av, mchunkptr p, int ha + { + errstr = "free(): invalid pointer"; + errout: +- if (! have_lock && locked) ++ if (have_lock || locked) + (void)mutex_unlock(&av->mutex); + malloc_printerr (check_action, errstr, chunk2mem(p)); ++ if (have_lock) ++ mutex_lock(&av->mutex); + return; + } + /* We know that each chunk is at least MINSIZE bytes in size or a +@@ -3952,7 +3964,7 @@ _int_free(mstate av, mchunkptr p, int ha + prevsize = p->prev_size; + size += prevsize; + p = chunk_at_offset(p, -((long) prevsize)); +- unlink(p, bck, fwd); ++ unlink(av, p, bck, fwd); + } + + if (nextchunk != av->top) { +@@ -3961,7 +3973,7 @@ _int_free(mstate av, mchunkptr p, int ha + + /* consolidate forward */ + if (!nextinuse) { +- unlink(nextchunk, bck, fwd); ++ unlink(av, nextchunk, bck, fwd); + size += nextsize; + } else + clear_inuse_bit_at_offset(nextchunk, 0); +@@ -4122,7 +4134,7 @@ static void malloc_consolidate(mstate av + prevsize = p->prev_size; + size += prevsize; + p = chunk_at_offset(p, -((long) prevsize)); +- unlink(p, bck, fwd); ++ unlink(av, p, bck, fwd); + } + + if (nextchunk != av->top) { +@@ -4130,7 +4142,7 @@ static void malloc_consolidate(mstate av + + if (!nextinuse) { + size += nextsize; +- unlink(nextchunk, bck, fwd); ++ unlink(av, nextchunk, bck, fwd); + } else + clear_inuse_bit_at_offset(nextchunk, 0); + +@@ -4199,7 +4211,9 @@ _int_realloc(mstate av, mchunkptr oldp, + { + errstr = "realloc(): invalid old size"; + errout: ++ mutex_unlock(&av->mutex); + malloc_printerr (check_action, errstr, chunk2mem(oldp)); ++ mutex_lock(&av->mutex); + return NULL; + } + +@@ -4241,7 +4255,7 @@ _int_realloc(mstate av, mchunkptr oldp, + (unsigned long)(newsize = oldsize + nextsize) >= + (unsigned long)(nb)) { + newp = oldp; +- unlink(next, bck, fwd); ++ unlink(av, next, bck, fwd); + } + + /* allocate, copy, free */ diff --git a/glibc-rh767693-2.patch b/glibc-rh767693-2.patch new file mode 100644 index 0000000..97d3658 --- /dev/null +++ b/glibc-rh767693-2.patch @@ -0,0 +1,76 @@ +diff -rup a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c +--- a/sunrpc/svc_tcp.c 2012-05-31 20:37:43.000000000 -0600 ++++ b/sunrpc/svc_tcp.c 2012-06-05 11:30:09.948733571 -0600 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -247,6 +248,11 @@ again: + { + if (errno == EINTR) + goto again; ++ if (errno == EMFILE) ++ { ++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; ++ __nanosleep(&ts , NULL); ++ } + return FALSE; + } + /* +diff -rup a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c +--- a/sunrpc/svc_udp.c 2012-05-31 20:37:43.000000000 -0600 ++++ b/sunrpc/svc_udp.c 2012-06-05 11:30:09.948733571 -0600 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #ifdef IP_PKTINFO + #include +@@ -277,8 +278,16 @@ again: + (int) su->su_iosz, 0, + (struct sockaddr *) &(xprt->xp_raddr), &len); + xprt->xp_addrlen = len; +- if (rlen == -1 && errno == EINTR) +- goto again; ++ if (rlen == -1) ++ { ++ if (errno == EINTR) ++ goto again; ++ if (errno == EMFILE) ++ { ++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; ++ __nanosleep(&ts , NULL); ++ } ++ } + if (rlen < 16) /* < 4 32-bit ints? */ + return FALSE; + xdrs->x_op = XDR_DECODE; +diff -rup a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c +--- a/sunrpc/svc_unix.c 2012-05-31 20:37:43.000000000 -0600 ++++ b/sunrpc/svc_unix.c 2012-06-05 11:30:36.495612770 -0600 +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + #include + + /* +@@ -244,6 +245,11 @@ again: + { + if (errno == EINTR) + goto again; ++ if (errno == EMFILE) ++ { ++ struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 }; ++ __nanosleep(&ts , NULL); ++ } + return FALSE; + } + /* diff --git a/glibc-rh769421.patch b/glibc-rh769421.patch new file mode 100644 index 0000000..dd03490 --- /dev/null +++ b/glibc-rh769421.patch @@ -0,0 +1,217 @@ +diff -Nrup c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +--- c/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:20.732670548 -0600 ++++ d/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-20 23:58:52.667518135 -0600 +@@ -137,7 +137,6 @@ __pthread_cond_wait: + cmpl $PI_BIT, %eax + jne 18f + +-90: + movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx + movl %ebp, %edx + xorl %esi, %esi +@@ -151,9 +150,6 @@ __pthread_cond_wait: + sete 16(%esp) + je 19f + +- cmpl $-EAGAIN, %eax +- je 91f +- + /* Normal and PI futexes dont mix. Use normal futex functions only + if the kernel does not support the PI futex functions. */ + cmpl $-ENOSYS, %eax +@@ -398,78 +394,6 @@ __pthread_cond_wait: + #endif + call __lll_unlock_wake + jmp 11b +- +-91: +-.LcleanupSTART2: +- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to +- call it again. */ +- +- /* Get internal lock. */ +- movl $1, %edx +- xorl %eax, %eax +- LOCK +-#if cond_lock == 0 +- cmpxchgl %edx, (%ebx) +-#else +- cmpxchgl %edx, cond_lock(%ebx) +-#endif +- jz 92f +- +-#if cond_lock == 0 +- movl %ebx, %edx +-#else +- leal cond_lock(%ebx), %edx +-#endif +-#if (LLL_SHARED-LLL_PRIVATE) > 255 +- xorl %ecx, %ecx +-#endif +- cmpl $-1, dep_mutex(%ebx) +- setne %cl +- subl $1, %ecx +- andl $(LLL_SHARED-LLL_PRIVATE), %ecx +-#if LLL_PRIVATE != 0 +- addl $LLL_PRIVATE, %ecx +-#endif +- call __lll_lock_wait +- +-92: +- /* Increment the cond_futex value again, so it can be used as a new +- expected value. */ +- addl $1, cond_futex(%ebx) +- movl cond_futex(%ebx), %ebp +- +- /* Unlock. */ +- LOCK +-#if cond_lock == 0 +- subl $1, (%ebx) +-#else +- subl $1, cond_lock(%ebx) +-#endif +- je 93f +-#if cond_lock == 0 +- movl %ebx, %eax +-#else +- leal cond_lock(%ebx), %eax +-#endif +-#if (LLL_SHARED-LLL_PRIVATE) > 255 +- xorl %ecx, %ecx +-#endif +- cmpl $-1, dep_mutex(%ebx) +- setne %cl +- subl $1, %ecx +- andl $(LLL_SHARED-LLL_PRIVATE), %ecx +-#if LLL_PRIVATE != 0 +- addl $LLL_PRIVATE, %ecx +-#endif +- call __lll_unlock_wake +- +-93: +- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */ +- xorl %ecx, %ecx +- movl dep_mutex(%ebx), %edi +- jmp 90b +-.LcleanupEND2: +- + .size __pthread_cond_wait, .-__pthread_cond_wait + versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2) +@@ -642,10 +566,6 @@ __condvar_w_cleanup: + .long .LcleanupEND-.Lsub_cond_futex + .long __condvar_w_cleanup-.LSTARTCODE + .uleb128 0 +- .long .LcleanupSTART2-.LSTARTCODE +- .long .LcleanupEND2-.LcleanupSTART2 +- .long __condvar_w_cleanup-.LSTARTCODE +- .uleb128 0 + .long .LcallUR-.LSTARTCODE + .long .LENDCODE-.LcallUR + .long 0 +diff -Nrup c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +--- c/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-20 23:58:20.736670528 -0600 ++++ d/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-21 00:01:39.870720001 -0600 +@@ -136,14 +136,11 @@ __pthread_cond_wait: + cmpl $PI_BIT, %eax + jne 61f + +-90: + movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi + movl $SYS_futex, %eax + syscall + + movl $1, %r8d +- cmpq $-EAGAIN, %rax +- je 91f + #ifdef __ASSUME_REQUEUE_PI + jmp 62f + #else +@@ -331,69 +328,6 @@ __pthread_cond_wait: + 13: movq %r10, %rax + jmp 14b + +-91: +-.LcleanupSTART2: +- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to +- call it again. */ +- movq 8(%rsp), %rdi +- +- /* Get internal lock. */ +- movl $1, %esi +- xorl %eax, %eax +- LOCK +-#if cond_lock == 0 +- cmpxchgl %esi, (%rdi) +-#else +- cmpxchgl %esi, cond_lock(%rdi) +-#endif +- jz 92f +- +-#if cond_lock != 0 +- addq $cond_lock, %rdi +-#endif +- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi) +- movl $LLL_PRIVATE, %eax +- movl $LLL_SHARED, %esi +- cmovne %eax, %esi +- callq __lll_lock_wait +-#if cond_lock != 0 +- subq $cond_lock, %rdi +-#endif +-92: +- /* Increment the cond_futex value again, so it can be used as a new +- expected value. */ +- incl cond_futex(%rdi) +- movl cond_futex(%rdi), %edx +- +- /* Release internal lock. */ +- LOCK +-#if cond_lock == 0 +- decl (%rdi) +-#else +- decl cond_lock(%rdi) +-#endif +- jz 93f +- +-#if cond_lock != 0 +- addq $cond_lock, %rdi +-#endif +- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi) +- movl $LLL_PRIVATE, %eax +- movl $LLL_SHARED, %esi +- cmovne %eax, %esi +- /* The call preserves %rdx. */ +- callq __lll_unlock_wake +-#if cond_lock != 0 +- subq $cond_lock, %rdi +-#endif +-93: +- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */ +- xorq %r10, %r10 +- mov dep_mutex(%rdi), %R8_LP +- leaq cond_futex(%rdi), %rdi +- jmp 90b +-.LcleanupEND2: +- + .size __pthread_cond_wait, .-__pthread_cond_wait + versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2) +@@ -546,15 +480,11 @@ __condvar_cleanup1: + .uleb128 .LcleanupSTART-.LSTARTCODE + .uleb128 .LcleanupEND-.LcleanupSTART + .uleb128 __condvar_cleanup1-.LSTARTCODE +- .uleb128 0 +- .uleb128 .LcleanupSTART2-.LSTARTCODE +- .uleb128 .LcleanupEND2-.LcleanupSTART2 +- .uleb128 __condvar_cleanup1-.LSTARTCODE +- .uleb128 0 ++ .uleb128 0 + .uleb128 .LcallUR-.LSTARTCODE + .uleb128 .LENDCODE-.LcallUR + .uleb128 0 +- .uleb128 0 ++ .uleb128 0 + .Lcstend: + + diff --git a/glibc-rh770439.patch b/glibc-rh770439.patch new file mode 100644 index 0000000..a6ec302 --- /dev/null +++ b/glibc-rh770439.patch @@ -0,0 +1,22 @@ +2012-02-08 Rakesh Pandit + + * locales/ks_IN@devanagari: Fix week day names. + +--- a/localedata/locales/ks_IN@devanagari ++++ a/localedata/locales/ks_IN@devanagari +@@ -64,11 +64,11 @@ abday "";/ + "" + % + % Full weekday names (%A) +-day "";/ ++day "";/ + "";/ +- "";/ +- "";/ +- "";/ ++ "";/ ++ "";/ ++ "";/ + "";/ + "" + % diff --git a/glibc-rh770869.patch b/glibc-rh770869.patch new file mode 100644 index 0000000..8757641 --- /dev/null +++ b/glibc-rh770869.patch @@ -0,0 +1,23 @@ +diff -rup a/fedora/nscd.service b/fedora/nscd.service +--- a/fedora/nscd.service 2011-10-19 05:04:41.000000000 -0600 ++++ b/fedora/nscd.service 2012-02-03 13:40:37.070063851 -0700 +@@ -3,16 +3,15 @@ Description=Name Service Cache Daemon + After=syslog.target + + [Service] +-Type=forking + EnvironmentFile=-/etc/sysconfig/nscd +-ExecStart=/usr/sbin/nscd $NSCD_OPTIONS ++ExecStart=/usr/sbin/nscd --foreground $NSCD_OPTIONS + ExecStop=/usr/sbin/nscd --shutdown + ExecReload=/usr/sbin/nscd -i passwd + ExecReload=/usr/sbin/nscd -i group + ExecReload=/usr/sbin/nscd -i hosts +-ExecReload=/usr/sbin/nscd -i service ++ExecReload=/usr/sbin/nscd -i services ++ExecReload=/usr/sbin/nscd -i netgroup + Restart=always +-PIDFile=/run/nscd/nscd.pid + + [Install] + WantedBy=multi-user.target diff --git a/glibc-rh787201.patch b/glibc-rh787201.patch new file mode 100644 index 0000000..cd7cfe1 --- /dev/null +++ b/glibc-rh787201.patch @@ -0,0 +1,12 @@ +diff -rup a/fedora/glibc.spec.in b/fedora/glibc.spec.in +--- a/fedora/glibc.spec.in 2011-10-19 05:04:41.000000000 -0600 ++++ b/fedora/glibc.spec.in 2012-02-03 09:26:36.669828253 -0700 +@@ -316,7 +316,7 @@ GCC="gcc -m64" + GXX="g++ -m64" + %endif + %ifarch ppc64 +-BuildFlags="-mno-minimal-toc" ++BuildFlags= + GCC="gcc -m64" + GXX="g++ -m64" + %endif diff --git a/glibc-rh788989-2.patch b/glibc-rh788989-2.patch new file mode 100644 index 0000000..50c59f8 --- /dev/null +++ b/glibc-rh788989-2.patch @@ -0,0 +1,159 @@ +2012-04-12 Jeff Law + + * nscd/grpcache.c (cache_addgr): Track alloca usage with alloca_account. + Do not allocate DATASET on the stack if it's too large. Free DATASET + if needed. + +diff -rcp a/nscd/grpcache.c b/nscd/grpcache.c +*** a/nscd/grpcache.c Wed Apr 11 12:50:07 2012 +--- b/nscd/grpcache.c Wed Apr 11 21:45:58 2012 +*************** cache_addgr (struct database_dyn *db, in +*** 178,184 **** + char *cp; + const size_t key_len = strlen (key); + const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1; +! char *buf = alloca (buf_len); + ssize_t n; + size_t cnt; + +--- 178,185 ---- + char *cp; + const size_t key_len = strlen (key); + const size_t buf_len = 3 * sizeof (grp->gr_gid) + key_len + 1; +! size_t alloca_used = 0; +! char *buf = alloca_account (buf_len, alloca_used); + ssize_t n; + size_t cnt; + +*************** cache_addgr (struct database_dyn *db, in +*** 190,196 **** + /* Determine the length of all members. */ + while (grp->gr_mem[gr_mem_cnt]) + ++gr_mem_cnt; +! gr_mem_len = (uint32_t *) alloca (gr_mem_cnt * sizeof (uint32_t)); + for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt) + { + gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1; +--- 191,198 ---- + /* Determine the length of all members. */ + while (grp->gr_mem[gr_mem_cnt]) + ++gr_mem_cnt; +! gr_mem_len = (uint32_t *) alloca_account (gr_mem_cnt * sizeof (uint32_t), +! alloca_used); + for (gr_mem_cnt = 0; grp->gr_mem[gr_mem_cnt]; ++gr_mem_cnt) + { + gr_mem_len[gr_mem_cnt] = strlen (grp->gr_mem[gr_mem_cnt]) + 1; +*************** cache_addgr (struct database_dyn *db, in +*** 205,214 **** + change. Allocate memory on the cache since it is likely + discarded anyway. If it turns out to be necessary to have a + new record we can still allocate real memory. */ +! bool alloca_used = false; + dataset = NULL; + +! if (he == NULL) + dataset = (struct dataset *) mempool_alloc (db, total + n, 1); + + if (dataset == NULL) +--- 207,216 ---- + change. Allocate memory on the cache since it is likely + discarded anyway. If it turns out to be necessary to have a + new record we can still allocate real memory. */ +! bool dataset_in_stack_or_freed = false; + dataset = NULL; + +! if (he == NULL || ! __libc_use_alloca (alloca_used + total + n)) + dataset = (struct dataset *) mempool_alloc (db, total + n, 1); + + if (dataset == NULL) +*************** cache_addgr (struct database_dyn *db, in +*** 216,225 **** + /* We cannot permanently add the result in the moment. But + we can provide the result as is. Store the data in some + temporary memory. */ +! dataset = (struct dataset *) alloca (total + n); + + /* We cannot add this record to the permanent database. */ +! alloca_used = true; + } + + dataset->head.allocsize = total + n; +--- 218,227 ---- + /* We cannot permanently add the result in the moment. But + we can provide the result as is. Store the data in some + temporary memory. */ +! dataset = (struct dataset *) alloca_account (total + n, alloca_used); + + /* We cannot add this record to the permanent database. */ +! dataset_in_stack_or_freed = true; + } + + dataset->head.allocsize = total + n; +*************** cache_addgr (struct database_dyn *db, in +*** 273,278 **** +--- 275,288 ---- + allocated on the stack and need not be freed. */ + dh->timeout = dataset->head.timeout; + ++dh->nreloads; ++ ++ /* If the new record was not allocated on the stack, then it must ++ be freed. Note that it can no longer be used. */ ++ if (! dataset_in_stack_or_freed) ++ { ++ free (dataset); ++ dataset_in_stack_or_freed = true; ++ } + } + else + { +*************** cache_addgr (struct database_dyn *db, in +*** 288,294 **** + key_copy = (char *) newp + (key_copy - (char *) dataset); + + dataset = memcpy (newp, dataset, total + n); +! alloca_used = false; + } + + /* Mark the old record as obsolete. */ +--- 298,304 ---- + key_copy = (char *) newp + (key_copy - (char *) dataset); + + dataset = memcpy (newp, dataset, total + n); +! dataset_in_stack_or_freed = false; + } + + /* Mark the old record as obsolete. */ +*************** cache_addgr (struct database_dyn *db, in +*** 303,309 **** + assert (fd != -1); + + #ifdef HAVE_SENDFILE +! if (__builtin_expect (db->mmap_used, 1) && !alloca_used) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); +--- 313,319 ---- + assert (fd != -1); + + #ifdef HAVE_SENDFILE +! if (__builtin_expect (db->mmap_used, 1) && !dataset_in_stack_or_freed) + { + assert (db->wr_fd != -1); + assert ((char *) &dataset->resp > (char *) db->data); +*************** cache_addgr (struct database_dyn *db, in +*** 330,336 **** + + /* Add the record to the database. But only if it has not been + stored on the stack. */ +! if (! alloca_used) + { + /* If necessary, we also propagate the data to disk. */ + if (db->persistent) +--- 340,346 ---- + + /* Add the record to the database. But only if it has not been + stored on the stack. */ +! if (! dataset_in_stack_or_freed) + { + /* If necessary, we also propagate the data to disk. */ + if (db->persistent) diff --git a/glibc-rh789209.patch b/glibc-rh789209.patch new file mode 100644 index 0000000..9645298 --- /dev/null +++ b/glibc-rh789209.patch @@ -0,0 +1,12 @@ +diff -rup a/localedata/locales/uk_UA b/localedata/locales/uk_UA +--- a/localedata/locales/uk_UA 2012-01-01 05:16:32.000000000 -0700 ++++ b/localedata/locales/uk_UA 2012-02-09 22:32:36.864134146 -0700 +@@ -700,7 +700,7 @@ LC_MONETARY + % 200 hrv. - 200 hryven (money) + + % the local currency symbol +-currency_symbol "" % hr (hryvnya) ++currency_symbol "" % hr (hryvnya) + + % This must be a 4-character string containing the international currency + % symbol as defined by the ISO 4217 standard (three characters) followed diff --git a/glibc-rh789238-2.patch b/glibc-rh789238-2.patch new file mode 100644 index 0000000..91e8df7 --- /dev/null +++ b/glibc-rh789238-2.patch @@ -0,0 +1,111 @@ +diff -rup c/malloc/arena.c d/malloc/arena.c +--- c/malloc/arena.c 2012-04-02 21:21:08.842818529 -0600 ++++ d/malloc/arena.c 2012-04-02 21:22:25.943306724 -0600 +@@ -121,14 +121,14 @@ int __malloc_initialized = -1; + if(ptr) \ + (void)mutex_lock(&ptr->mutex); \ + else \ +- ptr = arena_get2(ptr, (size)); \ ++ ptr = arena_get2(ptr, (size), false); \ + } while(0) + #else + # define arena_lock(ptr, size) do { \ + if(ptr && !mutex_trylock(&ptr->mutex)) { \ + THREAD_STAT(++(ptr->stat_lock_direct)); \ + } else \ +- ptr = arena_get2(ptr, (size)); \ ++ ptr = arena_get2(ptr, (size), false); \ + } while(0) + #endif + +@@ -782,7 +782,7 @@ get_free_list (void) + + + static mstate +-reused_arena (void) ++reused_arena (bool retrying) + { + mstate result; + static mstate next_to_use; +@@ -799,6 +799,15 @@ reused_arena (void) + } + while (result != next_to_use); + ++ /* If we are retrying due to a failure to allocate in the main ++ arena, don't wait for the main arena to become available, select ++ another. ++ ++ To really fix this right we would have to try the allocation ++ in every other arena, but that seems like severe overkill. */ ++ if (retrying && result == &main_arena) ++ result = result->next; ++ + /* No arena available. Wait for the next in line. */ + (void)mutex_lock(&result->mutex); + +@@ -813,7 +822,7 @@ reused_arena (void) + + static mstate + internal_function +-arena_get2(mstate a_tsd, size_t size) ++arena_get2(mstate a_tsd, size_t size, bool retrying) + { + mstate a; + +@@ -858,7 +867,7 @@ arena_get2(mstate a_tsd, size_t size) + catomic_decrement (&narenas); + } + else +- a = reused_arena (); ++ a = reused_arena (retrying); + } + #else + if(!a_tsd) +diff -rup c/malloc/malloc.c d/malloc/malloc.c +--- c/malloc/malloc.c 2012-04-02 21:21:08.984817776 -0600 ++++ d/malloc/malloc.c 2012-04-02 21:21:39.533655779 -0600 +@@ -2938,7 +2938,7 @@ public_mALLOc(size_t bytes) + /* ... or sbrk() has failed and there is still a chance to mmap() */ + mstate prev = ar_ptr->next ? ar_ptr : 0; + (void)mutex_unlock(&ar_ptr->mutex); +- ar_ptr = arena_get2(prev, bytes); ++ ar_ptr = arena_get2(prev, bytes, true); + if(ar_ptr) { + victim = _int_malloc(ar_ptr, bytes); + (void)mutex_unlock(&ar_ptr->mutex); +@@ -3117,7 +3117,7 @@ public_mEMALIGn(size_t alignment, size_t + /* ... or sbrk() has failed and there is still a chance to mmap() */ + mstate prev = ar_ptr->next ? ar_ptr : 0; + (void)mutex_unlock(&ar_ptr->mutex); +- ar_ptr = arena_get2(prev, bytes); ++ ar_ptr = arena_get2(prev, bytes, true); + if(ar_ptr) { + p = _int_memalign(ar_ptr, alignment, bytes); + (void)mutex_unlock(&ar_ptr->mutex); +@@ -3164,7 +3164,7 @@ public_vALLOc(size_t bytes) + /* ... or sbrk() has failed and there is still a chance to mmap() */ + mstate prev = ar_ptr->next ? ar_ptr : 0; + (void)mutex_unlock(&ar_ptr->mutex); +- ar_ptr = arena_get2(prev, bytes); ++ ar_ptr = arena_get2(prev, bytes, true); + if(ar_ptr) { + p = _int_memalign(ar_ptr, pagesz, bytes); + (void)mutex_unlock(&ar_ptr->mutex); +@@ -3211,7 +3211,7 @@ public_pVALLOc(size_t bytes) + /* ... or sbrk() has failed and there is still a chance to mmap() */ + mstate prev = ar_ptr->next ? ar_ptr : 0; + (void)mutex_unlock(&ar_ptr->mutex); +- ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE); ++ ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE, true); + if(ar_ptr) { + p = _int_memalign(ar_ptr, pagesz, rounded_bytes); + (void)mutex_unlock(&ar_ptr->mutex); +@@ -3298,7 +3298,7 @@ public_cALLOc(size_t n, size_t elem_size + /* ... or sbrk() has failed and there is still a chance to mmap() */ + mstate prev = av->next ? av : 0; + (void)mutex_unlock(&av->mutex); +- av = arena_get2(prev, sz); ++ av = arena_get2(prev, sz, true); + if(av) { + mem = _int_malloc(av, sz); + (void)mutex_unlock(&av->mutex); diff --git a/glibc-rh789238.patch b/glibc-rh789238.patch new file mode 100644 index 0000000..1801123 --- /dev/null +++ b/glibc-rh789238.patch @@ -0,0 +1,115 @@ +Only in b/malloc: arena.c.orig +Only in b/malloc: hooks.c.orig +diff -rup a/malloc/malloc.c b/malloc/malloc.c +--- a/malloc/malloc.c 2012-02-14 10:08:22.062534892 -0700 ++++ b/malloc/malloc.c 2012-02-14 10:19:43.088724473 -0700 +@@ -2936,8 +2936,9 @@ public_mALLOc(size_t bytes) + (void)mutex_unlock(&ar_ptr->mutex); + } else { + /* ... or sbrk() has failed and there is still a chance to mmap() */ +- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes); +- (void)mutex_unlock(&main_arena.mutex); ++ mstate prev = ar_ptr->next ? ar_ptr : 0; ++ (void)mutex_unlock(&ar_ptr->mutex); ++ ar_ptr = arena_get2(prev, bytes); + if(ar_ptr) { + victim = _int_malloc(ar_ptr, bytes); + (void)mutex_unlock(&ar_ptr->mutex); +@@ -3151,23 +3152,26 @@ public_vALLOc(size_t bytes) + if(!ar_ptr) + return 0; + p = _int_valloc(ar_ptr, bytes); +- (void)mutex_unlock(&ar_ptr->mutex); + if(!p) { + /* Maybe the failure is due to running out of mmapped areas. */ + if(ar_ptr != &main_arena) { ++ (void)mutex_unlock(&ar_ptr->mutex); + ar_ptr = &main_arena; + (void)mutex_lock(&ar_ptr->mutex); + p = _int_memalign(ar_ptr, pagesz, bytes); + (void)mutex_unlock(&ar_ptr->mutex); + } else { + /* ... or sbrk() has failed and there is still a chance to mmap() */ +- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes); ++ mstate prev = ar_ptr->next ? ar_ptr : 0; ++ (void)mutex_unlock(&ar_ptr->mutex); ++ ar_ptr = arena_get2(prev, bytes); + if(ar_ptr) { + p = _int_memalign(ar_ptr, pagesz, bytes); + (void)mutex_unlock(&ar_ptr->mutex); + } + } +- } ++ } else ++ (void)mutex_unlock(&ar_ptr->mutex); + assert(!p || chunk_is_mmapped(mem2chunk(p)) || + ar_ptr == arena_for_chunk(mem2chunk(p))); + +@@ -3195,24 +3199,26 @@ public_pVALLOc(size_t bytes) + + arena_get(ar_ptr, bytes + 2*pagesz + MINSIZE); + p = _int_pvalloc(ar_ptr, bytes); +- (void)mutex_unlock(&ar_ptr->mutex); + if(!p) { + /* Maybe the failure is due to running out of mmapped areas. */ + if(ar_ptr != &main_arena) { ++ (void)mutex_unlock(&ar_ptr->mutex); + ar_ptr = &main_arena; + (void)mutex_lock(&ar_ptr->mutex); + p = _int_memalign(ar_ptr, pagesz, rounded_bytes); + (void)mutex_unlock(&ar_ptr->mutex); + } else { + /* ... or sbrk() has failed and there is still a chance to mmap() */ +- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, +- bytes + 2*pagesz + MINSIZE); ++ mstate prev = ar_ptr->next ? ar_ptr : 0; ++ (void)mutex_unlock(&ar_ptr->mutex); ++ ar_ptr = arena_get2(prev, bytes + 2*pagesz + MINSIZE); + if(ar_ptr) { + p = _int_memalign(ar_ptr, pagesz, rounded_bytes); + (void)mutex_unlock(&ar_ptr->mutex); + } + } +- } ++ } else ++ (void)mutex_unlock(&ar_ptr->mutex); + assert(!p || chunk_is_mmapped(mem2chunk(p)) || + ar_ptr == arena_for_chunk(mem2chunk(p))); + +@@ -3277,8 +3283,6 @@ public_cALLOc(size_t n, size_t elem_size + #endif + mem = _int_malloc(av, sz); + +- /* Only clearing follows, so we can unlock early. */ +- (void)mutex_unlock(&av->mutex); + + assert(!mem || chunk_is_mmapped(mem2chunk(mem)) || + av == arena_for_chunk(mem2chunk(mem))); +@@ -3286,21 +3290,23 @@ public_cALLOc(size_t n, size_t elem_size + if (mem == 0) { + /* Maybe the failure is due to running out of mmapped areas. */ + if(av != &main_arena) { ++ (void)mutex_unlock(&av->mutex); + (void)mutex_lock(&main_arena.mutex); + mem = _int_malloc(&main_arena, sz); + (void)mutex_unlock(&main_arena.mutex); + } else { + /* ... or sbrk() has failed and there is still a chance to mmap() */ +- (void)mutex_lock(&main_arena.mutex); +- av = arena_get2(av->next ? av : 0, sz); +- (void)mutex_unlock(&main_arena.mutex); ++ mstate prev = av->next ? av : 0; ++ (void)mutex_unlock(&av->mutex); ++ av = arena_get2(prev, sz); + if(av) { + mem = _int_malloc(av, sz); + (void)mutex_unlock(&av->mutex); + } + } + if (mem == 0) return 0; +- } ++ } else ++ (void)mutex_unlock(&av->mutex); + p = mem2chunk(mem); + + /* Two optional cases in which clearing not necessary */ diff --git a/glibc-rh790292.patch b/glibc-rh790292.patch new file mode 100644 index 0000000..4f1351d --- /dev/null +++ b/glibc-rh790292.patch @@ -0,0 +1,188 @@ +diff -Nrup a/localedata/locales/sat_IN b/localedata/locales/sat_IN +--- a/localedata/locales/sat_IN 1969-12-31 17:00:00.000000000 -0700 ++++ b/localedata/locales/sat_IN 2012-02-14 09:45:55.072442697 -0700 +@@ -0,0 +1,184 @@ ++comment_char % ++escape_char / ++% Santali language locale for India. ++% Contributed by Mr. Pravin Satpute and Mr. Thakur Prasad Murmu ++ ++LC_IDENTIFICATION ++title "Santali language locale for India" ++source "Red Hat Pune" ++address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 " ++contact "" ++email "bug-glibc-locales@gnu.org" ++tel "" ++fax "" ++language "Santali" ++territory "India" ++revision "1.0" ++date "2012-01-17" ++% ++category "sat_IN:2012";LC_IDENTIFICATION ++category "sat_IN:2012";LC_CTYPE ++category "sat_IN:2012";LC_COLLATE ++category "sat_IN:2012";LC_TIME ++category "sat_IN:2012";LC_NUMERIC ++category "sat_IN:2012";LC_MONETARY ++category "sat_IN:2012";LC_MESSAGES ++category "sat_IN:2012";LC_PAPER ++category "sat_IN:2012";LC_NAME ++category "sat_IN:2012";LC_ADDRESS ++category "sat_IN:2012";LC_TELEPHONE ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "hi_IN" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "hi_IN" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "hi_IN" ++END LC_MONETARY ++ ++ ++LC_NUMERIC ++copy "hi_IN" ++END LC_NUMERIC ++ ++ ++LC_TIME ++% This is the POSIX Locale definition for the LC_TIME category ++% generated by IBM Basic CountryPack Transformer. ++% These are generated based on XML base Locale definition file ++% for IBM Class for Unicode. ++% ++% Abbreviated weekday names (%a) ++abday "";"";/ ++ "";"";/ ++ "";/ ++ "";"" ++% ++ ++% Full weekday names (%A) ++day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Abbreviated month names (%b) ++abmon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++ ++% Full month names (%B) ++mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Equivalent of AM PM ++ ++am_pm "";"" ++ ++% ++% Appropriate date and time representation ++% %A %d %b %Y%I:%M:%S %Z ++d_t_fmt "/ ++/ ++" ++% ++% Appropriate date representation ++% %A %d %b %Y ++d_fmt "/ ++" ++% ++% Appropriate time representation ++% %I:%M:%S %Z ++t_fmt "/ ++" ++% ++% Appropriate 12 h time representation (%r) ++t_fmt_ampm "/ ++" ++% ++% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" ++date_fmt "/ ++/ ++" ++END LC_TIME ++ ++ ++LC_MESSAGES ++% This is the POSIX Locale definition for the LC_MESSAGES category ++% generated by IBM Basic CountryPack Transformer. ++% These are generated based on XML base Locale definition file ++% for IBM Class for Unicode. ++% ++% ^(Yes|[yY]) ++yesexpr "/ ++" ++% ++% ^(No|[nN]) ++noexpr "/ ++" ++% ++END LC_MESSAGES ++ ++ ++LC_PAPER ++copy "hi_IN" ++END LC_PAPER ++ ++ ++LC_NAME ++% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category ++% generated by IBM Basic CountryPack Transformer. ++% ++% ++name_fmt "/ ++" ++name_gen "" ++name_mr "" ++name_mrs "" ++name_miss "" ++name_ms "" ++ ++END LC_NAME ++ ++ ++LC_ADDRESS ++copy "hi_IN" ++END LC_ADDRESS ++ ++ ++LC_TELEPHONE ++copy "hi_IN" ++END LC_TELEPHONE ++ ++ ++LC_MEASUREMENT ++copy "hi_IN" ++END LC_MEASUREMENT diff --git a/glibc-rh790298.patch b/glibc-rh790298.patch new file mode 100644 index 0000000..92bf620 --- /dev/null +++ b/glibc-rh790298.patch @@ -0,0 +1,176 @@ +diff -Nrup a/localedata/locales/mni_IN b/localedata/locales/mni_IN +--- a/localedata/locales/mni_IN 1969-12-31 17:00:00.000000000 -0700 ++++ b/localedata/locales/mni_IN 2012-02-14 09:49:33.059129964 -0700 +@@ -0,0 +1,172 @@ ++comment_char % ++escape_char / ++% Manipuri language locale for India. ++% Contributed by Mr. Pravin Satpute and Ms. Rebika Devi < rebika_srd AT rediffmail DOT com> ++ ++LC_IDENTIFICATION ++title "Manipuri language locale for India" ++source "Red Hat Pune" ++address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 " ++contact "" ++email "bug-glibc-locales@gnu.org" ++tel "" ++fax "" ++language "Manipuri" ++territory "India" ++revision "1.0" ++date "2012-01-17" ++% ++category "mni_IN:2012";LC_IDENTIFICATION ++category "mni_IN:2012";LC_CTYPE ++category "mni_IN:2012";LC_COLLATE ++category "mni_IN:2012";LC_TIME ++category "mni_IN:2012";LC_NUMERIC ++category "mni_IN:2012";LC_MONETARY ++category "mni_IN:2012";LC_MESSAGES ++category "mni_IN:2012";LC_PAPER ++category "mni_IN:2012";LC_NAME ++category "mni_IN:2012";LC_ADDRESS ++category "mni_IN:2012";LC_TELEPHONE ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "bn_IN" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "bn_IN" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "bn_IN" ++END LC_MONETARY ++ ++ ++LC_NUMERIC ++copy "bn_IN" ++END LC_NUMERIC ++ ++ ++LC_TIME ++% This is the POSIX Locale definition for the LC_TIME category ++% generated by IBM Basic CountryPack Transformer. ++% These are generated based on XML base Locale definition file ++% for IBM Class for Unicode. ++% ++% Abbreviated weekday names (%a) ++abday "";"";/ ++ "";"";/ ++ "";/ ++ "";"" ++% ++ ++% Full weekday names (%A) ++day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Abbreviated month names (%b) ++abmon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++ ++% Full month names (%B) ++mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Equivalent of AM PM ++ ++am_pm "";/ ++ "" ++% ++% Appropriate date and time representation ++% %A %d %b %Y%I:%M:%S %Z ++d_t_fmt "/ ++/ ++" ++% ++% Appropriate date representation ++% %A %d %b %Y ++d_fmt "/ ++" ++% ++% Appropriate time representation ++% %I:%M:%S %Z ++t_fmt "/ ++" ++% ++% Appropriate 12 h time representation (%r) ++t_fmt_ampm "/ ++" ++% ++% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" ++date_fmt "/ ++/ ++" ++END LC_TIME ++ ++ ++LC_MESSAGES ++copy "en_IN" ++END LC_MESSAGES ++ ++ ++LC_PAPER ++copy "bn_IN" ++END LC_PAPER ++ ++ ++LC_NAME ++% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category ++% generated by IBM Basic CountryPack Transformer. ++% ++% ++name_fmt "/ ++" ++name_gen "" ++name_mr "" ++name_mrs "" ++name_miss "" ++name_ms "" ++ ++END LC_NAME ++ ++ ++LC_ADDRESS ++copy "bn_IN" ++END LC_ADDRESS ++ ++ ++LC_TELEPHONE ++copy "bn_IN" ++END LC_TELEPHONE ++ ++ ++LC_MEASUREMENT ++copy "bn_IN" ++END LC_MEASUREMENT diff --git a/glibc-rh791161.patch b/glibc-rh791161.patch new file mode 100644 index 0000000..1c1fab0 --- /dev/null +++ b/glibc-rh791161.patch @@ -0,0 +1,180 @@ +diff -Nrup a/localedata/locales/doi_IN b/localedata/locales/doi_IN +--- a/localedata/locales/doi_IN 1969-12-31 17:00:00.000000000 -0700 ++++ b/localedata/locales/doi_IN 2012-02-16 09:14:08.215572109 -0700 +@@ -0,0 +1,176 @@ ++comment_char % ++escape_char / ++% Dogri language locale for India. ++% Contributed by Pravin Satpute and Sushil Badyal ++ ++LC_IDENTIFICATION ++title "Dogri language locale for India" ++source "Red Hat Pune" ++address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 " ++contact "" ++email "bug-glibc-locales@gnu.org" ++tel "" ++fax "" ++language "Dogri" ++territory "India" ++revision "1.0" ++date "2012-02-16" ++% ++category "doi_IN:2012";LC_IDENTIFICATION ++category "doi_IN:2012";LC_CTYPE ++category "doi_IN:2012";LC_COLLATE ++category "doi_IN:2012";LC_TIME ++category "doi_IN:2012";LC_NUMERIC ++category "doi_IN:2012";LC_MONETARY ++category "doi_IN:2012";LC_MESSAGES ++category "doi_IN:2012";LC_PAPER ++category "doi_IN:2012";LC_NAME ++category "doi_IN:2012";LC_ADDRESS ++category "doi_IN:2012";LC_TELEPHONE ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "hi_IN" ++END LC_CTYPE ++ ++LC_COLLATE ++ ++% Copy the template from ISO/IEC 14651 ++copy "iso14651_t1" ++ ++END LC_COLLATE ++ ++LC_MONETARY ++copy "hi_IN" ++END LC_MONETARY ++ ++ ++LC_NUMERIC ++copy "hi_IN" ++END LC_NUMERIC ++ ++ ++LC_TIME ++% This is the POSIX Locale definition for the LC_TIME category. ++% These are generated based on XML base Locale definition file ++% for IBM Class for Unicode/Java ++% ++% Abbreviated weekday names (%a) ++abday "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Full weekday names (%A) ++day "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Abbreviated month names (%b) ++abmon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";"";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Full month names (%B) ++mon "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";"";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "";/ ++ "" ++% ++% Equivalent of AM PM ++am_pm "";/ ++ "" ++% ++% Appropriate date and time representation ++% %A %d %b %Y%I:%M:%S %Z ++d_t_fmt "/ ++/ ++" ++% ++% Appropriate date representation ++% %A %d %b %Y ++d_fmt "/ ++" ++% ++% Appropriate time representation ++% %I:%M:%S %Z ++t_fmt "/ ++" ++% ++% Appropriate 12 h time representation (%r) ++t_fmt_ampm "/ ++" ++% ++date_fmt "/ ++/ ++" ++END LC_TIME ++ ++ ++LC_MESSAGES ++% ^(Yes|[yY]) ++yesexpr "/ ++" ++% ++% ^(No|[nN]) ++noexpr "/ ++" ++% ++END LC_MESSAGES ++ ++LC_PAPER ++copy "hi_IN" ++END LC_PAPER ++ ++ ++LC_NAME ++% This is the ISO_IEC TR14652 Locale definition for the ++% LC_NAME category. ++% ++name_fmt "/ ++" ++name_gen "" ++name_mr "" ++name_mrs "" ++name_miss "" ++name_ms "" ++ ++END LC_NAME ++ ++ ++ ++LC_ADDRESS ++copy "hi_IN" ++END LC_ADDRESS ++ ++ ++LC_TELEPHONE ++copy "hi_IN" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "hi_IN" ++END LC_MEASUREMENT diff --git a/glibc-rh800224.patch b/glibc-rh800224.patch new file mode 100644 index 0000000..ce8234c --- /dev/null +++ b/glibc-rh800224.patch @@ -0,0 +1,78 @@ + +2012-03-07 Jeff Law + + * elf/dl-reloc.c (_dl_relocate_object): Move code to allocate + l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE. + +diff -rup a/elf/dl-reloc.c b/elf/dl-reloc.c +--- a/elf/dl-reloc.c 2012-01-01 05:16:32.000000000 -0700 ++++ b/elf/dl-reloc.c 2012-03-06 15:41:56.486242640 -0700 +@@ -238,32 +238,9 @@ _dl_relocate_object (struct link_map *l, + /* String table object symbols. */ + const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); + +- /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */ +-#define RESOLVE_MAP(ref, version, r_type) \ +- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \ +- ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \ +- && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \ +- ? (bump_num_cache_relocations (), \ +- (*ref) = l->l_lookup_cache.ret, \ +- l->l_lookup_cache.value) \ +- : ({ lookup_t _lr; \ +- int _tc = elf_machine_type_class (r_type); \ +- l->l_lookup_cache.type_class = _tc; \ +- l->l_lookup_cache.sym = (*ref); \ +- const struct r_found_version *v = NULL; \ +- if ((version) != NULL && (version)->hash != 0) \ +- v = (version); \ +- _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \ +- scope, v, _tc, \ +- DL_LOOKUP_ADD_DEPENDENCY, NULL); \ +- l->l_lookup_cache.ret = (*ref); \ +- l->l_lookup_cache.value = _lr; })) \ +- : l) +- +-#include "dynamic-link.h" +- +- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc); +- ++ /* ELF_DYNAMIC_RELOCATE may need to examine l_reloc_result ++ when handling MACHINE_IRELATIVE relocs. So we must ++ allocate l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE. */ + #ifndef PROF + if (__builtin_expect (consider_profiling, 0)) + { +@@ -290,6 +267,32 @@ _dl_relocate_object (struct link_map *l, + } + } + #endif ++ ++ /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */ ++#define RESOLVE_MAP(ref, version, r_type) \ ++ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \ ++ ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \ ++ && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \ ++ ? (bump_num_cache_relocations (), \ ++ (*ref) = l->l_lookup_cache.ret, \ ++ l->l_lookup_cache.value) \ ++ : ({ lookup_t _lr; \ ++ int _tc = elf_machine_type_class (r_type); \ ++ l->l_lookup_cache.type_class = _tc; \ ++ l->l_lookup_cache.sym = (*ref); \ ++ const struct r_found_version *v = NULL; \ ++ if ((version) != NULL && (version)->hash != 0) \ ++ v = (version); \ ++ _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \ ++ scope, v, _tc, \ ++ DL_LOOKUP_ADD_DEPENDENCY, NULL); \ ++ l->l_lookup_cache.ret = (*ref); \ ++ l->l_lookup_cache.value = _lr; })) \ ++ : l) ++ ++#include "dynamic-link.h" ++ ++ ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc); + } + + /* Mark the object so we know this work has been done. */ diff --git a/glibc-rh803286.patch b/glibc-rh803286.patch new file mode 100644 index 0000000..d9f909c --- /dev/null +++ b/glibc-rh803286.patch @@ -0,0 +1,27 @@ +diff -rup a/localedata/SUPPORTED b/localedata/SUPPORTED +--- a/localedata/SUPPORTED 2012-03-12 14:11:04.134056609 -0600 ++++ b/localedata/SUPPORTED 2012-03-14 20:59:39.993269235 -0600 +@@ -103,6 +103,7 @@ de_DE@euro/ISO-8859-15 \ + de_LU.UTF-8/UTF-8 \ + de_LU/ISO-8859-1 \ + de_LU@euro/ISO-8859-15 \ ++doi_IN/UTF-8 \ + dv_MV/UTF-8 \ + dz_BT/UTF-8 \ + el_GR.UTF-8/UTF-8 \ +@@ -298,6 +299,7 @@ mk_MK.UTF-8/UTF-8 \ + mk_MK/ISO-8859-5 \ + ml_IN/UTF-8 \ + mn_MN/UTF-8 \ ++mni_IN/UTF-8 \ + mr_IN/UTF-8 \ + ms_MY.UTF-8/UTF-8 \ + ms_MY/ISO-8859-1 \ +@@ -350,6 +352,7 @@ ru_UA.UTF-8/UTF-8 \ + ru_UA/KOI8-U \ + rw_RW/UTF-8 \ + sa_IN/UTF-8 \ ++sat_IN/UTF-8 \ + sc_IT/UTF-8 \ + sd_IN/UTF-8 \ + sd_IN@devanagari/UTF-8 \ diff --git a/glibc-rh804630.patch b/glibc-rh804630.patch new file mode 100644 index 0000000..75dbe94 --- /dev/null +++ b/glibc-rh804630.patch @@ -0,0 +1,23 @@ +diff -rup c/resolv/res_send.c d/resolv/res_send.c +--- c/resolv/res_send.c 2012-01-01 05:16:32.000000000 -0700 ++++ d/resolv/res_send.c 2012-03-30 12:39:30.862467628 -0600 +@@ -409,6 +409,7 @@ __libc_res_nsend(res_state statp, const + */ + if (EXT(statp).nsinit == 0) { + unsigned char map[MAXNS]; ++ unsigned int ext_total_nscount; + + memset (map, MAXNS, sizeof (map)); + for (n = 0; n < MAXNS; n++) { +@@ -422,8 +423,9 @@ __libc_res_nsend(res_state statp, const + } + } + n = statp->nscount; +- if (statp->nscount > EXT(statp).nscount) +- for (n = EXT(statp).nscount, ns = 0; ++ ext_total_nscount = EXT(statp).nscount + EXT(statp).nscount6; ++ if (statp->nscount > ext_total_nscount) ++ for (n = ext_total_nscount, ns = 0; + n < statp->nscount; n++) { + while (ns < MAXNS + && EXT(statp).nsmap[ns] != MAXNS) diff --git a/glibc-rh819430.patch b/glibc-rh819430.patch new file mode 100644 index 0000000..8af1f78 --- /dev/null +++ b/glibc-rh819430.patch @@ -0,0 +1,78 @@ +diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c +--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500 ++++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400 +@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags) + # if HANDLE_MULTIBYTE + if (__builtin_expect (MB_CUR_MAX, 1) != 1) + { ++ const char *orig_pattern = pattern; + mbstate_t ps; + size_t n; + const char *p; +@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags) + alloca_used); + n = mbsrtowcs (wpattern, &p, n + 1, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- return -1; ++ /* Something wrong: Fall back to single byte matching. */ ++ goto try_singlebyte; + if (p) + { + memset (&ps, '\0', sizeof (ps)); +@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags) + prepare_wpattern: + n = mbsrtowcs (NULL, &pattern, 0, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- return -1; ++ /*Something wrong: Fall back to single byte matching. */ ++ goto try_singlebyte; + if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0)) + { + __set_errno (ENOMEM); +@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags) + alloca_used); + n = mbsrtowcs (wstring, &p, n + 1, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- { +- /* Something wrong. +- XXX Do we have to set `errno' to something which +- mbsrtows hasn't already done? */ +- free_return: +- free (wpattern_malloc); +- return -1; +- } ++ /* Something wrong: Fall back to single byte matching. */ ++ goto free_and_try_singlebyte; + if (p) + { + memset (&ps, '\0', sizeof (ps)); +@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags) + prepare_wstring: + n = mbsrtowcs (NULL, &string, 0, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- goto free_return; ++ /* Something wrong: Fall back to singlebyte matching. */ ++ goto free_and_try_singlebyte; + if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0)) + { + free (wpattern_malloc); +@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags) + free (wpattern_malloc); + + return res; ++ free_and_try_singlebyte: ++ free(wpattern_malloc); ++ try_singlebyte: ++ pattern = orig_pattern; + } + # endif /* mbstate_t and mbsrtowcs or _LIBC. */ + diff --git a/glibc-rh825061.patch b/glibc-rh825061.patch new file mode 100644 index 0000000..54fae8b --- /dev/null +++ b/glibc-rh825061.patch @@ -0,0 +1,13 @@ +diff -rup a/manual/Makefile b/manual/Makefile +--- a/manual/Makefile 2012-05-20 19:47:38.000000000 -0600 ++++ b/manual/Makefile 2012-05-29 22:23:33.920428631 -0600 +@@ -129,7 +129,8 @@ $(objpfx)%.c.texi: examples/%.c + mv -f $@.new $@ + + $(objpfx)%.info: %.texinfo +- LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $< ++ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=`basename $@` $< ++ mv `basename $@`* $(objpfx) + + $(objpfx)%.dvi: %.texinfo + cd $(objpfx);$(TEXI2DVI) -I $(shell cd $( + + + * locale/loadlocale.c (_nl_load_locale): Delay setting + file->decided until we have successfully loaded the file's + data. + +diff --git a/locale/loadlocale.c b/locale/loadlocale.c +index e3fa187..9fd9216 100644 +--- a/locale/loadlocale.c ++++ b/locale/loadlocale.c +@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) + int save_err; + int alloc = ld_mapped; + +- file->decided = 1; + file->data = NULL; + + fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC); +@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) + newdata->alloc = alloc; + + file->data = newdata; ++ file->decided = 1; + } + + void diff --git a/glibc-stap-libm.patch b/glibc-stap-libm.patch new file mode 100644 index 0000000..fd20b7f --- /dev/null +++ b/glibc-stap-libm.patch @@ -0,0 +1,72 @@ +diff -rup c/sysdeps/ieee754/dbl-64/slowexp.c d/sysdeps/ieee754/dbl-64/slowexp.c +--- c/sysdeps/ieee754/dbl-64/slowexp.c 2012-05-20 19:47:38.000000000 -0600 ++++ d/sysdeps/ieee754/dbl-64/slowexp.c 2012-05-21 10:02:51.693957300 -0600 +@@ -30,6 +30,8 @@ + #include "mpa.h" + #include + ++#include ++ + #ifndef SECTION + # define SECTION + #endif +@@ -60,12 +62,21 @@ __slowexp(double x) { + __sub(&mpy,&mpcor,&mpz,p); + __mp_dbl(&mpw, &w, p); + __mp_dbl(&mpz, &z, p); +- if (w == z) return w; ++ if (w == z) { ++ /* Track how often we get to the slow exp code plus ++ its input/output values. */ ++ LIBC_PROBE (slowexp_p6, 2, &x, &w); ++ return w; ++ } + else { /* if calculating is not exactly */ + p = 32; + __dbl_mp(x,&mpx,p); + __mpexp(&mpx, &mpy, p); + __mp_dbl(&mpy, &res, p); ++ ++ /* Track how often we get to the uber-slow exp code plus ++ its input/output values. */ ++ LIBC_PROBE (slowexp_p32, 2, &x, &res); + return res; + } + } +diff -rup c/sysdeps/ieee754/dbl-64/slowpow.c d/sysdeps/ieee754/dbl-64/slowpow.c +--- c/sysdeps/ieee754/dbl-64/slowpow.c 2012-05-20 19:47:38.000000000 -0600 ++++ d/sysdeps/ieee754/dbl-64/slowpow.c 2012-05-21 10:02:51.694957291 -0600 +@@ -34,6 +34,8 @@ + #include "mpa.h" + #include + ++#include ++ + #ifndef SECTION + # define SECTION + #endif +@@ -65,7 +67,12 @@ __slowpow(double x, double y, double z) + __mp_dbl(&mpr, &res, p); + __sub(&mpp,&eps,&mpr1,p); /* pp -eps =r1 */ + __mp_dbl(&mpr1, &res1, p); /* converting into double precision */ +- if (res == res1) return res; ++ if (res == res1) { ++ /* Track how often we get to the slow pow code plus ++ its input/output values. */ ++ LIBC_PROBE (slowpow_p6, 4, &x, &y, &z, &res); ++ return res; ++ } + + p = 32; /* if we get here result wasn't calculated exactly, continue */ + __dbl_mp(x,&mpx,p); /* for more exact calculation */ +@@ -75,5 +82,10 @@ __slowpow(double x, double y, double z) + __mul(&mpy,&mpz,&mpw,p); /* y*z =w */ + __mpexp(&mpw, &mpp, p); /* e^w=pp */ + __mp_dbl(&mpp, &res, p); /* converting into double precision */ ++ ++ /* Track how often we get to the uber-slow pow code plus ++ its input/output values. */ ++ LIBC_PROBE (slowpow_p32, 4, &x, &y, &z, &res); ++ + return res; + } diff --git a/glibc-stap.patch b/glibc-stap.patch new file mode 100644 index 0000000..e52e020 --- /dev/null +++ b/glibc-stap.patch @@ -0,0 +1,12 @@ +diff -Nrup c/scripts/check-local-headers.sh d/scripts/check-local-headers.sh +--- c/scripts/check-local-headers.sh 2012-05-20 19:47:38.000000000 -0600 ++++ d/scripts/check-local-headers.sh 2012-05-20 23:54:51.258670072 -0600 +@@ -28,7 +28,7 @@ exec ${AWK} -v includedir="$includedir" + BEGIN { + status = 0 + exclude = "^" includedir \ +- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)" ++ "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h|sys/sdt(-config)?\\.h))" + } + /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } + { diff --git a/glibc.spec b/glibc.spec index 4e7c9af..1a0d55f 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,328 +1,310 @@ -# 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 7 -%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} +%define glibcsrcdir glibc-%{version} +%define glibcportsdir glibc-%{version} %else -%define snapshot 20081113 -%define source_package glibc-%{glibcversion}-%{snapshot} -%define source_dir glibc-%{glibcversion} -%define _glibcrelease 0.%{snapshot}.%{__glibcrelease} -%define build_ports 0 +%define glibcsrcdir glibc-2.15-a316c1f +%define glibcportsdir glibc-ports-2.15-ad8ae7d %endif -%if "%{?manbo_mkrel:has_manbo}" == "has_manbo" -%define glibcrelease %manbo_mkrel %{_glibcrelease} -%else -%define glibcrelease %mkrel %{_glibcrelease} -%endif +%define checklist %{_builddir}/%{glibcsrcdir}/Check.list # crypt blowfish support -%define crypt_bf_ver 1.0.2 +%define crypt_bf_ver 1.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 +%define _libdir32 %{_prefix}/lib + +%define libc_major 6 +%define libc %mklibname c %{libc_major} +%define libc_devel %mklibname -d c +%define libc_static_devel %mklibname -d -s c +%define multilibc libc%{libc_major} +%define api 2.16 + +%define _disable_ld_no_undefined 1 +%undefine _fortify_cflags + +# for added ports support for arches like arm +%define build_ports 0 +# add ports arches here +%ifarch %{arm} %{mipsx} +%define build_ports 1 %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 +%ifarch %{arm} +%define _gnu -gnueabi %endif -# Define Xen arches to build with -mno-tls-direct-direct-seg-refs -%define xenarches %{ix86} x86_64 +# Define Xen arches to build with -mno-tls-direct-seg-refs +%define xenarches %{ix86} # 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 +%define build_multiarch 0 +%ifarch x86_64 +%define build_multiarch 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 +%define enable_nsscrypt 1 +%ifarch %{ix86} x86_64 +%define enable_systap 1 +%else +%define enable_systap 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}} +# build documentation by default +%bcond_without doc +%bcond_without pdf +# enable utils by default +%bcond_without utils +#----------------------------------------------------------------------- Summary: The GNU libc libraries -Name: %{name} -Version: %{glibcversion} -Release: %{glibcrelease} -Epoch: %{glibcepoch} -License: LGPL +Name: glibc +Version: 2.16.0 +Release: 1 +Epoch: 6 +License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ Group: System/Libraries Url: http://www.gnu.org/software/libc/ # FSF source -Source0: http://ftp.gnu.org/gnu/glibc/%{source_package}.tar.xz +Source0: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz %if %{RELEASE} -Source1: http://ftp.gnu.org/gnu/glibc/%{source_package}.tar.xz.sig +Source1: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz.sig %endif -# Red Hat tarball -Source2: glibc-redhat.tar.bz2 +# Fedora tarball +Source2: %{glibcsrcdir}-fedora.tar.gz 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 +Source8: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz +%if %{RELEASE} +Source9: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz.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 +Source50: http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_ver}.tar.gz +Source51: http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_ver}.tar.gz.sign +Source52: http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/crypt_freesec.c +Source53: http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/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 +Obsoletes: glibc-profile Provides: glibc-crypt_blowfish = %{crypt_bf_ver} -Provides: glibc-localedata Provides: should-restart = system -%if %isarch %{xenarches} -Obsoletes: %{name}-xen -Provides: %{name}-xen +# we'll be the only package requiring this, avoiding any other package +# dependencies on '/bin/sh' or 'bash' +Requires: bash +%ifarch %{xenarches} +%rename %{name}-xen %endif # The dynamic linker supports DT_GNU_HASH -Provides: rtld(GNU_HASH) -Autoreq: false -%endif +Provides: rtld(GNU_HASH) BuildRequires: patch, gettext, perl -BuildRequires: linux-userspace-headers +BuildRequires: kernel-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 +# Old prelink versions breaks the system with glibc 2.11 Conflicts: prelink < 1:0.4.2-1.20091104.1mdv2010.1 BuildRequires: texinfo -%if %{build_pdf_doc} +%if %{with pdf} BuildRequires: texlive %endif -%if %{build_utils} +%if %{with utils} BuildRequires: gd-devel %endif +%if %{enable_systap} +BuildRequires: systemtap +%endif +%if %{enable_nsscrypt} +BuildRequires: nss-devel +%endif BuildRequires: autoconf2.5 -BuildRequires: libcap-devel -BuildRequires: rpm-mandriva-setup-build >= 1.104 -BuildRequires: spec-helper >= 0.31.2 +BuildRequires: cap-devel -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 +#----------------------------------------------------------------------- +# from fedora glibc.spec + +# +# Patches that are highly unlikely to ever be accepated upstream. +# +# Still needs to be broken down into individual patches +Patch00: glibc-fedora.patch + +# Is this still necessary, if so, it needs to go upstream +Patch01: glibc-stap.patch + +#----------------------------------------------------------------------- +# mandriva patches +Patch02: glibc-2.11.1-localedef-archive-follow-symlinks.patch +Patch03: glibc-2.15-fix-dns-with-broken-routers.patch +Patch04: glibc-2.14.90-nss-upgrade.patch +Patch05: glibc-2.16.0-share-locale.patch +Patch06: glibc-2.3.6-nsswitch.conf.patch +Patch07: glibc-2.2.4-xterm-xvt.patch +Patch08: glibc-2.3.3-nscd-enable.patch +Patch09: glibc-2.9-nscd-no-host-cache.patch +Patch10: glibc-2.4.90-i386-hwcapinfo.patch +Patch11: glibc-2.8-nscd-init-should-start.patch +Patch12: glibc-2.3.4-timezone.patch +Patch13: glibc-2.10.1-biarch-cpp-defines.patch +Patch14: glibc-2.8-ENOTTY-fr-translation.patch +Patch15: glibc-2.3.5-biarch-utils.patch +Patch16: glibc-2.16.0-multiarch.patch +Patch17: glibc-2.16.0-i586-hptiming.patch +Patch18: glibc-2.3.4-i586-if-no-cmov.patch +Patch19: glibc-2.3.6-pt_BR-i18nfixes.patch +Patch20: glibc-2.4.90-testsuite-ldbl-bits.patch +Patch21: glibc-2.16.0-testsuite-rt-notparallel.patch +Patch22: glibc-2.13-fix-compile-error.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 +Patch23: 0001-x86_64-fix-for-new-memcpy-behavior.patch -# 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 +# odd, for some reason the fedora patch applied earlier removes install of +# streams header.. just add them back for now :| +Patch24: glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch + +Patch25: glibc-no-leaf-attribute.patch +Patch26: glibc-2.16.0-string-format-fixes.patch + +#----------------------------------------------------------------------- +# from fedora glibc.spec +# Reverting an upstream patch. I don't think this has been discussed +# upstream yet. +Patch27: %{name}-rh769421.patch + +# Not likely to be accepted upstream +Patch28: %{name}-rh787201.patch + +# Not necessary to send upstream, fedora specific +Patch29: %{name}-rh688948.patch + +# Build info files in the source tree, then move to the build +# tree so that they're identical for multilib builds +Patch30: %{name}-rh825061.patch + +# stap, needs to be sent upstream +Patch31: %{name}-rh179072.patch + +# Needs to be sent upstream +Patch32: %{name}-rh697421.patch + +# Needs to be sent upstream +Patch33: %{name}-2.16.0-rh740682.patch + +# Needs to be sent upstream +Patch34: %{name}-rh657588.patch + +# Needs to be sent upstream +Patch35: %{name}-rh564528.patch + +# stap, needs to be sent upstream +Patch36: %{name}-stap-libm.patch + +# +# Patches submitted, but not yet approved upstream. +# Each should be associated with a BZ. +# Obviously we're not there right now, but that's the goal +# + +Patch37: %{name}-rh757881.patch + +# Upstream BZ 13013 +Patch38: %{name}-rh730856.patch + +Patch39: %{name}-rh741105.patch +Patch40: %{name}-rh770869.patch +Patch41: %{name}-rh770439.patch +Patch42: %{name}-rh789209.patch +Patch43: %{name}-rh691912.patch + +# Upstream BZ 13604 +Patch44: %{name}-rh790292.patch + +# Upstream BZ 13603 +Patch45: %{name}-rh790298.patch + +# Upstream BZ 13698 +Patch46: %{name}-rh791161.patch + +# Upstream BZ 12377 +#Patch47: %{name}-rh697149.patch + +# Upstream BZ 9954 +Patch48: %{name}-rh739743.patch + +# Upstream BZ 13939 +Patch49: %{name}-rh789238.patch + +#Upstream BZ 13818 +Patch50: %{name}-rh800224.patch + +# Upstream BZ 14247 +Patch51: %{name}-rh827510.patch + +Patch52: %{name}-rh803286.patch + + +# Upstream BZ 13939 +Patch53: %{name}-rh789238-2.patch + +# Upstream BZ 13761 +Patch54: %{name}-rh788989-2.patch + +# Upstream BZ 13027 +Patch55: %{name}-rh804630.patch + +# Upstream BZ 14185 +Patch56: %{name}-rh819430.patch + +# See http://sourceware.org/ml/libc-alpha/2012-06/msg00074.html +Patch57: %{name}-rh767693-2.patch + +#----------------------------------------------------------------------- +# mandriva patches +Patch58: glibc-2.10.1-mdv-avx-owl-crypt.patch +Patch59: glibc-2.10.1-mdv-owl-crypt_freesec.patch + +Patch60: glibc-2.16.0-avx-relocate_fcrypt.patch +Patch61: glibc-2.16.0-avx-increase_BF_FRAME.patch +Patch62: glibc-2.16.0-mdv-wrapper_handle_sha.patch + +# Requires to link thumb mode build +Patch63: glibc-2.14-arm-thumb.patch + +# Determine minimum kernel versions (rhbz#619538) +%define enablekernel 2.6.32 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 +%define _filter_GLIBC_PRIVATE 1 -%if !%{build_cross} Obsoletes: ld.so Provides: ld.so -%endif -Obsoletes: ldconfig -Provides: ldconfig = %{glibcepoch}:%{glibcversion}-%{glibcrelease} /sbin/ldconfig +%rename ldconfig +Provides: /sbin/ldconfig +Obsoletes: nss_db %description The glibc package contains standard libraries which are used by @@ -331,46 +313,142 @@ 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. +Linux system will not function. -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. +%post -p %{_sbindir}/glibc_post_upgrade -%package devel +%files -f libc.lang +%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 %dir %{_docdir}/glibc +%doc %{_docdir}/glibc/nss +%doc %{_docdir}/glibc/gai.conf +%doc %{_docdir}/glibc/COPYING +%doc %{_docdir}/glibc/COPYING.LIB +%{_mandir}/man1/* +%{_mandir}/man8/rpcinfo.8* +%{_mandir}/man8/ld.so* +%{_localedir}/locale.alias +/sbin/sln +%{_prefix}/libexec/getconf +%ifarch x86_64 +%exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32 +%exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG +%exclude %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32 +%exclude %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFFBIG +%exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFF32 +%exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG +%endif +%{_slibdir}/ld-%{api}.so +%ifarch %{ix86} +%{_slibdir}/ld-linux.so.2 +%{_slibdir}/i686 +%endif +%ifarch x86_64 +%{_slibdir}/ld-linux-x86-64.so.2 +%endif +%ifarch %{arm} +%{_slibdir}/ld-linux.so.3 +%endif +%{_slibdir}/lib*-[.0-9]*.so +%{_slibdir}/lib*.so.[0-9]* +%{_slibdir}/libSegFault.so +%dir %{_libdir}/audit +%{_libdir}/audit/sotruss-lib.so +%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}/iconv +%{_bindir}/ldd +%ifarch %{ix86} +%{_bindir}/lddlibc4 +%endif +%{_bindir}/locale +%{_bindir}/localedef +%{_bindir}/makedb +%{_bindir}/pldd +%{_bindir}/rpcgen +%{_bindir}/sotruss +%{_bindir}/sprof +%{_bindir}/tzselect +%{_sbindir}/iconvconfig +%{_sbindir}/glibc_post_upgrade +/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.* +%{_var}/db/Makefile + +######################################################################## +%if %{build_multiarch} +#----------------------------------------------------------------------- +%package -n %{multilibc} +Summary: The GNU libc libraries +Group: System/Libraries +Conflicts: glibc < 6:2.14.90-13 + +%post -n %{multilibc} + %{_sbindir}/iconvconfig %{_libdir32}/gconv -o %{_libdir32}/gconv/gconv-modules.cache + +%description -n %{multilibc} +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. + +%files -n %{multilibc} +%{_slibdir32}/ld-%{api}.so +%{_slibdir32}/ld-linux*.so.2 +%{_slibdir32}/lib*-[.0-9]*.so +%{_slibdir32}/lib*.so.[0-9]* +%{_slibdir32}/libSegFault.so +%dir %{_libdir32}/audit +%{_libdir32}/audit/sotruss-lib.so +%{_libdir32}/gconv/*.so +%{_libdir32}/gconv/gconv-modules +%ghost %{_libdir32}/gconv/gconv-modules.cache +%{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32 +%{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG +%{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32 +%{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFFBIG +%{_prefix}/libexec/getconf/XBS5_ILP32_OFF32 +%{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG +#----------------------------------------------------------------------- +# build_multiarch +%endif + +#----------------------------------------------------------------------- +%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 +Requires: %{name} = %{EVRD} +%if %{build_multiarch} +Requires: %{multilibc} = %{EVRD} %endif +Requires: kernel-headers Provides: glibc-crypt_blowfish-devel = %{crypt_bf_ver} +%rename glibc-doc +%if %{with pdf} +%rename glibc-doc-pdf +%endif -%description devel +%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 @@ -378,278 +456,289 @@ 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. +%files devel +%{_mandir}/man3/* +%{_infodir}/libc.info* +%doc %{_docdir}/glibc/* +%exclude %{_docdir}/glibc/nss +%exclude %{_docdir}/glibc/gai.conf +%exclude %{_docdir}/glibc/COPYING +%exclude %{_docdir}/glibc/COPYING.LIB +%{_includedir}/* +%{_libdir}/*.o +%{_libdir}/*.so +%{_libdir}/libbsd-compat.a +%{_libdir}/libbsd.a +%{_libdir}/libc_nonshared.a +%{_libdir}/libg.a +%{_libdir}/libieee.a +%{_libdir}/libmcheck.a +%{_libdir}/libpthread_nonshared.a +%{_libdir}/librpcsvc.a +%if %{build_multiarch} +%{_libdir32}/*.o +%{_libdir32}/*.so +%{_libdir32}/libbsd-compat.a +%{_libdir32}/libbsd.a +%{_libdir32}/libc_nonshared.a +%{_libdir32}/libg.a +%{_libdir32}/libieee.a +%{_libdir32}/libmcheck.a +%{_libdir32}/libpthread_nonshared.a +%{_libdir32}/librpcsvc.a +%endif -Install glibc-devel if you are going to develop programs which will -use the standard C libraries. - -%package static-devel +#----------------------------------------------------------------------- +%package static-devel Summary: Static libraries for GNU C library Group: Development/C -Requires: %{name}-devel = %{glibcepoch}:%{glibcversion}-%{glibcrelease} +Requires: %{name}-devel = %{EVRD} -%description static-devel +%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 +%files static-devel +%{_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_multiarch} +%{_libdir32}/libBrokenLocale.a +%{_libdir32}/libanl.a +%{_libdir32}/libc.a +%{_libdir32}/libcrypt.a +%{_libdir32}/libdl.a +%{_libdir32}/libm.a +%{_libdir32}/libnsl.a +%{_libdir32}/libpthread.a +%{_libdir32}/libresolv.a +%{_libdir32}/librt.a +%{_libdir32}/libutil.a +%endif -%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 +######################################################################## +%if %{build_nscd} +#----------------------------------------------------------------------- +%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 +Requires(pre): rpm-helper +Requires(preun):rpm-helper +Requires(post): rpm-helper +Requires(postun):rpm-helper -%description -n nscd +%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. +performance with NIS+, and may help with DNS as well. -Install nscd if you need a name service lookup caching daemon, and -you're not using a version 2.0 kernel. +%pre -n nscd + %_pre_useradd nscd / /sbin/nologin -%if %{build_debug} -%package debug -Summary: Shared standard C libraries with debugging information -Group: System/Libraries -Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease} -Autoreq: false +%post -n nscd + %_post_service nscd -%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. +%preun -n nscd + %_preun_service nscd -To use these libraries, you need to add %{_libdir}/debug to your -LD_LIBRARY_PATH variable prior to starting the debugger. +%postun -n nscd + %_postun_userdel nscd + if [ "$1" -ge "1" ]; then + /sbin/service nscd condrestart > /dev/null 2>&1 || : + fi + +%files -n nscd +%config(noreplace) %{_sysconfdir}/nscd.conf +%config(noreplace) %{_initrddir}/nscd +%{_sbindir}/nscd +#----------------------------------------------------------------------- +# build_nscd %endif -%package utils +######################################################################## +%if %{with utils} +#----------------------------------------------------------------------- +%package utils Summary: Development utilities from GNU C library Group: Development/Other -Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease} +Requires: %{name} = %{EVRD} -%description utils +%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. +%files utils +%{_bindir}/memusage +%{_bindir}/memusagestat +%{_bindir}/mtrace +%{_bindir}/pcprofiledump +%{_bindir}/xtrace +%{_slibdir}/libmemusage.so +%{_slibdir}/libpcprofile.so +%if %{build_multiarch} +%{_slibdir32}/libmemusage.so +%{_slibdir32}/libpcprofile.so +%endif +#----------------------------------------------------------------------- +# with utils +%endif + +######################################################################## %if %{build_i18ndata} -%package i18ndata +#----------------------------------------------------------------------- +%package i18ndata Summary: Database sources for 'locale' Group: System/Libraries +%rename glibc-localedata -%description i18ndata +%description i18ndata This package contains the data needed to build the locale data files to use the internationalization features of the GNU libc. + +%files i18ndata +%dir %{_datadir}/i18n +%dir %{_datadir}/i18n/charmaps +%{_datadir}/i18n/charmaps/* +%dir %{_datadir}/i18n/locales +%{_datadir}/i18n/locales/* +%{_datadir}/i18n/SUPPORTED +#----------------------------------------------------------------------- +# build_i18ndata %endif +######################################################################## %if %{build_timezone} -%package -n timezone +#----------------------------------------------------------------------- +%package -n timezone Summary: Time zone descriptions Group: System/Base -Conflicts: glibc < 2.2.5-6mdk +Obsoletes: zoneinfo -%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. +%description -n timezone +These are configuration files that describe possible time zones. + +%files -n timezone +%{_sbindir}/zdump +%{_sbindir}/zic +%{_mandir}/man1/zdump.1* +%{_datadir}/zoneinfo +#----------------------------------------------------------------------- +# build_timezone %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 +%setup -q -n %{glibcsrcdir} -b 2 -a 3 -a 8 -a 50 -%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 +%patch00 -p1 +%patch01 -p1 +%patch02 -p1 +%patch03 -p1 +%patch04 -p1 +%patch05 -p1 +%patch06 -p1 +%patch07 -p1 +%patch08 -p1 +%patch09 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +#patch22 -p0 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +#patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 +#patch47 -p1 +%patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p1 +%patch56 -p1 +%patch57 -p1 +# FIXME: owl patches are incompatible with glibc-2.16 # 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/ +#cp %{SOURCE52} %{SOURCE53} crypt/ +#echo "Applying crypt_blowfish patch:" +#patch58 -p1 +#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 +#patch59 -p1 +#patch60 -p1 +#patch61 -p1 # add sha256-crypt and sha512-crypt support to the Openwall wrapper -%patch43 -p0 -b .mdv-wrapper_handle_sha +#patch62 -p0 %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 + # 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 + +%if %{build_ports} + mv %{glibcportsdir} ports +%patch63 -p1 %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 -} +> %{checklist} # # BuildGlibc [+] @@ -658,66 +747,23 @@ 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 + i[3-6]86) +%ifarch x86_64 + BuildFlags="-march=pentium4 -mtune=generic" + BuildAltArch="yes" + BuildCompFlags="-m32" +%else + BuildFlags="-march=$arch -mtune=generic" +%endif ;; 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" @@ -741,109 +787,72 @@ function BuildGlibc() { 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 %{__common_cflags} -O3" - 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 + # XXX: -frecord-gcc-switches makes gold abort with assertion error and gcc segfault :| + BuildFlags="$(echo $BuildFlags |sed -e 's#-frecord-gcc-switches##g')" # 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 +%ifarch %{xenarches} + BuildFlags="$BuildFlags -mno-tls-direct-seg-refs" +%endif # Extra configure flags ExtraFlags= - if [[ "%{build_profile}" != "0" ]]; then - ExtraFlags="$ExtraFlags --enable-profile" - fi + + # We'll be having issues with biarch builds of these two as longs as their + # build dependencies aren't provided as biarch packages as well. + # But as the alternate arch is less likely to make any use of the + # functionality and that we might just ditch biarch packaging completely, + # we just enable it on the main arch for now. +%if %{enable_nsscrypt} || %{enable_systap} + if [[ "$BuildAltArch" = "no" ]]; then +%if %{enable_nsscrypt} + ExtraFlags="$ExtraFlags --enable-nss-crypt" +%endif +%if %{enable_systap} + ExtraFlags="$ExtraFlags --enable-systemtap" +%endif + fi +%endif # NPTL+TLS are now the default -%if %build_ports +%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 + rm -rf build-$arch-linux + mkdir build-$arch-linux + pushd build-$arch-linux [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main" - CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags" ../configure \ - $arch-%{_real_vendor}-linux%{gnuext} $BuildCross \ + CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags" LDFLAGS="%{ldflags}" ../configure \ + $arch-%{_target_vendor}-%{_target_os}%{?_gnu} \ --prefix=%{_prefix} \ --libexecdir=%{_prefix}/libexec \ --infodir=%{_infodir} \ - --enable-add-ons=$AddOns --without-cvs \ - $TlsFlags $ExtraFlags $MultiArchFlags $SElinuxFlags \ - --enable-experimental-malloc \ + --enable-add-ons=$AddOns \ + --disable-profile \ +%if %{build_selinux} + --with-selinux \ +%else + --without-selinux \ +%endif + --enable-bind-now \ + $ExtraFlags \ + $MultiArchFlags \ --enable-kernel=%{enablekernel} \ - --with-headers=$KernelHeaders ${1+"$@"} + --with-headers=%{_includedir} ${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 + check_flags="-k" # Generate test matrix [[ -d "build-$arch-linux" ]] || { @@ -851,199 +860,130 @@ function BuildGlibc() { return 1 } local BuildJobs="-j`getconf _NPROCESSORS_ONLN`" - echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList + echo "$BuildJobs -d build-$arch-linux $check_flags" >> %{checklist} - case $cpu in - i686|athlon) base_arch=i586;; - power*) base_arch=$arch;; + case $arch in + i686) base_arch=i586;; *) 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 + echo "$BuildJobs -d build-$arch-linux $check_flags" >> %{checklist} } return 0 } # Build main glibc -BuildGlibc %{target_cpu} +BuildGlibc %{_target_cpu} -%if %{build_biarch} -%if %isarch sparc64 -BuildGlibc sparcv9 +%if %{build_multiarch} + %ifarch x86_64 + BuildGlibc i686 + %endif +%else + # Build i686 libraries if not already building for i686 + case %{_target_cpu} in + i686) + ;; + i[3-5]86) + BuildGlibc i686 + ;; + esac %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} +# post install wrapper +gcc -static -Lbuild-%{_target_cpu}-linux %{optflags} -Os fedora/glibc_post_upgrade.c -o build-%{_target_cpu}-linux/glibc_post_upgrade \ + '-DLIBTLS="/%{_lib}/tls/"' \ + '-DGCONV_MODULES_DIR="%{_libdir}/gconv"' \ + '-DLD_SO_CONF="/etc/ld.so.conf"' \ + '-DICONVCONFIG="%{_sbindir}/iconvconfig"' + +#----------------------------------------------------------------------- +%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 + sh %{SOURCE5} $arglist || exit 1 +done < %{checklist} +#----------------------------------------------------------------------- %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/ +%if %{build_multiarch} + %ifarch x86_64 + ALT_ARCH=i686 + %endif + %make install install_root=%{buildroot} -C build-${ALT_ARCH}-linux %endif +%make install install_root=%{buildroot} -C build-%{_target_cpu}-linux +%if %{build_multiarch} + %ifarch x86_64 + rm -f %{buildroot}%{_bindir}/lddlibc4 + %endif +%endif + +install -m700 build-%{_target_cpu}-linux/glibc_post_upgrade -D %{buildroot}%{_sbindir}/glibc_post_upgrade 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 + mkdir -p %{buildroot}$LibDir/$SubDir/ + install -m755 libc.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc-*.so` + ln -sf `basename %{buildroot}$LibDir/libc-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc.so.*` + install -m755 math/libm.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm-*.so` + ln -sf `basename %{buildroot}$LibDir/libm-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm.so.*` + install -m755 nptl/libpthread.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread-*.so` + ln -sf `basename %{buildroot}$LibDir/libpthread-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread.so.*` + install -m755 nptl_db/libthread_db.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db-*.so` + ln -sf `basename %{buildroot}$LibDir/libthread_db-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db.so.*` + install -m755 rt/librt.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt-*.so` + ln -sf `basename %{buildroot}$LibDir/librt-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt.so.*` popd } # Install arch-specific optimized libraries -%if %isarch %{ix86} -case %{target_cpu} in +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 +install -m644 bits/stdio-lock.h -D %{buildroot}%{_includedir}/bits/stdio-lock.h +# And needs sanitizing as well. +install -m644 fedora/libc-lock.h -D %{buildroot}%{_includedir}/bits/libc-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 +mkdir -p %{buildroot}%{_localedir}/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* +rm -f %{buildroot}%{_libdir}/libNoVersion* +rm -f %{buildroot}%{_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 +ln -sf libbsd-compat.a %{buildroot}%{_libdir}/libbsd.a +%if %{build_multiarch} + ln -sf libbsd-compat.a %{buildroot}%{_libdir32}/libbsd.a %endif -%if "%{name}" == "glibc" -install -m 644 mandriva/nsswitch.conf $RPM_BUILD_ROOT%{_sysconfdir}/nsswitch.conf -%endif +install -m 644 mandriva/nsswitch.conf %{buildroot}%{_sysconfdir}/nsswitch.conf # 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 + install -m 644 nscd/nscd.conf %{buildroot}%{_sysconfdir} + mkdir -p %{buildroot}%{_initrddir} + install -m 755 nscd/nscd.init %{buildroot}%{_initrddir}/nscd %endif # These man pages require special attention @@ -1051,1619 +991,127 @@ 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} +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 +echo "include /etc/ld.so.conf.d/*.conf" > %{buildroot}%{_sysconfdir}/ld.so.conf +chmod 644 %{buildroot}%{_sysconfdir}/ld.so.conf +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d # ldconfig cache -mkdir -p $RPM_BUILD_ROOT%{_var}/cache/ldconfig -touch $RPM_BUILD_ROOT%{_var}/cache/ldconfig/aux-cache +mkdir -p %{buildroot}%{_var}/cache/ldconfig +touch %{buildroot}%{_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 +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 +cat > %{buildroot}%{_var}/lib/rpm/filetriggers/ldconfig.script << EOF #!/bin/sh ldconfig -X EOF -chmod 755 %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.script +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 +# gconv-modules.cache +touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache +chmod 644 %{buildroot}%{_libdir}/gconv/gconv-modules.cache +%if %{build_multiarch} + touch %{buildroot}%{_libdir32}/gconv/gconv-modules.cache + chmod 644 %{buildroot}%{_libdir32}/gconv/gconv-modules.cache %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 +touch %{buildroot}%{_sysconfdir}/ld.so.cache # 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 +pushd %{buildroot}%{_libdir} + for i in *.a; do + if [ -f "$i" ]; then + strip -g -R .comment -R .GCC.command.line $i + 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] +rm -f %{buildroot}%{_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 + install -m644 localedata/SUPPORTED %{buildroot}%{_datadir}/i18n/ %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 +rm -rf %{buildroot}%{_includedir}/netatalk/ # /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 + rm -f %{buildroot}%{_sysconfdir}/localtime + cp -f %{buildroot}%{_datadir}/zoneinfo/US/Eastern %{buildroot}%{_sysconfdir}/localtime + #ln -sf ..%{_datadir}/zoneinfo/US/Eastern %{buildroot}%{_sysconfdir}/localtime %endif -# [gg] build PDF documentation -%if %{build_pdf_doc} -(cd manual; texi2dvi -p -t @afourpaper -t @finalout libc.texinfo) +# Documentation +install -m 755 -d %{buildroot}%{_docdir}/glibc +%if %{with doc} + make -C build-%{_target_cpu}-linux html + cp -fpar build-%{_arch}-linux/manual/libc %{buildroot}%{_docdir}/glibc/html %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} +%if %{with pdf} + make -C build-%{_target_cpu}-linux pdf + install -m644 -D build-%{_arch}-linux/manual/libc.pdf %{buildroot}%{_docdir}/glibc/libc.pdf +%endif +install -m 644 COPYING COPYING.LIB README NEWS INSTALL BUGS \ + PROJECTS CONFORMANCE hesiod/README.hesiod LICENSES \ + ChangeLog* crypt/README.ufc-crypt nis/nss posix/gai.conf \ + %{buildroot}%{_docdir}/glibc +xz -0 --text %{buildroot}%{_docdir}/glibc/ChangeLog* +install -m 644 timezone/README %{buildroot}%{_docdir}/glibc/README.timezone +install -m 755 -d %{buildroot}%{_docdir}/glibc/crypt_blowfish install -m 644 crypt_blowfish-%{crypt_bf_ver}/{README,LINKS,PERFORMANCE} \ - documentation/crypt_blowfish-%{crypt_bf_ver} + %{buildroot}%{_docdir}/glibc/crypt_blowfish -# Generate final rpm filelist, with localized libc.mo files -rm -f rpm.filelist -%if "%{name}" == "glibc" +# Localization %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* +rm -f %{buildroot}%{_infodir}/dir.old* +rm -rf %{buildroot}%{_includedir}/asm-*/mach-*/ +rm -f %{buildroot}%{_localedir}/locale-archive* +# XXX: verify +find %{buildroot}%{_localedir} -type f -name LC_\* -o -name SYS_LC_\* |xargs rm -f -%if !%{build_utils} -%if %{build_biarch} -rm -f $RPM_BUILD_ROOT%{_slibdir32}/libmemusage.so -rm -f $RPM_BUILD_ROOT%{_slibdir32}/libpcprofile.so +%if !%{build_nscd} + rm -f %{buildroot}%{_sbindir}/nscd %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 + +rm -f %{buildroot}%{_infodir}/dir + +%if %{without utils} + rm -f %{buildroot}%{_bindir}/memusage + rm -f %{buildroot}%{_bindir}/memusagestat + rm -f %{buildroot}%{_bindir}/mtrace + rm -f %{buildroot}%{_bindir}/pcprofiledump + rm -f %{buildroot}%{_bindir}/xtrace + rm -f %{buildroot}%{_slibdir}/libmemusage.so + rm -f %{buildroot}%{_slibdir}/libpcprofile.so + %if %{build_multiarch} + rm -f %{buildroot}%{_slibdir32}/libmemusage.so + rm -f %{buildroot}%{_slibdir32}/libpcprofile.so + %endif %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 + rm -f %{buildroot}%{_sysconfdir}/localtime + rm -f %{buildroot}%{_sbindir}/zdump + rm -f %{buildroot}%{_sbindir}/zic + rm -f %{buildroot}%{_mandir}/man1/zdump.1* + rm -rf %{buildroot}%{_datadir}/zoneinfo %endif %if !%{build_i18ndata} -rm -rf $RPM_BUILD_ROOT%{_datadir}/i18n + rm -rf %{buildroot}%{_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 - +# This will make the '-g' argument to be passed to eu-strip for these libraries, so that +# some info is kept that's required to make valgrind work without depending on glibc-debug +# package to be installed. +export EXCLUDE_FROM_FULL_STRIP="ld-%{api}.so libpthread libc-%{api}.so libm-%{api}.so" diff --git a/glibc.spec~ b/glibc.spec~ new file mode 100644 index 0000000..91fb86e --- /dev/null +++ b/glibc.spec~ @@ -0,0 +1,1116 @@ +# CVS snapshots of glibc +%define RELEASE 1 +%if %{RELEASE} +%define glibcsrcdir glibc-%{version} +%define glibcportsdir glibc-%{version} +%else +%define glibcsrcdir glibc-2.15-a316c1f +%define glibcportsdir glibc-ports-2.15-ad8ae7d +%endif + +%define checklist %{_builddir}/%{glibcsrcdir}/Check.list + +# crypt blowfish support +%define crypt_bf_ver 1.2 + +%define _slibdir /%{_lib} +%define _slibdir32 /lib +%define _libdir32 %{_prefix}/lib + +%define libc_major 6 +%define libc %mklibname c %{libc_major} +%define libc_devel %mklibname -d c +%define libc_static_devel %mklibname -d -s c +%define multilibc libc%{libc_major} +%define api 2.16 + +%define _disable_ld_no_undefined 1 +%undefine _fortify_cflags + +# for added ports support for arches like arm +%define build_ports 0 +# add ports arches here +%ifarch %{arm} %{mipsx} +%define build_ports 1 +%endif + +%ifarch %{arm} +%define _gnu -gnueabi +%endif + +# Define Xen arches to build with -mno-tls-direct-seg-refs +%define xenarches %{ix86} + +# Define to build nscd with selinux support +%define build_selinux 0 + +# 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_multiarch 0 +%ifarch x86_64 +%define build_multiarch 1 +%endif + +%define build_nscd 1 +%define build_i18ndata 1 +%define build_timezone 0 + +%define enable_nsscrypt 1 +%ifarch %{ix86} x86_64 +%define enable_systap 1 +%else +%define enable_systap 0 +%endif + +# build documentation by default +%bcond_without doc +%bcond_without pdf +# enable utils by default +%bcond_without utils + +#----------------------------------------------------------------------- +Summary: The GNU libc libraries +Name: glibc +Version: 2.16.0 +Release: 1 +Epoch: 6 +License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ +Group: System/Libraries +Url: http://www.gnu.org/software/libc/ + +# FSF source +Source0: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz +%if %{RELEASE} +Source1: http://ftp.gnu.org/gnu/glibc/%{glibcsrcdir}.tar.xz.sig +%endif + +# Fedora tarball +Source2: %{glibcsrcdir}-fedora.tar.gz +Source3: glibc-manpages.tar.bz2 +Source5: glibc-check.sh + +Source8: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz +%if %{RELEASE} +Source9: http://ftp.gnu.org/gnu/glibc/%{glibcportsdir}.tar.xz.sig +%endif + +# Blowfish support +Source50: http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_ver}.tar.gz +Source51: http://www.openwall.com/crypt/crypt_blowfish-%{crypt_bf_ver}.tar.gz.sign +Source52: http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/crypt_freesec.c +Source53: http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/glibc/crypt_freesec.h + +Obsoletes: glibc-profile +Provides: glibc-crypt_blowfish = %{crypt_bf_ver} +Provides: should-restart = system +# we'll be the only package requiring this, avoiding any other package +# dependencies on '/bin/sh' or 'bash' +Requires: bash +%ifarch %{xenarches} +%rename %{name}-xen +%endif +# The dynamic linker supports DT_GNU_HASH +Provides: rtld(GNU_HASH) +BuildRequires: patch, gettext, perl +BuildRequires: kernel-headers +%if %{build_selinux} +BuildRequires: libselinux-devel >= 1.17.10 +%endif + +# Old prelink versions breaks the system with glibc 2.11 +Conflicts: prelink < 1:0.4.2-1.20091104.1mdv2010.1 + +BuildRequires: texinfo +%if %{with pdf} +BuildRequires: texlive +%endif +%if %{with utils} +BuildRequires: gd-devel +%endif +%if %{enable_systap} +BuildRequires: systemtap +%endif +%if %{enable_nsscrypt} +BuildRequires: nss-devel +%endif +BuildRequires: autoconf2.5 +BuildRequires: cap-devel + +#----------------------------------------------------------------------- +# from fedora glibc.spec + +# +# Patches that are highly unlikely to ever be accepated upstream. +# +# Still needs to be broken down into individual patches +Patch00: glibc-fedora.patch + +# Is this still necessary, if so, it needs to go upstream +Patch01: glibc-stap.patch + +#----------------------------------------------------------------------- +# mandriva patches +Patch02: glibc-2.11.1-localedef-archive-follow-symlinks.patch +Patch03: glibc-2.15-fix-dns-with-broken-routers.patch +Patch04: glibc-2.14.90-nss-upgrade.patch +Patch05: glibc-2.16.0-share-locale.patch +Patch06: glibc-2.3.6-nsswitch.conf.patch +Patch07: glibc-2.2.4-xterm-xvt.patch +Patch08: glibc-2.3.3-nscd-enable.patch +Patch09: glibc-2.9-nscd-no-host-cache.patch +Patch10: glibc-2.4.90-i386-hwcapinfo.patch +Patch11: glibc-2.8-nscd-init-should-start.patch +Patch12: glibc-2.3.4-timezone.patch +Patch13: glibc-2.10.1-biarch-cpp-defines.patch +Patch14: glibc-2.8-ENOTTY-fr-translation.patch +Patch15: glibc-2.3.5-biarch-utils.patch +Patch16: glibc-2.16.0-multiarch.patch +Patch17: glibc-2.16.0-i586-hptiming.patch +Patch18: glibc-2.3.4-i586-if-no-cmov.patch +Patch19: glibc-2.3.6-pt_BR-i18nfixes.patch +Patch20: glibc-2.4.90-testsuite-ldbl-bits.patch +Patch21: glibc-2.16.0-testsuite-rt-notparallel.patch +Patch22: glibc-2.13-fix-compile-error.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 +Patch23: 0001-x86_64-fix-for-new-memcpy-behavior.patch + +# odd, for some reason the fedora patch applied earlier removes install of +# streams header.. just add them back for now :| +Patch24: glibc-2.14.90-revert-fedora-not-installing-stream-headers.patch + +Patch25: glibc-no-leaf-attribute.patch +Patch26: glibc-2.16.0-string-format-fixes.patch + +#----------------------------------------------------------------------- +# from fedora glibc.spec +# Reverting an upstream patch. I don't think this has been discussed +# upstream yet. +Patch27: %{name}-rh769421.patch + +# Not likely to be accepted upstream +Patch28: %{name}-rh787201.patch + +# Not necessary to send upstream, fedora specific +Patch29: %{name}-rh688948.patch + +# Build info files in the source tree, then move to the build +# tree so that they're identical for multilib builds +Patch30: %{name}-rh825061.patch + +# stap, needs to be sent upstream +Patch31: %{name}-rh179072.patch + +# Needs to be sent upstream +Patch32: %{name}-rh697421.patch + +# Needs to be sent upstream +Patch33: %{name}-2.16.0-rh740682.patch + +# Needs to be sent upstream +Patch34: %{name}-rh657588.patch + +# Needs to be sent upstream +Patch35: %{name}-rh564528.patch + +# stap, needs to be sent upstream +Patch36: %{name}-stap-libm.patch + +# +# Patches submitted, but not yet approved upstream. +# Each should be associated with a BZ. +# Obviously we're not there right now, but that's the goal +# + +Patch37: %{name}-rh757881.patch + +# Upstream BZ 13013 +Patch38: %{name}-rh730856.patch + +Patch39: %{name}-rh741105.patch +Patch40: %{name}-rh770869.patch +Patch41: %{name}-rh770439.patch +Patch42: %{name}-rh789209.patch +Patch43: %{name}-rh691912.patch + +# Upstream BZ 13604 +Patch44: %{name}-rh790292.patch + +# Upstream BZ 13603 +Patch45: %{name}-rh790298.patch + +# Upstream BZ 13698 +Patch46: %{name}-rh791161.patch + +# Upstream BZ 12377 +#Patch47: %{name}-rh697149.patch + +# Upstream BZ 9954 +Patch48: %{name}-rh739743.patch + +# Upstream BZ 13939 +Patch49: %{name}-rh789238.patch + +#Upstream BZ 13818 +Patch50: %{name}-rh800224.patch + +# Upstream BZ 14247 +Patch51: %{name}-rh827510.patch + +Patch52: %{name}-rh803286.patch + + +# Upstream BZ 13939 +Patch53: %{name}-rh789238-2.patch + +# Upstream BZ 13761 +Patch54: %{name}-rh788989-2.patch + +# Upstream BZ 13027 +Patch55: %{name}-rh804630.patch + +# Upstream BZ 14185 +Patch56: %{name}-rh819430.patch + +# See http://sourceware.org/ml/libc-alpha/2012-06/msg00074.html +Patch57: %{name}-rh767693-2.patch + +#----------------------------------------------------------------------- +# mandriva patches +Patch58: glibc-2.10.1-mdv-avx-owl-crypt.patch +Patch59: glibc-2.10.1-mdv-owl-crypt_freesec.patch + +Patch60: glibc-2.16.0-avx-relocate_fcrypt.patch +Patch61: glibc-2.16.0-avx-increase_BF_FRAME.patch +Patch62: glibc-2.16.0-mdv-wrapper_handle_sha.patch + +# Requires to link thumb mode build +Patch63: glibc-2.14-arm-thumb.patch + +# Determine minimum kernel versions (rhbz#619538) +%define enablekernel 2.6.32 +Conflicts: kernel < %{enablekernel} + +# Don't try to explicitly provide GLIBC_PRIVATE versioned libraries +%define _filter_GLIBC_PRIVATE 1 + +Obsoletes: ld.so +Provides: ld.so + +%rename ldconfig +Provides: /sbin/ldconfig +Obsoletes: nss_db + +%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. + +%post -p %{_sbindir}/glibc_post_upgrade + +%files -f libc.lang +%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 %dir %{_docdir}/glibc +%doc %{_docdir}/glibc/nss +%doc %{_docdir}/glibc/gai.conf +%doc %{_docdir}/glibc/COPYING +%doc %{_docdir}/glibc/COPYING.LIB +%{_mandir}/man1/* +%{_mandir}/man8/rpcinfo.8* +%{_mandir}/man8/ld.so* +%{_localedir}/locale.alias +/sbin/sln +%{_prefix}/libexec/getconf +%ifarch x86_64 +%exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32 +%exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG +%exclude %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32 +%exclude %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFFBIG +%exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFF32 +%exclude %{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG +%endif +%{_slibdir}/ld-%{api}.so +%ifarch %{ix86} +%{_slibdir}/ld-linux.so.2 +%{_slibdir}/i686 +%endif +%ifarch x86_64 +%{_slibdir}/ld-linux-x86-64.so.2 +%endif +%ifarch %{arm} +%{_slibdir}/ld-linux.so.3 +%endif +%{_slibdir}/lib*-[.0-9]*.so +%{_slibdir}/lib*.so.[0-9]* +%{_slibdir}/libSegFault.so +%dir %{_libdir}/audit +%{_libdir}/audit/sotruss-lib.so +%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}/iconv +%{_bindir}/ldd +%ifarch %{ix86} +%{_bindir}/lddlibc4 +%endif +%{_bindir}/locale +%{_bindir}/localedef +%{_bindir}/makedb +%{_bindir}/pldd +%{_bindir}/rpcgen +%{_bindir}/sotruss +%{_bindir}/sprof +%{_bindir}/tzselect +%{_sbindir}/iconvconfig +%{_sbindir}/glibc_post_upgrade +/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.* +%{_var}/db/Makefile + +######################################################################## +%if %{build_multiarch} +#----------------------------------------------------------------------- +%package -n %{multilibc} +Summary: The GNU libc libraries +Group: System/Libraries +Conflicts: glibc < 6:2.14.90-13 + +%post -n %{multilibc} + %{_sbindir}/iconvconfig %{_libdir32}/gconv -o %{_libdir32}/gconv/gconv-modules.cache + +%description -n %{multilibc} +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. + +%files -n %{multilibc} +%{_slibdir32}/ld-%{api}.so +%{_slibdir32}/ld-linux*.so.2 +%{_slibdir32}/lib*-[.0-9]*.so +%{_slibdir32}/lib*.so.[0-9]* +%{_slibdir32}/libSegFault.so +%dir %{_libdir32}/audit +%{_libdir32}/audit/sotruss-lib.so +%{_libdir32}/gconv/*.so +%{_libdir32}/gconv/gconv-modules +%ghost %{_libdir32}/gconv/gconv-modules.cache +%{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32 +%{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG +%{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32 +%{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFFBIG +%{_prefix}/libexec/getconf/XBS5_ILP32_OFF32 +%{_prefix}/libexec/getconf/XBS5_ILP32_OFFBIG +#----------------------------------------------------------------------- +# build_multiarch +%endif + +#----------------------------------------------------------------------- +%package devel +Summary: Header and object files for development using standard C libraries +Group: Development/C +Requires: %{name} = %{EVRD} +%if %{build_multiarch} +Requires: %{multilibc} = %{EVRD} +%endif +Requires: kernel-headers +Provides: glibc-crypt_blowfish-devel = %{crypt_bf_ver} +%rename glibc-doc +%if %{with pdf} +%rename glibc-doc-pdf +%endif + +%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. + +%files devel +%{_mandir}/man3/* +%{_infodir}/libc.info* +%doc %{_docdir}/glibc/* +%exclude %{_docdir}/glibc/nss +%exclude %{_docdir}/glibc/gai.conf +%exclude %{_docdir}/glibc/COPYING +%exclude %{_docdir}/glibc/COPYING.LIB +%{_includedir}/* +%{_libdir}/*.o +%{_libdir}/*.so +%{_libdir}/libbsd-compat.a +%{_libdir}/libbsd.a +%{_libdir}/libc_nonshared.a +%{_libdir}/libg.a +%{_libdir}/libieee.a +%{_libdir}/libmcheck.a +%{_libdir}/libpthread_nonshared.a +%{_libdir}/librpcsvc.a +%if %{build_multiarch} +%{_libdir32}/*.o +%{_libdir32}/*.so +%{_libdir32}/libbsd-compat.a +%{_libdir32}/libbsd.a +%{_libdir32}/libc_nonshared.a +%{_libdir32}/libg.a +%{_libdir32}/libieee.a +%{_libdir32}/libmcheck.a +%{_libdir32}/libpthread_nonshared.a +%{_libdir32}/librpcsvc.a +%endif + +#----------------------------------------------------------------------- +%package static-devel +Summary: Static libraries for GNU C library +Group: Development/C +Requires: %{name}-devel = %{EVRD} + +%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. + +%files static-devel +%{_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_multiarch} +%{_libdir32}/libBrokenLocale.a +%{_libdir32}/libanl.a +%{_libdir32}/libc.a +%{_libdir32}/libcrypt.a +%{_libdir32}/libdl.a +%{_libdir32}/libm.a +%{_libdir32}/libnsl.a +%{_libdir32}/libpthread.a +%{_libdir32}/libresolv.a +%{_libdir32}/librt.a +%{_libdir32}/libutil.a +%endif + +######################################################################## +%if %{build_nscd} +#----------------------------------------------------------------------- +%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 + +%description -n nscd +Nscd caches name service lookups and can dramatically improve +performance with NIS+, and may help with DNS as well. + +%pre -n nscd + %_pre_useradd nscd / /sbin/nologin + +%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 + +%files -n nscd +%config(noreplace) %{_sysconfdir}/nscd.conf +%config(noreplace) %{_initrddir}/nscd +%{_sbindir}/nscd +#----------------------------------------------------------------------- +# build_nscd +%endif + +######################################################################## +%if %{with utils} +#----------------------------------------------------------------------- +%package utils +Summary: Development utilities from GNU C library +Group: Development/Other +Requires: %{name} = %{EVRD} + +%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. + +%files utils +%{_bindir}/memusage +%{_bindir}/memusagestat +%{_bindir}/mtrace +%{_bindir}/pcprofiledump +%{_bindir}/xtrace +%{_slibdir}/libmemusage.so +%{_slibdir}/libpcprofile.so +%if %{build_multiarch} +%{_slibdir32}/libmemusage.so +%{_slibdir32}/libpcprofile.so +%endif +#----------------------------------------------------------------------- +# with utils +%endif + +######################################################################## +%if %{build_i18ndata} +#----------------------------------------------------------------------- +%package i18ndata +Summary: Database sources for 'locale' +Group: System/Libraries +%rename glibc-localedata + +%description i18ndata +This package contains the data needed to build the locale data files +to use the internationalization features of the GNU libc. + +%files i18ndata +%dir %{_datadir}/i18n +%dir %{_datadir}/i18n/charmaps +%{_datadir}/i18n/charmaps/* +%dir %{_datadir}/i18n/locales +%{_datadir}/i18n/locales/* +%{_datadir}/i18n/SUPPORTED +#----------------------------------------------------------------------- +# build_i18ndata +%endif + +######################################################################## +%if %{build_timezone} +#----------------------------------------------------------------------- +%package -n timezone +Summary: Time zone descriptions +Group: System/Base +Obsoletes: zoneinfo + +%description -n timezone +These are configuration files that describe possible time zones. + +%files -n timezone +%{_sbindir}/zdump +%{_sbindir}/zic +%{_mandir}/man1/zdump.1* +%{_datadir}/zoneinfo +#----------------------------------------------------------------------- +# build_timezone +%endif + +######################################################################## +%prep +%setup -q -n %{glibcsrcdir} -b 2 -a 3 -a 8 -a 50 + +%patch00 -p1 +%patch01 -p1 +%patch02 -p1 +%patch03 -p1 +%patch04 -p1 +%patch05 -p1 +%patch06 -p1 +%patch07 -p1 +%patch08 -p1 +%patch09 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +#patch22 -p0 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +#patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch39 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 +%patch44 -p1 +%patch45 -p1 +%patch46 -p1 +#patch47 -p1 +%patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 +%patch52 -p1 +%patch53 -p1 +%patch54 -p1 +%patch55 -p1 +%patch56 -p1 +%patch57 -p1 + +# copy freesec source +#cp %{SOURCE52} %{SOURCE53} crypt/ +#echo "Applying crypt_blowfish patch:" +#patch58 -p1 +#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) +#patch59 -p1 +#patch60 -p1 +#patch61 -p1 +# add sha256-crypt and sha512-crypt support to the Openwall wrapper +#patch62 -p0 + +%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 + +%if %{build_ports} + mv %{glibcportsdir} ports +%patch63 -p1 +%endif + +find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; + +# 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} + +# +# BuildGlibc [+] +# +function BuildGlibc() { + arch="$1" + shift 1 + + # Select optimization flags and compiler to use + BuildAltArch="no" + BuildCompFlags="" + BuildFlags="" + case $arch in + i[3-6]86) +%ifarch x86_64 + BuildFlags="-march=pentium4 -mtune=generic" + BuildAltArch="yes" + BuildCompFlags="-m32" +%else + BuildFlags="-march=$arch -mtune=generic" +%endif + ;; + x86_64) + BuildFlags="-mtune=generic" + ;; + 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" + + BuildFlags="$BuildFlags -DNDEBUG=1 %{__common_cflags} -O3" + + # XXX: -frecord-gcc-switches makes gold abort with assertion error and gcc segfault :| + BuildFlags="$(echo $BuildFlags |sed -e 's#-frecord-gcc-switches##g')" + + # Do not use direct references against %gs when accessing tls data + # XXX make it the default in GCC? (for other non glibc specific usage) +%ifarch %{xenarches} + BuildFlags="$BuildFlags -mno-tls-direct-seg-refs" +%endif + + # Extra configure flags + ExtraFlags= + + # We'll be having issues with biarch builds of these two as longs as their + # build dependencies aren't provided as biarch packages as well. + # But as the alternate arch is less likely to make any use of the + # functionality and that we might just ditch biarch packaging completely, + # we just enable it on the main arch for now. +%if %{enable_nsscrypt} || %{enable_systap} + if [[ "$BuildAltArch" = "no" ]]; then +%if %{enable_nsscrypt} + ExtraFlags="$ExtraFlags --enable-nss-crypt" +%endif +%if %{enable_systap} + ExtraFlags="$ExtraFlags --enable-systemtap" +%endif + fi +%endif + + # NPTL+TLS are now the default +%if %{build_ports} + Pthreads="ports,nptl" +%else + Pthreads="nptl" +%endif + + # Add-ons + AddOns="$Pthreads,libidn" + + # Force a separate and clean object dir + rm -rf build-$arch-linux + mkdir build-$arch-linux + pushd build-$arch-linux + [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main" + CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags" LDFLAGS="%{ldflags}" ../configure \ + $arch-%{_target_vendor}-%{_target_os}%{?_gnu} \ + --prefix=%{_prefix} \ + --libexecdir=%{_prefix}/libexec \ + --infodir=%{_infodir} \ + --enable-add-ons=$AddOns \ + --disable-profile \ +%if %{build_selinux} + --with-selinux \ +%else + --without-selinux \ +%endif + --enable-bind-now \ + $ExtraFlags \ + $MultiArchFlags \ + --enable-kernel=%{enablekernel} \ + --with-headers=%{_includedir} ${1+"$@"} + %make -r + popd + + check_flags="-k" + + # 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 $arch in + i686) base_arch=i586;; + *) 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_multiarch} + %ifarch x86_64 + BuildGlibc i686 + %endif +%else + # Build i686 libraries if not already building for i686 + case %{_target_cpu} in + i686) + ;; + i[3-5]86) + BuildGlibc i686 + ;; + esac +%endif + +make -C crypt_blowfish-%{crypt_bf_ver} man + +# post install wrapper +gcc -static -Lbuild-%{_target_cpu}-linux %{optflags} -Os fedora/glibc_post_upgrade.c -o build-%{_target_cpu}-linux/glibc_post_upgrade \ + '-DLIBTLS="/%{_lib}/tls/"' \ + '-DGCONV_MODULES_DIR="%{_libdir}/gconv"' \ + '-DLD_SO_CONF="/etc/ld.so.conf"' \ + '-DICONVCONFIG="%{_sbindir}/iconvconfig"' + +#----------------------------------------------------------------------- +%check +export TMPDIR=/tmp +export TIMEOUTFACTOR=16 +while read arglist; do + sh %{SOURCE5} $arglist || exit 1 +done < %{checklist} + +#----------------------------------------------------------------------- +%install +%if %{build_multiarch} + %ifarch x86_64 + ALT_ARCH=i686 + %endif + %make install install_root=%{buildroot} -C build-${ALT_ARCH}-linux +%endif +%make install install_root=%{buildroot} -C build-%{_target_cpu}-linux +%if %{build_multiarch} + %ifarch x86_64 + rm -f %{buildroot}%{_bindir}/lddlibc4 + %endif +%endif + +install -m700 build-%{_target_cpu}-linux/glibc_post_upgrade -D %{buildroot}%{_sbindir}/glibc_post_upgrade +sh manpages/Script.sh + +# Install extra glibc libraries +function InstallGlibc() { + local BuildDir="$1" + local SubDir="$2" + local LibDir="$3" + + [[ -z "$LibDir" ]] && LibDir="%{_slibdir}" + + pushd $BuildDir + mkdir -p %{buildroot}$LibDir/$SubDir/ + install -m755 libc.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc-*.so` + ln -sf `basename %{buildroot}$LibDir/libc-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc.so.*` + install -m755 math/libm.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm-*.so` + ln -sf `basename %{buildroot}$LibDir/libm-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm.so.*` + install -m755 nptl/libpthread.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread-*.so` + ln -sf `basename %{buildroot}$LibDir/libpthread-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread.so.*` + install -m755 nptl_db/libthread_db.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db-*.so` + ln -sf `basename %{buildroot}$LibDir/libthread_db-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db.so.*` + install -m755 rt/librt.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt-*.so` + ln -sf `basename %{buildroot}$LibDir/librt-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt.so.*` + popd +} + +# Install arch-specific optimized libraries +case %{_target_cpu} in +i[3-5]86) + InstallGlibc build-i686-linux i686 + ;; +esac + +# NPTL is not usable outside of glibc, so include +# the generic one (RH#162634) +install -m644 bits/stdio-lock.h -D %{buildroot}%{_includedir}/bits/stdio-lock.h +# And needs sanitizing as well. +install -m644 fedora/libc-lock.h -D %{buildroot}%{_includedir}/bits/libc-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 %{buildroot}%{_localedir}/ru_RU/LC_MESSAGES + +# Remove the files we don't want to distribute +rm -f %{buildroot}%{_libdir}/libNoVersion* +rm -f %{buildroot}%{_slibdir}/libNoVersion* + +ln -sf libbsd-compat.a %{buildroot}%{_libdir}/libbsd.a +%if %{build_multiarch} + ln -sf libbsd-compat.a %{buildroot}%{_libdir32}/libbsd.a +%endif + +install -m 644 mandriva/nsswitch.conf %{buildroot}%{_sysconfdir}/nsswitch.conf + +# This is for ncsd - in glibc 2.2 +%if %{build_nscd} + install -m 644 nscd/nscd.conf %{buildroot}%{_sysconfdir} + mkdir -p %{buildroot}%{_initrddir} + install -m 755 nscd/nscd.init %{buildroot}%{_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 +echo "include /etc/ld.so.conf.d/*.conf" > %{buildroot}%{_sysconfdir}/ld.so.conf +chmod 644 %{buildroot}%{_sysconfdir}/ld.so.conf +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d + +# ldconfig cache +mkdir -p %{buildroot}%{_var}/cache/ldconfig +touch %{buildroot}%{_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 + +# gconv-modules.cache +touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache +chmod 644 %{buildroot}%{_libdir}/gconv/gconv-modules.cache +%if %{build_multiarch} + touch %{buildroot}%{_libdir32}/gconv/gconv-modules.cache + chmod 644 %{buildroot}%{_libdir32}/gconv/gconv-modules.cache +%endif + +touch %{buildroot}%{_sysconfdir}/ld.so.cache + +# Strip debugging info from all static libraries +pushd %{buildroot}%{_libdir} + for i in *.a; do + if [ -f "$i" ]; then + strip -g -R .comment -R .GCC.command.line $i + fi + done +popd + +# rquota.x and rquota.h are now provided by quota +rm -f %{buildroot}%{_includedir}/rpcsvc/rquota.[hx] + +%if %{build_i18ndata} + install -m644 localedata/SUPPORTED %{buildroot}%{_datadir}/i18n/ +%endif + +rm -rf %{buildroot}%{_includedir}/netatalk/ + +# /etc/localtime - we're proud of our timezone #Well we(mdk) may put Paris +%if %{build_timezone} + rm -f %{buildroot}%{_sysconfdir}/localtime + cp -f %{buildroot}%{_datadir}/zoneinfo/US/Eastern %{buildroot}%{_sysconfdir}/localtime + #ln -sf ..%{_datadir}/zoneinfo/US/Eastern %{buildroot}%{_sysconfdir}/localtime +%endif + +# Documentation +install -m 755 -d %{buildroot}%{_docdir}/glibc +%if %{with doc} + make -C build-%{_target_cpu}-linux html + cp -fpar build-%{_arch}-linux/manual/libc %{buildroot}%{_docdir}/glibc/html +%endif +%if %{with pdf} + make -C build-%{_target_cpu}-linux pdf + install -m644 -D build-%{_arch}-linux/manual/libc.pdf %{buildroot}%{_docdir}/glibc/libc.pdf +%endif +install -m 644 COPYING COPYING.LIB README NEWS INSTALL BUGS \ + PROJECTS CONFORMANCE hesiod/README.hesiod LICENSES \ + ChangeLog* crypt/README.ufc-crypt nis/nss posix/gai.conf \ + %{buildroot}%{_docdir}/glibc +xz -0 --text %{buildroot}%{_docdir}/glibc/ChangeLog* +install -m 644 timezone/README %{buildroot}%{_docdir}/glibc/README.timezone +install -m 755 -d %{buildroot}%{_docdir}/glibc/crypt_blowfish +install -m 644 crypt_blowfish-%{crypt_bf_ver}/{README,LINKS,PERFORMANCE} \ + %{buildroot}%{_docdir}/glibc/crypt_blowfish + +# Localization +%find_lang libc + +# Remove unpackaged files +rm -f %{buildroot}%{_infodir}/dir.old* +rm -rf %{buildroot}%{_includedir}/asm-*/mach-*/ +rm -f %{buildroot}%{_localedir}/locale-archive* +# XXX: verify +find %{buildroot}%{_localedir} -type f -name LC_\* -o -name SYS_LC_\* |xargs rm -f + +%if !%{build_nscd} + rm -f %{buildroot}%{_sbindir}/nscd +%endif + +rm -f %{buildroot}%{_infodir}/dir + +%if %{without utils} + rm -f %{buildroot}%{_bindir}/memusage + rm -f %{buildroot}%{_bindir}/memusagestat + rm -f %{buildroot}%{_bindir}/mtrace + rm -f %{buildroot}%{_bindir}/pcprofiledump + rm -f %{buildroot}%{_bindir}/xtrace + rm -f %{buildroot}%{_slibdir}/libmemusage.so + rm -f %{buildroot}%{_slibdir}/libpcprofile.so + %if %{build_multiarch} + rm -f %{buildroot}%{_slibdir32}/libmemusage.so + rm -f %{buildroot}%{_slibdir32}/libpcprofile.so + %endif +%endif + +%if !%{build_timezone} + rm -f %{buildroot}%{_sysconfdir}/localtime + rm -f %{buildroot}%{_sbindir}/zdump + rm -f %{buildroot}%{_sbindir}/zic + rm -f %{buildroot}%{_mandir}/man1/zdump.1* + rm -rf %{buildroot}%{_datadir}/zoneinfo +%endif + +%if !%{build_i18ndata} + rm -rf %{buildroot}%{_datadir}/i18n +%endif + +# This will make the '-g' argument to be passed to eu-strip for these libraries, so that +# some info is kept that's required to make valgrind work without depending on glibc-debug +# package to be installed. +export EXCLUDE_FROM_FULL_STRIP="ld-%{api}.so libpthread libc-%{api}.so libm-%{api}.so" diff --git a/glibc_local-syscall-mcount.diff b/glibc_local-syscall-mcount.diff deleted file mode 100644 index df71190..0000000 --- a/glibc_local-syscall-mcount.diff +++ /dev/null @@ -1,27 +0,0 @@ -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}