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

  ViewVC Help
Powered by ViewVC 1.1.30