/[packages]/cauldron/glibc/current/SPECS/glibc.spec
ViewVC logotype

Contents of /cauldron/glibc/current/SPECS/glibc.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1583751 - (show annotations) (download)
Thu May 14 22:32:54 2020 UTC (3 years, 11 months ago) by tmb
File size: 39278 byte(s)
- oc_FR locale: Fix spelling of Thursday [BZ #25639]
- oc_FR locale: Fix spelling of April [BZ #25639]
- x86-64: Use RDX_LP on __x86_shared_non_temporal_threshold [BZ #25966]
- aarch64: Accept PLT calls to __getauxval within libc.so


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.31
5 %define __glibcrelease 9
6 %define glibcepoch 6
7
8 %define source_package glibc-%{glibcversion}
9 %define source_dir glibc-%{glibcversion}
10 %define _glibcrelease %{__glibcrelease}
11
12 %define glibcrelease %mkrel %{_glibcrelease}
13
14 # Define "cross" to an architecture to which glibc is to be
15 # cross-compiled
16 %define build_cross 0
17 %{expand: %{?cross: %%global build_cross 1}}
18
19 %if %{build_cross}
20 %define target_cpu %{cross}
21 %define cross_prefix cross-%{target_cpu}-
22 %define _prefix /usr/%{target_cpu}-%{_real_vendor}-linux%{gnuext}
23 %define cross_program_prefix %{target_cpu}-%{_real_vendor}-linux%{gnuext}-
24 %define _exec_prefix %{_prefix}
25 # brain damage alert: should not be needed imho
26 # overriding _prefix and _exec_prefix should be enough
27 %define _bindir %{_exec_prefix}/bin
28 %define _sbindir %{_exec_prefix}/sbin
29 %define _libexecdir %{_exec_prefix}/libexec
30 %define _datadir %{_prefix}/share
31 %define _sharedstatedir %{_prefix}/com
32 %define _localstatedir %{_prefix}/var
33 %define _lib lib
34 %define _libdir %{_exec_prefix}/%{_lib}
35 %define _slibdir %{_exec_prefix}/%{_lib}
36 %define _slibdir32 %{_exec_prefix}/lib
37 %define _includedir %{_prefix}/include
38 %else
39 %define gnuext %{_gnu}
40 %define target_cpu %{_target_cpu}
41 %define cross_prefix %{nil}
42 %define cross_program_prefix %{nil}
43 %define _slibdir /%{_lib}
44 %define _slibdir32 /lib
45 %endif
46
47 # Define target (base) architecture
48 %define arch %(echo %{target_cpu}|sed -e "s/\\(i.86\\|athlon\\)/i386/" -e "s/amd64/x86_64/")
49 %define isarch() %(case " %* " in (*" %{arch} "*) echo 1;; (*) echo 0;; esac)
50
51 %if %{build_cross}
52 %if %isarch %arm
53 %define gnuext -gnueabi
54 %else
55 %define gnuext -gnu
56 %endif
57 %endif
58
59 # Define Xen arches to build with -mno-tls-direct-direct-seg-refs
60 %define xenarches %{ix86} x86_64
61
62 # arches which requires glibc-port
63 %define ports_arch %arm
64
65 # Define to build nscd with selinux support
66 %define build_selinux 0
67
68 # Flag for build_pdf_doc:
69 # 1 build glibc with PDF documentation
70 # 0 don't build PDF glibc documentation (e.g. for bootstrap build)
71 %define build_pdf_doc 0
72
73 # Enable checking by default for arches where we know tests all pass
74 %define build_check 0
75
76 # Allow make check to fail only when running kernels where we know
77 # tests must pass (no missing features or bugs in the kernel)
78 %define check_min_kver 2.6.32
79
80 # Define to build a biarch package
81 %define build_biarch 0
82 %if %isarch x86_64
83 %define build_biarch 1
84 %endif
85
86 # Define to bootstrap new glibc
87 %define build_bootstrap 0
88 %{expand: %{!?build_cross_bootstrap: %global build_cross_bootstrap 0}}
89
90 %define build_profile 1
91 %define build_nscd 1
92 %define build_doc 1
93 %define build_utils 1
94 %define build_i18ndata 1
95 %define build_timezone 0
96
97 # Disable a few defaults when cross-compiling a glibc
98 %if %{build_cross}
99 %define build_doc 0
100 %define build_pdf_doc 0
101 %define build_biarch 0
102 %define build_check 0
103 %define build_nscd 0
104 %define build_profile 0
105 %define build_utils 0
106 %define build_i18ndata 0
107 %define build_timezone 0
108 %endif
109
110 # Allow --with[out] <feature> at rpm command line build
111 %{expand: %{?_without_PDF: %%global build_pdf_doc 0}}
112 %{expand: %{?_without_CHECK: %%global build_check 0}}
113 %{expand: %{?_without_UTILS: %%global build_utils 0}}
114 %{expand: %{?_without_BOOTSTRAP:%%global build_bootstrap 0}}
115 %{expand: %{?_with_PDF: %%global build_pdf_doc 1}}
116 %{expand: %{?_with_CHECK: %%global build_check 1}}
117 %{expand: %{?_with_UTILS: %%global build_utils 1}}
118 %{expand: %{?_with_BOOTSTRAP: %%global build_bootstrap 1}}
119
120 Summary: The GNU libc libraries
121 Name: %{cross_prefix}glibc
122 Version: %{glibcversion}
123 Release: %{glibcrelease}
124 Epoch: %{glibcepoch}
125 License: LGPL
126 Group: System/Libraries
127 Url: https://www.gnu.org/software/libc/
128
129 # FSF source
130 Source0: https://ftpmirror.gnu.org/libc/%{source_package}.tar.xz
131 Source1: https://ftpmirror.gnu.org/libc/%{source_package}.tar.xz.sig
132 Source2: glibc-git.sh
133
134 Source4: glibc-find-requires.sh
135 Source5: glibc-check.sh
136 Source6: nscd.service
137 Source7: nscd.socket
138 Source8: nsswitch.conf
139 Source9: nscd.conf
140
141 # wrapper to avoid rpm circular dependencies
142 Source14: glibc-post-wrapper.c
143
144 %if %{build_cross}
145 Autoreq: false
146 Autoprov: false
147 %else
148 Provides: should-restart = system
149 %if %isarch %{xenarches}
150 Obsoletes: %{name}-xen
151 Provides: %{name}-xen
152 %endif
153 # The dynamic linker supports DT_GNU_HASH
154 Provides: rtld(GNU_HASH)
155 Autoreq: false
156 %endif
157 BuildRequires: bison >= 3.3.1-1
158 BuildRequires: patch
159 BuildRequires: gettext
160 BuildRequires: perl
161 BuildRequires: kernel-userspace-headers
162 BuildRequires: libstdc++-static-devel
163 BuildRequires: hardlink
164 %if %{build_selinux}
165 BuildRequires: pkgconfig(libselinux) >= 1.17.10
166 %endif
167 # (tmb) force new gcc 10.1
168 BuildRequires: %{cross_prefix}gcc >= 10.1.0-1
169 # (tmb) force latest binutils for aarch64 STO_AARCH64_VARIANT_PCS
170 BuildRequires: %{cross_prefix}binutils >= 1:2.34-10
171 # we need the static dash
172 %define ash_bin /usr/bin/dash.static
173 Requires(post): dash-static
174 Requires(post): grep
175 Requires: filesystem >= 2.1.9-18
176 # ensure libxcrypt is installed as glibc crypt is disabled / being obsoleted
177 Requires: %{_lib}xcrypt1 >= 4.1.1-1
178
179 BuildRequires: systemtap-sdt-devel
180
181 BuildRequires: texinfo
182 BuildRequires: texinfo-tex
183 %if %{build_pdf_doc}
184 BuildRequires: texlive
185 %endif
186 %if %{build_utils}
187 BuildRequires: pkgconfig(gdlib)
188 %endif
189 BuildRequires: autoconf2.5
190 BuildRequires: pkgconfig(libcap)
191 BuildRequires: rpm-mageia-setup-build >= 1.147
192 BuildRequires: spec-helper >= 0.31.2
193
194 ###
195 ### upstream release/2.31/master branch
196 ### git format-patch --start-number 200 glibc-2.31..origin/release/2.31/master
197 ###
198 Patch200: 0200-mips-Use-long-int-and-long-long-int-in-linux-syscall.patch
199 Patch201: 0201-mips-Fix-argument-passing-for-inlined-syscalls-on-Li.patch
200 Patch202: 0202-microblaze-Avoid-clobbering-register-parameters-in-s.patch
201 Patch203: 0203-riscv-Avoid-clobbering-register-parameters-in-syscal.patch
202 Patch204: 0204-malloc-tst-mallocfork2-Kill-lingering-process-for-un.patch
203 # CVE-2020-10029
204 Patch205: 0205-Avoid-ldbl-96-stack-corruption-from-range-reduction-.patch
205 Patch206: 0206-Improve-IFUNC-check-BZ-25506.patch
206 Patch207: 0207-i386-Use-comdat-instead-of-.gnu.linkonce-for-i386-se.patch
207 Patch208: 0208-linux-Clear-mode_t-padding-bits-BZ-25623.patch
208 Patch209: 0209-linux-sysipc-Include-linux-posix_types.h-for-__kerne.patch
209 Patch210: 0210-arm-Fix-softp-fp-Implies-BZ-25635.patch
210 Patch211: 0211-sparc-Move-sigreturn-stub-to-assembly.patch
211 Patch212: 0212-math-test-sinl-pseudo-Use-stack-protector-only-if-av.patch
212 Patch213: 0213-Add-NEWS-entry-for-CVE-2020-10029-bug-25487.patch
213 Patch214: 0214-NEWS-update-list-of-bugs-fixed-on-the-2.31-branch.patch
214 Patch215: 0215-Update-syscall-lists-for-Linux-5.5.patch
215 Patch216: 0216-Fix-use-after-free-in-glob-when-expanding-user-bug-2.patch
216 Patch217: 0217-Add-NEWS-entry-for-CVE-2020-1752-bug-25414.patch
217 Patch218: 0218-posix-Fix-system-error-return-value-BZ-25715.patch
218 Patch219: 0219-Add-NEWS-entry-for-CVE-2020-1751-bug-25423.patch
219 Patch220: 0220-support-shell-container.c-Return-127-if-execve-fails.patch
220 Patch221: 0221-support-shell-container.c-Add-builtin-exit.patch
221 Patch222: 0222-support-shell-container.c-Add-builtin-kill.patch
222 Patch223: 0223-stdlib-Move-tst-system-to-tests-container.patch
223 Patch224: 0224-mips-Fix-bracktrace-result-for-signal-frames.patch
224 Patch225: 0225-nios2-delete-sysdeps-unix-sysv-linux-nios2-kernel-fe.patch
225 Patch226: 0226-Fix-data-race-in-setting-function-descriptors-during.patch
226 Patch227: 0227-Add-new-file-missed-in-previous-hppa-commit.patch
227 Patch228: 0228-Fix-build-with-GCC-10-when-long-double-double.patch
228 Patch229: 0229-x32-Properly-pass-long-to-syscall-BZ-25810.patch
229 Patch230: 0230-Add-SYSCALL_ULONG_ARG_-12-to-pass-long-to-syscall-BZ.patch
230 Patch231: 0231-Add-a-syscall-test-for-BZ-25810.patch
231 Patch232: 0232-Mark-unsigned-long-arguments-with-U-in-more-syscalls.patch
232 Patch233: 0233-Add-C-wrappers-for-process_vm_readv-process_vm_write.patch
233 Patch234: 0234-powerpc-Rename-argN-to-_argN-in-LOADARGS_N-BZ-25902.patch
234 Patch235: 0235-Add-a-C-wrapper-for-prctl-BZ-25896.patch
235 Patch236: 0236-oc_FR-locale-Fix-spelling-of-Thursday-bug-25639.patch
236 Patch237: 0237-oc_FR-locale-Fix-spelling-of-April-bug-25639.patch
237 Patch238: 0238-NEWS-Mention-bug-25639-fixed-in-2.31-branch.patch
238 Patch239: 0239-x86-64-Use-RDX_LP-on-__x86_shared_non_temporal_thres.patch
239 Patch240: 0240-NEWS-Mention-fixes-for-BZ-25810-25896-25902-25966.patch
240 Patch241: 0241-aarch64-Accept-PLT-calls-to-__getauxval-within-libc..patch
241
242 ###
243 ### upstream master branch
244 ### starts from number 300
245 ###
246 Patch300: 0300-Convert-Python-scripts-to-Python-3.patch
247 Patch301: 0301-AArch64-Improve-integer-memcpy.patch
248
249 ###
250 ### Mageia patches
251 ###
252
253 # make "localedef --add-to-archive" to follow symlink
254 # safe to send ustream, need to be kept for locales
255 Patch00: glibc-2.17-localedef-archive-follow-symlinks.patch
256
257 # various path fix, according to usrmove
258 Patch01: glibc-2.17-fhs-usrmove.patch
259 # try to fallback on loading /lib/libnss_*.so.X.Y when the loading
260 # of /lib/libnss_*.so.X failed. Should be dropped, IMHO.
261 Patch04: glibc-2.17-nss-upgrade.patch
262
263 Patch06: glibc-2.26-share-locale.patch
264 # use xvt instead of xterm in xtrace.sh
265 # cannot be pushed upstream as xvt is Ma* specific
266 Patch09: glibc-2.2.4-xterm-xvt.patch
267
268 # add transliteration for "COLON SIGN"
269 # ( used for the money of money of san salvador )
270 Patch11: glibc-2.19-compat-EUR-currencies.patch
271
272 # fix the chkconfig header, should be sent upstream
273 Patch13: glibc-2.3.3-nscd-enable.patch
274
275 # disable cache for hosts on nscd, as this is seen as insecure
276 # if the system relie on reverse dns for security
277 Patch14: glibc-2.9-nscd-no-host-cache.patch
278
279 # add some new timezone for various cities
280 # Halifax, Montreal, Johannesburg
281 # should be sent upstream ( I guess )
282 Patch23: glibc-2.3.4-timezone.patch
283 Patch24: glibc-2.10.1-biarch-cpp-defines.patch
284
285 # fix a typo, safe to send upstream
286 Patch27: glibc-2.20-ENOTTY-fr-translation.patch
287 Patch29: glibc-2.3.5-biarch-utils.patch
288
289 # remove multiarch header, Ma* specific patch
290 # check if still needed or if the work was finished
291 Patch30: glibc-2.26-multiarch.patch
292
293 # translation fixes, need to be checked with some i18n team member
294 # should be safe to send upstream once checked
295 Patch35: glibc-2.16.0-force-gb18030-for-zh_CN.patch
296
297 # disable parallel testsuite of rt on powerpc with SMT
298 Patch38: glibc-2.18-testsuite-rt-notparallel.patch
299
300 # Add C.UTF-8 locale into /usr/lib/locale/
301 Patch59: glibc-c-utf8-locale.patch
302
303 # check for libcap, even if selinux is disabled
304 # should be sent upstream
305 Patch44: glibc-2.26-dont-tie-libcap-with-selinux.patch
306
307
308 # Determine minium kernel versions
309 %define enablekernel 3.2
310 Conflicts: kernel < %{enablekernel}
311
312 # People changed location of rpm scripts...
313 %define rpmscripts /usr/lib/rpm/%{_real_vendor}
314
315 # Don't try to explicitly provide GLIBC_PRIVATE versioned libraries
316 %define __find_provides %{_builddir}/%{source_dir}/find_provides.sh
317 %define __find_requires %{_builddir}/%{source_dir}/find_requires.sh
318
319 %if !%{build_cross}
320 Obsoletes: ld.so
321 Provides: ld.so
322 %endif
323
324 Obsoletes: ldconfig
325 Provides: ldconfig = %{glibcepoch}:%{glibcversion}-%{glibcrelease} /sbin/ldconfig
326 # obsolete nss_db as it got merged again in 2.15
327 Obsoletes: nss_db <= 2.2.3-0.pre1.9
328
329 %description
330 The glibc package contains standard libraries which are used by
331 multiple programs on the system. In order to save disk space and
332 memory, as well as to make upgrading easier, common system code is
333 kept in one place and shared between programs. This particular package
334 contains the most important sets of shared libraries: the standard C
335 library and the standard math library. Without these two libraries, a
336 Linux system will not function. The glibc package also contains
337 national language (locale) support.
338
339 This package now also provides ldconfig which was package seperately in
340 the past. Ldconfig is a basic system program which determines run-time
341 link bindings between ld.so and shared libraries. Ldconfig scans a running
342 system and sets up the symbolic links that are used to load shared
343 libraries properly. It also creates a cache (/etc/ld.so.cache) which
344 speeds the loading of programs which use shared libraries.
345
346 %package devel
347 Summary: Header and object files for development using standard C libraries
348 Group: Development/C
349 Requires(post): coreutils
350 Requires(postun): coreutils, awk
351 # ensure libxcrypt is installed as glibc crypt is disabled / being obsoleted
352 Requires: %{_lib}xcrypt-devel >= 4.1.1-1
353 # (tmb) filter out requires on self-provides
354 %global __requires_exclude devel\\(libm.*\\)
355 # (tmb) add virtual provides for old libm to ease builds... from glibc-2.22 libmvec is preferred
356 %ifarch x86_64
357 Provides: devel(libm(64bit))
358 %endif
359 Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
360 %if !%{build_cross}
361 Requires: linux-userspace-headers
362 %endif
363 %if %{build_cross}
364 Autoreq: false
365 Autoprov: false
366 %else
367 Autoreq: true
368 %endif
369
370 %description devel
371 The glibc-devel package contains the header and object files necessary
372 for developing programs which use the standard C libraries (which are
373 used by nearly all programs). If you are developing programs which
374 will use the standard C libraries, your system needs to have these
375 standard header and object files available in order to create the
376 executables.
377
378 This package also includes the C header files for the Linux kernel.
379 The header files define structures and constants that are needed for
380 building most standard programs. The header files are also needed for
381 rebuilding the kernel.
382
383 Install glibc-devel if you are going to develop programs which will
384 use the standard C libraries.
385
386 %package static-devel
387 Summary: Static libraries for GNU C library
388 Group: Development/C
389 Requires: %{name}-devel = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
390 # ensure libxcrypt is installed as glibc crypt is disabled / being obsoleted
391 Requires: %{_lib}xcrypt-static-devel >= 4.1.1-1
392
393 %description static-devel
394 The glibc-static-devel package contains the static libraries necessary
395 for developing programs which use the standard C libraries. Install
396 glibc-static-devel if you need to statically link your program or
397 library.
398
399 %package profile
400 Summary: The GNU libc libraries, including support for gprof profiling
401 Group: Development/C
402 Obsoletes: libc-profile
403 Provides: libc-profile = %{glibcversion}-%{glibcrelease}
404 Autoreq: true
405
406 %description profile
407 The glibc-profile package includes the GNU libc libraries and support
408 for profiling using the gprof program. Profiling is analyzing a
409 program's functions to see how much CPU time they use and determining
410 which functions are calling other functions during execution. To use
411 gprof to profile a program, your program needs to use the GNU libc
412 libraries included in glibc-profile (instead of the standard GNU libc
413 libraries included in the glibc package).
414
415 If you are going to use the gprof program to profile a program, you'll
416 need to install the glibc-profile program.
417
418 %package -n nscd
419 Summary: A Name Service Caching Daemon (nscd)
420 Group: System/Servers
421 Requires(post): systemd >= %{systemd_required_version}
422 Requires(post): rpm-helper >= 0.24.8-1
423 Requires(preun): rpm-helper >= 0.24.8-1
424 Autoreq: true
425
426 %description -n nscd
427 Nscd caches name service lookups and can dramatically improve
428 performance with NIS+, and may help with DNS as well. Note that you
429 can't use nscd with 2.0 kernels because of bugs in the kernel-side
430 thread support. Unfortunately, nscd happens to hit these bugs
431 particularly hard.
432
433 Install nscd if you need a name service lookup caching daemon, and
434 you're not using a version 2.0 kernel.
435
436 %package utils
437 Summary: Development utilities from GNU C library
438 Group: Development/Other
439 Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
440
441 %description utils
442 The glibc-utils package contains memusage, a memory usage profiler,
443 mtrace, a memory leak tracer and xtrace, a function call tracer which
444 can be helpful during program debugging.
445
446 If unsure if you need this, don't install this package.
447
448 %if %{build_i18ndata}
449 %package i18ndata
450 Summary: Database sources for 'locale'
451 Group: System/Libraries
452
453 %description i18ndata
454 This package contains the data needed to build the locale data files
455 to use the internationalization features of the GNU libc.
456 %endif
457
458 %if %{build_timezone}
459 %package -n timezone
460 Summary: Time zone descriptions
461 Group: System/Base
462
463 %description -n timezone
464 These are configuration files that describe possible
465 time zones.
466 %endif
467
468 %package doc
469 Summary: GNU C library documentation
470 Group: Development/Other
471 BuildArch: noarch
472
473 %description doc
474 The glibc-doc package contains documentation for the GNU C library in
475 info format.
476
477 %if %{build_pdf_doc}
478 %package doc-pdf
479 Summary: GNU C library documentation
480 Group: Development/Other
481 BuildArch: noarch
482
483 %description doc-pdf
484 The glibc-doc-pdf package contains the printable documentation for the
485 GNU C library in PDF format.
486 %endif
487
488 %prep
489 %setup -q -n %{source_dir}
490 %autopatch -p1
491
492 %if %{build_selinux}
493 # XXX kludge to build nscd with selinux support as it added -nostdinc
494 # so /usr/include/selinux is not found
495 ln -s %{_includedir}/selinux selinux
496 %endif
497
498 find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
499
500 # \\(Anssi 03/2008\\) FIXME: use __provides_exclude
501 cat > find_provides.sh << EOF
502 #!/bin/sh
503 %{rpmscripts}/find-provides | grep -v GLIBC_PRIVATE
504 exit 0
505 EOF
506 chmod +x find_provides.sh
507
508 cat > find_requires.bootstrap.sh << EOF
509 /bin/sh %{SOURCE4} %{buildroot} %{_target_cpu} | grep -v "\(GLIBC_PRIVATE\|linux-gate\|linux-vdso\)"
510 exit 0
511 EOF
512 chmod +x find_requires.bootstrap.sh
513
514 # XXX: use better way later to avoid LD_LIBRARY_PATH issue
515 cat %{rpmscripts}/find-requires | sed '/.*LD_LIBRARY_PATH.*/d;' > find_requires
516 chmod +x find_requires
517 # \\(Anssi 03/2008\\) FIXME: use __requires_exclude
518 cat > find_requires.noprivate.sh << EOF
519 %{_builddir}/%{source_dir}/find_requires %{buildroot} %{_target_cpu} | \
520 grep -v GLIBC_PRIVATE
521 exit 0
522 EOF
523 chmod +x find_requires.noprivate.sh
524
525 # FIXME: fix system rpm find-requires to use the prefix cross version
526 %if %{build_bootstrap} || "%{_target_cpu}" != "%{target_cpu}"
527 ln -s find_requires.bootstrap.sh find_requires.sh
528 %else
529 ln -s find_requires.noprivate.sh find_requires.sh
530 %endif
531
532 # Remove patch backups from files we ship in glibc packages
533 rm -fr ChangeLog.old
534 rm -f localedata/locales/{???_??,??_??}.*
535 rm -f localedata/locales/[a-z_]*.*
536
537 %build
538 # Prepare test matrix in the next function
539 CheckList=$PWD/Check.list
540 rm -f $CheckList
541 touch $CheckList
542
543 #
544 # CompareKver <kernel version>
545 # function to compare the desired kernel version with running kernel
546 # version (package releases not taken into account in comparison). The
547 # function returns:
548 # -1 = <kernel version> is lesser than current running kernel
549 # 0 = <kernel version> is equal to the current running kernel
550 # 1 = <kernel version> is greater than current running kernel
551 #
552 function CompareKver() {
553 v1=`echo $1 | sed 's/\.\?$/./'`
554 v2=`uname -r | sed 's/[^.0-9].*//' | sed 's/\.\?$/./'`
555 n=1
556 s=0
557 while true; do
558 c1=`echo "$v1" | cut -d "." -f $n`
559 c2=`echo "$v2" | cut -d "." -f $n`
560 if [ -z "$c1" -a -z "$c2" ]; then
561 break
562 elif [ -z "$c1" ]; then
563 s=-1
564 break
565 elif [ -z "$c2" ]; then
566 s=1
567 break
568 elif [ "$c1" -gt "$c2" ]; then
569 s=1
570 break
571 elif [ "$c2" -gt "$c1" ]; then
572 s=-1
573 break
574 fi
575 n=$((n + 1))
576 done
577 echo $s
578 }
579
580 #
581 # BuildGlibc <arch> [<extra_configure_options>+]
582 #
583 function BuildGlibc() {
584 arch="$1"
585 shift 1
586
587 # PowerPC CPU add-on
588 case $arch in
589 cpu-addon,*)
590 cpu=` echo "$arch" | sed -n "/.*,\([^,]*\),.*$/s//\1/p"`
591 arch=`echo "$arch" | sed -n "/.*,.*,\([^,]*\)$/s//\1/p"`
592 ;;
593 *)
594 cpu=$arch
595 ;;
596 esac
597
598 # Select optimization flags and compiler to use
599 BuildAltArch="no"
600 BuildCompFlags=""
601 BuildFlags=""
602 case $arch in
603 i[3456]86 | athlon)
604 BuildFlags="-march=$arch -mtune=generic"
605 if [[ "`uname -m`" = "x86_64" ]]; then
606 BuildAltArch="yes"
607 BuildCompFlags="-m32"
608 fi
609 ;;
610 x86_64)
611 BuildFlags="-mtune=generic"
612 ;;
613 armv4t*)
614 BuildFlags="-march=armv4t"
615 BuildCompFlags="-march=armv4t"
616 ;;
617 armv5t*)
618 BuildFlags="-march=armv5t"
619 BuildCompFlags="-march=armv5t"
620 ;;
621 # to check
622 armv7h*)
623 BuildFlags="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16"
624 BuildCompFlags="-march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16"
625 ;;
626 esac
627
628 # Choose multiarch support
629 MultiArchFlags=
630 case $arch in
631 i686 | x86_64)
632 MultiArchFlags="--enable-multi-arch"
633 ;;
634 esac
635
636 # Determine C & C++ compilers
637 BuildCC="%{__cc} $BuildCompFlags"
638 BuildCXX="%{__cxx} $BuildCompFlags"
639
640 # Are we supposed to cross-compile?
641 if [[ "%{target_cpu}" != "%{_target_cpu}" ]]; then
642 # Can't use BuildCC anymore with previous changes.
643 BuildCC="%{cross_program_prefix}gcc $BuildCompFlags"
644 BuildCXX="%{cross_program_prefix}g++ $BuildCompFlags"
645 BuildCross="--build=%{_target_platform}"
646 export libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
647 fi
648
649 BuildFlags="$BuildFlags -DNDEBUG=1 -O2 -finline-functions -g"
650
651 # Do not use direct references against %gs when accessing tls data
652 # XXX make it the default in GCC? (for other non glibc specific usage)
653 case $arch in
654 i[3456]86 | x86_64)
655 BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
656 ;;
657 esac
658
659 # Arch specific compilation flags
660 if [[ "$arch" = "ppc64" ]]; then
661 BuildFlags="$BuildFlags -fno-inline-functions -mno-minimal-toc"
662 fi
663
664 # Extra configure flags
665 ExtraFlags=
666 if [[ "%{build_profile}" != "0" ]]; then
667 ExtraFlags="$ExtraFlags --enable-profile"
668 fi
669
670 # NPTL+TLS are now the default
671 # check for other arches
672 %if %isarch %ports_arch
673 Pthreads="ports nptl"
674 %else
675 Pthreads="nptl"
676 %endif
677
678 # Add-ons
679 AddOns="libidn"
680 if [[ "$cpu" != "$arch" ]]; then
681 AddOns="$AddOns,powerpc-cpu"
682 BuildFlags="$BuildFlags -mcpu=$cpu"
683 ExtraFlags="$ExtraFlags --with-cpu=$cpu"
684 fi
685
686 # Build with selinux support?
687 %if %{build_selinux}
688 SElinuxFlags="--with-selinux"
689 %else
690 SElinuxFlags="--without-selinux"
691 %endif
692
693 # Kernel headers directory
694 KernelHeaders=%{_includedir}
695
696 # Determine library name
697 glibc_cv_cc_64bit_output=no
698 if echo ".text" | $BuildCC -c -o test.o -xassembler -; then
699 case `/usr/bin/file test.o` in
700 *"ELF 64"*)
701 glibc_cv_cc_64bit_output=yes
702 ;;
703 esac
704 fi
705 rm -f test.o
706
707 # Force a separate and clean object dir
708 rm -rf build-$cpu-linux
709 mkdir build-$cpu-linux
710 pushd build-$cpu-linux
711 [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main"
712 CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-function -Wno-maybe-uninitialized" ../configure \
713 $arch-%{_real_vendor}-linux%{gnuext} $BuildCross \
714 --prefix=%{_prefix} \
715 --libexecdir=%{_prefix}/libexec \
716 --infodir=%{_infodir} \
717 --enable-add-ons="$AddOns" --without-cvs \
718 $ExtraFlags $MultiArchFlags $SElinuxFlags \
719 --enable-kernel=%{enablekernel} \
720 --with-headers=$KernelHeaders ${1+"$@"} \
721 --enable-obsolete-rpc \
722 --enable-obsolete-nsl \
723 --enable-systemtap \
724 --disable-crypt
725 %make_build -r -s
726 popd
727
728 # All tests are expected to pass on certain platforms, depending also
729 # on the version of the kernel running
730 case $arch in
731 athlon | ia64 | ppc | ppc64)
732 if [ "`CompareKver %{check_min_kver}`" -lt 0 ]; then
733 check_flags=""
734 else
735 check_flags="-k"
736 fi
737 ;;
738 *)
739 check_flags="-k"
740 ;;
741 esac
742
743 # Generate test matrix
744 [[ -d "build-$arch-linux" ]] || {
745 echo "ERROR: PrepareGlibcTest: build-$arch-linux does not exist!"
746 return 1
747 }
748 local BuildJobs="-j`getconf _NPROCESSORS_ONLN`"
749 echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList
750
751 case $cpu in
752 i686|athlon) base_arch=i586;;
753 power*) base_arch=$arch;;
754 *) base_arch=none;;
755 esac
756
757 [[ -d "build-$base_arch-linux" ]] && {
758 check_flags="$check_flags -l build-$base_arch-linux/elf/ld.so"
759 echo "$BuildJobs -d build-$arch-linux $check_flags" >> $CheckList
760 }
761 return 0
762 }
763
764 # Build main glibc
765 BuildGlibc %{target_cpu}
766
767 %if %{build_biarch}
768 %if %isarch x86_64
769 BuildGlibc i686
770 %endif
771 %endif
772
773 # Build i686 libraries if not already building for i686/athlon
774 case %{target_cpu} in
775 i686 | athlon)
776 ;;
777 i[3-6]86)
778 # BuildGlibc i686 --disable-profile
779 ;;
780 esac
781
782 %if %{build_check}
783 export TMPDIR=/tmp
784 export TIMEOUTFACTOR=16
785 Check="$PWD/glibc-check.sh"
786 cat %{SOURCE5} > $Check
787 chmod +x $Check
788 while read arglist; do
789 $Check $arglist || exit 1
790 done < $CheckList
791 %endif
792
793 %install
794 # force use of _NPROCESSORS_ONLN jobs since RPM_BUILD_NCPUS could be
795 # greater for icecream
796 BuildJobs="-j`getconf _NPROCESSORS_ONLN`"
797
798 make install_root=$RPM_BUILD_ROOT install -C build-%{target_cpu}-linux
799 %if %{build_i18ndata}
800 (cd build-%{target_cpu}-linux;
801 make $BuildJobs -C ../localedata objdir=`pwd` \
802 install_root=$RPM_BUILD_ROOT \
803 install-locales
804 )
805 install -m 0644 localedata/SUPPORTED $RPM_BUILD_ROOT/%{_datadir}/i18n/
806 %endif
807
808 # Empty filelist for non i686/athlon targets
809 > extralibs.filelist
810
811 # Install biarch libraries
812 %if %{build_biarch}
813 %if %isarch x86_64
814 ALT_ARCHES=i686-linux
815 %endif
816
817 for ALT_ARCH in $ALT_ARCHES; do
818 mkdir -p $RPM_BUILD_ROOT/$ALT_ARCH
819 make install_root=$RPM_BUILD_ROOT/$ALT_ARCH install -C build-$ALT_ARCH
820
821 # Dispatch */lib only
822 LIB=/lib
823 %if !%{build_cross}
824 mv $RPM_BUILD_ROOT/$ALT_ARCH/$LIB $RPM_BUILD_ROOT/$LIB
825 mv $RPM_BUILD_ROOT/$ALT_ARCH%{_prefix}/libexec/getconf/* \
826 $RPM_BUILD_ROOT%{_prefix}/libexec/getconf/
827 [ ! -d $RPM_BUILD_ROOT/%{_prefix}/$LIB/ ] && mkdir -p $RPM_BUILD_ROOT/%{_prefix}/$LIB/
828 mv $RPM_BUILD_ROOT/$ALT_ARCH/%{_prefix}/$LIB/* $RPM_BUILD_ROOT/%{_prefix}/$LIB/
829 %else
830 mv $RPM_BUILD_ROOT/$ALT_ARCH/%{_prefix}/lib $RPM_BUILD_ROOT/$LIB
831 sed -i $RPM_BUILD_ROOT/$LIB/libc.so -e "s!%{_slibdir}!$LIB!g"
832 %endif
833
834 rm -rf $RPM_BUILD_ROOT/$ALT_ARCH
835 # XXX Dispatch 32-bit stubs
836 (sed '/^@/d' include/stubs-prologue.h; LC_ALL=C sort $(find build-$ALT_ARCH -name stubs)) \
837 > $RPM_BUILD_ROOT%{_includedir}/gnu/stubs-32.h
838 done
839 %endif
840
841 # Install extra glibc libraries
842 function InstallGlibc() {
843 local BuildDir="$1"
844 local SubDir="$2"
845 local LibDir="$3"
846
847 case $BuildDir in
848 *) Pthreads=nptl ;;
849 esac
850
851 [[ -z "$LibDir" ]] && LibDir="%{_slibdir}"
852
853 pushd $BuildDir
854 mkdir -p $RPM_BUILD_ROOT$LibDir/$SubDir/
855 install -m755 libc.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libc-*.so`
856 ln -sf `basename $RPM_BUILD_ROOT$LibDir/libc-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libc.so.*`
857 install -m755 math/libm.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libm-*.so`
858 ln -sf `basename $RPM_BUILD_ROOT$LibDir/libm-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libm.so.*`
859 install -m755 $Pthreads/libpthread.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libpthread-*.so`
860 ln -sf `basename $RPM_BUILD_ROOT$LibDir/libpthread-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libpthread.so.*`
861 install -m755 ${Pthreads}_db/libthread_db.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libthread_db-*.so`
862 ln -sf `basename $RPM_BUILD_ROOT$LibDir/libthread_db-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/libthread_db.so.*`
863 install -m755 rt/librt.so $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/librt-*.so`
864 ln -sf `basename $RPM_BUILD_ROOT$LibDir/librt-*.so` $RPM_BUILD_ROOT$LibDir/$SubDir/`basename $RPM_BUILD_ROOT$LibDir/librt.so.*`
865 echo "%dir $LibDir/$SubDir" >> ../extralibs.filelist
866 find $RPM_BUILD_ROOT$LibDir/$SubDir -maxdepth 1 -type f -o -type l | sed -e "s|$RPM_BUILD_ROOT||" >> ../extralibs.filelist
867 popd
868 }
869
870 # Install arch-specific optimized libraries
871 %if %isarch %{ix86}
872 case %{target_cpu} in
873 i[3-5]86)
874 # InstallGlibc build-i686-linux i686
875 ;;
876 esac
877 %endif
878
879 # Remove the files we don't want to distribute
880 rm -f $RPM_BUILD_ROOT%{_libdir}/libNoVersion*
881 rm -f $RPM_BUILD_ROOT%{_slibdir}/libNoVersion*
882
883 %if "%{name}" == "glibc"
884 install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/nsswitch.conf
885 %endif
886
887 # This is for ncsd - in glibc 2.2
888 %if %{build_nscd}
889 install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT%{_sysconfdir}
890 install -d -m 755 %{buildroot}%{_unitdir}
891 install -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/nscd.service
892 install -m 644 %{SOURCE7} %{buildroot}%{_unitdir}/nscd.socket
893 install -D -m 644 %{SOURCE9} %{buildroot}%{_tmpfilesdir}/nscd.conf
894 install -d -m 755 %{buildroot}%{_var}/db/nscd
895 %endif
896
897 # Useless and takes place
898 rm -rf %buildroot/%{_datadir}/zoneinfo/{posix,right}
899
900 # Include ld.so.conf
901 %if "%{name}" == "glibc"
902 echo "include /etc/ld.so.conf.d/*.conf" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
903 chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf
904 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d
905
906 # ldconfig cache
907 mkdir -p $RPM_BUILD_ROOT%{_var}/cache/ldconfig
908 touch $RPM_BUILD_ROOT%{_var}/cache/ldconfig/aux-cache
909 %endif
910
911 # Include %{_libdir}/gconv/gconv-modules.cache
912 > $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
913 chmod 644 $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.cache
914
915 %if "%{name}" == "glibc"
916 touch $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.cache
917 %endif
918
919 # Are we cross-compiling?
920 Strip="strip"
921 if [[ "%{_target_cpu}" != "%{target_cpu}" ]]; then
922 Strip="%{cross_program_prefix}$Strip"
923 fi
924
925 # Strip debugging info from all static libraries
926 pushd $RPM_BUILD_ROOT%{_slibdir}
927 for i in *.a; do
928 if [ -f "$i" ]; then
929 case "$i" in
930 *_p.a) ;;
931 *) $Strip -g -R .comment $i ;;
932 esac
933 fi
934 done
935 popd
936
937 # post install wrapper
938 %__cc -Os -g %{SOURCE14} -static \
939 -o "$RPM_BUILD_ROOT%{_sbindir}/glibc-post-wrapper" \
940 -L "$RPM_BUILD_ROOT%{_libdir}/" \
941 '-DSLIBDIR="%{_slibdir}"' \
942 '-DGCONV_DIR="%{_libdir}/gconv"'
943 chmod 700 $RPM_BUILD_ROOT%{_sbindir}/glibc-post-wrapper
944
945 # rquota.x and rquota.h are now provided by quota
946 rm -f $RPM_BUILD_ROOT%{_includedir}/rpcsvc/rquota.[hx]
947
948 # Hardlink identical locale files together
949 %if %{build_i18ndata}
950 %{_bindir}/hardlink -vc $RPM_BUILD_ROOT%{_datadir}/locale
951 %endif
952
953 rm -rf $RPM_BUILD_ROOT%{_includedir}/netatalk/
954
955 # Build file list for devel package
956 find $RPM_BUILD_ROOT%{_includedir} -type f -or -type l > devel.filelist
957 find $RPM_BUILD_ROOT%{_includedir} -type d | sed "s/^/%dir /" | \
958 grep -v "%{_libdir}/libnss1.*.so$" | \
959 grep -v "%{_includedir}$" | >> devel.filelist
960 find $RPM_BUILD_ROOT%{_libdir} -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
961 # biarch libs
962 %if %{build_biarch}
963 find $RPM_BUILD_ROOT%{_prefix}/lib -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
964 %endif
965 perl -pi -e "s|$RPM_BUILD_ROOT||" devel.filelist
966
967 # /etc/localtime - we're proud of our timezone #Well we may put Paris
968 %if %{build_timezone}
969 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
970 cp -f $RPM_BUILD_ROOT%{_datadir}/zoneinfo/US/Eastern $RPM_BUILD_ROOT%{_sysconfdir}/localtime
971 #ln -sf ..%{_datadir}/zoneinfo/US/Eastern $RPM_BUILD_ROOT%{_sysconfdir}/localtime
972 %endif
973
974 # [gg] build PDF documentation
975 %if %{build_pdf_doc}
976 (cd manual; texi2dvi -p -t @afourpaper -t @finalout libc.texinfo)
977 %endif
978
979 # Leave a compatibility symlink for the dynamic loader on armhfp targets,
980 # at least until the world gets rebuilt
981 %ifarch armv7hl
982 ln -sf %{_slibdir}/ld-linux-armhf.so.3 $RPM_BUILD_ROOT%{_slibdir}/ld-linux.so.3
983 %endif
984
985 # Generate final rpm filelist, with localized libc.mo files
986 rm -f rpm.filelist
987 %if "%{name}" == "glibc"
988 %find_lang libc
989 perl -ne '/^\s*$/ or print' libc.lang > rpm.filelist
990 %endif
991 cat extralibs.filelist >> rpm.filelist
992
993 # Remove unpackaged files
994 rm -f $RPM_BUILD_ROOT%{_infodir}/dir.old*
995 rm -rf $RPM_BUILD_ROOT%{_includedir}/asm-*/mach-*/
996 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/locale-archive*
997 rm -f $RPM_BUILD_ROOT%{_var}/db/Makefile
998
999 %if !%{build_utils}
1000 %if %{build_biarch}
1001 rm -f $RPM_BUILD_ROOT%{_slibdir32}/libmemusage.so
1002 rm -f $RPM_BUILD_ROOT%{_slibdir32}/libpcprofile.so
1003 %endif
1004 rm -f $RPM_BUILD_ROOT%{_slibdir}/libmemusage.so
1005 rm -f $RPM_BUILD_ROOT%{_slibdir}/libpcprofile.so
1006 rm -f $RPM_BUILD_ROOT%{_bindir}/memusage
1007 rm -f $RPM_BUILD_ROOT%{_bindir}/memusagestat
1008 rm -f $RPM_BUILD_ROOT%{_bindir}/mtrace
1009 rm -f $RPM_BUILD_ROOT%{_bindir}/pcprofiledump
1010 rm -f $RPM_BUILD_ROOT%{_bindir}/xtrace
1011 %endif
1012
1013 %if !%{build_timezone}
1014 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/localtime
1015 rm -f $RPM_BUILD_ROOT%{_sbindir}/zdump
1016 rm -f $RPM_BUILD_ROOT%{_sbindir}/zic
1017 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo
1018 %endif
1019
1020 %if !%{build_i18ndata}
1021 rm -rf $RPM_BUILD_ROOT%{_datadir}/i18n
1022 %endif
1023
1024 %if "%{name}" != "glibc"
1025 rm -rf $RPM_BUILD_ROOT/boot
1026 rm -rf $RPM_BUILD_ROOT/sbin
1027 rm -rf $RPM_BUILD_ROOT/usr/share
1028 rm -rf $RPM_BUILD_ROOT%{_bindir}
1029 rm -rf $RPM_BUILD_ROOT%{_sbindir}
1030 rm -rf $RPM_BUILD_ROOT%{_datadir}
1031 rm -rf $RPM_BUILD_ROOT%{_infodir}
1032 rm -rf $RPM_BUILD_ROOT%{_prefix}/etc
1033 rm -rf $RPM_BUILD_ROOT%{_libdir}/gconv
1034 %endif
1035
1036 # In case we are cross-compiling, don't bother to remake symlinks and
1037 # fool spec-helper when stripping files
1038 %if "%{name}" != "glibc"
1039 export DONT_SYMLINK_LIBS=1
1040 export PATH=%{_bindir}:$PATH
1041 %endif
1042
1043 # This will make the '-g' argument to be passed to eu-strip for these
1044 # libraries, so that only debug symbols are stripped and gdb/valgrind continue
1045 # to work without needing glibc-debug package to be installed.
1046 export EXCLUDE_FROM_FULL_STRIP="ld-%{glibcversion}.so libpthread libc-%{glibcversion}.so"
1047
1048 %if "%{name}" == "glibc"
1049
1050 %post -p %{_sbindir}/glibc-post-wrapper
1051
1052 # automatic ldconfig cache update on rpm installs/removals
1053 # (see http://www.rpm.org/wiki/FileTriggers)
1054 # FIXME: port to lua to remove circular dependency with grep
1055 %transfiletriggerin -p %{ash_bin} -P 2000000 -- /lib/ /lib64/
1056 grep -F '.so.' | ldconfig -X
1057
1058 %transfiletriggerin -p %{ash_bin} -P 2000000 -- /etc/ld.so.conf.d/
1059 ldconfig -X
1060
1061 %endif
1062
1063 %pre devel
1064 if [ -L %{_includedir}/scsi ]; then
1065 rm -f %{_includedir}/scsi
1066 fi
1067 if [ -L %{_includedir}/sound ]; then
1068 rm -f %{_includedir}/sound
1069 fi
1070 if [ -L %{_includedir}/linux ]; then
1071 rm -f %{_includedir}/linux
1072 fi
1073 if [ -L %{_includedir}/asm ]; then
1074 rm -f %{_includedir}/asm
1075 fi
1076 if [ -L %{_includedir}/asm-generic ]; then
1077 rm -f %{_includedir}/asm-generic
1078 fi
1079 %if %isarch x86_64
1080 if [ -L %{_includedir}/asm-x86_64 ]; then
1081 rm -f %{_includedir}/asm-x86_64
1082 fi
1083 if [ -L %{_includedir}/asm-i386 ]; then
1084 rm -f %{_includedir}/asm-i386
1085 fi
1086 %endif
1087 %if %isarch %arm
1088 if [ -L %{_includedir}/asm-arm ]; then
1089 rm -f %{_includedir}/asm-arm
1090 fi
1091 %endif
1092 exit 0
1093
1094 %if %{build_nscd}
1095 %pre -n nscd
1096 %_pre_useradd nscd / /bin/false
1097
1098 %post -n nscd
1099 %_tmpfilescreate nscd
1100 %_post_service nscd
1101
1102 %preun -n nscd
1103 %_preun_service nscd
1104
1105 %postun -n nscd
1106 %_postun_userdel nscd
1107
1108 if [ "$1" -ge "1" ]; then
1109 /sbin/service nscd condrestart > /dev/null 2>&1 || :
1110 fi
1111 %endif
1112
1113 #
1114 # glibc
1115 #
1116 %files -f rpm.filelist
1117 %if "%{name}" == "glibc"
1118 %if %{build_timezone}
1119 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/localtime
1120 %endif
1121 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/nsswitch.conf
1122 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ld.so.conf
1123 %dir %{_sysconfdir}/ld.so.conf.d
1124 %config(noreplace) %{_sysconfdir}/rpc
1125 %doc nis/nss
1126 %doc posix/gai.conf
1127 %{_datadir}/locale/locale.alias
1128 /sbin/sln
1129 %dir %{_prefix}/libexec/getconf
1130 %{_prefix}/libexec/getconf/*
1131 %endif
1132 %{_slibdir}/ld-%{glibcversion}.so
1133 %if %isarch i386
1134 %{_slibdir}/ld-linux.so.2
1135 %endif
1136 %if %isarch %arm
1137 %if %isarch armv7hl
1138 %{_slibdir}/ld-linux-armhf.so.3
1139 %endif
1140 %{_slibdir}/ld-linux.so.3
1141 %endif
1142 %if %isarch x86_64
1143 %{_slibdir}/ld-linux-x86-64.so.2
1144 %endif
1145 %if %isarch aarch64
1146 %{_slibdir}/ld-linux-aarch64.so.1
1147 %endif
1148 %{_slibdir}/lib*-[.0-9]*.so
1149 %{_slibdir}/lib*.so.[0-9]*
1150 %{_slibdir}/libSegFault.so
1151 %if "%{name}" == "glibc"
1152 %dir %{_libdir}/audit
1153 %{_libdir}/audit/sotruss-lib.so
1154 %dir %{_libdir}/gconv
1155 %{_libdir}/gconv/*.so
1156 %{_libdir}/gconv/gconv-modules
1157 %ghost %{_libdir}/gconv/gconv-modules.cache
1158 %{_bindir}/catchsegv
1159 %{_bindir}/gencat
1160 %{_bindir}/getconf
1161 %{_bindir}/getent
1162 %{_bindir}/iconv
1163 %{_bindir}/ldd
1164 %if %isarch i386
1165 %{_bindir}/lddlibc4
1166 %endif
1167 %{_bindir}/locale
1168 %{_bindir}/localedef
1169 %{_bindir}/makedb
1170 %{_bindir}/pldd
1171 %{_bindir}/rpcgen
1172 %{_bindir}/sotruss
1173 %{_bindir}/sprof
1174 %{_bindir}/tzselect
1175 %{_sbindir}/iconvconfig
1176 %{_sbindir}/glibc-post-wrapper
1177 %endif
1178
1179 %if %isarch aarch64
1180 %{_slibdir32}/ld-linux-aarch64.so.1
1181 %endif
1182
1183 %if %{build_biarch}
1184 %{_slibdir32}/ld-%{glibcversion}.so
1185 %{_slibdir32}/ld-linux*.so.2
1186 %{_slibdir32}/lib*-[.0-9]*.so
1187 %{_slibdir32}/lib*.so.[0-9]*
1188 %{_slibdir32}/libSegFault.so
1189 %dir %{_prefix}/lib/audit
1190 %{_prefix}/lib/audit/sotruss-lib.so
1191 %dir %{_prefix}/lib/gconv
1192 %{_prefix}/lib/gconv/*
1193 %endif
1194
1195 #
1196 # ldconfig
1197 #
1198 %if "%{name}" == "glibc"
1199 /sbin/ldconfig
1200 %ghost %{_sysconfdir}/ld.so.cache
1201 %dir %{_var}/cache/ldconfig
1202 %ghost %{_var}/cache/ldconfig/aux-cache
1203 %endif
1204
1205 #
1206 # glibc-devel
1207 #
1208 %files devel -f devel.filelist
1209 %doc README NEWS INSTALL
1210 # (tmb) FIXME, figure out rpm doc breakage/change
1211 #doc COPYING COPYING.LIB
1212 #doc documentation/*
1213 #doc hesiod/README.hesiod
1214 #doc crypt/README.ufc-crypt
1215 %{_libdir}/libc_nonshared.a
1216 %{_libdir}/libg.a
1217 %{_libdir}/libmcheck.a
1218 %if %isarch x86_64
1219 %{_libdir}/libm-%{glibcversion}.a
1220 %{_libdir}/libmvec.a
1221 %endif
1222 #{_libdir}/libpthread_nonshared.a
1223 %if "%{name}" == "glibc"
1224 %{_libdir}/librpcsvc.a
1225 %endif
1226
1227 %if %{build_biarch}
1228 %{_prefix}/lib/libc_nonshared.a
1229 %{_prefix}/lib/libg.a
1230 %{_prefix}/lib/libmcheck.a
1231 #{_prefix}/lib/libpthread_nonshared.a
1232 %{_prefix}/lib/librpcsvc.a
1233 %endif
1234
1235 #
1236 # glibc-static-devel
1237 #
1238 %files static-devel
1239 %doc COPYING COPYING.LIB
1240 %{_libdir}/libBrokenLocale.a
1241 %{_libdir}/libanl.a
1242 %{_libdir}/libc.a
1243 %{_libdir}/libdl.a
1244 %{_libdir}/libm.a
1245 %{_libdir}/libnsl.a
1246 %{_libdir}/libpthread.a
1247 %{_libdir}/libresolv.a
1248 %{_libdir}/librt.a
1249 %{_libdir}/libutil.a
1250
1251 %if %{build_biarch}
1252 %{_prefix}/lib/libBrokenLocale.a
1253 %{_prefix}/lib/libanl.a
1254 %{_prefix}/lib/libc.a
1255 %{_prefix}/lib/libdl.a
1256 %{_prefix}/lib/libm.a
1257 %{_prefix}/lib/libnsl.a
1258 %{_prefix}/lib/libpthread.a
1259 %{_prefix}/lib/libresolv.a
1260 %{_prefix}/lib/librt.a
1261 %{_prefix}/lib/libutil.a
1262 %endif
1263
1264 #
1265 # glibc-doc
1266 #
1267 %if %{build_doc}
1268 %files doc
1269 %{_infodir}/libc.info*
1270 %endif
1271
1272 #
1273 # glibc-doc-pdf
1274 #
1275 %if %{build_pdf_doc}
1276 %files doc-pdf
1277 %doc manual/libc.pdf
1278 %endif
1279
1280 #
1281 # glibc-profile
1282 #
1283 %if %{build_profile}
1284 %files profile
1285 %{_libdir}/lib*_p.a
1286 %if %{build_biarch}
1287 %{_prefix}/lib/lib*_p.a
1288 %endif
1289 %endif
1290
1291 #
1292 # glibc-utils
1293 #
1294 %if %{build_utils}
1295 %files utils
1296 %if %{build_biarch}
1297 %{_slibdir32}/libmemusage.so
1298 %{_slibdir32}/libpcprofile.so
1299 %endif
1300 %{_slibdir}/libmemusage.so
1301 %{_slibdir}/libpcprofile.so
1302 %{_bindir}/memusage
1303 %{_bindir}/memusagestat
1304 %{_bindir}/mtrace
1305 %{_bindir}/pcprofiledump
1306 %{_bindir}/xtrace
1307 %endif
1308
1309 #
1310 # nscd
1311 #
1312 %if %{build_nscd}
1313 %files -n nscd
1314 %config(noreplace) %{_sysconfdir}/nscd.conf
1315 %{_sbindir}/nscd
1316 %{_unitdir}/nscd.service
1317 %{_unitdir}/nscd.socket
1318 %{_tmpfilesdir}/nscd.conf
1319 %dir %{_var}/db/nscd
1320 %endif
1321
1322 #
1323 # timezone
1324 #
1325 %if %{build_timezone}
1326 %files -n timezone
1327 %{_sbindir}/zdump
1328 %{_sbindir}/zic
1329 %dir %{_datadir}/zoneinfo
1330 %{_datadir}/zoneinfo/*
1331 %endif
1332
1333 #
1334 # glibc-i18ndata
1335 #
1336 %if %{build_i18ndata}
1337 %files i18ndata
1338 %dir %{_datadir}/i18n
1339 %dir %{_datadir}/i18n/charmaps
1340 %{_datadir}/i18n/charmaps/*
1341 %dir %{_datadir}/i18n/locales
1342 %{_datadir}/i18n/locales/*
1343 %{_datadir}/i18n/SUPPORTED
1344 %endif

  ViewVC Help
Powered by ViewVC 1.1.30