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

  ViewVC Help
Powered by ViewVC 1.1.30