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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 81873 - (show annotations) (download)
Thu Apr 7 14:47:08 2011 UTC (13 years ago) by rtp
Original Path: cauldron/glibc/current/SPECS/glibc.spec
File size: 53767 byte(s)
- remove native pt_chown when generating cross glibc for non-biarch/mips* case
  too

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

  ViewVC Help
Powered by ViewVC 1.1.30