From e3a9f6982a94b97e83ac37101bab56b41197607e Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 28 Nov 2012 14:30:40 -0700 Subject: [PATCH] - Resync with master. - Drop local patch for 878913. - Drop local patch for 880666. - Drop local patch for 767693. - Repack patchlist. --- .gitignore | 2 + glibc-rh767693-2.patch | 76 --------------------- glibc-rh878913.patch | 27 -------- glibc-rh880666.patch | 148 ----------------------------------------- glibc.spec | 27 +++----- sources | 4 +- 6 files changed, 15 insertions(+), 269 deletions(-) delete mode 100644 glibc-rh767693-2.patch delete mode 100644 glibc-rh878913.patch delete mode 100644 glibc-rh880666.patch diff --git a/.gitignore b/.gitignore index 103a1e8..eeae38e 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,5 @@ glibc-2.14-394-g8f3b1ff /glibc-2.16.90-d14fbb17.tar.gz /glibc-2.16.90-3e2e43e2-fedora.tar.gz /glibc-2.16.90-3e2e43e2.tar.gz +/glibc-2.16.90-14bc93a9-fedora.tar.gz +/glibc-2.16.90-14bc93a9.tar.gz diff --git a/glibc-rh767693-2.patch b/glibc-rh767693-2.patch deleted file mode 100644 index 97d3658..0000000 --- a/glibc-rh767693-2.patch +++ /dev/null @@ -1,76 +0,0 @@ -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-rh878913.patch b/glibc-rh878913.patch deleted file mode 100644 index e5dc3d3..0000000 --- a/glibc-rh878913.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/nss/makedb.c b/nss/makedb.c -index 8d7d027..fdcf4c6 100644 ---- a/nss/makedb.c -+++ b/nss/makedb.c -@@ -591,10 +591,12 @@ copy_valstr (const void *nodep, const VISIT which, const int depth) - } - - -+/* Check if a number is prime. We check only odd numbers greater than 10. -+ Enter even numbers and watch the function fail in mysterious ways. Odd -+ numbers less than 10 return false even if they are prime. */ - static int - is_prime (size_t candidate) - { -- /* No even number and none less than 10 will be passed here. */ - size_t divn = 3; - size_t sq = divn * divn; - -@@ -605,7 +607,7 @@ is_prime (size_t candidate) - ++divn; - } - -- return candidate % divn != 0; -+ return (candidate >= divn && candidate % divn != 0); - } - - diff --git a/glibc-rh880666.patch b/glibc-rh880666.patch deleted file mode 100644 index e7b9fb5..0000000 --- a/glibc-rh880666.patch +++ /dev/null @@ -1,148 +0,0 @@ -commit d2e8e5132b806951a389ee87bccc7e55ccf4a02e -Author: Siddhesh Poyarekar -Date: Sun Nov 25 15:30:07 2012 +0530 - - Make fwrite return 0 on EOF - -diff --git a/libio/Makefile b/libio/Makefile -index 9ccd6a0..83d90d0 100644 ---- a/libio/Makefile -+++ b/libio/Makefile -@@ -59,7 +59,8 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ - tst-memstream1 tst-memstream2 \ - tst-wmemstream1 tst-wmemstream2 \ - bug-memstream1 bug-wmemstream1 \ -- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos bug-fclose1 tst-fseek -+ tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos bug-fclose1 tst-fseek \ -+ tst-fwrite-error - ifeq (yes,$(build-shared)) - # Add test-fopenloc only if shared library is enabled since it depends on - # shared localedata objects. -diff --git a/libio/iofwrite.c b/libio/iofwrite.c -index d4610f7..e93a656 100644 ---- a/libio/iofwrite.c -+++ b/libio/iofwrite.c -@@ -43,11 +43,19 @@ _IO_fwrite (buf, size, count, fp) - written = _IO_sputn (fp, (const char *) buf, request); - _IO_release_lock (fp); - /* We have written all of the input in case the return value indicates -- this or EOF is returned. The latter is a special case where we -- simply did not manage to flush the buffer. But the data is in the -- buffer and therefore written as far as fwrite is concerned. */ -- if (written == request || written == EOF) -+ this. */ -+ if (written == request) - return count; -+ /* It is possible that the data was written out into buffer and we just -+ failed to flush it out. However, this is not necessarily always the -+ case and we cannot really differentiate this with a case when a flush -+ failed and all of the data was not in the buffer. Hence, just return 0 -+ (the flush failure should already have set the errno) and let the user -+ decide what to do. A future enhancement could be to find out how much -+ data is in the buffer and return that as a short write instead of just -+ 0. */ -+ else if (written == EOF) -+ return 0; - else - return written / size; - } -diff --git a/libio/iofwrite_u.c b/libio/iofwrite_u.c -index a1077ee..bc533dd 100644 ---- a/libio/iofwrite_u.c -+++ b/libio/iofwrite_u.c -@@ -45,11 +45,19 @@ fwrite_unlocked (buf, size, count, fp) - { - written = _IO_sputn (fp, (const char *) buf, request); - /* We have written all of the input in case the return value indicates -- this or EOF is returned. The latter is a special case where we -- simply did not manage to flush the buffer. But the data is in the -- buffer and therefore written as far as fwrite is concerned. */ -- if (written == request || written == EOF) -+ this. */ -+ if (written == request) - return count; -+ /* It is possible that the data was written out into buffer and we just -+ failed to flush it out. However, this is not necessarily always the -+ case and we cannot really differentiate this with a case when a flush -+ failed and all of the data was not in the buffer. Hence, just return 0 -+ (the flush failure should already have set the errno) and let the user -+ decide what to do. A future enhancement could be to find out how much -+ data is in the buffer and return that as a short write instead of just -+ 0. */ -+ else if (written == EOF) -+ return 0; - } - - return written / size; -diff --git a/libio/tst-fwrite-error.c b/libio/tst-fwrite-error.c -new file mode 100644 -index 0000000..3c0cf49 ---- /dev/null -+++ b/libio/tst-fwrite-error.c -@@ -0,0 +1,66 @@ -+/* Test of fwrite() function, adapted from gnulib-tests in grep. -+ Copyright (C) 2011-2012 Free Software Foundation, Inc. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 3, or (at your option) -+ any later version. -+ -+ This program 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 General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, see . */ -+ -+#include -+#include -+#include -+#include -+ -+static int -+do_test (void) -+{ -+ char tmpl[] = "/tmp/tst-fwrite-error.XXXXXX"; -+ int fd = mkstemp (tmpl); -+ if (fd == -1) -+ { -+ printf ("mkstemp failed with errno %d\n", errno); -+ return 1; -+ } -+ FILE *fp = fdopen (fd, "w"); -+ if (fp == NULL) -+ { -+ printf ("fdopen failed with errno %d\n", errno); -+ return 1; -+ } -+ -+ char buf[5] = "world"; -+ setvbuf (fp, NULL, _IONBF, 0); -+ close (fd); -+ unlink (tmpl); -+ errno = 0; -+ -+ int ret = fwrite (buf, 1, sizeof (buf), fp); -+ if (ret != 0) -+ { -+ printf ("fwrite returned %d\n", ret); -+ return 1; -+ } -+ if (errno != EBADF) -+ { -+ printf ("Errno is not EBADF: %d\n", errno); -+ return 1; -+ } -+ if (ferror (fp) == 0) -+ { -+ printf ("ferror not set\n"); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" diff --git a/glibc.spec b/glibc.spec index 2b67385..aef6572 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.16.90-3e2e43e2 +%define glibcsrcdir glibc-2.16.90-14bc93a9 %define glibcversion 2.16.90 ### glibc.spec.in follows: %define run_glibc_tests 1 @@ -27,7 +27,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 31%{?dist} +Release: 32%{?dist} # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # Things that are linked directly into dynamically linked programs # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional @@ -96,6 +96,7 @@ Patch0018: %{name}-fedora-strict-aliasing.patch Patch0019: %{name}-fedora-nis-rh188246.patch Patch0020: %{name}-fedora-manual-dircategory.patch Patch0024: %{name}-fedora-locarchive.patch +Patch0028: %{name}-fedora-localedata-rh61908.patch # Needs to be sent upstream Patch0029: %{name}-rh841318.patch @@ -122,7 +123,6 @@ Patch0044: %{name}-fedora-linux-tcsetattr.patch Patch0045: %{name}-fedora-locale-euro.patch Patch0046: %{name}-fedora-localedata-locales-fixes.patch Patch0047: %{name}-fedora-streams-rh436349.patch -Patch0048: %{name}-fedora-localedata-rh61908.patch # # Patches from upstream @@ -163,15 +163,6 @@ Patch2026: %{name}-rh841787.patch # Upstream BZ 14185 Patch2027: %{name}-rh819430.patch -# See http://sourceware.org/ml/libc-alpha/2012-06/msg00074.html -Patch2028: %{name}-rh767693-2.patch - -# RH BZ 878913 -Patch2049: %{name}-rh878913.patch - -# RH BZ 880666 -Patch2050: %{name}-rh880666.patch - Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: glibc-profile < 2.4 Obsoletes: nss_db @@ -422,7 +413,7 @@ package or when debugging this package. %patch2025 -p1 %patch2026 -p1 %patch2027 -p1 -%patch2028 -p1 +%patch0028 -p1 %patch0029 -p1 %patch0030 -p1 %patch0031 -p1 @@ -442,9 +433,6 @@ package or when debugging this package. %patch0045 -p1 %patch0046 -p1 %patch0047 -p1 -%patch0048 -p1 -%patch2049 -p1 -%patch2050 -p1 # On powerpc32, hp timing is only available in power4/power6 # libs, not in base, so pre-power4 dynamic linker is incompatible @@ -1239,6 +1227,13 @@ rm -f *.filelist* %endif %changelog +* Wed Nov 28 2012 Siddhesh Poyarekar - 2.16.90-32 + - Resync with master. + - Drop local patch for 878913. + - Drop local patch for 880666. + - Drop local patch for 767693. + - Repack patchlist. + * Tue Nov 27 2012 Siddhesh Poyarekar - 2.16.90-31 - Ensure that hashtable size is greater than 3 (#878913). - fwrite returns 0 on EOF (#880666). diff --git a/sources b/sources index 891317e..476a923 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -8c42a7148eee38c58e88f7185bcd1267 glibc-2.16.90-3e2e43e2-fedora.tar.gz -be38c58906cbec13928dedad16d084d0 glibc-2.16.90-3e2e43e2.tar.gz +dd3bdcaf6bde00d0484eace472d01ccc glibc-2.16.90-14bc93a9-fedora.tar.gz +d8d1869f634ef7cffcf7ed3cd11e5f3c glibc-2.16.90-14bc93a9.tar.gz