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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30