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

  ViewVC Help
Powered by ViewVC 1.1.30