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

  ViewVC Help
Powered by ViewVC 1.1.30