/[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 1701529 - (show annotations) (download)
Thu Mar 11 19:32:44 2021 UTC (3 years, 1 month ago) by tmb
File size: 38075 byte(s)
- io: Return EBAFD for negative file descriptor on fstat [BZ #27559]


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

  ViewVC Help
Powered by ViewVC 1.1.30