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

  ViewVC Help
Powered by ViewVC 1.1.30