SHA256
3
0
forked from pool/glibc

Accepting request 74639 from home:a_jaeger:branches:openSUSE:Factory

Fix warnings, speed up getsysstats.

OBS-URL: https://build.opensuse.org/request/show/74639
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=69
This commit is contained in:
Andreas Jaeger 2011-06-27 12:05:13 +00:00 committed by Git OBS Bridge
parent e2e592656e
commit 0a7a66275a
11 changed files with 339 additions and 459 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 Index: glibc/sysdeps/s390/s390-64/Makefile
=================================================================== ===================================================================
--- sysdeps/s390/s390-64/Makefile 2009-08-03 10:18:31.000000000 +0200 --- 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
============================================================ commit 6e502e19455c6110dd4487d91b7b7d6d8121f9ba
Index: ./sysdeps/unix/sysv/linux/i386/bits/sigcontext.h Author: Ulrich Drepper <drepper@gmail.com>
--- ./sysdeps/unix/sysv/linux/i386/bits/sigcontext.h created Date: Wed Jun 22 08:32:55 2011 -0400
+++ ./sysdeps/unix/sysv/linux/i386/bits/sigcontext.h 2011-06-20 12:14:48.528411362 +0200 1.1
@@ -0,0 +1,104 @@ Clean up after kernel sigcontext header mess
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
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 +/* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */
+ modify it under the terms of the GNU Lesser General Public +# define __need_NULL
+ License as published by the Free Software Foundation; either +# include <stddef.h>
+ version 2.1 of the License, or (at your option) any later version. #endif
+
+ 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 */

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
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 Mon Jun 20 12:47:46 UTC 2011 - aj@suse.de

View File

@ -58,12 +58,13 @@ BuildRequires: libstdc++-devel
%define enablekernel 2.6.5 %define enablekernel 2.6.5
%endif %endif
%define exp_malloc 1 %define exp_malloc 1
# ngpt was used in 8.1 and SLES8
Obsoletes: ngpt < 2.2.2 Obsoletes: ngpt < 2.2.2
Obsoletes: ngpt-devel < 2.2.2 Obsoletes: ngpt-devel < 2.2.2
Provides: ngpt = 2.2.2 Provides: ngpt = 2.2.2
Provides: ngpt-devel = 2.2.2 Provides: ngpt-devel = 2.2.2
Conflicts: kernel < %{enablekernel} Conflicts: kernel < %{enablekernel}
# bug437293 # bug437293 - handle update from SLES10 on PowerPC
%ifarch ppc64 %ifarch ppc64
Obsoletes: glibc-64bit Obsoletes: glibc-64bit
%endif %endif
@ -84,7 +85,7 @@ Source10: bindresvport.blacklist
Source12: glibc_post_upgrade.c Source12: glibc_post_upgrade.c
Source15: glibc.rpmlintrc Source15: glibc.rpmlintrc
Source16: baselibs.conf Source16: baselibs.conf
PreReq: filesystem Requires(pre): filesystem
Provides: rtld(GNU_HASH) Provides: rtld(GNU_HASH)
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %_target_cpu == "i686" %if %_target_cpu == "i686"
@ -93,8 +94,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
NoSource: 0 NoSource: 0
%endif %endif
# #
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-FIX-OPENSUSE remove lfs test from testsuite aj@suse.de
Patch0: glibc-2.3-SuSE.diff Patch0: glibc-testsuite.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: glibc-2.3.90-noversion.diff Patch1: glibc-2.3.90-noversion.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
@ -110,8 +111,6 @@ Patch7: glibc-version.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch8: glibc-2.4.90-revert-only-euro.diff Patch8: glibc-2.4.90-revert-only-euro.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # 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 Patch11: glibc-2.3.1.localedef.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch12: glibc-2.3.2.no_archive.diff Patch12: glibc-2.3.2.no_archive.diff
@ -120,12 +119,8 @@ Patch13: libm-x86-64.diff.bz2
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch14: glibc-2.3.90-bindresvport.blacklist.diff Patch14: glibc-2.3.90-bindresvport.blacklist.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # 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 Patch16: glibc-2.4.90-no_NO.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # 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 Patch18: glibc-2.3.3-amd64-s_ceil.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch20: glibc-2.4-china.diff Patch20: glibc-2.4-china.diff
@ -155,7 +150,7 @@ Patch33: glibc-compiled-binaries.diff
Patch36: glibc-no-unwind-tables.diff Patch36: glibc-no-unwind-tables.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch37: glibc-2.10-nscd-nostack.diff 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 Patch38: glibc-cpusetsize.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch39: glibc-2.10.99-ia64-include.diff Patch39: glibc-2.10.99-ia64-include.diff
@ -183,22 +178,26 @@ Patch49: glibc-fini-unwind.diff
Patch50: glibc-gconvcache-s390.diff Patch50: glibc-gconvcache-s390.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch51: glibc-vfprintf-positional.diff Patch51: glibc-vfprintf-positional.diff
# FIX-OPENSUSE bnc#657627 # PATCH-FIX-OPENSUSE bnc#657627
Patch52: glibc-elf-localscope.diff 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 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 Patch54: glibc-disable-backward-memcpy.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch55: glibc-bso-12454.diff 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 Patch56: glibc-static-memcpy.diff
# FIX-OPENSUSE compile some files with -fno-strict-aliasing # FIX-OPENSUSE compile some files with -fno-strict-aliasing
Patch58: glibc-strict-aliasing.diff Patch58: glibc-strict-aliasing.diff
# PATCH-FIX-UPSTREAM fix preloading of shared libs aj@suse.de # PATCH-FIX-UPSTREAM fix preloading of shared libs aj@suse.de
Patch59: glibc-2.13-dl-load.patch 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 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 # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
@ -219,7 +218,8 @@ without these libraries.
License: GPLv2+ License: GPLv2+
Summary: Info Files for the GNU C Library Summary: Info Files for the GNU C Library
Group: Documentation/Other Group: Documentation/Other
PreReq: %{install_info_prereq} Requires(post): %{install_info_prereq}
Requires(postun): %{install_info_prereq}
%description info %description info
@ -254,7 +254,7 @@ created.
License: GPLv2+ ; LGPLv2.1+ License: GPLv2+ ; LGPLv2.1+
Summary: Locale Data for Localized Programs Summary: Locale Data for Localized Programs
Group: System/Libraries Group: System/Libraries
PreReq: /bin/cat Requires(post): /bin/cat
Requires: glibc = %{version} Requires: glibc = %{version}
# bug437293 # bug437293
%ifarch ppc64 %ifarch ppc64
@ -274,7 +274,9 @@ Summary: Name Service Caching Daemon
Group: System/Daemons Group: System/Daemons
Provides: aaa_base:/etc/init.d/nscd Provides: aaa_base:/etc/init.d/nscd
Provides: glibc:/usr/sbin/nscd Provides: glibc:/usr/sbin/nscd
PreReq: %insserv_prereq Requires(preun): %insserv_prereq
Requires(post): %insserv_prereq
Requires(postun): %insserv_prereq
%description -n nscd %description -n nscd
@ -312,8 +314,8 @@ Obsoletes: glibc-devel-64bit
%ifarch ppc %ifarch ppc
Obsoletes: glibc-devel-32bit Obsoletes: glibc-devel-32bit
%endif %endif
PreReq: /bin/rm Requires: glibc = %{version}
Requires: glibc = %{version}, linux-kernel-headers Requires: linux-kernel-headers
%description devel %description devel
@ -340,9 +342,9 @@ Requires: glibc = %{version}
%description utils %description utils
The glibc-utils package contains memusage, a memory usage profiler, The glibc-utils package contains mtrace, a memory leak tracer and
mtrace, a memory leak tracer and xtrace, a function call tracer xtrace, a function call tracer which can be helpful during program
which can be helpful during program debugging. debugging.
If you are unsure if you need this, don't install this package. If you are unsure if you need this, don't install this package.
@ -379,8 +381,7 @@ versions of your software.
# any other leave out ports # any other leave out ports
%setup -n glibc-%{version} -q -a 3 -a 4 %setup -n glibc-%{version} -q -a 3 -a 4
%endif %endif
# Seems not needed anymore %patch0
#%patch0
# libNoVersion part is only active on ix86 # libNoVersion part is only active on ix86
%patch1 %patch1
%patch2 -p1 %patch2 -p1
@ -389,17 +390,13 @@ versions of your software.
%patch5 %patch5
%patch7 %patch7
%patch8 %patch8
# Seems not needed anymore
#%patch9
%patch11 %patch11
%patch12 %patch12
%patch13 -E %patch13 -E
# We have s_sincos.c in patch13, remove duplicate # We have s_sincos.c in patch13, remove duplicate
rm sysdeps/x86_64/fpu/s_sincos.S rm sysdeps/x86_64/fpu/s_sincos.S
%patch14 %patch14
%patch15
%patch16 %patch16
%patch17
%patch18 %patch18
%patch20 %patch20
%patch21 %patch21
@ -443,7 +440,9 @@ rm nscd/s-stamp
%patch56 -p1 %patch56 -p1
%patch58 %patch58
%patch59 -p1 %patch59 -p1
%patch60 %patch60 -p1
%patch61 -p1
%patch62 -p1
%ifarch %arm armv5tel armv7l %ifarch %arm armv5tel armv7l
%patch500 %patch500
%patch501 %patch501
@ -492,7 +491,7 @@ echo "#define CVSDATE \"`date -r ChangeLog +%Y%m%d`\"" >> version.h
# #
# Default CFLAGS and Compiler # 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]*##')" BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=[0-9]*##')"
BuildCC="gcc" BuildCC="gcc"
BuildCCplus="g++" BuildCCplus="g++"
@ -627,7 +626,7 @@ make -C cc-base html
# #
# Build glibc_post_upgrade binary # 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 \ -Lcc-base -Bcc-base/csu \
'-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \ '-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
%ifarch ppc ppc64 %ifarch ppc ppc64
@ -644,7 +643,7 @@ $BuildCC -static $RPM_OPT_FLAGS -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glib
'-DREMOVE_PPC_OPTIMIZE_CELL' \ '-DREMOVE_PPC_OPTIMIZE_CELL' \
%endif %endif
%endif %endif
'-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"' '-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_libdir}/gconv"'
####################################################################### #######################################################################
### ###
@ -689,12 +688,12 @@ make -C cc-base check-abi || echo check-abi failed
export STRIP_KEEP_SYMTAB=*.so* export STRIP_KEEP_SYMTAB=*.so*
# Make sure we will create the gconv-modules.cache # Make sure we will create the gconv-modules.cache
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gconv mkdir -p %{buildroot}%{_libdir}/gconv
touch $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
# Install base glibc # Install base glibc
# Do not install in parallel, timezone Makefile will fail # 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 # Install power-optimized glibc
%if %{optimize_power} %if %{optimize_power}
@ -716,24 +715,24 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base
ppc-cell-be \ ppc-cell-be \
%endif %endif
; do ; do
make install_root=${RPM_BUILD_ROOT}/$pcpu install -C cc-$pcpu make install_root=%{buildroot}/$pcpu install -C cc-$pcpu
mkdir -p $RPM_BUILD_ROOT/%{_lib}/$pcpu mkdir -p %{buildroot}/%{_lib}/$pcpu
for i in libc-%{version} libm-%{version} libpthread-%{version} libthread_db-1.0 librt-%{version}; do 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 done
$my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/$pcpu/ $my_ldconfig -n %{buildroot}/%{_lib}/$pcpu/
rm -rf $RPM_BUILD_ROOT/$pcpu rm -rf %{buildroot}/$pcpu
done done
%if %{powerpc_optimize_cpu_power6} %if %{powerpc_optimize_cpu_power6}
# power6 is compatible with power6x # power6 is compatible with power6x
# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir # doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir
if test -d $RPM_BUILD_ROOT/%{_lib}/power6; then if test -d %{buildroot}/%{_lib}/power6; then
mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6x mkdir -p %{buildroot}/%{_lib}/power6x
for i in $RPM_BUILD_ROOT/%{_lib}/power6/*.so; do for i in %{buildroot}/%{_lib}/power6/*.so; do
b=`basename $i` b=`basename $i`
ln -vs ../power6/$b $RPM_BUILD_ROOT/%{_lib}/power6x/$b ln -vs ../power6/$b %{buildroot}/%{_lib}/power6x/$b
done done
$my_ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power6x/ $my_ldconfig -n %{buildroot}/%{_lib}/power6x/
fi fi
%endif %endif
%endif # optimize_power %endif # optimize_power
@ -742,7 +741,7 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base
%if %{build_locales} %if %{build_locales}
# Do not install locales in parallel! # Do not install locales in parallel!
cd cc-base 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 .. cd ..
%endif %endif
# Create file list for glibc-locale package # Create file list for glibc-locale package
@ -751,55 +750,55 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base
# Prepare obsolete/, used only on some architectures: # Prepare obsolete/, used only on some architectures:
export RPM_BUILD_ROOT export RPM_BUILD_ROOT
%ifarch %ix86 %ifarch %ix86
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete mkdir -p %{buildroot}/%{_lib}/obsolete
%endif %endif
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include # NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
# the generic one (RH#162634) # 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 %ifarch s390x
# s390x is different ... # s390x is different ...
mkdir $RPM_BUILD_ROOT/lib mkdir %{buildroot}/lib
ln -sf ../%{_lib}/ld-%{version}.so $RPM_BUILD_ROOT/lib/ld64.so.1 ln -sf ../%{_lib}/ld-%{version}.so %{buildroot}/lib/ld64.so.1
%endif %endif
# Miscelanna: # 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/bindresvport.blacklist %{buildroot}/etc
install -m 644 $RPM_SOURCE_DIR/nsswitch.conf $RPM_BUILD_ROOT/etc install -m 644 $RPM_SOURCE_DIR/nsswitch.conf %{buildroot}/etc
install -m 644 posix/gai.conf $RPM_BUILD_ROOT/etc install -m 644 posix/gai.conf %{buildroot}/etc
mkdir -p $RPM_BUILD_ROOT/etc/default mkdir -p %{buildroot}/etc/default
install -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/ install -m 644 nis/nss %{buildroot}/etc/default/
mkdir -p $RPM_BUILD_ROOT/usr/include/resolv mkdir -p %{buildroot}%{_includedir}/resolv
install -m 0644 resolv/mapv4v6addr.h $RPM_BUILD_ROOT/usr/include/resolv/ install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
install -m 0644 resolv/mapv4v6hostent.h $RPM_BUILD_ROOT/usr/include/resolv/ install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/glibc mkdir -p %{buildroot}%{_datadir}/doc/glibc
cp -p manual/libc/*.html $RPM_BUILD_ROOT/usr/share/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: # nscd tools:
cp nscd/nscd.conf $RPM_BUILD_ROOT/etc cp nscd/nscd.conf %{buildroot}/etc
mkdir -p $RPM_BUILD_ROOT/etc/apparmor.d mkdir -p %{buildroot}/etc/apparmor.d
cp $RPM_SOURCE_DIR/usr.sbin.nscd $RPM_BUILD_ROOT/etc/apparmor.d cp $RPM_SOURCE_DIR/usr.sbin.nscd %{buildroot}/etc/apparmor.d
mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p %{buildroot}/etc/init.d
install -m 755 $RPM_SOURCE_DIR/nscd.init $RPM_BUILD_ROOT/etc/init.d/nscd install -m 755 $RPM_SOURCE_DIR/nscd.init %{buildroot}/etc/init.d/nscd
ln -sf /etc/init.d/nscd $RPM_BUILD_ROOT/usr/sbin/rcnscd ln -sf /etc/init.d/nscd %{buildroot}/usr/sbin/rcnscd
mkdir -p $RPM_BUILD_ROOT/var/run/nscd mkdir -p %{buildroot}/var/run/nscd
touch $RPM_BUILD_ROOT/var/run/nscd/{passwd,group,hosts} touch %{buildroot}/var/run/nscd/{passwd,group,hosts}
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid} touch %{buildroot}/var/run/nscd/{socket,nscd.pid}
# #
# Create ld.so.conf # Create ld.so.conf
# #
cat > $RPM_BUILD_ROOT/etc/ld.so.conf <<EOF cat > %{buildroot}/etc/ld.so.conf <<EOF
/usr/%{_lib}/Xaw3d /usr/%{_lib}/Xaw3d
%ifarch s390x sparc64 x86_64 ppc64 ppc %ifarch s390x sparc64 x86_64 ppc64 ppc
/usr/lib/Xaw3d /usr/lib/Xaw3d
@ -819,29 +818,29 @@ cat > $RPM_BUILD_ROOT/etc/ld.so.conf <<EOF
include /etc/ld.so.conf.d/*.conf include /etc/ld.so.conf.d/*.conf
EOF EOF
# Add ldconfig cache directory for directory ownership # 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: # Empty the ld.so.cache:
rm -f $RPM_BUILD_ROOT/etc/ld.so.cache rm -f %{buildroot}/etc/ld.so.cache
touch $RPM_BUILD_ROOT/etc/ld.so.cache touch %{buildroot}/etc/ld.so.cache
# libNoVersion belongs only to glibc-obsolete: # libNoVersion belongs only to glibc-obsolete:
%ifarch %ix86 %ifarch %ix86
rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion* rm -f %{buildroot}%{_libdir}/libNoVersion*
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion mkdir -p %{buildroot}/%{_lib}/obsolete/noversion
mv -v $RPM_BUILD_ROOT/%{_lib}/libNoVersion* $RPM_BUILD_ROOT/%{_lib}/obsolete/noversion/ mv -v %{buildroot}/%{_lib}/libNoVersion* %{buildroot}/%{_lib}/obsolete/noversion/
%endif %endif
# Don't look at ldd! We don't wish a /bin/sh requires # 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: # 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 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 done
rm -rf $RPM_BUILD_ROOT/usr/share/zoneinfo rm -rf %{buildroot}%{_datadir}/zoneinfo
# Remove the buildflags tracking section and the build-id # 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 objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o
done done
@ -853,10 +852,10 @@ done
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
# Note: glibc_post_upgrade does: # 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 # since we cannot do it in our own post section
@ -1048,7 +1047,7 @@ exit 0
%files locale -f libc.lang %files locale -f libc.lang
%defattr(-,root,root) %defattr(-,root,root)
/usr/share/locale/locale.alias %{_datadir}/locale/locale.alias
%if %{build_locales} %if %{build_locales}
/usr/lib/locale /usr/lib/locale
%endif %endif
@ -1065,7 +1064,7 @@ exit 0
%{_bindir}/catchsegv %{_bindir}/catchsegv
%{_bindir}/rpcgen %{_bindir}/rpcgen
%{_bindir}/sprof %{_bindir}/sprof
%{_prefix}/include/* %{_includedir}/*
%{_libdir}/*.o %{_libdir}/*.o
%{_libdir}/*.so %{_libdir}/*.so
# These static libraries are needed even for shared builds # These static libraries are needed even for shared builds
@ -1151,8 +1150,8 @@ exit 0
/%{_lib}/libmemusage.so /%{_lib}/libmemusage.so
/%{_lib}/libpcprofile.so /%{_lib}/libpcprofile.so
# These need gd-devel for building # These need gd-devel for building
#%{_bindir}/memusage # %%{_bindir}/memusage
#%{_bindir}/memusagestat # %%{_bindir}/memusagestat
%{_bindir}/mtrace %{_bindir}/mtrace
%{_bindir}/pcprofiledump %{_bindir}/pcprofiledump
%{_bindir}/xtrace %{_bindir}/xtrace