/[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 1554162 - (show annotations) (download)
Thu Mar 5 20:39:37 2020 UTC (4 years, 1 month ago) by tmb
File size: 38133 byte(s)
- sinl() stack corruption from crafted input [BZ 25487] (CVE-2020-10029)


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

  ViewVC Help
Powered by ViewVC 1.1.30