/[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 1649545 - (show annotations) (download)
Thu Nov 26 15:46:37 2020 UTC (3 years, 4 months ago) by tmb
File size: 39286 byte(s)
- sync in glibc-2.32 branch
  - update to 2.32
  - rebase P27
  - update filelists
  - add fixes from upstream 2.32 branch
  - drop upstream removed --enable-obsolete-rpc,  --enable-obsolete-nsl build flags
  - glibc-devel: require libtirpc and libnsl to simplify transition to glibc 2.32
  - Use O_CLOEXEC in sysconf [BZ #26791]


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

  ViewVC Help
Powered by ViewVC 1.1.30