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

Contents of /updates/5/glibc/current/SPECS/glibc.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1043638 - (show annotations) (download)
Tue Jul 26 09:50:51 2016 UTC (7 years, 9 months ago) by tmb
File size: 50940 byte(s)
- Fix static dlopen default library search path [BZ #17250]
- grantpt: trust the kernel about pty group and permission mode [BZ #19347]
- sunrpc: Do not use alloca in clntudp_call [BZ #20112] (CVE-2016-4429, mga#18651)


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

  ViewVC Help
Powered by ViewVC 1.1.30