Accepting request 74646 from Base:System

Cleanups, fix PPC build.

OBS-URL: https://build.opensuse.org/request/show/74646
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=57
This commit is contained in:
Sascha Peilicke 2011-06-27 13:35:35 +00:00 committed by Git OBS Bridge
commit 49ca6afed5
11 changed files with 391 additions and 461 deletions

33
glibc-2.13-warnings.fix Normal file
View File

@ -0,0 +1,33 @@
commit 5615eaf26469f20c2d8c3be5770e12564a1edfff
Author: Roland McGrath <roland@hack.frob.com>
Date: Fri Jun 10 12:45:09 2011 -0700
Quash some new warnings from GCC 4.6.
2011-06-10 Roland McGrath <roland@hack.frob.com>
* elf/dl-open.c (_dl_open): Quash warnings when DL_NNS==1.
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 8d90b56..19fda91 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -516,7 +516,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
if (__builtin_expect (nsid == LM_ID_NEWLM, 0))
{
/* Find a new namespace. */
- for (nsid = 1; nsid < GL(dl_nns); ++nsid)
+ for (nsid = 1; DL_NNS > 1 && nsid < GL(dl_nns); ++nsid)
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
break;
@@ -528,8 +528,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
_dl_signal_error (EINVAL, file, NULL, N_("\
no more namespaces available for dlmopen()"));
}
-
- if (nsid == GL(dl_nns))
+ else if (nsid == GL(dl_nns))
{
__rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
++GL(dl_nns);

View File

@ -0,0 +1,145 @@
From glibc.git (for 2.15):
2011-06-23 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
__gettimeofday instead of gettimeofday.
2011-06-22 Ulrich Drepper <drepper@gmail.com>
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Use
/sys/devices/system/cpu/online if it is usable.
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Rate limit
reading the information from the /proc filesystem to once a second.
--- glibc-2.13/sysdeps/unix/sysv/linux/getsysstats.c 2010-04-08 10:45:22.000000000 +0200
+++ glibc.git/sysdeps/unix/sysv/linux/getsysstats.c 2011-06-27 09:56:27.359389056 +0200
@@ -1,5 +1,5 @@
/* Determine various system internal values, Linux version.
- Copyright (C) 1996-2003,2006,2007,2009,2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2003,2006,2007,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -35,6 +35,16 @@
#include <atomic.h>
#include <not-cancel.h>
+#include <kernel-features.h>
+
+#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
+# undef INTERNAL_VSYSCALL
+# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
+# undef INLINE_VSYSCALL
+# define INLINE_VSYSCALL INLINE_SYSCALL
+#else
+# include <bits/libc-vdso.h>
+#endif
/* How we can determine the number of available processors depends on
@@ -128,6 +138,22 @@
int
__get_nprocs ()
{
+ static int cached_result;
+ static time_t timestamp;
+
+#ifdef __ASSUME_POSIX_TIMERS
+ struct timespec ts;
+ INTERNAL_SYSCALL_DECL (err);
+ INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, &ts);
+#else
+ struct timeval ts;
+ __gettimeofday (&ts, NULL);
+#endif
+ time_t prev = timestamp;
+ atomic_read_barrier ();
+ if (ts.tv_sec == prev)
+ return cached_result;
+
/* XXX Here will come a test for the new system call. */
const size_t buffer_size = __libc_use_alloca (8192) ? 8192 : 512;
@@ -135,20 +161,65 @@
char *buffer_end = buffer + buffer_size;
char *cp = buffer_end;
char *re = buffer_end;
- int result = 1;
#ifdef O_CLOEXEC
const int flags = O_RDONLY | O_CLOEXEC;
#else
const int flags = O_RDONLY;
#endif
+ int fd = open_not_cancel_2 ("/sys/devices/system/cpu/online", flags);
+ char *l;
+ int result = 0;
+ if (fd != -1)
+ {
+ l = next_line (fd, buffer, &cp, &re, buffer_end);
+ if (l != NULL)
+ do
+ {
+ char *endp;
+ unsigned long int n = strtoul (l, &endp, 10);
+ if (l == endp)
+ {
+ result = 0;
+ break;
+ }
+
+ unsigned long int m = n;
+ if (*endp == '-')
+ {
+ l = endp + 1;
+ m = strtoul (l, &endp, 10);
+ if (l == endp)
+ {
+ result = 0;
+ break;
+ }
+ }
+
+ result += m - n + 1;
+
+ l = endp;
+ while (l < re && isspace (*l))
+ ++l;
+ }
+ while (l < re);
+
+ close_not_cancel_no_status (fd);
+
+ if (result > 0)
+ goto out;
+ }
+
+ cp = buffer_end;
+ re = buffer_end;
+ result = 1;
+
/* The /proc/stat format is more uniform, use it by default. */
- int fd = open_not_cancel_2 ("/proc/stat", flags);
+ fd = open_not_cancel_2 ("/proc/stat", flags);
if (fd != -1)
{
result = 0;
- char *l;
while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL)
/* The current format of /proc/stat has all the cpu* entries
at the front. We assume here that stays this way. */
@@ -169,6 +240,11 @@
}
}
+ out:
+ cached_result = result;
+ atomic_write_barrier ();
+ timestamp = ts.tv_sec;
+
return result;
}
weak_alias (__get_nprocs, get_nprocs)

View File

@ -1,43 +0,0 @@
Index: io/Makefile
===================================================================
--- io/Makefile.orig
+++ io/Makefile
@@ -64,7 +64,7 @@ static-only-routines = stat fstat lstat
others := pwd
test-srcs := ftwtest
-tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
+tests := test-utime test-stat test-stat2 tst-getcwd \
tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \
tst-openat tst-unlinkat tst-fstatat tst-futimesat \
tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
Index: libio/stdio.h
===================================================================
--- libio/stdio.h.orig
+++ libio/stdio.h
@@ -145,10 +145,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. */
Index: stdio-common/Makefile
===================================================================
--- stdio-common/Makefile.orig
+++ stdio-common/Makefile
@@ -52,7 +52,7 @@ tests := tstscanf test_rdwr test-popen t
temptest tst-fileno test-fwrite tst-ungetc tst-ferror \
xbug errnobug \
bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 bug12 bug13 \
- tfformat tiformat tllformat tstdiomisc tst-printfsz tst-wc-printf \
+ tfformat tiformat tllformat tst-printfsz tst-wc-printf \
scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \
scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \
tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \

View File

@ -1,13 +0,0 @@
Index: posix/regcomp.c
===================================================================
--- posix/regcomp.c.orig
+++ posix/regcomp.c
@@ -2254,6 +2254,8 @@ parse_expression (re_string_t *regexp, r
else if (syntax & RE_CONTEXT_INDEP_OPS)
{
fetch_token (token, regexp, syntax);
+ if (token->type == OP_CLOSE_SUBEXP || token->type == OP_ALT)
+ return NULL;
return parse_expression (regexp, preg, token, syntax, nest, err);
}
/* else fall through */

View File

@ -1,76 +0,0 @@
Index: elf/dl-load.c
===================================================================
--- elf/dl-load.c.orig
+++ elf/dl-load.c
@@ -1207,6 +1207,9 @@ cannot allocate TLS data structures for
goto call_lose_errno;
}
+ if (GLRO(dl_madvise))
+ posix_fadvise (fd, c->mapoff, maplength, POSIX_FADV_WILLNEED);
+
l->l_map_end = l->l_map_start + maplength;
l->l_addr = l->l_map_start - c->mapstart;
Index: elf/dl-support.c
===================================================================
--- elf/dl-support.c.orig
+++ elf/dl-support.c
@@ -42,6 +42,7 @@ size_t _dl_platformlen;
int _dl_debug_mask;
int _dl_lazy;
+int _dl_madvise;
ElfW(Addr) _dl_use_load_bias = -2;
int _dl_dynamic_weak;
@@ -254,6 +255,8 @@ _dl_non_dynamic_init (void)
_dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0';
+ _dl_madvise = *(getenv ("LD_NOMADVISE") ?: "") == '\0';
+
_dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';
_dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0';
Index: elf/rtld.c
===================================================================
--- elf/rtld.c.orig
+++ elf/rtld.c
@@ -158,6 +158,7 @@ struct rtld_global_ro _rtld_global_ro at
._dl_lazy = 1,
._dl_fpu_control = _FPU_DEFAULT,
._dl_pointer_guard = 1,
+ ._dl_madvise = 1,
/* Function pointers. */
._dl_debug_printf = _dl_debug_printf,
@@ -2612,6 +2613,14 @@ process_envvars (enum mode *modep)
break;
case 9:
+ /* Test whether we should not advise the kernel
+ about memory usage. */
+ if (memcmp (envline, "NOMADVISE", 9) == 0)
+ {
+ GLRO(dl_madvise) = envline[10] == '\0';
+ break;
+ }
+
/* Test whether we want to see the content of the auxiliary
array passed up from the kernel. */
if (!INTUSE(__libc_enable_secure)
Index: sysdeps/generic/ldsodefs.h
===================================================================
--- sysdeps/generic/ldsodefs.h.orig
+++ sysdeps/generic/ldsodefs.h
@@ -580,6 +580,9 @@ struct rtld_global_ro
/* Do we do lazy relocations? */
EXTERN int _dl_lazy;
+ /* Should we advise kernel about memory usage? */
+ EXTERN int _dl_madvise;
+
/* Nonzero if runtime lookups should not update the .got/.plt. */
EXTERN int _dl_bind_not;

View File

@ -1,3 +1,8 @@
2011-06-21 Andreas Jaeger <aj@suse.de>
* sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules):
Copy rule from iconvdata/Makefile.
Index: glibc/sysdeps/s390/s390-64/Makefile
===================================================================
--- sysdeps/s390/s390-64/Makefile 2009-08-03 10:18:31.000000000 +0200

View File

@ -1,127 +0,0 @@
This patch creates a SuSE .note section with version number 10.2
================================================================================
Index: Makerules
===================================================================
--- Makerules.orig
+++ Makerules
@@ -475,6 +475,7 @@ $(common-objpfx)shlib.lds: $(common-objp
-e '/^=========/,/^=========/!d;/^=========/d' \
$(if $(filter yes,$(have-hash-style)), \
-e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
+ -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } .note.SuSE : { *(.note.SuSE) } &/' \
-e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
-e '/DATA_SEGMENT_ALIGN/{H;g}' \
, \
@@ -500,7 +501,7 @@ common-generated += shlib.lds
define build-shlib
$(build-shlib-helper) -o $@ -T $(common-objpfx)shlib.lds \
- $(csu-objpfx)abi-note.o $(build-shlib-objlist)
+ $(csu-objpfx)abi-note.o $(csu-objpfx)suse-note.o $(build-shlib-objlist)
endef
else
ifneq (,$(findstring aix,$(config-os)))
@@ -542,7 +543,7 @@ ifeq (yes,$(elf))
# not for shared objects
define build-module
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
- $(csu-objpfx)abi-note.o $(build-module-objlist)
+ $(csu-objpfx)abi-note.o $(csu-objpfx)suse-note.o $(build-module-objlist)
endef
define build-module-asneeded
$(build-module-helper) -o $@ -T $(common-objpfx)shlib.lds \
Index: csu/Makefile
===================================================================
--- csu/Makefile.orig
+++ csu/Makefile
@@ -125,7 +125,7 @@ $(objpfx)defs.h: $(objpfx)initfini.s
endif
ifeq (yes,$(elf))
-extra-objs += abi-note.o init.o
+extra-objs += abi-note.o suse-note.o init.o
asm-CPPFLAGS += -I$(objpfx).
endif
@@ -143,12 +143,15 @@ ifeq (yes,$(elf))
# We link the ELF startfile along with a SHT_NOTE section indicating
# the kernel ABI the binaries linked with this library will require.
$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o \
+ $(objpfx)suse-note.o \
$(objpfx)init.o
$(link-relocatable)
$(objpfx)S$(start-installed-name): $(objpfx)start.os $(objpfx)abi-note.o \
+ $(objpfx)suse-note.o \
$(objpfx)init.o
$(link-relocatable)
$(objpfx)b$(start-installed-name): $(objpfx)start.ob $(objpfx)abi-note.ob \
+ $(objpfx)suse-note.ob \
$(objpfx)init.ob
$(link-relocatable)
else
Index: csu/suse-note.S
===================================================================
--- /dev/null
+++ csu/suse-note.S
@@ -0,0 +1,59 @@
+/* Special .init and .fini section support.
+ Copyright (C) 1997, 2001, 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.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ 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. */
+
+/* Look in abi-note.S for the definition of an ELF note section. */
+
+#include <config.h>
+
+#define PROD_TYPE_BOX 0
+#define PROD_TYPE_SLES 1
+
+#define NOTE_VERSION 1
+#define PROD_TYPE PROD_TYPE_BOX
+#define PROD_MAJOR 10
+#define PROD_MINOR 2
+
+/* The linker (GNU ld 2.8 and later) recognizes an allocated section whose
+ name begins with `.note' and creates a PT_NOTE program header entry
+ pointing at it. */
+
+ .section ".note.SuSE", "a"
+ .p2align 2
+ .long 1f - 0f /* name length */
+ .long 3f - 2f /* data length */
+ .long 0x45537553 /* note type ("SuSE" in little endian) */
+0: .asciz "SuSE" /* vendor name */
+1:
+ .p2align 2
+2: /* Data */
+ .byte NOTE_VERSION /* Version of following data */
+ .byte PROD_TYPE /* product type (box, sles, nld, whatever) */
+ .byte PROD_MAJOR /* product version */
+ .byte PROD_MINOR /* product minor version */
+3:
+ .p2align 2 /* pad out section */

15
glibc-testsuite.patch Normal file
View File

@ -0,0 +1,15 @@
test-lfs runs for ever on ReiserFS. Let's disable it completely.
Index: io/Makefile
===================================================================
--- io/Makefile.orig
+++ io/Makefile
@@ -64,7 +64,7 @@ static-only-routines = stat fstat lstat
others := pwd
test-srcs := ftwtest
-tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
+tests := test-utime test-stat test-stat2 tst-getcwd \
tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \
tst-openat tst-unlinkat tst-fstatat tst-futimesat \
tst-renameat tst-fchownat tst-fchmodat tst-faccessat \

View File

@ -1,113 +1,35 @@
2011-06-20 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/i386/bits/sigcontext.h: New file.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e502e19455c6110dd4487d91b7b7d6d8121f9ba
============================================================
Index: ./sysdeps/unix/sysv/linux/i386/bits/sigcontext.h
--- ./sysdeps/unix/sysv/linux/i386/bits/sigcontext.h created
+++ ./sysdeps/unix/sysv/linux/i386/bits/sigcontext.h 2011-06-20 12:14:48.528411362 +0200 1.1
@@ -0,0 +1,104 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
commit 6e502e19455c6110dd4487d91b7b7d6d8121f9ba
Author: Ulrich Drepper <drepper@gmail.com>
Date: Wed Jun 22 08:32:55 2011 -0400
Clean up after kernel sigcontext header mess
2011-06-21 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/bits/sigcontext.h: Fix definition of
NULL after inclusion of kernel headers.
diff --git a/sysdeps/unix/sysv/linux/bits/sigcontext.h b/sysdeps/unix/sysv/linux/bits/sigcontext.h
index 67dcf94..0f5b607 100644
--- a/sysdeps/unix/sysv/linux/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2011 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
@@ -26,4 +26,8 @@
# define sigcontext_struct sigcontext
# include <asm/sigcontext.h>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+struct _fpreg
+{
+ unsigned short significand[4];
+ unsigned short exponent;
+};
+
+struct _fpxreg
+{
+ unsigned short significand[4];
+ unsigned short exponent;
+ unsigned short padding[3];
+};
+
+struct _xmmreg
+{
+ __uint32_t element[4];
+};
+
+
+
+struct _fpstate
+{
+ /* Regular FPU environment. */
+ __uint32_t cw;
+ __uint32_t sw;
+ __uint32_t tag;
+ __uint32_t ipoff;
+ __uint32_t cssel;
+ __uint32_t dataoff;
+ __uint32_t datasel;
+ struct _fpreg _st[8];
+ unsigned short status;
+ unsigned short magic;
+
+ /* FXSR FPU environment. */
+ __uint32_t _fxsr_env[6];
+ __uint32_t mxcsr;
+ __uint32_t reserved;
+ struct _fpxreg _fxsr_st[8];
+ struct _xmmreg _xmm[8];
+ __uint32_t padding[56];
+};
+
+#ifndef sigcontext_struct
+/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
+ we need sigcontext. Some packages have come to rely on
+ sigcontext_struct being defined on 32-bit x86, so define this for
+ their benefit. */
+# define sigcontext_struct sigcontext
+#endif
+
+struct sigcontext
+{
+ unsigned short gs, __gsh;
+ unsigned short fs, __fsh;
+ unsigned short es, __esh;
+ unsigned short ds, __dsh;
+ unsigned long edi;
+ unsigned long esi;
+ unsigned long ebp;
+ unsigned long esp;
+ unsigned long ebx;
+ unsigned long edx;
+ unsigned long ecx;
+ unsigned long eax;
+ unsigned long trapno;
+ unsigned long err;
+ unsigned long eip;
+ unsigned short cs, __csh;
+ unsigned long eflags;
+ unsigned long esp_at_signal;
+ unsigned short ss, __ssh;
+ struct _fpstate * fpstate;
+ unsigned long oldmask;
+ unsigned long cr2;
+};
+
+
+#endif /* _BITS_SIGCONTEXT_H */
+/* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */
+# define __need_NULL
+# include <stddef.h>
#endif

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Mon Jun 27 12:19:47 UTC 2011 - aj@suse.de
- Disable exp_malloc on PPC platforms for now since it caused a
build failure.
-------------------------------------------------------------------
Mon Jun 27 11:00:33 UTC 2011 - aj@suse.de
- Update glibc-x86-bits-sigcontext.patch with version accepted
upstream.
- Add glibc-2.15-getsysstats-speedup.patch to "Fix Linux
sysconf(_SC_NPROCESSORS_[CONF|ONLN]) performance problem"
- Fix warning about potential array subscript out of bounds
(glibc-2.13-wranings.fix).
- Fix some rpmlint warnings.
-------------------------------------------------------------------
Tue Jun 21 10:59:33 UTC 2011 - aj@suse.de
- Cleanup spec file, change PreReqs.
- Remove obsolete patches: glibc-2.3.90-ld.so-madvise.diff,
glibc-suse-note.diff, glibc-2.3-regcomp.diff.
- Rename glibc-2.3-SuSE.diff to glibc-testsuite.patch, remove obsolete
parts.
-------------------------------------------------------------------
Mon Jun 20 12:47:46 UTC 2011 - aj@suse.de

View File

@ -57,13 +57,21 @@ BuildRequires: libstdc++-devel
%else
%define enablekernel 2.6.5
%endif
%ifarch ppc ppc64
# On PowerPC we got a memory corruption during building, disabling
# exp_malloc fixed it. Disable it until we have found and fixed the
# root cause.
%define exp_malloc 0
%else
%define exp_malloc 1
%endif
# ngpt was used in 8.1 and SLES8
Obsoletes: ngpt < 2.2.2
Obsoletes: ngpt-devel < 2.2.2
Provides: ngpt = 2.2.2
Provides: ngpt-devel = 2.2.2
Conflicts: kernel < %{enablekernel}
# bug437293
# bug437293 - handle update from SLES10 on PowerPC
%ifarch ppc64
Obsoletes: glibc-64bit
%endif
@ -71,7 +79,7 @@ Obsoletes: glibc-64bit
Obsoletes: glibc-32bit
%endif
Version: 2.13
Release: 13
Release: 5
Url: http://www.gnu.org/software/libc/libc.html
Source: glibc-%{version}-996cf2ef0727.tar.bz2
Source2: http://ftp.gnu.org/gnu/glibc/glibc-ports-2.13.tar.bz2
@ -84,7 +92,7 @@ Source10: bindresvport.blacklist
Source12: glibc_post_upgrade.c
Source15: glibc.rpmlintrc
Source16: baselibs.conf
PreReq: filesystem
Requires(pre): filesystem
Provides: rtld(GNU_HASH)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %_target_cpu == "i686"
@ -93,8 +101,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
NoSource: 0
%endif
#
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0: glibc-2.3-SuSE.diff
# PATCH-FIX-OPENSUSE remove lfs test from testsuite aj@suse.de
Patch0: glibc-testsuite.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: glibc-2.3.90-noversion.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
@ -110,8 +118,6 @@ Patch7: glibc-version.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch8: glibc-2.4.90-revert-only-euro.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch9: glibc-2.3-regcomp.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch11: glibc-2.3.1.localedef.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch12: glibc-2.3.2.no_archive.diff
@ -120,12 +126,8 @@ Patch13: libm-x86-64.diff.bz2
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch14: glibc-2.3.90-bindresvport.blacklist.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch15: glibc-suse-note.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch16: glibc-2.4.90-no_NO.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch17: glibc-2.3.90-ld.so-madvise.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch18: glibc-2.3.3-amd64-s_ceil.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch20: glibc-2.4-china.diff
@ -155,7 +157,7 @@ Patch33: glibc-compiled-binaries.diff
Patch36: glibc-no-unwind-tables.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch37: glibc-2.10-nscd-nostack.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de
Patch38: glibc-cpusetsize.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch39: glibc-2.10.99-ia64-include.diff
@ -183,22 +185,26 @@ Patch49: glibc-fini-unwind.diff
Patch50: glibc-gconvcache-s390.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch51: glibc-vfprintf-positional.diff
# FIX-OPENSUSE bnc#657627
# PATCH-FIX-OPENSUSE bnc#657627
Patch52: glibc-elf-localscope.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
# PATCH-FIX-UPSTREAM Fix longlong.h for zArch
Patch53: glibc-zarch-longlong.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
# PATCH-FEATURE-OPENSUSE disable backward memcpy aj@suse.de
Patch54: glibc-disable-backward-memcpy.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch55: glibc-bso-12454.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
# PATCH-FIX-UPSTREAM fix static memcpy
Patch56: glibc-static-memcpy.diff
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
Patch58: glibc-strict-aliasing.diff
# PATCH-FIX-UPSTREAM fix preloading of shared libs aj@suse.de
Patch59: glibc-2.13-dl-load.patch
# PATCH-FIX-UPSTREAM fix x86 <bits/sigcontext.h aj@suse.de
# PATCH-FIX-UPSTREAM fix x86 <bits/sigcontext.h> aj@suse.de
Patch60: glibc-x86-bits-sigcontext.patch
# PATCH-FEATURE-UPSTREAM Speedup getsysstats call aj@suse.de
Patch61: glibc-2.15-getsysstats-speedup.patch
# PATCH-FIX-UPSTREAM Fix gcc 4.6 warnings aj@suse.de
Patch62: glibc-2.13-warnings.fix
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
@ -208,6 +214,7 @@ Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch503: ARM_glibc-2.10.1-local-no-hwcap.diff
%description
The GNU C Library provides the most important standard libraries used
by nearly all programs: the standard C library, the standard math
@ -218,7 +225,9 @@ without these libraries.
License: GPLv2+
Summary: Info Files for the GNU C Library
Group: Documentation/Other
PreReq: %{install_info_prereq}
Requires(post): %{install_info_prereq}
Requires(postun): %{install_info_prereq}
%description info
This package contains the documentation for the GNU C library stored as
@ -230,6 +239,7 @@ License: GPLv2+ ; LGPLv2.1+
Summary: HTML Documentation for the GNU C Library
Group: Documentation/HTML
%description html
This package contains the HTML documentation for the GNU C library. Due
to a lack of resources, this documentation is not complete and is
@ -240,6 +250,7 @@ License: LGPLv2.1+
Summary: Database Sources for 'locale'
Group: System/Libraries
%description i18ndata
This package contains the data needed to build the locale data files to
use the internationalization features of the GNU libc. It is normally
@ -250,7 +261,7 @@ created.
License: GPLv2+ ; LGPLv2.1+
Summary: Locale Data for Localized Programs
Group: System/Libraries
PreReq: /bin/cat
Requires(post): /bin/cat
Requires: glibc = %{version}
# bug437293
%ifarch ppc64
@ -260,6 +271,7 @@ Obsoletes: glibc-locale-64bit
Obsoletes: glibc-locale-32bit
%endif
%description locale
Locale data for the internationalisation features of the GNU C library.
@ -269,7 +281,10 @@ Summary: Name Service Caching Daemon
Group: System/Daemons
Provides: aaa_base:/etc/init.d/nscd
Provides: glibc:/usr/sbin/nscd
PreReq: %insserv_prereq
Requires(preun): %insserv_prereq
Requires(post): %insserv_prereq
Requires(postun): %insserv_prereq
%description -n nscd
Nscd caches name service lookups and can dramatically improve
@ -288,6 +303,7 @@ Obsoletes: glibc-profile-64bit
Obsoletes: glibc-profile-32bit
%endif
%description profile
This package contains special versions of the GNU C library which are
necessary for profiling and debugging.
@ -305,8 +321,9 @@ Obsoletes: glibc-devel-64bit
%ifarch ppc
Obsoletes: glibc-devel-32bit
%endif
PreReq: /bin/rm
Requires: glibc = %{version}, linux-kernel-headers
Requires: glibc = %{version}
Requires: linux-kernel-headers
%description devel
These libraries are needed to develop programs which use the standard C
@ -314,11 +331,11 @@ library.
%package devel-static
Summary: C library static libraries for -static linking
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
%description devel-static
The glibc-devel-static package contains the C library static libraries
for -static linking. You don't need these, unless you link statically,
@ -330,21 +347,24 @@ Summary: Development utilities from GNU C library
Group: Development/Languages/C and C++
Requires: glibc = %{version}
%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.
The glibc-utils package contains mtrace, a memory leak tracer and
xtrace, a function call tracer which can be helpful during program
debugging.
If you are unsure if you need this, don't install this package.
%ifarch %ix86
%package obsolete
License: BSD3c(or similar) ; GPLv2+ ; LGPLv2.1+
Summary: Obsolete Shared Libraries from the GNU C Library
Group: System/Libraries
Requires: glibc = %{version}
%description obsolete
This package provides some old libraries from the GNU C Library which
are no longer supported. Additional it provides a compatibility library
@ -357,6 +377,7 @@ versions of your software.
%endif
%prep
%ifarch %arm armv5tel armv7l
# add glibc-ports for arm
@ -367,8 +388,7 @@ versions of your software.
# any other leave out ports
%setup -n glibc-%{version} -q -a 3 -a 4
%endif
# Seems not needed anymore
#%patch0
%patch0
# libNoVersion part is only active on ix86
%patch1
%patch2 -p1
@ -377,17 +397,13 @@ versions of your software.
%patch5
%patch7
%patch8
# Seems not needed anymore
#%patch9
%patch11
%patch12
%patch13 -E
# We have s_sincos.c in patch13, remove duplicate
rm sysdeps/x86_64/fpu/s_sincos.S
%patch14
%patch15
%patch16
%patch17
%patch18
%patch20
%patch21
@ -431,7 +447,9 @@ rm nscd/s-stamp
%patch56 -p1
%patch58
%patch59 -p1
%patch60
%patch60 -p1
%patch61 -p1
%patch62 -p1
%ifarch %arm armv5tel armv7l
%patch500
%patch501
@ -464,6 +482,7 @@ find . -name configure | xargs touch
###
#######################################################################
%build
if [ -x /bin/uname.bin ]; then
/bin/uname.bin -a
@ -479,7 +498,7 @@ echo "#define CVSDATE \"`date -r ChangeLog +%Y%m%d`\"" >> version.h
#
# Default CFLAGS and Compiler
#
BuildFlags="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
BuildFlags="%{optflags} -U_FORTIFY_SOURCE"
BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=[0-9]*##')"
BuildCC="gcc"
BuildCCplus="g++"
@ -614,7 +633,7 @@ make -C cc-base html
#
# Build glibc_post_upgrade binary
#
$BuildCC -static $RPM_OPT_FLAGS -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
$BuildCC -static %{optflags} -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
-Lcc-base -Bcc-base/csu \
'-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
%ifarch ppc ppc64
@ -631,7 +650,7 @@ $BuildCC -static $RPM_OPT_FLAGS -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glib
'-DREMOVE_PPC_OPTIMIZE_CELL' \
%endif
%endif
'-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"'
'-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_libdir}/gconv"'
#######################################################################
###
@ -639,6 +658,7 @@ $BuildCC -static $RPM_OPT_FLAGS -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glib
###
#######################################################################
%check
%if %{run_testsuite}
# Increase timeout
@ -661,6 +681,7 @@ make -C cc-base check-abi || echo check-abi failed
###
#######################################################################
%install
# We don't want to strip the .symtab from our libraries in find-debuginfo.sh,
# certainly not from libpthread.so.* because it is used by libthread_db to find
@ -674,12 +695,12 @@ make -C cc-base check-abi || echo check-abi failed
export STRIP_KEEP_SYMTAB=*.so*
# Make sure we will create the gconv-modules.cache
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gconv
touch $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
mkdir -p %{buildroot}%{_libdir}/gconv
touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
# Install base glibc
# Do not install in parallel, timezone Makefile will fail
make install_root=$RPM_BUILD_ROOT install -C cc-base
make install_root=%{buildroot} install -C cc-base
# Install power-optimized glibc
%if %{optimize_power}
@ -701,24 +722,24 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base
ppc-cell-be \
%endif
; do
make install_root=${RPM_BUILD_ROOT}/$pcpu install -C cc-$pcpu
mkdir -p $RPM_BUILD_ROOT/%{_lib}/$pcpu
make install_root=%{buildroot}/$pcpu install -C cc-$pcpu
mkdir -p %{buildroot}/%{_lib}/$pcpu
for i in libc-%{version} libm-%{version} libpthread-%{version} libthread_db-1.0 librt-%{version}; do
mv $RPM_BUILD_ROOT/$pcpu/%{_lib}/$i.so $RPM_BUILD_ROOT/%{_lib}/$pcpu
mv %{buildroot}/$pcpu/%{_lib}/$i.so %{buildroot}/%{_lib}/$pcpu
done
$my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/$pcpu/
rm -rf $RPM_BUILD_ROOT/$pcpu
$my_ldconfig -n %{buildroot}/%{_lib}/$pcpu/
rm -rf %{buildroot}/$pcpu
done
%if %{powerpc_optimize_cpu_power6}
# power6 is compatible with power6x
# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir
if test -d $RPM_BUILD_ROOT/%{_lib}/power6; then
mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6x
for i in $RPM_BUILD_ROOT/%{_lib}/power6/*.so; do
if test -d %{buildroot}/%{_lib}/power6; then
mkdir -p %{buildroot}/%{_lib}/power6x
for i in %{buildroot}/%{_lib}/power6/*.so; do
b=`basename $i`
ln -vs ../power6/$b $RPM_BUILD_ROOT/%{_lib}/power6x/$b
ln -vs ../power6/$b %{buildroot}/%{_lib}/power6x/$b
done
$my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power6x/
$my_ldconfig -n %{buildroot}/%{_lib}/power6x/
fi
%endif
%endif # optimize_power
@ -727,7 +748,7 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base
%if %{build_locales}
# Do not install locales in parallel!
cd cc-base
make install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd`
make install_root=%{buildroot} install-locales -C ../localedata objdir=`pwd`
cd ..
%endif
# Create file list for glibc-locale package
@ -736,55 +757,55 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base
# Prepare obsolete/, used only on some architectures:
export RPM_BUILD_ROOT
%ifarch %ix86
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete
mkdir -p %{buildroot}/%{_lib}/obsolete
%endif
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
# the generic one (RH#162634)
cp -av bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h
cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
%ifarch s390x
# s390x is different ...
mkdir $RPM_BUILD_ROOT/lib
ln -sf ../%{_lib}/ld-%{version}.so $RPM_BUILD_ROOT/lib/ld64.so.1
mkdir %{buildroot}/lib
ln -sf ../%{_lib}/ld-%{version}.so %{buildroot}/lib/ld64.so.1
%endif
# Miscelanna:
install -m 0700 glibc_post_upgrade $RPM_BUILD_ROOT%{_sbindir}
install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
install -m 644 $RPM_SOURCE_DIR/bindresvport.blacklist $RPM_BUILD_ROOT/etc
install -m 644 $RPM_SOURCE_DIR/nsswitch.conf $RPM_BUILD_ROOT/etc
install -m 644 posix/gai.conf $RPM_BUILD_ROOT/etc
install -m 644 $RPM_SOURCE_DIR/bindresvport.blacklist %{buildroot}/etc
install -m 644 $RPM_SOURCE_DIR/nsswitch.conf %{buildroot}/etc
install -m 644 posix/gai.conf %{buildroot}/etc
mkdir -p $RPM_BUILD_ROOT/etc/default
install -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/
mkdir -p %{buildroot}/etc/default
install -m 644 nis/nss %{buildroot}/etc/default/
mkdir -p $RPM_BUILD_ROOT/usr/include/resolv
install -m 0644 resolv/mapv4v6addr.h $RPM_BUILD_ROOT/usr/include/resolv/
install -m 0644 resolv/mapv4v6hostent.h $RPM_BUILD_ROOT/usr/include/resolv/
mkdir -p %{buildroot}%{_includedir}/resolv
install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/glibc
cp -p manual/libc/*.html $RPM_BUILD_ROOT/usr/share/doc/glibc
mkdir -p %{buildroot}%{_datadir}/doc/glibc
cp -p manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
cd manpages; make install_root=$RPM_BUILD_ROOT install; cd ..
cd manpages; make install_root=%{buildroot} install; cd ..
# nscd tools:
cp nscd/nscd.conf $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT/etc/apparmor.d
cp $RPM_SOURCE_DIR/usr.sbin.nscd $RPM_BUILD_ROOT/etc/apparmor.d
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 755 $RPM_SOURCE_DIR/nscd.init $RPM_BUILD_ROOT/etc/init.d/nscd
ln -sf /etc/init.d/nscd $RPM_BUILD_ROOT/usr/sbin/rcnscd
mkdir -p $RPM_BUILD_ROOT/var/run/nscd
touch $RPM_BUILD_ROOT/var/run/nscd/{passwd,group,hosts}
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid}
cp nscd/nscd.conf %{buildroot}/etc
mkdir -p %{buildroot}/etc/apparmor.d
cp $RPM_SOURCE_DIR/usr.sbin.nscd %{buildroot}/etc/apparmor.d
mkdir -p %{buildroot}/etc/init.d
install -m 755 $RPM_SOURCE_DIR/nscd.init %{buildroot}/etc/init.d/nscd
ln -sf /etc/init.d/nscd %{buildroot}/usr/sbin/rcnscd
mkdir -p %{buildroot}/var/run/nscd
touch %{buildroot}/var/run/nscd/{passwd,group,hosts}
touch %{buildroot}/var/run/nscd/{socket,nscd.pid}
#
# Create ld.so.conf
#
cat > $RPM_BUILD_ROOT/etc/ld.so.conf <<EOF
cat > %{buildroot}/etc/ld.so.conf <<EOF
/usr/%{_lib}/Xaw3d
%ifarch s390x sparc64 x86_64 ppc64 ppc
/usr/lib/Xaw3d
@ -804,29 +825,29 @@ cat > $RPM_BUILD_ROOT/etc/ld.so.conf <<EOF
include /etc/ld.so.conf.d/*.conf
EOF
# Add ldconfig cache directory for directory ownership
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
mkdir -p %{buildroot}/var/cache/ldconfig
# Empty the ld.so.cache:
rm -f $RPM_BUILD_ROOT/etc/ld.so.cache
touch $RPM_BUILD_ROOT/etc/ld.so.cache
rm -f %{buildroot}/etc/ld.so.cache
touch %{buildroot}/etc/ld.so.cache
# libNoVersion belongs only to glibc-obsolete:
%ifarch %ix86
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion
mv -v $RPM_BUILD_ROOT/%{_lib}/libNoVersion* $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion/
rm -f %{buildroot}%{_libdir}/libNoVersion*
mkdir -p %{buildroot}/%{_lib}/obsolete/noversion
mv -v %{buildroot}/%{_lib}/libNoVersion* %{buildroot}/%{_lib}/obsolete/noversion/
%endif
# Don't look at ldd! We don't wish a /bin/sh requires
chmod 644 $RPM_BUILD_ROOT/usr/bin/ldd
chmod 644 %{buildroot}%{_bindir}/ldd
# Remove timezone data, now coming in standalone package:
for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
rm -f $RPM_BUILD_ROOT/$i
rm -f %{buildroot}/$i
done
rm -rf $RPM_BUILD_ROOT/usr/share/zoneinfo
rm -rf %{buildroot}%{_datadir}/zoneinfo
# Remove the buildflags tracking section and the build-id
for o in $RPM_BUILD_ROOT/%{_libdir}/crt[1in].o $RPM_BUILD_ROOT/%{_libdir}/lib*_nonshared.a; do
for o in %{buildroot}/%{_libdir}/crt[1in].o %{buildroot}/%{_libdir}/lib*_nonshared.a; do
objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o
done
@ -836,17 +857,21 @@ done
###
#######################################################################
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
# Note: glibc_post_upgrade does:
# %set_permissions %{_libdir}/pt_chown
# %%set_permissions %%{_libdir}/pt_chown
# since we cannot do it in our own post section
%post -p %{_sbindir}/glibc_post_upgrade
%postun -p /sbin/ldconfig
%post locale
for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do
[ -d "$l.d" ] || continue
@ -855,19 +880,24 @@ for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do
done
/usr/sbin/iconvconfig
%post info
%install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
%postun info
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
%preun -n nscd
%stop_on_removal nscd
%post -n nscd
%{insserv_force_if_yast nscd}
mkdir -p /var/run/nscd
%postun -n nscd
%restart_on_update nscd
%insserv_cleanup
@ -884,6 +914,7 @@ exit 0
# glibc
%files
%defattr(-,root,root)
%doc LICENSES
@ -1011,6 +1042,7 @@ exit 0
%ifarch %ix86
%files obsolete
%defattr (755,root,root,755)
%dir /%{_lib}/obsolete/
@ -1019,14 +1051,16 @@ exit 0
/%{_lib}/obsolete/noversion/libNoVersion.so.1
%endif
%files locale -f libc.lang
%defattr(-,root,root)
/usr/share/locale/locale.alias
%{_datadir}/locale/locale.alias
%if %{build_locales}
/usr/lib/locale
%endif
%{_libdir}/gconv
%files devel
%defattr(-,root,root)
%doc COPYING COPYING.LIB FAQ INSTALL NEWS NOTES README BUGS CONFORMANCE
@ -1037,7 +1071,7 @@ exit 0
%{_bindir}/catchsegv
%{_bindir}/rpcgen
%{_bindir}/sprof
%{_prefix}/include/*
%{_includedir}/*
%{_libdir}/*.o
%{_libdir}/*.so
# These static libraries are needed even for shared builds
@ -1053,6 +1087,7 @@ exit 0
%{_libdir}/libpthread_nonshared.a
%{_libdir}/librpcsvc.a
%files devel-static
%defattr(-,root,root)
%{_libdir}/libBrokenLocale.a
@ -1067,20 +1102,24 @@ exit 0
%{_libdir}/librt.a
%{_libdir}/libutil.a
%files info
%defattr(-,root,root)
%doc %{_infodir}/libc.info.gz
%doc %{_infodir}/libc.info-?.gz
%doc %{_infodir}/libc.info-??.gz
%files html
%defattr(-,root,root)
%doc %{_prefix}/share/doc/glibc
%files i18ndata
%defattr(-,root,root)
%{_prefix}/share/i18n
%files -n nscd
%defattr(-,root,root)
%config(noreplace) /etc/nscd.conf
@ -1096,6 +1135,7 @@ exit 0
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
%files profile
%defattr(-,root,root)
%{_libdir}/libc_p.a
@ -1111,15 +1151,18 @@ exit 0
%{_libdir}/libutil_p.a
%{_libdir}/libdl_p.a
%files utils
%defattr(-,root,root)
/%{_lib}/libmemusage.so
/%{_lib}/libpcprofile.so
# These need gd-devel for building
#%{_bindir}/memusage
#%{_bindir}/memusagestat
# %%{_bindir}/memusage
# %%{_bindir}/memusagestat
%{_bindir}/mtrace
%{_bindir}/pcprofiledump
%{_bindir}/xtrace
%changelog