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