/[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 471630 - (hide annotations) (download)
Sun Aug 25 13:03:21 2013 UTC (10 years, 7 months ago) by tmb
File size: 48381 byte(s)
- drop minimal required kernel to 2.6.32 so it works in chroots on top
  of enterprise kernels

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

  ViewVC Help
Powered by ViewVC 1.1.30