/[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 1693225 - (show annotations) (download)
Sun Feb 28 02:08:02 2021 UTC (3 years, 1 month ago) by tmb
File size: 37853 byte(s)
SILENT: lock
1 # <epoch>:<version>-<release> tags for glibc main package
2 %define glibcversion 2.33_tmb_WIP_NO_release_or_selinux_allowed_yet
3 %define __glibcrelease 1
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 # i586 packages
169 BuildRequires: libselinux1 devel(libselinux)
170 BuildRequires: libpcre1 devel(libpcre)
171 %endif
172 # (tmb) force new gcc 10.2
173 BuildRequires: %{cross_prefix}gcc >= 10.2.1-0.20210130.1
174 # (tmb) force latest binutils
175 BuildRequires: %{cross_prefix}binutils >= 1:2.36.1-1
176 # we need the static dash
177 %define ash_bin /usr/bin/dash.static
178 Requires(post): dash-static
179 Requires(post): grep
180 Requires: filesystem >= 2.1.9-18
181 # ensure libxcrypt is installed as glibc crypt is disabled / being obsoleted
182 Requires: %{_lib}xcrypt1 >= 4.1.1-1
183
184 BuildRequires: systemtap-sdt-devel
185
186 BuildRequires: texinfo
187 BuildRequires: texinfo-tex
188 %if %{build_pdf_doc}
189 BuildRequires: texlive
190 %endif
191 %if %{build_utils}
192 BuildRequires: pkgconfig(gdlib)
193 %endif
194 BuildRequires: autoconf2.5
195 BuildRequires: pkgconfig(libcap)
196 BuildRequires: rpm-mageia-setup-build >= 1.147
197 BuildRequires: spec-helper >= 0.31.2
198
199 ###
200 ### upstream release/2.33/master branch
201 ### git format-patch --start-number 200 glibc-2.33..origin/release/2.33/master
202 ###
203 Patch200: 0200-nsswitch-return-result-when-nss-database-is-locked-B.patch
204 Patch201: 0201-tunables-Simplify-TUNABLE_SET-interface.patch
205 Patch202: 0202-x86-Use-SIZE_MAX-instead-of-long-int-1-for-tunable-r.patch
206 Patch203: 0203-tunables-Disallow-negative-values-for-some-tunables.patch
207 Patch204: 0204-S390-Add-new-hwcap-values.patch
208 Patch205: 0205-string-Work-around-GCC-PR-98512-in-rawmemchr.patch
209
210 ###
211 ### upstream master branch
212 ### starts from number 300
213 ###
214
215 ###
216 ### Mageia patches
217 ###
218
219 # make "localedef --add-to-archive" to follow symlink
220 # safe to send ustream, need to be kept for locales
221 Patch00: glibc-2.17-localedef-archive-follow-symlinks.patch
222
223 # various path fix, according to usrmove
224 Patch01: glibc-2.17-fhs-usrmove.patch
225
226 Patch06: glibc-2.26-share-locale.patch
227 # use xvt instead of xterm in xtrace.sh
228 # cannot be pushed upstream as xvt is Ma* specific
229 Patch09: glibc-2.2.4-xterm-xvt.patch
230
231 # add transliteration for "COLON SIGN"
232 # ( used for the money of money of san salvador )
233 Patch11: glibc-2.19-compat-EUR-currencies.patch
234
235 # fix the chkconfig header, should be sent upstream
236 Patch13: glibc-2.3.3-nscd-enable.patch
237
238 # disable cache for hosts on nscd, as this is seen as insecure
239 # if the system relie on reverse dns for security
240 Patch14: glibc-2.9-nscd-no-host-cache.patch
241
242 # add some new timezone for various cities
243 # Halifax, Montreal, Johannesburg
244 # should be sent upstream ( I guess )
245 Patch23: glibc-2.3.4-timezone.patch
246 Patch24: glibc-2.10.1-biarch-cpp-defines.patch
247
248 Patch29: glibc-2.3.5-biarch-utils.patch
249
250 # translation fixes, need to be checked with some i18n team member
251 # should be safe to send upstream once checked
252 Patch35: glibc-2.16.0-force-gb18030-for-zh_CN.patch
253
254 # disable parallel testsuite of rt on powerpc with SMT
255 Patch38: glibc-2.18-testsuite-rt-notparallel.patch
256
257 # Add C.UTF-8 locale into /usr/lib/locale/
258 Patch59: glibc-c-utf8-locale.patch
259
260 # check for libcap, even if selinux is disabled
261 # should be sent upstream
262 Patch44: glibc-2.26-dont-tie-libcap-with-selinux.patch
263
264
265 # Determine minium kernel versions
266 %define enablekernel 3.2
267 Conflicts: kernel < %{enablekernel}
268
269 # People changed location of rpm scripts...
270 %define rpmscripts /usr/lib/rpm/%{_real_vendor}
271
272 # Don't try to explicitly provide GLIBC_PRIVATE versioned libraries
273 %define __find_provides %{_builddir}/%{source_dir}/find_provides.sh
274 %define __find_requires %{_builddir}/%{source_dir}/find_requires.sh
275
276 %if !%{build_cross}
277 Obsoletes: ld.so
278 Provides: ld.so
279 %endif
280
281 Obsoletes: ldconfig
282 Provides: ldconfig = %{glibcepoch}:%{glibcversion}-%{glibcrelease} /sbin/ldconfig
283 # obsolete nss_db as it got merged again in 2.15
284 Obsoletes: nss_db <= 2.2.3-0.pre1.9
285
286 %description
287 The glibc package contains standard libraries which are used by
288 multiple programs on the system. In order to save disk space and
289 memory, as well as to make upgrading easier, common system code is
290 kept in one place and shared between programs. This particular package
291 contains the most important sets of shared libraries: the standard C
292 library and the standard math library. Without these two libraries, a
293 Linux system will not function. The glibc package also contains
294 national language (locale) support.
295
296 This package now also provides ldconfig which was package seperately in
297 the past. Ldconfig is a basic system program which determines run-time
298 link bindings between ld.so and shared libraries. Ldconfig scans a running
299 system and sets up the symbolic links that are used to load shared
300 libraries properly. It also creates a cache (/etc/ld.so.cache) which
301 speeds the loading of programs which use shared libraries.
302
303 %package devel
304 Summary: Header and object files for development using standard C libraries
305 Group: Development/C
306 Requires(post): coreutils
307 Requires(postun): coreutils, awk
308 # ensure libxcrypt is installed as glibc crypt is disabled / being obsoleted
309 Requires: %{_lib}xcrypt-devel >= 4.1.1-1
310 # (tmb) filter out requires on self-provides
311 %global __requires_exclude devel\\(libm.*\\)
312 # (tmb) add virtual provides for old libm to ease builds... from glibc-2.22 libmvec is preferred
313 %ifarch x86_64
314 Provides: devel(libm(64bit))
315 %endif
316 Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
317 %if !%{build_cross}
318 Requires: linux-userspace-headers
319 %endif
320 %if %{build_cross}
321 Autoreq: false
322 Autoprov: false
323 %else
324 Autoreq: true
325 %endif
326
327 %description devel
328 The glibc-devel package contains the header and object files necessary
329 for developing programs which use the standard C libraries (which are
330 used by nearly all programs). If you are developing programs which
331 will use the standard C libraries, your system needs to have these
332 standard header and object files available in order to create the
333 executables.
334
335 This package also includes the C header files for the Linux kernel.
336 The header files define structures and constants that are needed for
337 building most standard programs. The header files are also needed for
338 rebuilding the kernel.
339
340 Install glibc-devel if you are going to develop programs which will
341 use the standard C libraries.
342
343 %package static-devel
344 Summary: Static libraries for GNU C library
345 Group: Development/C
346 Requires: %{name}-devel = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
347 # ensure libxcrypt is installed as glibc crypt is disabled / being obsoleted
348 Requires: %{_lib}xcrypt-static-devel >= 4.1.1-1
349
350 %description static-devel
351 The glibc-static-devel package contains the static libraries necessary
352 for developing programs which use the standard C libraries. Install
353 glibc-static-devel if you need to statically link your program or
354 library.
355
356 %package profile
357 Summary: The GNU libc libraries, including support for gprof profiling
358 Group: Development/C
359 Obsoletes: libc-profile
360 Provides: libc-profile = %{glibcversion}-%{glibcrelease}
361 Autoreq: true
362
363 %description profile
364 The glibc-profile package includes the GNU libc libraries and support
365 for profiling using the gprof program. Profiling is analyzing a
366 program's functions to see how much CPU time they use and determining
367 which functions are calling other functions during execution. To use
368 gprof to profile a program, your program needs to use the GNU libc
369 libraries included in glibc-profile (instead of the standard GNU libc
370 libraries included in the glibc package).
371
372 If you are going to use the gprof program to profile a program, you'll
373 need to install the glibc-profile program.
374
375 %package -n nscd
376 Summary: A Name Service Caching Daemon (nscd)
377 Group: System/Servers
378 Requires(post): systemd >= %{systemd_required_version}
379 Requires(post): rpm-helper >= 0.24.8-1
380 Requires(preun): rpm-helper >= 0.24.8-1
381 Autoreq: true
382
383 %description -n nscd
384 Nscd caches name service lookups and can dramatically improve
385 performance with NIS+, and may help with DNS as well. Note that you
386 can't use nscd with 2.0 kernels because of bugs in the kernel-side
387 thread support. Unfortunately, nscd happens to hit these bugs
388 particularly hard.
389
390 Install nscd if you need a name service lookup caching daemon, and
391 you're not using a version 2.0 kernel.
392
393 %package utils
394 Summary: Development utilities from GNU C library
395 Group: Development/Other
396 Requires: %{name} = %{glibcepoch}:%{glibcversion}-%{glibcrelease}
397
398 %description utils
399 The glibc-utils package contains memusage, a memory usage profiler,
400 mtrace, a memory leak tracer and xtrace, a function call tracer which
401 can be helpful during program debugging.
402
403 If unsure if you need this, don't install this package.
404
405 %if %{build_i18ndata}
406 %package i18ndata
407 Summary: Database sources for 'locale'
408 Group: System/Libraries
409
410 %description i18ndata
411 This package contains the data needed to build the locale data files
412 to use the internationalization features of the GNU libc.
413 %endif
414
415 %if %{build_timezone}
416 %package -n timezone
417 Summary: Time zone descriptions
418 Group: System/Base
419
420 %description -n timezone
421 These are configuration files that describe possible
422 time zones.
423 %endif
424
425 ### glibc core "debuginfo and debugsource" sub-packages
426 %if %{build_debug}
427 %define debug_package %{nil}
428 %define __debug_install_post %{nil}
429 %global __debug_package 1
430 # Disable thew new features that glibc packages don't use.
431 %undefine _debugsource_packages
432 %undefine _debuginfo_subpackages
433 %undefine _unique_debug_names
434 %undefine _unique_debug_srcs
435
436 %package debuginfo
437 Summary: Debug information for package %{name}
438 Group: Development/Debug
439 AutoReqProv: no
440
441 %description debuginfo
442 This package provides debug information for package %{name}.
443 Debug information is useful when developing applications that use this
444 package or when debugging this package.
445
446 %package debugsource
447 Summary: Debug source for package %{name}
448 Group: Development/Debug
449 AutoReqProv: no
450
451 %description debugsource
452 This package provides debug source for %{name}
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 # not so pretty but it makes autopoo find the "correct" library for i586 in the second loop
676 export CFLAGS="-L/usr/lib $CFLAGS"
677 SElinuxFlags="--with-selinux"
678 %else
679 SElinuxFlags="--without-selinux"
680 %endif
681
682 # Kernel headers directory
683 KernelHeaders=%{_includedir}
684
685 # Determine library name
686 glibc_cv_cc_64bit_output=no
687 if echo ".text" | $BuildCC -c -o test.o -xassembler -; then
688 case `/usr/bin/file test.o` in
689 *"ELF 64"*)
690 glibc_cv_cc_64bit_output=yes
691 ;;
692 esac
693 fi
694 rm -f test.o
695
696 # Force a separate and clean object dir
697 rm -rf build-$cpu-linux
698 mkdir build-$cpu-linux
699 pushd build-$cpu-linux
700 [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main"
701 CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-function -Wno-maybe-uninitialized" ../configure \
702 $arch-%{_real_vendor}-linux%{gnuext} $BuildCross \
703 --prefix=%{_prefix} \
704 --libexecdir=%{_prefix}/libexec \
705 --infodir=%{_infodir} \
706 --enable-add-ons="$AddOns" --without-cvs \
707 $ExtraFlags $MultiArchFlags $SElinuxFlags \
708 --enable-kernel=%{enablekernel} \
709 --with-headers=$KernelHeaders ${1+"$@"} \
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=%{buildroot} 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=%{buildroot} \
790 install-locales
791 )
792 install -m 0644 localedata/SUPPORTED %{buildroot}/%{_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 %{buildroot}/$ALT_ARCH
806 make install_root=%{buildroot}/$ALT_ARCH install -C build-$ALT_ARCH
807
808 # Dispatch */lib only
809 LIB=/lib
810 %if !%{build_cross}
811 mv %{buildroot}/$ALT_ARCH/$LIB %{buildroot}/$LIB
812 mv %{buildroot}/$ALT_ARCH%{_prefix}/libexec/getconf/* \
813 %{buildroot}%{_prefix}/libexec/getconf/
814 [ ! -d %{buildroot}/%{_prefix}/$LIB/ ] && mkdir -p %{buildroot}/%{_prefix}/$LIB/
815 mv %{buildroot}/$ALT_ARCH/%{_prefix}/$LIB/* %{buildroot}/%{_prefix}/$LIB/
816 %else
817 mv %{buildroot}/$ALT_ARCH/%{_prefix}/lib %{buildroot}/$LIB
818 sed -i %{buildroot}/$LIB/libc.so -e "s!%{_slibdir}!$LIB!g"
819 %endif
820
821 rm -rf %{buildroot}/$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 > %{buildroot}%{_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 %{buildroot}$LibDir/$SubDir/
842 install -m755 libc.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc-*.so`
843 ln -sf `basename %{buildroot}$LibDir/libc-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libc.so.*`
844 install -m755 math/libm.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm-*.so`
845 ln -sf `basename %{buildroot}$LibDir/libm-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libm.so.*`
846 install -m755 $Pthreads/libpthread.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread-*.so`
847 ln -sf `basename %{buildroot}$LibDir/libpthread-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libpthread.so.*`
848 install -m755 ${Pthreads}_db/libthread_db.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db-*.so`
849 ln -sf `basename %{buildroot}$LibDir/libthread_db-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/libthread_db.so.*`
850 install -m755 rt/librt.so %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt-*.so`
851 ln -sf `basename %{buildroot}$LibDir/librt-*.so` %{buildroot}$LibDir/$SubDir/`basename %{buildroot}$LibDir/librt.so.*`
852 echo "%dir $LibDir/$SubDir" >> ../extralibs.filelist
853 find %{buildroot}$LibDir/$SubDir -maxdepth 1 -type f -o -type l | sed -e "s|%{buildroot}||" >> ../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 %{buildroot}%{_libdir}/libNoVersion*
868 rm -f %{buildroot}%{_slibdir}/libNoVersion*
869
870 %if "%{name}" == "glibc"
871 install -m 644 %{SOURCE8} %{buildroot}%{_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 %{buildroot}%{_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" > %{buildroot}%{_sysconfdir}/ld.so.conf
890 chmod 644 %{buildroot}%{_sysconfdir}/ld.so.conf
891 mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
892
893 # ldconfig cache
894 mkdir -p %{buildroot}%{_var}/cache/ldconfig
895 touch %{buildroot}%{_var}/cache/ldconfig/aux-cache
896 %endif
897
898 # Include %{_libdir}/gconv/gconv-modules.cache
899 > %{buildroot}%{_libdir}/gconv/gconv-modules.cache
900 chmod 644 %{buildroot}%{_libdir}/gconv/gconv-modules.cache
901
902 %if "%{name}" == "glibc"
903 touch %{buildroot}%{_sysconfdir}/ld.so.cache
904 %endif
905
906 # Are we cross-compiling?
907 Strip="strip"
908 if [[ "%{_target_cpu}" != "%{target_cpu}" ]]; then
909 Strip="%{cross_program_prefix}$Strip"
910 fi
911
912 # Strip debugging info from all static libraries
913 pushd %{buildroot}%{_slibdir}
914 for i in *.a; do
915 if [ -f "$i" ]; then
916 case "$i" in
917 *_p.a) ;;
918 *) $Strip -g -R .comment $i ;;
919 esac
920 fi
921 done
922 popd
923 pushd %{buildroot}%{_libdir}
924 for i in libc_nonshared.a; do
925 if [ -f "$i" ]; then
926 $Strip -g -R .comment $i
927 fi
928 done
929 popd
930
931 # post install wrapper
932 %__cc -Os -g %{SOURCE14} -static \
933 -o "%{buildroot}%{_sbindir}/glibc-post-wrapper" \
934 -L "%{buildroot}%{_libdir}/" \
935 '-DSLIBDIR="%{_slibdir}"' \
936 '-DGCONV_DIR="%{_libdir}/gconv"'
937 chmod 700 %{buildroot}%{_sbindir}/glibc-post-wrapper
938
939 # rquota.x and rquota.h are now provided by quota
940 rm -f %{buildroot}%{_includedir}/rpcsvc/rquota.[hx]
941
942 # Hardlink identical locale files together
943 %if %{build_i18ndata}
944 %{_bindir}/hardlink -vc %{buildroot}%{_datadir}/locale
945 %endif
946
947 rm -rf %{buildroot}%{_includedir}/netatalk/
948
949 # Build file list for devel package
950 find %{buildroot}%{_includedir} -type f -or -type l > devel.filelist
951 find %{buildroot}%{_includedir} -type d | sed "s/^/%dir /" | \
952 grep -v "%{_libdir}/libnss1.*.so$" | \
953 grep -v "%{_includedir}$" | >> devel.filelist
954 find %{buildroot}%{_libdir} -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
955 # biarch libs
956 %if %{build_biarch}
957 find %{buildroot}%{_prefix}/lib -maxdepth 1 -name "*.so" -o -name "*.o" | egrep -v "(libmemusage.so|libpcprofile.so)" >> devel.filelist
958 %endif
959 perl -pi -e "s|%{buildroot}||" devel.filelist
960
961 # /etc/localtime - we're proud of our timezone #Well we may put Paris
962 %if %{build_timezone}
963 rm -f %{buildroot}%{_sysconfdir}/localtime
964 cp -f %{buildroot}%{_datadir}/zoneinfo/US/Eastern %{buildroot}%{_sysconfdir}/localtime
965 #ln -sf ..%{_datadir}/zoneinfo/US/Eastern %{buildroot}%{_sysconfdir}/localtime
966 %endif
967
968 # [gg] build PDF documentation
969 %if %{build_pdf_doc}
970 (cd manual; texi2dvi -p -t @afourpaper -t @finalout libc.texinfo)
971 %endif
972
973 # Leave a compatibility symlink for the dynamic loader on armhfp targets,
974 # at least until the world gets rebuilt
975 %ifarch armv7hl
976 ln -sf %{_slibdir}/ld-linux-armhf.so.3 %{buildroot}%{_slibdir}/ld-linux.so.3
977 %endif
978
979 # Generate final rpm filelist, with localized libc.mo files
980 rm -f rpm.filelist
981 %if "%{name}" == "glibc"
982 %find_lang libc
983 perl -ne '/^\s*$/ or print' libc.lang > rpm.filelist
984 %endif
985 cat extralibs.filelist >> rpm.filelist
986
987 # Remove unpackaged files
988 rm -f %{buildroot}%{_infodir}/dir.old*
989 rm -rf %{buildroot}%{_includedir}/asm-*/mach-*/
990 rm -f %{buildroot}%{_datadir}/locale/locale-archive*
991 rm -f %{buildroot}%{_var}/db/Makefile
992
993 %if !%{build_utils}
994 %if %{build_biarch}
995 rm -f %{buildroot}%{_slibdir32}/libmemusage.so
996 rm -f %{buildroot}%{_slibdir32}/libpcprofile.so
997 %endif
998 rm -f %{buildroot}%{_slibdir}/libmemusage.so
999 rm -f %{buildroot}%{_slibdir}/libpcprofile.so
1000 rm -f %{buildroot}%{_bindir}/memusage
1001 rm -f %{buildroot}%{_bindir}/memusagestat
1002 rm -f %{buildroot}%{_bindir}/mtrace
1003 rm -f %{buildroot}%{_bindir}/pcprofiledump
1004 rm -f %{buildroot}%{_bindir}/xtrace
1005 %endif
1006
1007 %if !%{build_timezone}
1008 rm -f %{buildroot}%{_sysconfdir}/localtime
1009 rm -f %{buildroot}%{_bindir}/zdump
1010 rm -f %{buildroot}%{_sbindir}/zic
1011 rm -rf %{buildroot}%{_datadir}/zoneinfo
1012 %endif
1013
1014 %if !%{build_i18ndata}
1015 rm -rf %{buildroot}%{_datadir}/i18n
1016 %endif
1017
1018 %if "%{name}" != "glibc"
1019 rm -rf %{buildroot}/boot
1020 rm -rf %{buildroot}/sbin
1021 rm -rf %{buildroot}/usr/share
1022 rm -rf %{buildroot}%{_bindir}
1023 rm -rf %{buildroot}%{_sbindir}
1024 rm -rf %{buildroot}%{_datadir}
1025 rm -rf %{buildroot}%{_infodir}
1026 rm -rf %{buildroot}%{_prefix}/etc
1027 rm -rf %{buildroot}%{_libdir}/gconv
1028 %endif
1029
1030 # In case we are cross-compiling, don't bother to remake symlinks and
1031 # fool spec-helper when stripping files
1032 %if "%{name}" != "glibc"
1033 export DONT_SYMLINK_LIBS=1
1034 export PATH=%{_bindir}:$PATH
1035 %endif
1036
1037 # This will make the '-g' argument to be passed to eu-strip for these
1038 # libraries, so that only debug symbols are stripped and gdb/valgrind continue
1039 # to work without needing glibc-debug package to be installed.
1040 export EXCLUDE_FROM_FULL_STRIP="ld-%{glibcversion}.so libpthread libc-%{glibcversion}.so"
1041
1042 # If we are building a debug package then copy all of the static archives
1043 # into the debug directory to keep them as unstripped copies.
1044 %if %{build_debug}
1045 mkdir -p %{buildroot}%{_prefix}/lib/debug%{_libdir}
1046 cp -a %{buildroot}%{_libdir}/*.a \
1047 %{buildroot}%{_prefix}/lib/debug%{_libdir}/
1048 rm -f %{buildroot}%{_prefix}/lib/debug%{_libdir}/*_p.a
1049 %endif
1050 # Strip all of the installed object files.
1051 strip -g %{buildroot}%{_libdir}/*.o
1052
1053 find_debuginfo_args='--strict-build-id -g -i'
1054 /usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
1055
1056 # List all of the *.a archives in the debug directory.
1057 list_debug_archives()
1058 {
1059 local dir=%{_prefix}/lib/debug%{_libdir}
1060 find %{buildroot}$dir -name "*.a" -printf "$dir/%%P\n"
1061 }
1062
1063 # Remove some common directories from the common package debuginfo so that we
1064 # don't end up owning them.
1065 exclude_common_dirs()
1066 {
1067 exclude_dirs="%{_prefix}/src/debug"
1068 exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
1069 exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
1070
1071 for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
1072 sed -i "\|^%%dir $d/\?$|d" $1
1073 done
1074 }
1075
1076 exclude_common_dirs debuginfo.filelist
1077
1078 # remove debug source dir
1079 sed -i 's/\%{_prefix}\/src\/debug\/%{name}-%{version}//' debuginfo.filelist
1080
1081 %if "%{name}" == "glibc"
1082
1083 %post -p %{_sbindir}/glibc-post-wrapper
1084
1085 # automatic ldconfig cache update on rpm installs/removals
1086 # (see http://www.rpm.org/wiki/FileTriggers)
1087 # FIXME: port to lua to remove circular dependency with grep
1088 %transfiletriggerin -p %{ash_bin} -P 2000000 -- /lib/ /lib64/
1089 grep -F '.so.' | ldconfig -X
1090
1091 %transfiletriggerin -p %{ash_bin} -P 2000000 -- /etc/ld.so.conf.d/
1092 ldconfig -X
1093
1094 %endif
1095
1096 %if %{build_nscd}
1097 %pre -n nscd
1098 %_pre_useradd nscd / /bin/false
1099
1100 %post -n nscd
1101 %_tmpfilescreate nscd
1102 %_post_service nscd
1103
1104 %preun -n nscd
1105 %_preun_service nscd
1106
1107 %postun -n nscd
1108 %_postun_userdel nscd
1109
1110 if [ "$1" -ge "1" ]; then
1111 /sbin/service nscd condrestart > /dev/null 2>&1 || :
1112 fi
1113 %endif
1114
1115 #
1116 # glibc
1117 #
1118 %files -f rpm.filelist
1119 %if "%{name}" == "glibc"
1120 %if %{build_timezone}
1121 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/localtime
1122 %endif
1123 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/nsswitch.conf
1124 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/ld.so.conf
1125 %dir %{_sysconfdir}/ld.so.conf.d
1126 %config(noreplace) %{_sysconfdir}/rpc
1127 #doc nis/nss
1128 %doc posix/gai.conf
1129 %{_datadir}/locale/locale.alias
1130 /sbin/sln
1131 %dir %{_prefix}/libexec/getconf
1132 %{_prefix}/libexec/getconf/*
1133 %endif
1134 %{_slibdir}/ld-%{glibcversion}.so
1135 %if %isarch i386
1136 %{_slibdir}/ld-linux.so.2
1137 %endif
1138 %if %isarch %arm
1139 %if %isarch armv7hl
1140 %{_slibdir}/ld-linux-armhf.so.3
1141 %endif
1142 %{_slibdir}/ld-linux.so.3
1143 %endif
1144 %if %isarch x86_64
1145 %{_slibdir}/ld-linux-x86-64.so.2
1146 %endif
1147 %if %isarch aarch64
1148 %{_slibdir}/ld-linux-aarch64.so.1
1149 %endif
1150 %{_slibdir}/lib*-[.0-9]*.so
1151 %{_slibdir}/lib*.so.[0-9]*
1152 %{_slibdir}/libSegFault.so
1153 %if "%{name}" == "glibc"
1154 %dir %{_libdir}/audit
1155 %{_libdir}/audit/sotruss-lib.so
1156 %dir %{_libdir}/gconv
1157 %{_libdir}/gconv/*.so
1158 %{_libdir}/gconv/gconv-modules
1159 %ghost %{_libdir}/gconv/gconv-modules.cache
1160 %{_bindir}/catchsegv
1161 %{_bindir}/gencat
1162 %{_bindir}/getconf
1163 %{_bindir}/getent
1164 %{_bindir}/iconv
1165 %{_bindir}/ldd
1166 %if %isarch i386
1167 %{_bindir}/lddlibc4
1168 %endif
1169 %{_bindir}/locale
1170 %{_bindir}/localedef
1171 %{_bindir}/makedb
1172 %{_bindir}/pldd
1173 %{_bindir}/sotruss
1174 %{_bindir}/sprof
1175 %{_bindir}/tzselect
1176 %{_sbindir}/iconvconfig
1177 %{_sbindir}/glibc-post-wrapper
1178 %endif
1179
1180 %if %isarch aarch64
1181 %{_slibdir32}/ld-linux-aarch64.so.1
1182 %endif
1183
1184 %if %{build_biarch}
1185 %{_slibdir32}/ld-%{glibcversion}.so
1186 %{_slibdir32}/ld-linux*.so.2
1187 %{_slibdir32}/lib*-[.0-9]*.so
1188 %{_slibdir32}/lib*.so.[0-9]*
1189 %{_slibdir32}/libSegFault.so
1190 %dir %{_prefix}/lib/audit
1191 %{_prefix}/lib/audit/sotruss-lib.so
1192 %dir %{_prefix}/lib/gconv
1193 %{_prefix}/lib/gconv/*
1194 %endif
1195
1196 #
1197 # ldconfig
1198 #
1199 %if "%{name}" == "glibc"
1200 /sbin/ldconfig
1201 %ghost %{_sysconfdir}/ld.so.cache
1202 %dir %{_var}/cache/ldconfig
1203 %ghost %{_var}/cache/ldconfig/aux-cache
1204 %endif
1205
1206 #
1207 # glibc-devel
1208 #
1209 %files devel -f devel.filelist
1210 %doc README NEWS INSTALL
1211 # (tmb) FIXME, figure out rpm doc breakage/change
1212 #doc COPYING COPYING.LIB
1213 #doc documentation/*
1214 #doc hesiod/README.hesiod
1215 #doc crypt/README.ufc-crypt
1216 %{_libdir}/libc_nonshared.a
1217 %{_libdir}/libg.a
1218 %{_libdir}/libmcheck.a
1219 %if %isarch x86_64
1220 %{_libdir}/libm-%{glibcversion}.a
1221 %{_libdir}/libmvec.a
1222 %endif
1223
1224 %if %{build_biarch}
1225 %{_prefix}/lib/libc_nonshared.a
1226 %{_prefix}/lib/libg.a
1227 %{_prefix}/lib/libmcheck.a
1228 %endif
1229
1230 #
1231 # glibc-static-devel
1232 #
1233 %files static-devel
1234 %doc COPYING COPYING.LIB
1235 %{_libdir}/libBrokenLocale.a
1236 %{_libdir}/libanl.a
1237 %{_libdir}/libc.a
1238 %{_libdir}/libdl.a
1239 %{_libdir}/libm.a
1240 %{_libdir}/libpthread.a
1241 %{_libdir}/libresolv.a
1242 %{_libdir}/librt.a
1243 %{_libdir}/libutil.a
1244
1245 %if %{build_biarch}
1246 %{_prefix}/lib/libBrokenLocale.a
1247 %{_prefix}/lib/libanl.a
1248 %{_prefix}/lib/libc.a
1249 %{_prefix}/lib/libdl.a
1250 %{_prefix}/lib/libm.a
1251 %{_prefix}/lib/libpthread.a
1252 %{_prefix}/lib/libresolv.a
1253 %{_prefix}/lib/librt.a
1254 %{_prefix}/lib/libutil.a
1255 %endif
1256
1257 #
1258 # glibc-doc
1259 #
1260 %if %{build_doc}
1261 %files doc
1262 %{_infodir}/libc.info*
1263 %endif
1264
1265 #
1266 # glibc-doc-pdf
1267 #
1268 %if %{build_pdf_doc}
1269 %files doc-pdf
1270 %doc manual/libc.pdf
1271 %endif
1272
1273 #
1274 # glibc-profile
1275 #
1276 %if %{build_profile}
1277 %files profile
1278 %{_libdir}/lib*_p.a
1279 %if %{build_biarch}
1280 %{_prefix}/lib/lib*_p.a
1281 %endif
1282 %endif
1283
1284 #
1285 # glibc-utils
1286 #
1287 %if %{build_utils}
1288 %files utils
1289 %if %{build_biarch}
1290 %{_slibdir32}/libmemusage.so
1291 %{_slibdir32}/libpcprofile.so
1292 %endif
1293 %{_slibdir}/libmemusage.so
1294 %{_slibdir}/libpcprofile.so
1295 %{_bindir}/memusage
1296 %{_bindir}/memusagestat
1297 %{_bindir}/mtrace
1298 %{_bindir}/pcprofiledump
1299 %{_bindir}/xtrace
1300 %endif
1301
1302 #
1303 # nscd
1304 #
1305 %if %{build_nscd}
1306 %files -n nscd
1307 %config(noreplace) %{_sysconfdir}/nscd.conf
1308 %{_sbindir}/nscd
1309 %{_unitdir}/nscd.service
1310 %{_unitdir}/nscd.socket
1311 %{_tmpfilesdir}/nscd.conf
1312 %dir %{_var}/db/nscd
1313 %endif
1314
1315 #
1316 # timezone
1317 #
1318 %if %{build_timezone}
1319 %files -n timezone
1320 %{_sbindir}/zdump
1321 %{_sbindir}/zic
1322 %dir %{_datadir}/zoneinfo
1323 %{_datadir}/zoneinfo/*
1324 %endif
1325
1326 #
1327 # glibc-i18ndata
1328 #
1329 %if %{build_i18ndata}
1330 %files i18ndata
1331 %dir %{_datadir}/i18n
1332 %dir %{_datadir}/i18n/charmaps
1333 %{_datadir}/i18n/charmaps/*
1334 %dir %{_datadir}/i18n/locales
1335 %{_datadir}/i18n/locales/*
1336 %{_datadir}/i18n/SUPPORTED
1337 %endif
1338
1339 %if %{build_debug}
1340 %files debuginfo -f debuginfo.filelist
1341
1342 %files debugsource
1343 %dir %{_prefix}/src/debug/%{name}-%{version}
1344 %{_prefix}/src/debug/%{name}-%{version}/*
1345 %endif

  ViewVC Help
Powered by ViewVC 1.1.30