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