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

  ViewVC Help
Powered by ViewVC 1.1.30