/[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 75374 - (show annotations) (download)
Tue Mar 22 00:20:45 2011 UTC (13 years, 1 month ago) by rtp
Original Path: cauldron/glibc/current/SPECS/glibc.spec
File size: 53582 byte(s)
SILENT: fix LIB variable in ALT_ARCHES/biarch code

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

  ViewVC Help
Powered by ViewVC 1.1.30