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

  ViewVC Help
Powered by ViewVC 1.1.30