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

  ViewVC Help
Powered by ViewVC 1.1.30