/[packages]/updates/3/glibc/current/SPECS/glibc.spec
ViewVC logotype

Annotation of /updates/3/glibc/current/SPECS/glibc.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137807 - (hide annotations) (download)
Fri Sep 2 00:27:58 2011 UTC (12 years, 7 months ago) by tv
Original Path: cauldron/glibc/current/SPECS/glibc.spec
File size: 53803 byte(s)
make the huge doc subpackages be noarch
1 tmb 180 # RH 2.2.4-20, SuSE 2.3.1-32
2     %define name %{cross_prefix}glibc
3    
4     # <epoch>:<version>-<release> tags for glibc main package
5     %define glibcversion 2.12.1
6 tv 137807 %define __glibcrelease 12
7 tmb 180 %define glibcepoch 6
8    
9     # CVS snapshots of glibc
10     %define RELEASE 1
11     %if %{RELEASE}
12     %define source_package glibc-%{glibcversion}
13     %define source_dir glibc-%{glibcversion}
14     %define _glibcrelease %{__glibcrelease}
15 rtp 75373 %define portsversion %{glibcversion}
16 tmb 180 %else
17     %define snapshot 20081113
18     %define source_package glibc-%{glibcversion}-%{snapshot}
19     %define source_dir glibc-%{glibcversion}
20     %define _glibcrelease 0.%{snapshot}.%{__glibcrelease}
21 rtp 75373 %define portsversion 2.9
22 tmb 180 %endif
23    
24     %define glibcrelease %mkrel %{_glibcrelease}
25    
26     # crypt blowfish support
27     %define crypt_bf_ver 1.0.2
28    
29     # Define "cross" to an architecture to which glibc is to be
30     # cross-compiled
31     %define build_cross 0
32     %{expand: %{?cross: %%global build_cross 1}}
33    
34     %if %{build_cross}
35     %define target_cpu %{cross}
36     %define cross_prefix cross-%{target_cpu}-
37 rtp 75373 %define _prefix /usr/%{target_cpu}-%{_real_vendor}-linux%{gnuext}
38 rtp 76126 %define cross_program_prefix %{target_cpu}-%{_real_vendor}-linux%{gnuext}-
39 rtp 75373 %define _exec_prefix %{_prefix}
40     # brain damage alert: should not be needed imho
41     # overriding _prefix and _exec_prefix should be enough
42     %define _bindir %{_exec_prefix}/bin
43     %define _sbindir %{_exec_prefix}/sbin
44     %define _libexecdir %{_exec_prefix}/libexec
45     %define _datadir %{_prefix}/share
46     %define _sharedstatedir %{_prefix}/com
47     %define _localstatedir %{_prefix}/var
48 tmb 180 %define _lib lib
49 rtp 75373 %define _libdir %{_exec_prefix}/%{_lib}
50     %define _slibdir %{_exec_prefix}/%{_lib}
51     %define _slibdir32 %{_exec_prefix}/lib
52     %define _includedir %{_prefix}/include
53 tmb 180 %else
54 rtp 75373 %define gnuext %{_gnu}
55 tmb 180 %define target_cpu %{_target_cpu}
56     %define cross_prefix %{nil}
57 rtp 75373 %define cross_program_prefix %{nil}
58 tmb 180 %define _slibdir /%{_lib}
59     %define _slibdir32 /lib
60     %endif
61    
62     # Define target (base) architecture
63     %define arch %(echo %{target_cpu}|sed -e "s/\\(i.86\\|athlon\\)/i386/" -e "s/amd64/x86_64/" -e "s/\\(sun4.*\\|sparcv[89]\\)/sparc/")
64     %define isarch() %(case " %* " in (*" %{arch} "*) echo 1;; (*) echo 0;; esac)
65    
66 rtp 76126 %if %{build_cross}
67     %if %isarch %arm
68     %define gnuext -gnueabi
69     %else
70     %define gnuext -gnu
71     %endif
72     %endif
73    
74 tmb 180 # Define Xen arches to build with -mno-tls-direct-direct-seg-refs
75     %define xenarches %{ix86} x86_64
76    
77 rtp 75373 # arches which requires glibc-port
78     %define ports_arch %arm %mips
79    
80 tmb 180 # Define to build nscd with selinux support
81     %define build_selinux 0
82    
83     # Flag for build_pdf_doc:
84     # 1 build glibc with PDF documentation
85     # 0 don't build PDF glibc documentation (e.g. for bootstrap build)
86     %define build_pdf_doc 1
87    
88     # Enable checking by default for arches where we know tests all pass
89     %define build_check 1
90    
91     # Allow make check to fail only when running kernels where we know
92     # tests must pass (no missing features or bugs in the kernel)
93     %define check_min_kver 2.6.21
94    
95     # Define to build a biarch package
96     %define build_biarch 0
97 rtp 75373 %if %isarch sparc64 x86_64 ppc64 mips64 mips64el
98 tmb 180 %define build_biarch 1
99     %endif
100    
101     # Define to build glibc-debug package
102     %define build_debug 1
103     %define _enable_debug_packages 1
104     %if "%{_enable_debug_packages}" == "1"
105     %define build_debug 0
106     %endif
107    
108     # Define to bootstrap new glibc
109     %define build_bootstrap 0
110     %{expand: %{!?build_cross_bootstrap: %global build_cross_bootstrap 0}}
111    
112     %define build_profile 1
113     %define build_nscd 1
114     %define build_doc 1
115     %define build_utils 1
116     %define build_i18ndata 1
117     %define build_timezone 0
118    
119     # Disable a few defaults when cross-compiling a glibc
120     %if %{build_cross}
121     %define build_doc 0
122     %define build_pdf_doc 0
123     %define build_biarch 0
124     %define build_check 0
125     %define build_debug 0
126     %define build_nscd 0
127     %define build_profile 0
128     %define build_utils 0
129     %define build_i18ndata 0
130     %define build_timezone 0
131     %endif
132    
133     # Allow --with[out] <feature> at rpm command line build
134     %{expand: %{?_without_PDF: %%global build_pdf_doc 0}}
135     %{expand: %{?_without_CHECK: %%global build_check 0}}
136     %{expand: %{?_without_UTILS: %%global build_utils 0}}
137     %{expand: %{?_without_BOOTSTRAP:%%global build_bootstrap 0}}
138     %{expand: %{?_with_PDF: %%global build_pdf_doc 1}}
139     %{expand: %{?_with_CHECK: %%global build_check 1}}
140     %{expand: %{?_with_UTILS: %%global build_utils 1}}
141     %{expand: %{?_with_BOOTSTRAP: %%global build_bootstrap 1}}
142    
143     Summary: The GNU libc libraries
144     Name: %{name}
145     Version: %{glibcversion}
146     Release: %{glibcrelease}
147     Epoch: %{glibcepoch}
148     License: LGPL
149     Group: System/Libraries
150     Url: http://www.gnu.org/software/libc/
151    
152     # FSF source
153     Source0: http://ftp.gnu.org/gnu/glibc/%{source_package}.tar.xz
154     %if %{RELEASE}
155     Source1: http://ftp.gnu.org/gnu/glibc/%{source_package}.tar.xz.sig
156     %endif
157    
158     # Red Hat tarball
159     Source2: glibc-redhat.tar.bz2
160     Source3: glibc-manpages.tar.bz2
161     Source4: glibc-find-requires.sh
162     Source5: glibc-check.sh
163    
164     # wrapper to avoid rpm circular dependencies
165     Source14: glibc-post-wrapper.c
166    
167     # <http://penguinppc.org/dev/glibc/glibc-powerpc-cpu-addon.html>
168     # NOTE: this check is weak. The rationale is: Cell PPU optimized by
169     # default
170     %define powerpc_cpu_list noarch
171     Source15: glibc-powerpc-cpu-addon-v0.03.tar.bz2
172    
173     # Blowfish support
174     Source16: crypt_blowfish-%{crypt_bf_ver}.tar.gz
175     Source17: crypt_freesec.c
176     Source18: crypt_freesec.h
177    
178 rtp 75373 # tarball are at http://ftp.gnu.org/gnu/glibc/
179     # for snapshots :
180     # git clone git://sources.redhat.com/git/glibc-ports.git
181     # git archive --format=tar --prefix=glibc-ports-2.9/ HEAD | bzip2 -c > ../glibc-ports-2.9-$(date +%%Y%%m%%d).tar.bz2
182     Source20: glibc-ports-%{portsversion}.tar.bz2
183    
184 tmb 180 Buildroot: %{_tmppath}/glibc-%{PACKAGE_VERSION}-root
185     %if %{build_cross}
186     Autoreq: false
187     Autoprov: false
188     %else
189     Provides: glibc-crypt_blowfish = %{crypt_bf_ver}
190     Provides: should-restart = system
191     %if %isarch %{xenarches}
192     Obsoletes: %{name}-xen
193     Provides: %{name}-xen
194     %endif
195     # The dynamic linker supports DT_GNU_HASH
196     Provides: rtld(GNU_HASH)
197     Autoreq: false
198     %endif
199     BuildRequires: patch, gettext, perl
200     BuildRequires: linux-userspace-headers
201     %if %{build_selinux}
202     BuildRequires: libselinux-devel >= 1.17.10
203     %endif
204     # need linker for -Wl,--hash-style=both (>= 2.16.91.0.7-6})
205     # need gnu indirect function for multiarch (>= 2.19.51.0.14-1)
206     %define binutils_version 2.19.51.0.14-1
207     BuildRequires: %{cross_prefix}binutils >= %{binutils_version}
208     # we need the static dash
209     %define ash_bin /bin/dash.static
210     Requires(pre): dash-static
211     Requires(post): dash-static
212     # we need an ldconfig with TLS support
213     %if %{build_cross}
214     BuildRequires: %{cross_prefix}gcc >= 3.2.2-4
215     %endif
216     %ifarch %{ix86} alpha
217     BuildRequires: %{cross_prefix}gcc >= 2.96-0.50
218     %endif
219     %ifarch ia64
220     BuildRequires: %{cross_prefix}gcc >= 3.2.3-1
221     %endif
222     %ifarch x86_64
223     BuildRequires: %{cross_prefix}gcc >= 3.1.1-0.5
224     %endif
225     BuildRequires: %{cross_prefix}gcc >= 4.0.1-2
226     %if !%{build_cross}
227     %ifarch alpha
228     Provides: ld.so.2
229     %endif
230 rtp 75373 %ifarch ppc mips mipsel
231 tmb 180 Provides: ld.so.1
232     %endif
233     %ifarch sparc
234     Obsoletes: libc
235     %endif
236     %endif
237    
238     # Old prelink versions brakes the system with glibc 2.11
239     Conflicts: prelink < 1:0.4.2-1.20091104.1
240    
241     BuildRequires: texinfo
242     %if %{build_pdf_doc}
243     BuildRequires: tetex, tetex-latex
244     %endif
245     %if %{build_utils}
246     BuildRequires: gd-devel
247     %endif
248     BuildRequires: autoconf2.5
249     BuildRequires: libcap-devel
250     BuildRequires: rpm-mageia-setup-build >= 1.104
251     BuildRequires: spec-helper >= 0.31.2
252    
253 misc 58181 # make "localedef --add-to-archive" to follow symlink
254     # safe to send ustream, need to be kept for locales
255 tmb 180 Patch00: glibc-2.11.1-localedef-archive-follow-symlinks.patch
256 misc 58181
257     # various path fix, for _PATH_VI and _PATH_VARDB
258 tmb 180 Patch01: glibc-2.12.1-fhs.patch
259     Patch02: glibc-2.9-ldd-non-exec.patch
260     Patch03: glibc-2.11-bz10851.patch
261 misc 58181 # try to fallback on loading /lib/libnss_*.so.X.Y when the loading
262     # of /lib/libnss_*.so.X failed. Should be dropped, IMHO.
263 tmb 180 Patch04: glibc-2.2-nss-upgrade.patch
264 misc 58181
265     # patch from https://qa.mandriva.com/show_bug.cgi?id=58834
266     # deferred upstream until rfc is changed, no need to push upstream
267 tmb 180 Patch05: glibc-2.12.1-assign-global-scope-to-RFC-1918-addresses.patch
268     Patch06: glibc-2.9-share-locale.patch
269 misc 58181
270     # default nsswitch.conf
271     # should be moved out patch and be a regular Source
272 tmb 180 Patch07: glibc-2.3.6-nsswitch.conf.patch
273     Patch08: glibc-2.12.1-make-3.82-fix.patch
274 misc 58181
275     # use xvt instead of xterm in xtrace.sh
276     # cannot be pushed upstream as xvt is Ma* specific
277 tmb 180 Patch09: glibc-2.2.4-xterm-xvt.patch
278 misc 58181
279     # add transliteration for "COLON SIGN"
280     # ( used for the money of money of san salvador )
281 tmb 180 Patch10: glibc-2.12.1-submitted-translit-colon.patch
282     Patch11: glibc-2.4.90-compat-EUR-currencies.patch
283     Patch12: glibc-2.3.6-ppc-build-lddlibc4.patch
284 misc 58181
285     # fix the chkconfig header, should be sent upstream
286 tmb 180 Patch13: glibc-2.3.3-nscd-enable.patch
287 misc 58181
288     # disable cache for hosts on nscd, as this is seen as insecure
289     # if the system relie on reverse dns for security
290 tmb 180 Patch14: glibc-2.9-nscd-no-host-cache.patch
291 misc 58181
292    
293 tmb 180 Patch15: glibc-2.12.1-ldconfig-chroot-aux-cache.patch
294     Patch16: glibc-2.12.1-workaround-shortest-stem-in-make-3.82.patch
295     Patch17: glibc-2.4.90-i386-hwcapinfo.patch
296     Patch18: glibc-2.7-provide_CFI_for_the_outermost_function.patch
297 misc 58181
298     # another fix for nscd init script, make it start after network, ldap, mysql and ypbind
299     # should be sent upstream
300 tmb 180 Patch19: glibc-2.8-nscd-init-should-start.patch
301     Patch20: glibc-2.12.1-never-expand-ORIGIN-in-privileged-programs.patch
302 misc 58181
303     # according to the patch : "The Linux kernel has a bug which silently ignore the invalid
304     # c_cflag on pty.". Patch is likely fixed in kernel, but this should be checked
305 tmb 180 Patch22: glibc-2.3.2-tcsetattr-kernel-bug-workaround.patch
306 misc 58181
307     # add some new timezone for various cities
308     # Halifax, Montreal, Johannesburg
309     # should be sent upstream ( I guess )
310 tmb 180 Patch23: glibc-2.3.4-timezone.patch
311     Patch24: glibc-2.10.1-biarch-cpp-defines.patch
312     Patch26: glibc-2.6-nice_fix.patch
313 misc 58181
314     # fix a typo, safe to send upstream
315 tmb 180 Patch27: glibc-2.8-ENOTTY-fr-translation.patch
316     Patch28: glibc-2.4.90-gcc4-fortify.patch
317     Patch29: glibc-2.3.5-biarch-utils.patch
318 misc 58181
319     # remove multiarch header, Ma* specific patch
320     # check if still needed or if the work was finished
321 tmb 180 Patch30: glibc-2.10.1-multiarch.patch
322     Patch31: glibc-2.4.90-i586-hptiming.patch
323 misc 58181
324     # do not use i686 optimised library if the processor do not support
325     # cmov ( some i686 cpu don't, from VIA iirc )
326     # shuld be sent upstream, IMHO
327 tmb 180 Patch32: glibc-2.3.4-i586-if-no-cmov.patch
328 misc 58181
329     # translation fixes, need to be checked with some i18n team member
330     # should be safe to send upstream once checked
331 tmb 180 Patch33: glibc-2.3.6-pt_BR-i18nfixes.patch
332     Patch34: glibc-2.4.90-testsuite-ldbl-bits.patch
333     Patch35: glibc-2.12.1-fix-error-handling-in-Linux-getlogin.patch
334     Patch36: glibc-2.12.1-more-fixes-to-error-handling-in-getlogin_r.patch
335     Patch37: glibc-2.12.1-__getlogin_r_loginuid-fail-if-tpwd-after-pwuid-is-NULL.patch
336 misc 58181
337     # disable parralel testsuite of rt on powerpc with SMT
338 tmb 180 Patch38: glibc-2.4.90-testsuite-rt-notparallel.patch
339     Patch39: glibc-2.10.1-mdv-owl-crypt_freesec.patch
340     Patch40: glibc-2.9-avx-relocate_fcrypt.patch
341     Patch41: glibc-2.3.6-avx-increase_BF_FRAME.patch
342     Patch42: glibc-2.10.1-mdv-avx-owl-crypt.patch
343 misc 58181
344     # add support for sha256 and sha512 in crypt
345     # likely coming from owl
346 tmb 180 Patch43: glibc-2.7-mdv-wrapper_handle_sha.patch
347 misc 58181
348     # check for libcap, even if selinux is disabled
349     # should be sent upstream
350 tmb 180 Patch44: glibc-2.11-dont-tie-libcap-with-selinux.patch
351     Patch45: glibc-2.12.1-CVE-2010-3856.diff
352 rtp 75373 # change page size to 16k. mandatory for loongson
353     # but not necessary a good idea for other socs
354     Patch46: glibc_mips_16k_page_size.patch
355     # shamlessly taken in linaro. just look dirty woraround
356     Patch47: glibc_local-syscall-mcount.diff
357 tmb 180 # Determine minium kernel versions
358     %define enablekernel 2.6.9
359     %if %isarch ppc ppc64
360     # waitid syscall is available in 2.6.12+ there
361     %define enablekernel 2.6.12
362     %endif
363     Conflicts: kernel < %{enablekernel}
364    
365     # People changed location of rpm scripts...
366     %define rpmscripts /usr/lib/rpm/%{_real_vendor}
367    
368     # Don't try to explicitly provide GLIBC_PRIVATE versioned libraries
369     %define __find_provides %{_builddir}/%{source_dir}/find_provides.sh
370     %define __find_requires %{_builddir}/%{source_dir}/find_requires.sh
371    
372     %if !%{build_cross}
373     Obsoletes: ld.so
374     Provides: ld.so
375     %endif
376    
377     Obsoletes: ldconfig
378     Provides: ldconfig = %{glibcepoch}:%{glibcversion}-%{glibcrelease} /sbin/ldconfig
379    
380     %description
381     The glibc package contains standard libraries which are used by
382     multiple programs on the system. In order to save disk space and
383     memory, as well as to make upgrading easier, common system code is
384     kept in one place and shared between programs. This particular package
385     contains the most important sets of shared libraries: the standard C
386     library and the standard math library. Without these two libraries, a
387     Linux system will not function. The glibc package also contains
388     national language (locale) support.
389    
390     This package now also provides ldconfig which was package seperately in
391     the past. Ldconfig is a basic system program which determines run-time
392     link bindings between ld.so and shared libraries. Ldconfig scans a running
393     system and sets up the symbolic links that are used to load shared
394     libraries properly. It also creates a cache (/etc/ld.so.cache) which
395     speeds the loading of programs which use shared libraries.
396    
397     %package devel
398     Summary: Header and object files for development using standard C libraries
399     Group: Development/C
400     Requires(post): info-install
401     Requires(preun): info-install
402     Requires(post): coreutils
403     Requires(postun): coreutils, awk
404     Obsoletes: libc-debug, libc-headers, libc-devel, linuxthreads-devel, nptl-devel
405     %if !%{build_debug}
406     Obsoletes: %{name}-debug < 6:2.3.2-15
407     %endif
408     Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
409     %if !%{build_cross}
410     Requires: linux-userspace-headers
411     %endif
412     %if !%isarch ppc
413     Conflicts: %{cross_prefix}gcc < 2.96-0.50
414     %endif
415     # needs a gcc4 fortify capable compiler
416     Conflicts: gcc4.0 < 4.0.1-2
417     %if %{build_cross}
418     Autoreq: false
419     Autoprov: false
420     %else
421     Autoreq: true
422     %endif
423     Provides: glibc-crypt_blowfish-devel = %{crypt_bf_ver}
424    
425     %description devel
426     The glibc-devel package contains the header and object files necessary
427     for developing programs which use the standard C libraries (which are
428     used by nearly all programs). If you are developing programs which
429     will use the standard C libraries, your system needs to have these
430     standard header and object files available in order to create the
431     executables.
432    
433     This package also includes the C header files for the Linux kernel.
434     The header files define structures and constants that are needed for
435     building most standard programs. The header files are also needed for
436     rebuilding the kernel.
437    
438     Install glibc-devel if you are going to develop programs which will
439     use the standard C libraries.
440    
441     %package static-devel
442     Summary: Static libraries for GNU C library
443     Group: Development/C
444     Requires: %{name}-devel = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
445    
446     %description static-devel
447     The glibc-static-devel package contains the static libraries necessary
448     for developing programs which use the standard C libraries. Install
449     glibc-static-devel if you need to statically link your program or
450     library.
451    
452     %package profile
453     Summary: The GNU libc libraries, including support for gprof profiling
454     Group: Development/C
455     Obsoletes: libc-profile
456     Provides: libc-profile = %{glibcversion}-%{glibcrelease}
457     Autoreq: true
458    
459     %description profile
460     The glibc-profile package includes the GNU libc libraries and support
461     for profiling using the gprof program. Profiling is analyzing a
462     program's functions to see how much CPU time they use and determining
463     which functions are calling other functions during execution. To use
464     gprof to profile a program, your program needs to use the GNU libc
465     libraries included in glibc-profile (instead of the standard GNU libc
466     libraries included in the glibc package).
467    
468     If you are going to use the gprof program to profile a program, you'll
469     need to install the glibc-profile program.
470    
471     %package -n nscd
472     Summary: A Name Service Caching Daemon (nscd)
473     Group: System/Servers
474     Requires(pre): rpm-helper
475     Requires(preun): rpm-helper
476     Requires(post): rpm-helper
477     Requires(postun): rpm-helper
478     Autoreq: true
479    
480     %description -n nscd
481     Nscd caches name service lookups and can dramatically improve
482     performance with NIS+, and may help with DNS as well. Note that you
483     can't use nscd with 2.0 kernels because of bugs in the kernel-side
484     thread support. Unfortunately, nscd happens to hit these bugs
485     particularly hard.
486    
487     Install nscd if you need a name service lookup caching daemon, and
488     you're not using a version 2.0 kernel.
489    
490     %if %{build_debug}
491     %package debug
492     Summary: Shared standard C libraries with debugging information
493     Group: System/Libraries
494     Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
495     Autoreq: false
496    
497     %description debug
498     The glibc-debug package contains shared standard C libraries with
499     debugging information. You need this only if you want to step into C
500     library routines during debugging.
501    
502     To use these libraries, you need to add %{_libdir}/debug to your
503     LD_LIBRARY_PATH variable prior to starting the debugger.
504     %endif
505    
506     %package utils
507     Summary: Development utilities from GNU C library
508     Group: Development/Other
509     Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
510    
511     %description utils
512     The glibc-utils package contains memusage, a memory usage profiler,
513     mtrace, a memory leak tracer and xtrace, a function call tracer which
514     can be helpful during program debugging.
515    
516     If unsure if you need this, don't install this package.
517    
518     %if %{build_i18ndata}
519     %package i18ndata
520     Summary: Database sources for 'locale'
521     Group: System/Libraries
522    
523     %description i18ndata
524     This package contains the data needed to build the locale data files
525     to use the internationalization features of the GNU libc.
526     %endif
527    
528     %if %{build_timezone}
529     %package -n timezone
530     Summary: Time zone descriptions
531     Group: System/Base
532    
533     %description -n timezone
534     These are configuration files that describe possible
535     time zones.
536     %endif
537    
538     %package doc
539     Summary: GNU C library documentation
540     Group: Development/Other
541 tv 137807 BuildArch: noarch
542 tmb 180
543     %description doc
544     The glibc-doc package contains documentation for the GNU C library in
545     info format.
546    
547     %if %{build_pdf_doc}
548     %package doc-pdf
549     Summary: GNU C library documentation
550     Group: Development/Other
551 tv 137807 BuildArch: noarch
552 tmb 180
553     %description doc-pdf
554     The glibc-doc-pdf package contains the printable documentation for the
555     GNU C library in PDF format.
556     %endif
557    
558     %prep
559     %setup -q -n %{source_dir} -a 3 -a 2 -a 15 -a 16
560    
561     %patch00 -p1 -b .localedef-archive-follow-symlinks
562     %patch01 -p1 -b .fhs
563     %patch02 -p1 -b .ldd-non-exec
564     %patch03 -p1 -b .bz10851
565     %patch04 -p1 -b .nss-upgrade
566     %patch05 -p1 -b .assign-global-scope-to-RFC-1918-addresses
567     %patch06 -p1 -b .share-locale
568     %patch07 -p1 -b .nsswitch.conf
569     %patch08 -p1 -b .make-3.82-fix
570     %patch09 -p1 -b .xterm-xvt
571     %patch10 -p1 -b .translit-colon
572     %patch11 -p1 -b .compat-EUR-currencies
573     %patch12 -p1 -b .ppc-lddlibc4
574     %patch13 -p1 -b .nscd-enable
575     %patch14 -p1 -b .nscd-no-host-cache
576     %patch15 -p1 -b .ldconfig-chroot-aux-cache
577     %patch16 -p1 -b .workaround-shortest-stem-in-make-3.82.patch
578     %patch17 -p1 -b .i386-hwcapinfo
579     %patch18 -p0 -R -b .provide_CFI_for_the_outermost_function
580     %patch19 -p1 -b .nscd-init-should-start
581     %patch20 -p1 -b .never-expand-ORIGIN-in-privileged-programs
582     %patch22 -p1 -b .tcsetattr-kernel-bug-workaround
583     %patch23 -p1 -b .timezone
584     %patch24 -p1 -b .biarch-cpp-defines
585     %patch26 -p1 -b .nice-fix
586     %patch27 -p1 -b .ENOTTY-fr-translation
587     %patch28 -p1 -b .gcc4-fortify
588     %patch29 -p1 -b .biarch-utils
589     %patch30 -p1 -b .multiarch-check
590     %patch31 -p1 -b .i586-hptiming
591     %patch32 -p1 -b .i586-if-no-cmov
592     %patch33 -p1 -b .pt_BR-i18nfixes
593     %patch34 -p1 -b .testsuite-ldbl-bits
594     %patch35 -p1 -b .fix-error-handling-in-Linux-getlogin
595     %patch36 -p1 -b .more-fixes-to-error-handling-in-getlogin_r
596     %patch37 -p1 -b .__getlogin_r_loginuid-fail-if-tpwd-after-pwuid-is-NULL
597     %patch38 -p1 -b .testsuite-rt-notparallel
598     %patch44 -p1 -b .dont-tie-libcap-with-selinux
599     %patch45 -p1 -b .CVE-2010-3856
600    
601 rtp 75373 %if %isarch %ports_arch
602     tar xjf %{SOURCE20}
603     mv glibc-ports-%{glibcversion} ports
604     %patch46 -p1 -b .pagesize
605     %patch47 -p1 -b .mcount
606     %endif
607    
608 tmb 180 # copy freesec source
609     cp %{_sourcedir}/crypt_freesec.[ch] crypt/
610     echo "Applying crypt_blowfish patch:"
611     %patch42 -p1 -b .mdv-avx-owl-crypt
612     #patch -p1 -s < crypt_blowfish-%{crypt_bf_ver}/glibc-2.3.2-crypt.diff
613     mv crypt/crypt.h crypt/gnu-crypt.h
614     cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/
615    
616     ## FreeSec support for extended/new-style/BSDI hashes in crypt(3)
617     %patch39 -p1 -b .mdv-owl-crypt_freesec
618     %patch40 -p1 -b .avx-relocate_fcrypt
619     %patch41 -p1 -b .avx-increase_BF_FRAME
620     # add sha256-crypt and sha512-crypt support to the Openwall wrapper
621     %patch43 -p0 -b .mdv-wrapper_handle_sha
622    
623     %if %{build_selinux}
624     # XXX kludge to build nscd with selinux support as it added -nostdinc
625     # so /usr/include/selinux is not found
626     ln -s %{_includedir}/selinux selinux
627     %endif
628    
629     find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
630    
631     # (Anssi 03/2008) FIXME: use _provides_exceptions
632     cat > find_provides.sh << EOF
633     #!/bin/sh
634     %{rpmscripts}/find-provides | grep -v GLIBC_PRIVATE
635     exit 0
636     EOF
637     chmod +x find_provides.sh
638    
639     cat > find_requires.bootstrap.sh << EOF
640     /bin/sh %{SOURCE4} %{buildroot} %{_target_cpu} | grep -v "\(GLIBC_PRIVATE\|linux-gate\|linux-vdso\)"
641     exit 0
642     EOF
643     chmod +x find_requires.bootstrap.sh
644    
645     # XXX: use better way later to avoid LD_LIBRARY_PATH issue
646     cat %{rpmscripts}/find-requires | sed '/.*LD_LIBRARY_PATH.*/d;' > find_requires
647     chmod +x find_requires
648     # (Anssi 03/2008) FIXME: use _requires_exceptions
649     cat > find_requires.noprivate.sh << EOF
650     %{_builddir}/%{source_dir}/find_requires %{buildroot} %{_target_cpu} | \
651     grep -v GLIBC_PRIVATE
652     exit 0
653     EOF
654     chmod +x find_requires.noprivate.sh
655    
656     # FIXME: fix system rpm find-requires to use the prefix cross version
657     %if %{build_bootstrap} || "%{_target_cpu}" != "%{target_cpu}"
658     ln -s find_requires.bootstrap.sh find_requires.sh
659     %else
660     ln -s find_requires.noprivate.sh find_requires.sh
661     %endif
662    
663     # Remove patch backups from files we ship in glibc packages
664     rm -f ChangeLog.[^0-9]*
665     rm -f localedata/locales/{???_??,??_??}.*
666     rm -f localedata/locales/[a-z_]*.*
667    
668     %build
669     # Prepare test matrix in the next function
670     CheckList=$PWD/Check.list
671     rm -f $CheckList
672     touch $CheckList
673    
674     #
675     # CompareKver <kernel version>
676     # function to compare the desired kernel version with running kernel
677     # version (package releases not taken into account in comparison). The
678     # function returns:
679     # -1 = <kernel version> is lesser than current running kernel
680     # 0 = <kernel version> is equal to the current running kernel
681     # 1 = <kernel version> is greater than current running kernel
682     #
683     function CompareKver() {
684     v1=`echo $1 | sed 's/\.\?$/./'`
685     v2=`uname -r | sed 's/[^.0-9].*//' | sed 's/\.\?$/./'`
686     n=1
687     s=0
688     while true; do
689     c1=`echo "$v1" | cut -d "." -f $n`
690     c2=`echo "$v2" | cut -d "." -f $n`
691     if [ -z "$c1" -a -z "$c2" ]; then
692     break
693     elif [ -z "$c1" ]; then
694     s=-1
695     break
696     elif [ -z "$c2" ]; then
697     s=1
698     break
699     elif [ "$c1" -gt "$c2" ]; then
700     s=1
701     break
702     elif [ "$c2" -gt "$c1" ]; then
703     s=-1
704     break
705     fi
706     n=$((n + 1))
707     done
708     echo $s
709     }
710    
711     #
712     # BuildGlibc <arch> [<extra_configure_options>+]
713     #
714     function BuildGlibc() {
715     arch="$1"
716     shift 1
717    
718     # PowerPC CPU add-on
719     case $arch in
720     cpu-addon,*)
721     cpu=` echo "$arch" | sed -n "/.*,\([^,]*\),.*$/s//\1/p"`
722     arch=`echo "$arch" | sed -n "/.*,.*,\([^,]*\)$/s//\1/p"`
723     ;;
724     *)
725     cpu=$arch
726     ;;
727     esac
728    
729     # Select optimization flags and compiler to use
730     BuildAltArch="no"
731     BuildCompFlags=""
732     BuildFlags=""
733     case $arch in
734     i[3456]86 | athlon)
735     BuildFlags="-march=$arch -mtune=generic"
736     if [[ "`uname -m`" = "x86_64" ]]; then
737     BuildAltArch="yes"
738     BuildCompFlags="-m32"
739     fi
740     ;;
741     x86_64)
742     BuildFlags="-mtune=generic"
743     ;;
744     ppc)
745     if [[ "`uname -m`" = "ppc64" ]]; then
746     BuildAltArch="yes"
747     BuildCompFlags="-m32"
748     # 64-bit processors we support do support power4+ ISA (2.01)
749     if [[ "$cpu" != "$arch" ]]; then
750     BuildFlags="-mcpu=$cpu"
751     else
752     BuildFlags="-mcpu=power4 -mtune=cell"
753     fi
754     fi
755     ;;
756     ppc64)
757     if [[ "$cpu" != "$arch" ]]; then
758     BuildFlags="-mcpu=$cpu"
759     else
760     BuildFlags="-mcpu=power4 -mtune=cell"
761     fi
762     ;;
763     alphaev6)
764     BuildFlags="-mcpu=ev6"
765     ;;
766     sparc)
767     BuildFlags="-fcall-used-g6"
768     BuildCompFlags="-m32"
769     ;;
770     sparcv9)
771     BuildFlags="-mcpu=ultrasparc -fcall-used-g6"
772     BuildCompFlags="-m32"
773     ;;
774     sparc64)
775     BuildFlags="-mcpu=ultrasparc -mvis -fcall-used-g6"
776     BuildCompFlags="-m64 -mcpu=ultrasparc"
777     ;;
778 rtp 75373 mips|mipsel)
779     BuildFlags="-march=mips3"
780     BuildCompFlags="-march=mips3"
781     ;;
782     mips32|mips32el)
783     BuildFlags="-march=mips3 -mabi=n32"
784     BuildCompFlags="-march=mips3 -mabi=n32"
785     ;;
786     mips64|mips64el)
787     BuildFlags="-march=mips3 -mabi=64"
788     BuildCompFlags="-march=mips3 -mabi=64"
789     ;;
790     armv4t*)
791     BuildFlags="-march=armv4t"
792     BuildCompFlags="-march=armv4t"
793     ;;
794     armv5t*)
795     BuildFlags="-march=armv5t"
796     BuildCompFlags="-march=armv5t"
797     ;;
798     # to check
799     armv7*)
800     BuildFlags="-march=armv7-a"
801     BuildCompFlags="-march=armv7-a"
802     ;;
803 tmb 180 esac
804    
805     # Choose multiarch support
806     MultiArchFlags=
807     case $arch in
808     i686 | x86_64)
809     MultiArchFlags="--enable-multi-arch"
810     ;;
811     esac
812    
813     # Determine C & C++ compilers
814     BuildCC="%{__cc} $BuildCompFlags"
815     BuildCXX="%{__cxx} $BuildCompFlags"
816    
817     # Are we supposed to cross-compile?
818     if [[ "%{target_cpu}" != "%{_target_cpu}" ]]; then
819 rtp 75373 # Can't use BuildCC anymore with previous changes.
820     BuildCC="%{cross_program_prefix}gcc $BuildCompFlags"
821     BuildCXX="%{cross_program_prefix}g++ $BuildCompFlags"
822 tmb 180 BuildCross="--build=%{_target_platform}"
823     export libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
824     fi
825    
826     BuildFlags="$BuildFlags -DNDEBUG=1 -O2 -finline-functions -g"
827     if $BuildCC -v 2>&1 | grep -q 'gcc version 3.0'; then
828     # gcc3.0 had really poor inlining heuristics causing problems in
829     # resulting ld.so
830     BuildFlags="$BuildFlags -finline-limit=2000"
831     fi
832    
833     # Do not use direct references against %gs when accessing tls data
834     # XXX make it the default in GCC? (for other non glibc specific usage)
835     case $arch in
836     i[3456]86 | x86_64)
837     BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
838     ;;
839     esac
840    
841     # Arch specific compilation flags
842     if [[ "$arch" = "ppc64" ]]; then
843     BuildFlags="$BuildFlags -fno-inline-functions -mno-minimal-toc"
844     fi
845    
846     # Extra configure flags
847     ExtraFlags=
848     if [[ "%{build_profile}" != "0" ]]; then
849     ExtraFlags="$ExtraFlags --enable-profile"
850     fi
851    
852     # NPTL+TLS are now the default
853 rtp 75373 # check for other arches
854     %if %isarch %ports_arch
855     Pthreads="ports nptl"
856     %else
857     Pthreads="nptl"
858     %endif
859 tmb 180 TlsFlags="--with-tls --with-__thread"
860    
861     # Add-ons
862     AddOns="$Pthreads,libidn"
863     if [[ "$cpu" != "$arch" ]]; then
864     AddOns="$AddOns,powerpc-cpu"
865     BuildFlags="$BuildFlags -mcpu=$cpu"
866     ExtraFlags="$ExtraFlags --with-cpu=$cpu"
867     fi
868    
869     # Build with selinux support?
870     %if %{build_selinux}
871     SElinuxFlags="--with-selinux"
872     %else
873     SElinuxFlags="--without-selinux"
874     %endif
875    
876     # Kernel headers directory
877     KernelHeaders=%{_includedir}
878    
879     # Determine library name
880     glibc_cv_cc_64bit_output=no
881     if echo ".text" | $BuildCC -c -o test.o -xassembler -; then
882     case `/usr/bin/file test.o` in
883     *"ELF 64"*)
884     glibc_cv_cc_64bit_output=yes
885     ;;
886     esac
887     fi
888     rm -f test.o
889    
890     # Force a separate and clean object dir
891     rm -rf build-$cpu-linux
892     mkdir build-$cpu-linux
893     pushd build-$cpu-linux
894     [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main"
895     CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags" ../configure \
896 rtp 75373 $arch-%{_real_vendor}-linux%{gnuext} $BuildCross \
897 tmb 180 --prefix=%{_prefix} \
898     --libexecdir=%{_prefix}/libexec \
899     --infodir=%{_infodir} \
900 rtp 75373 --enable-add-ons="$AddOns" --without-cvs \
901 tmb 180 $TlsFlags $ExtraFlags $MultiArchFlags $SElinuxFlags \
902     --enable-experimental-malloc \
903     --enable-kernel=%{enablekernel} \
904     --with-headers=$KernelHeaders ${1+"$@"}
905     %make -r
906     popd
907    
908     # All tests are expected to pass on certain platforms, depending also
909     # on the version of the kernel running
910     case $arch in
911     athlon | ia64 | ppc | ppc64)
912     if [ "`CompareKver %{check_min_kver}`" -lt 0 ]; then
913     check_flags=""
914     else
915     check_flags="-k"
916     fi
917     ;;
918     *)
919     check_flags="-k"
920     ;;
921     esac
922    
923     # Generate test matrix
924     [[ -d "build-$arch-linux" ]] || {
925     echo "ERROR: PrepareGlibcTest: build-$arch-linux does not exist!"
926     return 1
927     }
928     local BuildJobs="-j`getconf _NPROCESSORS_ONLN`"
929     echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList
930    
931     case $cpu in
932     i686|athlon) base_arch=i586;;
933     power*) base_arch=$arch;;
934     *) base_arch=none;;
935     esac
936    
937     [[ -d "build-$base_arch-linux" ]] && {
938     check_flags="$check_flags -l build-$base_arch-linux/elf/ld.so"
939     echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList
940     }
941     return 0
942     }
943    
944     # Build main glibc
945     BuildGlibc %{target_cpu}
946    
947     %if %{build_biarch}
948     %if %isarch sparc64
949     BuildGlibc sparcv9
950     %endif
951     %if %isarch x86_64
952     BuildGlibc i686
953     %endif
954     %if %isarch ppc64
955     BuildGlibc ppc
956     %endif
957     %endif
958 rtp 75373 %if %isarch mips
959     BuildGlibc mips64
960     BuildGlibc mips32
961     %endif
962     %if %isarch mipsel
963     BuildGlibc mips64el
964     BuildGlibc mips32el
965     %endif
966     %if %isarch mips64
967     BuildGlibc mips
968     BuildGlibc mips32
969     %endif
970     %if %isarch mips64el
971     BuildGlibc mipsel
972     BuildGlibc mips32el
973     %endif
974 tmb 180
975     %if %isarch ppc ppc64
976     for cpu in %{powerpc_cpu_list}; do
977     [[ "$cpu" = "noarch" ]] && continue
978     BuildGlibc cpu-addon,$cpu,%{_arch} --disable-profile
979     done
980     %endif
981    
982     # Build i686 libraries if not already building for i686/athlon
983     case %{target_cpu} in
984     i686 | athlon)
985     ;;
986     i[3-6]86)
987     BuildGlibc i686 --disable-profile
988     ;;
989     esac
990    
991     make -C crypt_blowfish-%{crypt_bf_ver} man
992    
993     %if %{build_check}
994     export TMPDIR=/tmp
995     export TIMEOUTFACTOR=16
996     Check="$PWD/glibc-check.sh"
997     cat %{SOURCE5} > $Check
998     chmod +x $Check
999     while read arglist; do
1000     $Check $arglist || exit 1
1001     done < $CheckList
1002     %endif
1003    
1004     %install
1005     rm -rf $RPM_BUILD_ROOT
1006    
1007     # force use of _NPROCESSORS_ONLN jobs since RPM_BUILD_NCPUS could be
1008     # greater for icecream
1009     BuildJobs="-j`getconf _NPROCESSORS_ONLN`"
1010    
1011     make install_root=$RPM_BUILD_ROOT install -C build-%{target_cpu}-linux
1012     %if %{build_i18ndata}
1013     (cd build-%{target_cpu}-linux;
1014     make $BuildJobs -C ../localedata objdir=`pwd` \
1015     install_root=$RPM_BUILD_ROOT \
1016     install-locales
1017     )
1018     install -m 0644 localedata/SUPPORTED $RPM_BUILD_ROOT/%{_datadir}/i18n/
1019     %endif
1020     sh manpages/Script.sh
1021    
1022     # Empty filelist for non i686/athlon targets
1023     > extralibs.filelist
1024    
1025     # Install biarch libraries
1026 rtp 75373 %if %{build_biarch} || %isarch mips mipsel
1027 tmb 180 %if %isarch sparc64
1028 rtp 75373 ALT_ARCHES=sparcv9-linux
1029 tmb 180 %endif
1030     %if %isarch x86_64
1031 rtp 75373 ALT_ARCHES=i686-linux
1032 tmb 180 %endif
1033     %if %isarch ppc64
1034 rtp 75373 ALT_ARCHES=ppc-linux
1035 tmb 180 %endif
1036 rtp 75373 %if %isarch mips
1037     ALT_ARCHES="mips64-linux mips32-linux"
1038     %endif
1039     %if %isarch mipsel
1040     ALT_ARCHES="mips64el-linux mips32el-linux"
1041     %endif
1042     %if %isarch mips64
1043     ALT_ARCHES="mips-linux mips32-linux"
1044     %endif
1045     %if %isarch mips64el
1046     ALT_ARCHES="mipsel-linux mips32el-linux"
1047     %endif
1048    
1049     for ALT_ARCH in $ALT_ARCHES; do
1050 tmb 180 mkdir -p $RPM_BUILD_ROOT/$ALT_ARCH
1051     make install_root=$RPM_BUILD_ROOT/$ALT_ARCH install -C build-$ALT_ARCH
1052    
1053     # Dispatch */lib only
1054 rtp 75373 case "$ALT_ARCH" in
1055     mips32*)
1056     LIB="%{_slibdir}32"
1057     ;;
1058     mips64*)
1059     LIB="%{_slibdir}64"
1060     ;;
1061     *)
1062 rtp 75374 LIB=/lib
1063 rtp 75373 ;;
1064     esac
1065     %if !%{build_cross}
1066     mv $RPM_BUILD_ROOT/$ALT_ARCH/$LIB $RPM_BUILD_ROOT/$LIB
1067     rm -f $RPM_BUILD_ROOT/$ALT_ARCH/%_prefix/lib/pt_chown
1068 tmb 180 mv $RPM_BUILD_ROOT/$ALT_ARCH%{_prefix}/libexec/getconf/* \
1069     $RPM_BUILD_ROOT%{_prefix}/libexec/getconf/
1070 rtp 75373 [ ! -d $RPM_BUILD_ROOT/%{_prefix}/$LIB/ ] && mkdir -p $RPM_BUILD_ROOT/%{_prefix}/$LIB/
1071     mv $RPM_BUILD_ROOT/$ALT_ARCH/%{_prefix}/$LIB/* $RPM_BUILD_ROOT/%{_prefix}/$LIB/
1072     %else
1073     mv $RPM_BUILD_ROOT/$ALT_ARCH/%{_prefix}/lib $RPM_BUILD_ROOT/$LIB
1074 rtp 76126 rm -f $RPM_BUILD_ROOT/%{_prefix}/libexec/pt_chown
1075 rtp 75373 rm -f $RPM_BUILD_ROOT/$LIB/pt_chown
1076     sed -i $RPM_BUILD_ROOT/$LIB/libc.so -e "s!%{_slibdir}!$LIB!g"
1077     %endif
1078    
1079 tmb 180 # We want 32-bit binaries on sparc64
1080     %if %isarch sparc64
1081     mv -f $RPM_BUILD_ROOT/$ALT_ARCH/sbin/* $RPM_BUILD_ROOT/sbin
1082     mv -f $RPM_BUILD_ROOT/$ALT_ARCH/%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
1083     mv -f $RPM_BUILD_ROOT/$ALT_ARCH/%{_sbindir}/* $RPM_BUILD_ROOT%{_sbindir}
1084     %endif
1085     rm -rf $RPM_BUILD_ROOT/$ALT_ARCH
1086     # XXX Dispatch 32-bit stubs
1087     (sed '/^@/d' include/stubs-prologue.h; LC_ALL=C sort $(find build-$ALT_ARCH -name stubs)) \
1088     > $RPM_BUILD_ROOT%{_includedir}/gnu/stubs-32.h
1089 rtp 75373 done
1090 tmb 180 %endif
1091 rtp 81873 %if %{build_cross}
1092     rm -f $RPM_BUILD_ROOT/%{_prefix}/libexec/pt_chown
1093     %endif
1094 tmb 180
1095     # Install extra glibc libraries
1096     function InstallGlibc() {
1097     local BuildDir="$1"
1098     local SubDir="$2"
1099     local LibDir="$3"
1100    
1101     case $BuildDir in
1102     *) Pthreads=nptl ;;
1103     esac
1104    
1105     [[ -z "$LibDir" ]] && LibDir="%{_slibdir}"
1106    
1107     pushd $BuildDir
1108     mkdir -p $RPM_BUILD_ROOT$LibDir/$SubDir/
1109     install -m755 libc.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libc-*.so`
1110     ln -sf `basename $RPM_BUILD_ROOT$LibDir/libc-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libc.so.*`
1111     install -m755 math/libm.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libm-*.so`
1112     ln -sf `basename $RPM_BUILD_ROOT$LibDir/libm-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libm.so.*`
1113     install -m755 $Pthreads/libpthread.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libpthread-*.so`
1114     ln -sf `basename $RPM_BUILD_ROOT$LibDir/libpthread-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libpthread.so.*`
1115     install -m755 ${Pthreads}_db/libthread_db.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libthread_db-*.so`
1116     ln -sf `basename $RPM_BUILD_ROOT$LibDir/libthread_db-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libthread_db.so.*`
1117     install -m755 rt/librt.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/librt-*.so`
1118     ln -sf `basename $RPM_BUILD_ROOT$LibDir/librt-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/librt.so.*`
1119     echo "%dir $LibDir/$SubDir" >> ../extralibs.filelist
1120     find $RPM_BUILD_ROOT$LibDir/$SubDir -maxdepth 1 -type f -o -type l | sed -e "s|$RPM_BUILD_ROOT||" >> ../extralibs.filelist
1121     popd
1122     }
1123    
1124     # Install arch-specific optimized libraries
1125     %if %isarch %{ix86}
1126     case %{target_cpu} in
1127     i[3-5]86)
1128     InstallGlibc build-i686-linux i686
1129     ;;
1130     esac
1131     %endif
1132     %if %isarch ppc ppc64
1133     for cpu in %{powerpc_cpu_list}; do
1134     [[ "$cpu" = "noarch" ]] && continue
1135     InstallGlibc build-$cpu-linux $cpu
1136     done
1137     # Use hardlinks, not symlinks
1138     # see upper NOTE if you really want dedicated power5+ hwcap...
1139     [[ -d "$RPM_BUILD_ROOT/%{_lib}/power5" ]] && {
1140     mkdir -p $RPM_BUILD_ROOT/%{_lib}/power5+
1141     ln -v $RPM_BUILD_ROOT/%{_lib}/power5/*.so \
1142     $RPM_BUILD_ROOT/%{_lib}/power5+/
1143     $RPM_BUILD_ROOT/sbin/ldconfig -n $RPM_BUILD_ROOT/%{_lib}/power5+/
1144     echo "%dir /%{_lib}/power5+" >> extralibs.filelist
1145     find $RPM_BUILD_ROOT$LibDir/%{_lib}/power5+/ -maxdepth 1 -type f -o -type l | sed -e "s|$RPM_BUILD_ROOT||" >> extralibs.filelist
1146     }
1147     %endif
1148    
1149     # NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
1150     # the generic one (RH#162634)
1151     install -m644 bits/stdio-lock.h $RPM_BUILD_ROOT%{_includedir}/bits/stdio-lock.h
1152    
1153     # Compatibility hack: this locale has vanished from glibc, but some other
1154     # programs are still using it. Normally we would handle it in the %pre
1155     # section but with glibc that is simply not an option
1156     mkdir -p $RPM_BUILD_ROOT%{_datadir}/locale/ru_RU/LC_MESSAGES
1157    
1158     # Remove the files we don't want to distribute
1159     rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
1160     rm -f $RPM_BUILD_ROOT%{_slibdir}/libNoVersion*
1161    
1162     ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_libdir}/libbsd.a
1163     %if %{build_biarch}
1164     ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_prefix}/lib/libbsd.a
1165     %endif
1166 rtp 75373 %if %isarch mips mipsel
1167     ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_libdir}32/libbsd.a
1168     ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_libdir}64/libbsd.a
1169     %endif
1170 tmb 180
1171     %if "%{name}" == "glibc"
1172     install -m 644 mageia/nsswitch.conf $RPM_BUILD_ROOT%{_sysconfdir}/nsswitch.conf
1173     %endif
1174    
1175     # This is for ncsd - in glibc 2.2
1176     %if %{build_nscd}
1177     install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT%{_sysconfdir}
1178     mkdir -p $RPM_BUILD_ROOT%{_initrddir}
1179     install -m 755 nscd/nscd.init $RPM_BUILD_ROOT%{_initrddir}/nscd
1180     %endif
1181    
1182     # These man pages require special attention
1183     mkdir -p %{buildroot}%{_mandir}/man3
1184     install -p -m 0644 crypt_blowfish-%{crypt_bf_ver}/*.3 %{buildroot}%{_mandir}/man3/
1185    
1186     # Useless and takes place
1187     rm -rf %buildroot/%{_datadir}/zoneinfo/{posix,right}
1188    
1189     # Include ld.so.conf
1190     %if "%{name}" == "glibc"
1191 rtp 75373 %if %isarch mips mipsel
1192     # needed to get a ldd which understands o32, n32, 64
1193     install -m 755 $RPM_BUILD_DIR/%{source_dir}/build-mips64el-linux/elf/ldd $RPM_BUILD_ROOT/%{_bindir}/ldd
1194     %endif
1195 tmb 180 echo "include /etc/ld.so.conf.d/*.conf" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
1196     chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
1197     mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d
1198    
1199     # ldconfig cache
1200     mkdir -p $RPM_BUILD_ROOT%{_var}/cache/ldconfig
1201     touch $RPM_BUILD_ROOT%{_var}/cache/ldconfig/aux-cache
1202    
1203     # automatic ldconfig cache update on rpm installs/removals
1204     # (see http://wiki.mandriva.com/en/Rpm_filetriggers)
1205     install -d %buildroot%{_var}/lib/rpm/filetriggers
1206     cat > %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.filter << EOF
1207 rtp 75373 ^.((/lib|/usr/lib)(32|64)?/[^/]*\.so\.|/etc/ld.so.conf.d/[^/]*\.conf)
1208 tmb 180 EOF
1209     cat > %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.script << EOF
1210     #!/bin/sh
1211     ldconfig -X
1212     EOF
1213     chmod 755 %buildroot%{_var}/lib/rpm/filetriggers/ldconfig.script
1214 rtp 75373 %endif
1215 tmb 180
1216     # Include %{_libdir}/gconv/gconv-modules.cache
1217     > $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
1218     chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
1219    
1220 rtp 76126 %if "%{name}" == "glibc"
1221 tmb 180 touch $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.cache
1222 rtp 76126 %endif
1223 tmb 180
1224     # Add libraries to debug sub-package
1225     %if %{build_debug}
1226     mkdir $RPM_BUILD_ROOT%{_libdir}/debug
1227     #cp -a $RPM_BUILD_ROOT%{_libdir}/*.a $RPM_BUILD_ROOT%{_libdir}/debug/
1228     #rm -f $RPM_BUILD_ROOT%{_libdir}/debug/*_p.a
1229     cp -a $RPM_BUILD_ROOT%{_slibdir}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/debug/
1230    
1231     pushd $RPM_BUILD_ROOT%{_libdir}/debug
1232     for lib in *.so*; do
1233     [[ -f "$lib" ]] && DEBUG_LIBS="$DEBUG_LIBS %{_libdir}/debug/$lib"
1234     done
1235     popd
1236     %endif
1237    
1238     # Are we cross-compiling?
1239     Strip="strip"
1240     if [[ "%{_target_cpu}" != "%{target_cpu}" ]]; then
1241 rtp 75373 Strip="%{cross_program_prefix}$Strip"
1242 tmb 180 fi
1243    
1244     # Strip libpthread but keep some symbols
1245     find $RPM_BUILD_ROOT%{_slibdir} -type f -name "libpthread-*.so" \
1246     -o -type f -name "libc-*.so" | \
1247     xargs $Strip -g -R .comment
1248    
1249     %if %{build_biarch}
1250     find $RPM_BUILD_ROOT/lib -type f -name "libpthread-*.so" \
1251     -o -type f -name "libc-*.so" | \
1252     xargs $Strip -g -R .comment
1253     %endif
1254    
1255     # Strip debugging info from all static libraries
1256 rtp 75373 pushd $RPM_BUILD_ROOT%{_slibdir}
1257 tmb 180 for i in *.a; do
1258     if [ -f "$i" ]; then
1259     case "$i" in
1260     *_p.a) ;;
1261     *) $Strip -g -R .comment $i ;;
1262     esac
1263     fi
1264     done
1265     popd
1266    
1267     # post install wrapper
1268     %__cc -Os -DSLIBDIR="\"%{_slibdir}\"" -DASH_BIN="\"%{ash_bin}\"" %{SOURCE14} -static \
1269     -L $RPM_BUILD_ROOT%{_libdir}/ \
1270     -o $RPM_BUILD_ROOT%{_sbindir}/glibc-post-wrapper
1271     chmod 700 $RPM_BUILD_ROOT%{_sbindir}/glibc-post-wrapper
1272    
1273     # rquota.x and rquota.h are now provided by quota
1274     rm -f $RPM_BUILD_ROOT%{_includedir}/rpcsvc/rquota.[hx]
1275    
1276     # Hardlink identical locale files together
1277     %if %{build_i18ndata}
1278 rtp 75373 gcc -O2 -o build-%{target_cpu}-linux/hardlink redhat/hardlink.c
1279     build-%{target_cpu}-linux/hardlink -vc $RPM_BUILD_ROOT%{_datadir}/locale
1280 tmb 180 %endif
1281    
1282     rm -rf $RPM_BUILD_ROOT%{_includedir}/netatalk/
1283    
1284     # Build file list for devel package
1285     find $RPM_BUILD_ROOT%{_includedir} -type f -or -type l > devel.filelist
1286     find $RPM_BUILD_ROOT%{_includedir} -type d | sed "s/^/%dir /" | \
1287     grep -v "%{_libdir}/libnss1.*.so$" | \
1288     grep -v "%{_includedir}$" | >> devel.filelist
1289     find $RPM_BUILD_ROOT%{_libdir} -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
1290     # biarch libs
1291     %if %{build_biarch}
1292     find $RPM_BUILD_ROOT%{_prefix}/lib -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
1293     %endif
1294 rtp 75373 %if %isarch mips mipsel
1295     find $RPM_BUILD_ROOT%{_libdir}32 -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
1296     find $RPM_BUILD_ROOT%{_libdir}64 -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
1297     %endif
1298 tmb 180 perl -pi -e "s|$RPM_BUILD_ROOT||" devel.filelist
1299    
1300 blino 3100 # /etc/localtime - we're proud of our timezone #Well we may put Paris
1301 tmb 180 %if %{build_timezone}
1302     rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
1303     cp -f $RPM_BUILD_ROOT%{_datadir}/zoneinfo/US/Eastern $RPM_BUILD_ROOT%{_sysconfdir}/localtime
1304     #ln -sf ..%{_datadir}/zoneinfo/US/Eastern $RPM_BUILD_ROOT%{_sysconfdir}/localtime
1305     %endif
1306    
1307     # [gg] build PDF documentation
1308     %if %{build_pdf_doc}
1309     (cd manual; texi2dvi -p -t @afourpaper -t @finalout libc.texinfo)
1310     %endif
1311    
1312     # the last bit: more documentation
1313     rm -rf documentation
1314     mkdir documentation
1315     cp timezone/README documentation/README.timezone
1316     cp ChangeLog* documentation
1317     gzip -9 documentation/ChangeLog*
1318     mkdir documentation/crypt_blowfish-%{crypt_bf_ver}
1319     install -m 644 crypt_blowfish-%{crypt_bf_ver}/{README,LINKS,PERFORMANCE} \
1320     documentation/crypt_blowfish-%{crypt_bf_ver}
1321    
1322     # Generate final rpm filelist, with localized libc.mo files
1323     rm -f rpm.filelist
1324     %if "%{name}" == "glibc"
1325     %find_lang libc
1326     perl -ne '/^\s*$/ or print' libc.lang > rpm.filelist
1327     %endif
1328     cat extralibs.filelist >> rpm.filelist
1329    
1330     # Remove unpackaged files
1331     rm -f $RPM_BUILD_ROOT%{_infodir}/dir.old*
1332     rm -rf $RPM_BUILD_ROOT%{_includedir}/asm-*/mach-*/
1333     rm -f $RPM_BUILD_ROOT%{_datadir}/locale/locale-archive*
1334    
1335     %if !%{build_utils}
1336     %if %{build_biarch}
1337     rm -f $RPM_BUILD_ROOT%{_slibdir32}/libmemusage.so
1338     rm -f $RPM_BUILD_ROOT%{_slibdir32}/libpcprofile.so
1339     %endif
1340 rtp 75373 %if %isarch mips mipsel
1341     rm -f $RPM_BUILD_ROOT%{_slibdir}32/libmemusage.so
1342     rm -f $RPM_BUILD_ROOT%{_slibdir}32/libpcprofile.so
1343     rm -f $RPM_BUILD_ROOT%{_slibdir}64/libmemusage.so
1344     rm -f $RPM_BUILD_ROOT%{_slibdir}64/libpcprofile.so
1345     %endif
1346 tmb 180 rm -f $RPM_BUILD_ROOT%{_slibdir}/libmemusage.so
1347     rm -f $RPM_BUILD_ROOT%{_slibdir}/libpcprofile.so
1348     rm -f $RPM_BUILD_ROOT%{_bindir}/memusage
1349     rm -f $RPM_BUILD_ROOT%{_bindir}/memusagestat
1350     rm -f $RPM_BUILD_ROOT%{_bindir}/mtrace
1351     rm -f $RPM_BUILD_ROOT%{_bindir}/pcprofiledump
1352     rm -f $RPM_BUILD_ROOT%{_bindir}/xtrace
1353     %endif
1354    
1355     %if !%{build_timezone}
1356     rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
1357     rm -f $RPM_BUILD_ROOT%{_sbindir}/zdump
1358     rm -f $RPM_BUILD_ROOT%{_sbindir}/zic
1359     rm -f $RPM_BUILD_ROOT%{_mandir}/man1/zdump.1*
1360     rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo
1361     %endif
1362    
1363     %if !%{build_i18ndata}
1364     rm -rf $RPM_BUILD_ROOT%{_datadir}/i18n
1365     %endif
1366    
1367     %if "%{name}" != "glibc"
1368     rm -rf $RPM_BUILD_ROOT/boot
1369     rm -rf $RPM_BUILD_ROOT/sbin
1370     rm -rf $RPM_BUILD_ROOT/usr/share
1371     rm -rf $RPM_BUILD_ROOT%{_bindir}
1372     rm -rf $RPM_BUILD_ROOT%{_sbindir}
1373     rm -rf $RPM_BUILD_ROOT%{_datadir}
1374     rm -rf $RPM_BUILD_ROOT%{_mandir}
1375     rm -rf $RPM_BUILD_ROOT%{_infodir}
1376     rm -rf $RPM_BUILD_ROOT%{_prefix}/etc
1377     rm -rf $RPM_BUILD_ROOT%{_libdir}/gconv
1378     %endif
1379    
1380     # In case we are cross-compiling, don't bother to remake symlinks and
1381     # fool spec-helper when stripping files
1382     %if "%{name}" != "glibc"
1383     export DONT_SYMLINK_LIBS=1
1384     export PATH=%{_bindir}:$PATH
1385     %endif
1386    
1387     EXCLUDE_FROM_STRIP="ld-%{glibcversion}.so libpthread libc-%{glibcversion}.so $DEBUG_LIBS"
1388     export EXCLUDE_FROM_STRIP
1389    
1390     %if "%{name}" == "glibc"
1391     %define upgradestamp %{_slibdir}/glibc.upgraded
1392     %define broken_link %{_slibdir}/libnss_nis.so.1 %{_slibdir}/libnss_files.so.1 %{_slibdir}/libnss_dns.so.1 %{_slibdir}/libnss_compat.so.1
1393    
1394     %pre -p %{ash_bin}
1395     # test(1) and echo(1) are built-ins
1396     if [ -d %{_slibdir} ] && [ ! -f %{_slibdir}/libnss_files-%{glibcversion}.so ]; then
1397     echo > %{upgradestamp}
1398     fi
1399    
1400     %post -p %{_sbindir}/glibc-post-wrapper
1401     export LC_ALL=C
1402    
1403     if [ "$1" -gt 1 ]; then
1404     # migrate /etc/ld.so.conf to include the new /etc/ld.so.conf.d/
1405     # without external commands but for removing the temporary file
1406     ldso_conf=/etc/ld.so.conf
1407     while read i; do
1408     [ "$i" = "include /etc/ld.so.conf.d/*.conf" ] && keep=1
1409     # Remove previously used include line without absolute path
1410     [ "$i" = "include ld.so.conf.d/*.conf" ] || echo $i
1411     done < $ldso_conf > $ldso_conf-
1412     if [ -z "$keep" ]; then
1413     echo "include /etc/ld.so.conf.d/*.conf" > $ldso_conf
1414     while read i; do
1415     echo $i
1416     done < $ldso_conf- >> $ldso_conf
1417     fi
1418     [ -x /bin/rm ] && /bin/rm -f $ldso_conf-
1419     fi
1420     /sbin/ldconfig
1421    
1422     if [ "$1" -gt 1 ]; then
1423     # On upgrade the services doesn't work because libnss couldn't be
1424     # loaded anymore.
1425     if [ -f %{upgradestamp} ]; then
1426     if /usr/bin/readlink /proc/1/exe >/dev/null && \
1427     /usr/bin/readlink /proc/1/root >/dev/null; then
1428     if [ -x /sbin/telinit -a -p /dev/initctl ]; then
1429     /sbin/telinit u
1430     fi
1431     if [ -x /etc/init.d/sshd -a \
1432     -x /usr/sbin/sshd -a \
1433     -x /bin/bash ]; then
1434     /etc/init.d/sshd condrestart
1435     fi
1436     fi
1437     fi
1438     if [ -f /bin/rm ]; then
1439     for i in %broken_link; do
1440     if [ -e $i ] && [ ! -L $i ]; then
1441     /bin/rm -f $i
1442     fi
1443     done
1444     fi
1445     fi
1446     [ -x /bin/rm ] && /bin/rm -f %{upgradestamp}
1447    
1448     # always generate the gconv-modules.cache
1449     %{_sbindir}/iconvconfig -o %{_libdir}/gconv/gconv-modules.cache --nostdlib %{_libdir}/gconv
1450    
1451 blino 3102 %endif
1452    
1453 tmb 180 %pre devel
1454     if [ -L %{_includedir}/scsi ]; then
1455     rm -f %{_includedir}/scsi
1456     fi
1457     if [ -L %{_includedir}/sound ]; then
1458     rm -f %{_includedir}/sound
1459     fi
1460     if [ -L %{_includedir}/linux ]; then
1461     rm -f %{_includedir}/linux
1462     fi
1463     if [ -L %{_includedir}/asm ]; then
1464     rm -f %{_includedir}/asm
1465     fi
1466     if [ -L %{_includedir}/asm-generic ]; then
1467     rm -f %{_includedir}/asm-generic
1468     fi
1469     %if %isarch x86_64
1470     if [ -L %{_includedir}/asm-x86_64 ]; then
1471     rm -f %{_includedir}/asm-x86_64
1472     fi
1473     if [ -L %{_includedir}/asm-i386 ]; then
1474     rm -f %{_includedir}/asm-i386
1475     fi
1476     %endif
1477     %if %isarch ppc64
1478     if [ -L %{_includedir}/asm-ppc64 ]; then
1479     rm -f %{_includedir}/asm-ppc64
1480     fi
1481     if [ -L %{_includedir}/asm-ppc ]; then
1482     rm -f %{_includedir}/asm-ppc
1483     fi
1484     %endif
1485     %if %isarch sparc64
1486     if [ -L %{_includedir}/asm-sparc64 ]; then
1487     rm -f %{_includedir}/asm-sparc64
1488     fi
1489     if [ -L %{_includedir}/asm-sparc ]; then
1490     rm -f %{_includedir}/asm-sparc
1491     fi
1492     %endif
1493 rtp 75373 %if %isarch %mips
1494     if [ -L %{_includedir}/asm-mips ]; then
1495     rm -f %{_includedir}/asm-mips
1496     fi
1497     %endif
1498     %if %isarch %arm
1499     if [ -L %{_includedir}/asm-arm ]; then
1500     rm -f %{_includedir}/asm-arm
1501     fi
1502     %endif
1503 tmb 180 exit 0
1504    
1505     %if %{build_doc}
1506     %post doc
1507     %_install_info libc.info
1508    
1509     %preun doc
1510     %_remove_install_info libc.info
1511     %endif
1512    
1513     %if %{build_nscd}
1514     %pre -n nscd
1515     %_pre_useradd nscd / /bin/false
1516    
1517     %post -n nscd
1518     %_post_service nscd
1519    
1520     %preun -n nscd
1521     %_preun_service nscd
1522    
1523     %postun -n nscd
1524     %_postun_userdel nscd
1525    
1526     if [ "$1" -ge "1" ]; then
1527     /sbin/service nscd condrestart > /dev/null 2>&1 || :
1528     fi
1529     %endif
1530    
1531     %clean
1532     #rm -rf "$RPM_BUILD_ROOT"
1533     #rm -f *.filelist*
1534    
1535     #
1536     # glibc
1537     #
1538     %files -f rpm.filelist
1539     %defattr(-,root,root)
1540     %if "%{name}" == "glibc"
1541     %if %{build_timezone}
1542     %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/localtime
1543     %endif
1544     %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/nsswitch.conf
1545     %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ld.so.conf
1546     %dir %{_sysconfdir}/ld.so.conf.d
1547     %config(noreplace) %{_sysconfdir}/rpc
1548     %doc nis/nss
1549     %doc posix/gai.conf
1550     %{_mandir}/man1/*
1551     %{_mandir}/man8/rpcinfo.8*
1552     %{_mandir}/man8/ld.so*
1553     %{_datadir}/locale/locale.alias
1554     /sbin/sln
1555     %dir %{_prefix}/libexec/getconf
1556     %{_prefix}/libexec/getconf/*
1557     %endif
1558     %{_slibdir}/ld-%{glibcversion}.so
1559     %if %isarch i386 alpha sparc sparc64
1560     %{_slibdir}/ld-linux.so.2
1561     %endif
1562 rtp 75373 %if %isarch %arm
1563     %{_slibdir}/ld-linux.so.3
1564     %endif
1565 tmb 180 %if %isarch ppc
1566     %{_slibdir}/ld.so.1
1567     %endif
1568     %if %isarch ppc64
1569     %{_slibdir}/ld64.so.1
1570     %endif
1571     %if %isarch ia64
1572     %{_slibdir}/ld-linux-ia64.so.2
1573     %endif
1574     %if %isarch x86_64
1575     %{_slibdir}/ld-linux-x86-64.so.2
1576     %endif
1577     %if %isarch m68k
1578     %{_slibdir}/ld.so.1
1579     %endif
1580 rtp 75373 %if %isarch %mips
1581     %{_slibdir}/ld.so.1
1582     %endif
1583 tmb 180 %{_slibdir}/lib*-[.0-9]*.so
1584     %{_slibdir}/lib*.so.[0-9]*
1585     %{_slibdir}/libSegFault.so
1586     %if "%{name}" == "glibc"
1587     %dir %{_libdir}/gconv
1588     %{_libdir}/gconv/*.so
1589     %{_libdir}/gconv/gconv-modules
1590     %ghost %{_libdir}/gconv/gconv-modules.cache
1591     %attr(4755,root,root) %{_prefix}/libexec/pt_chown
1592     %{_bindir}/catchsegv
1593     %{_bindir}/gencat
1594     %{_bindir}/getconf
1595     %{_bindir}/getent
1596     #%{_bindir}/glibcbug
1597     %{_bindir}/iconv
1598     %{_bindir}/ldd
1599     %if %isarch i386 ppc sparc sparc64
1600     %{_bindir}/lddlibc4
1601     %endif
1602     %{_bindir}/locale
1603     %{_bindir}/localedef
1604     %{_bindir}/rpcgen
1605     %{_bindir}/sprof
1606     %{_bindir}/tzselect
1607     %{_sbindir}/rpcinfo
1608     %{_sbindir}/iconvconfig
1609     %{_sbindir}/glibc-post-wrapper
1610     %endif
1611    
1612     %if %{build_biarch}
1613     %{_slibdir32}/ld-%{glibcversion}.so
1614     %if %isarch ppc64
1615     %{_slibdir32}/ld.so.1
1616     %else
1617     %{_slibdir32}/ld-linux*.so.2
1618     %endif
1619     %{_slibdir32}/lib*-[.0-9]*.so
1620     %{_slibdir32}/lib*.so.[0-9]*
1621     %{_slibdir32}/libSegFault.so
1622     %dir %{_prefix}/lib/gconv
1623     %{_prefix}/lib/gconv/*
1624     %endif
1625 rtp 75373 %if %isarch mips mipsel
1626     %{_slibdir}32/ld-%{glibcversion}.so
1627     %{_slibdir}32/ld.so.1
1628     %{_slibdir}32/lib*-[.0-9]*.so
1629     %{_slibdir}32/lib*.so.[0-9]*
1630     %{_slibdir}32/libSegFault.so
1631     %dir %{_libdir}32/gconv
1632     %{_libdir}32/gconv/*
1633     %{_slibdir}64/ld-%{glibcversion}.so
1634     %{_slibdir}64/ld.so.1
1635     %{_slibdir}64/lib*-[.0-9]*.so
1636     %{_slibdir}64/lib*.so.[0-9]*
1637     %{_slibdir}64/libSegFault.so
1638     %dir %{_libdir}64/gconv
1639     %{_libdir}64/gconv/*
1640     %endif
1641    
1642 tmb 180 #
1643     # ldconfig
1644     #
1645     %if "%{name}" == "glibc"
1646     %defattr(-,root,root)
1647     /sbin/ldconfig
1648     %{_mandir}/man8/ldconfig*
1649     %ghost %{_sysconfdir}/ld.so.cache
1650     %dir %{_var}/cache/ldconfig
1651     %ghost %{_var}/cache/ldconfig/aux-cache
1652     %{_var}/lib/rpm/filetriggers/ldconfig.*
1653     %endif
1654    
1655     #
1656     # glibc-devel
1657     #
1658     %files devel -f devel.filelist
1659     %defattr(-,root,root)
1660     %doc README NEWS INSTALL FAQ BUGS NOTES PROJECTS CONFORMANCE
1661     %doc COPYING COPYING.LIB
1662     %doc documentation/* README.libm
1663     %doc hesiod/README.hesiod
1664     %doc crypt/README.ufc-crypt
1665 rtp 75373 %if "%{name}" == "glibc"
1666 tmb 180 %{_mandir}/man3/*
1667 rtp 75373 %endif
1668 tmb 180 %{_libdir}/libbsd-compat.a
1669     %{_libdir}/libbsd.a
1670     %{_libdir}/libc_nonshared.a
1671     %{_libdir}/libg.a
1672     %{_libdir}/libieee.a
1673     %{_libdir}/libmcheck.a
1674     %{_libdir}/libpthread_nonshared.a
1675     %if "%{name}" == "glibc"
1676     %{_libdir}/librpcsvc.a
1677     %endif
1678     %if %isarch ppc ppc64 sparc
1679     %{_libdir}/libnldbl_nonshared.a
1680     %endif
1681    
1682     %if %{build_biarch}
1683     %{_prefix}/lib/libbsd-compat.a
1684     %{_prefix}/lib/libbsd.a
1685     %{_prefix}/lib/libc_nonshared.a
1686     %{_prefix}/lib/libg.a
1687     %{_prefix}/lib/libieee.a
1688     %{_prefix}/lib/libmcheck.a
1689     %{_prefix}/lib/libpthread_nonshared.a
1690     %{_prefix}/lib/librpcsvc.a
1691     %if %isarch ppc64 sparc64
1692     %{_prefix}/lib/libnldbl_nonshared.a
1693     %endif
1694     %endif
1695    
1696 rtp 75373 %if %isarch mips mipsel
1697     %{_libdir}32/libbsd-compat.a
1698     %{_libdir}32/libbsd.a
1699     %{_libdir}32/libc_nonshared.a
1700     %{_libdir}32/libg.a
1701     %{_libdir}32/libieee.a
1702     %{_libdir}32/libmcheck.a
1703     %{_libdir}32/libpthread_nonshared.a
1704     %if "%{name}" == "glibc"
1705     %{_libdir}32/librpcsvc.a
1706     %endif
1707     %{_libdir}64/libbsd-compat.a
1708     %{_libdir}64/libbsd.a
1709     %{_libdir}64/libc_nonshared.a
1710     %{_libdir}64/libg.a
1711     %{_libdir}64/libieee.a
1712     %{_libdir}64/libmcheck.a
1713     %{_libdir}64/libpthread_nonshared.a
1714     %if "%{name}" == "glibc"
1715     %{_libdir}64/librpcsvc.a
1716     %endif
1717     %endif
1718    
1719 tmb 180 #
1720     # glibc-static-devel
1721     #
1722     %files static-devel
1723     %defattr(-,root,root)
1724     %doc COPYING COPYING.LIB
1725     %{_libdir}/libBrokenLocale.a
1726     %{_libdir}/libanl.a
1727     %{_libdir}/libc.a
1728     %{_libdir}/libcrypt.a
1729     %{_libdir}/libdl.a
1730     %{_libdir}/libm.a
1731     %{_libdir}/libnsl.a
1732     %{_libdir}/libpthread.a
1733     %{_libdir}/libresolv.a
1734     %{_libdir}/librt.a
1735     %{_libdir}/libutil.a
1736    
1737     %if %{build_biarch}
1738     %{_prefix}/lib/libBrokenLocale.a
1739     %{_prefix}/lib/libanl.a
1740     %{_prefix}/lib/libc.a
1741     %{_prefix}/lib/libcrypt.a
1742     %{_prefix}/lib/libdl.a
1743     %{_prefix}/lib/libm.a
1744     %{_prefix}/lib/libnsl.a
1745     %{_prefix}/lib/libpthread.a
1746     %{_prefix}/lib/libresolv.a
1747     %{_prefix}/lib/librt.a
1748     %{_prefix}/lib/libutil.a
1749     %endif
1750    
1751 rtp 75373 %if %isarch mips mipsel
1752     %{_libdir}32/libBrokenLocale.a
1753     %{_libdir}32/libanl.a
1754     %{_libdir}32/libc.a
1755     %{_libdir}32/libcrypt.a
1756     %{_libdir}32/libdl.a
1757     %{_libdir}32/libm.a
1758     %{_libdir}32/libnsl.a
1759     %{_libdir}32/libpthread.a
1760     %{_libdir}32/libresolv.a
1761     %{_libdir}32/librt.a
1762     %{_libdir}32/libutil.a
1763    
1764     %{_libdir}64/libBrokenLocale.a
1765     %{_libdir}64/libanl.a
1766     %{_libdir}64/libc.a
1767     %{_libdir}64/libcrypt.a
1768     %{_libdir}64/libdl.a
1769     %{_libdir}64/libm.a
1770     %{_libdir}64/libnsl.a
1771     %{_libdir}64/libpthread.a
1772     %{_libdir}64/libresolv.a
1773     %{_libdir}64/librt.a
1774     %{_libdir}64/libutil.a
1775     %endif
1776    
1777 tmb 180 #
1778     # glibc-doc
1779     #
1780     %if %{build_doc}
1781     %files doc
1782     %defattr(-,root,root)
1783     %{_infodir}/libc.info*
1784     %endif
1785    
1786     #
1787     # glibc-doc-pdf
1788     #
1789     %if %{build_pdf_doc}
1790     %files doc-pdf
1791     %defattr(-,root,root)
1792     %doc manual/libc.pdf
1793     %endif
1794    
1795     #
1796     # glibc-debug
1797     #
1798     %if %{build_debug}
1799     %files debug
1800     %defattr(-,root,root)
1801     %dir %{_libdir}/debug
1802     %{_libdir}/debug/*.so
1803     %{_libdir}/debug/*.so.*
1804 rtp 75373 %if %isarch mips mipsel
1805     %dir %{_libdir}/debug/lib32
1806     %{_libdir}/debug/lib32/*.so
1807     %{_libdir}/debug/lib32/*.so.*
1808     %dir %{_libdir}/debug/lib64
1809     %{_libdir}/debug/lib64/*.so
1810     %{_libdir}/debug/lib64/*.so.*
1811 tmb 180 %endif
1812 rtp 75373 %endif
1813 tmb 180
1814     #
1815     # glibc-profile
1816     #
1817     %if %{build_profile}
1818     %files profile
1819     %defattr(-,root,root)
1820     %{_libdir}/lib*_p.a
1821     %if %{build_biarch}
1822     %{_prefix}/lib/lib*_p.a
1823     %endif
1824 rtp 75373 %if %isarch mips mipsel
1825     %{_libdir}32/lib*_p.a
1826     %{_libdir}64/lib*_p.a
1827 tmb 180 %endif
1828 rtp 75373 %endif
1829 tmb 180
1830     #
1831     # glibc-utils
1832     #
1833     %if %{build_utils}
1834     %files utils
1835     %defattr(-,root,root)
1836     %if %{build_biarch}
1837     %{_slibdir32}/libmemusage.so
1838     %{_slibdir32}/libpcprofile.so
1839     %endif
1840     %{_slibdir}/libmemusage.so
1841     %{_slibdir}/libpcprofile.so
1842     %{_bindir}/memusage
1843     %{_bindir}/memusagestat
1844     %{_bindir}/mtrace
1845     %{_bindir}/pcprofiledump
1846     %{_bindir}/xtrace
1847 rtp 75373 %if %isarch mips mipsel
1848     %{_slibdir}32/libmemusage.so
1849     %{_slibdir}32/libpcprofile.so
1850     %{_slibdir}64/libmemusage.so
1851     %{_slibdir}64/libpcprofile.so
1852 tmb 180 %endif
1853 rtp 75373 %endif
1854 tmb 180
1855     #
1856     # nscd
1857     #
1858     %if %{build_nscd}
1859     %files -n nscd
1860     %defattr(-,root,root)
1861     %config(noreplace) %{_sysconfdir}/nscd.conf
1862     %config(noreplace) %{_initrddir}/nscd
1863     %{_sbindir}/nscd
1864     %endif
1865    
1866     #
1867     # timezone
1868     #
1869     %if %{build_timezone}
1870     %files -n timezone
1871     %defattr(-,root,root)
1872     %{_sbindir}/zdump
1873     %{_sbindir}/zic
1874     %{_mandir}/man1/zdump.1*
1875     %dir %{_datadir}/zoneinfo
1876     %{_datadir}/zoneinfo/*
1877     %endif
1878    
1879     #
1880     # glibc-i18ndata
1881     #
1882     %if %{build_i18ndata}
1883     %files i18ndata
1884     %defattr(-,root,root)
1885     %dir %{_datadir}/i18n
1886     %dir %{_datadir}/i18n/charmaps
1887     %{_datadir}/i18n/charmaps/*
1888     %dir %{_datadir}/i18n/locales
1889     %{_datadir}/i18n/locales/*
1890     %{_datadir}/i18n/SUPPORTED
1891     %endif
1892    
1893    
1894    
1895    

  ViewVC Help
Powered by ViewVC 1.1.30