956cb8c9201338cb29975fab128fef2f3bf62c26
[external/glibc.git] / packaging / glibc.spec
1 #
2 # spec file for package glibc
3 #
4 # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # This will avoid building some parts of glibc
16 %define asan_arch x86_64 armv7l aarch64
17 %bcond_with    fast_build
18 Name:           glibc
19 Summary:        Standard Shared Libraries (from the GNU C Library)
20 License:        LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
21 Group:          Base/Libraries
22 BuildRequires:  fdupes
23 BuildRequires:  makeinfo
24 BuildRequires:  xz
25 BuildRequires:  gcc-c++
26 BuildRequires:  gettext-tools
27 BuildRequires:  libstdc++-devel
28 %{?asan:
29 %ifarch %asan_arch
30 #BuildRequires:  python
31 BuildRequires:  glibc-devel-static
32 %endif
33 }
34 #BuildRequires:  pkgconfig(systemd)
35 %define _filter_GLIBC_PRIVATE 1
36 %if %_target_cpu == "i686"
37 # For i686 let's only build what's different from i586, so
38 # no need to build documentation
39 %define build_profile 1
40 %define build_locales 0
41 %define build_html 0
42 %else
43 %if %{with fast_build}
44 %define build_profile 0
45 %define build_locales 0
46 %define build_html 0
47 %else
48 # Default:
49 %define build_profile 1
50 %define build_locales 0
51 %define build_html 1
52 %endif
53 %endif
54
55 %define disable_assert 0
56 %define enable_stackguard_randomization 1
57 %define multiarcharches %{ix86} x86_64
58
59 %ifarch x86_64
60 %define enablekernel 2.6.16
61 %else
62 %define enablekernel 2.6.16
63 %endif
64 Conflicts:      kernel < %{enablekernel}
65 %ifarch armv7l armv7hl
66 # The old runtime linker link gets not provided by rpm find.provides, but it exists
67 Provides:       ld-linux.so.3
68 Provides:       ld-linux.so.3(GLIBC_2.4)
69 %endif
70 Version:        2.24
71 Release:        0
72 %define glibc_major_version 2.24
73 %define git_id 4e42b5b8f89f
74
75 Url:            http://www.gnu.org/software/libc/libc.html
76 Source:         glibc-%{version}.tar.xz
77 Source5:        nsswitch.conf
78 Source7:        bindresvport.blacklist
79 Source8:        glibc_post_upgrade.c
80 Source9:        glibc.rpmlintrc
81 Source10:       baselibs.conf
82 # For systemd 
83 Source1001:     glibc.manifest
84
85 Requires(pre):  filesystem
86 Provides:       rtld(GNU_HASH)
87
88 %description
89 The GNU C Library provides the most important standard libraries used
90 by nearly all programs: the standard C library, the standard math
91 library, and the POSIX thread library. A system is not functional
92 without these libraries.
93
94 %package info
95 Summary:        Info Files for the GNU C Library
96 License:        GFDL-1.1
97 Group:          Documentation
98 BuildArch:      noarch
99
100 %description info
101 This package contains the documentation for the GNU C library stored as
102 info files. Due to a lack of resources, this documentation is not
103 complete and is partially out of date.
104
105 %package html
106 Summary:        HTML Documentation for the GNU C Library
107 License:        GFDL-1.1
108 Group:          Documentation
109 BuildArch:      noarch
110
111 %description html
112 This package contains the HTML documentation for the GNU C library. Due
113 to a lack of resources, this documentation is not complete and is
114 partially out of date.
115
116 %package i18ndata
117 Summary:        Database Sources for 'locale'
118 License:        GPL-2.0+ and MIT
119 Group:          Base/Libraries
120 BuildArch:      noarch
121
122 %description i18ndata
123 This package contains the data needed to build the locale data files to
124 use the internationalization features of the GNU libc. It is normally
125 not necessary to install this packages, the data files are already
126 created.
127
128 %package locale
129 Summary:        Locale Data for Localized Programs
130 License:        GPL-2.0+ and MIT and LGPL-2.1+
131 Requires(post): /usr/bin/cat
132 Requires:       glibc = %{version}
133 %description locale
134 Locale data for the internationalisation features of the GNU C library.
135
136 %package profile
137 Summary:        Libc Profiling and Debugging Versions
138 License:        LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
139 Group:          Base/Utilities
140 Requires:       glibc = %{version}
141
142 %description profile
143 This package contains special versions of the GNU C library which are
144 necessary for profiling and debugging.
145
146 %package devel
147 Summary:        Include Files and Libraries Mandatory for Development
148 License:        BSD-3-Clause and LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
149 Requires:       glibc = %{version}
150 Requires:       linux-kernel-headers
151
152 %description devel
153 These libraries are needed to develop programs which use the standard C
154 library.
155
156 %package devel-static
157 Summary:        C library static libraries for -static linking
158 License:        BSD-3-Clause and LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
159 Requires:       %{name}-devel = %{version}
160 # Provide Fedora name for package to make packaging easier
161 Provides:       %{name}-static = %version
162
163 %description devel-static
164 The glibc-devel-static package contains the C library static libraries
165 for -static linking.  You don't need these, unless you link statically,
166 which is highly discouraged.
167
168 %package devel-utils
169 Summary:        Development utilities from GNU C library
170 License:        LGPL-2.1+
171 Requires:       glibc = %{version}
172
173 %description devel-utils
174 The glibc-devel-utils package contains various binaries which can be helpful during program
175 debugging.
176
177 If you are unsure if you need this, don't install this package.
178
179 %package extra
180 Summary:        Extra binaries from GNU C Library
181 License:        LGPL-2.1+
182 Requires:       glibc = %{version}
183
184 %description extra
185 The glibc-extra package contains some extra binaries for glibc that
186 are not essential but recommend to use.
187
188 makedb: A program to create a database for nss
189
190 %package obsolete
191 Summary:        Obsolete Shared Libraries from the GNU C Library
192 License:        LGPL-2.0+
193 Requires:       glibc = %{version}
194
195 %description obsolete
196 This package provides some old libraries from the GNU C Library which
197 are no longer supported. Additional it provides a compatibility library
198 for old binaries linked against glibc 2.0.
199
200 Install this package if you need one of this libraries to get old
201 binaries working, but since this libraries are not supported and there
202 is no gurantee that they work for you, you should try to get newer
203 versions of your software.
204
205 %{?asan:
206 %ifarch %asan_arch
207 %package asan
208 Summary:     glibc with ASan instrumentation
209 License:     LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
210 Requires:    glibc = %{version}
211
212 %description asan
213 This package provides glibc with ASan instrumentation
214
215 %post asan
216 ln -s --force /%{_lib}/libc-2.24-asan.so /%{_lib}/libc.so.6
217
218 %preun asan
219 ln -s --force /%{_lib}/libc-2.24.so /%{_lib}/libc.so.6
220
221 %endif
222 }
223
224 %prep
225 %setup -n glibc-%{version} -q 
226 cp %{SOURCE1001} .
227
228 %build
229 %{?asan:%gcc_unforce_options}
230 if [ -x /bin/uname.bin ]; then
231         /bin/uname.bin -a
232 else
233         uname -a
234 fi
235 uptime || :
236 ulimit -a
237 nice
238 # We do not want configure to figure out the system its building one
239 # to support a common ground and thus set build and host to the
240 # target_cpu.
241 %ifarch %arm
242 %define target %{_target_cpu}-tizen-linux-gnueabi
243 %else
244 %define target %{_target_cpu}-tizen-linux
245 %endif
246 # Don't use as-needed, it breaks glibc assumptions
247 # Before enabling it, run the testsuite and verify that it
248 # passes completely
249 export LD_AS_NEEDED=0
250 # Adjust glibc version.h
251 echo "#define CONFHOST \"%{target}\"" >> version.h
252 echo "#define GITID \"%{git_id}\"" >> version.h
253 #
254 # Default CFLAGS and Compiler
255 #
256 BuildFlags=$(echo %{optflags} | sed -e "s/-Wp,-D_FORTIFY_SOURCE=2//g" | sed -e "s/-ffast-math//" | sed -e "s/atom/i686/g" | sed -e "s/-fexceptions//" | sed -e "s/-fno-omit-frame-pointer//" )
257 BuildFlags="$BuildFlags -O2 -g -U_FORTIFY_SOURCE"
258 BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=[0-9]*##')"
259 BuildFlags="$(echo $BuildFlags | sed -e 's/-Wa,-mimplicit-it=thumb//g' | sed -e 's/-mthumb//g')"
260 # Turn off all -Wformat enable flags as there are glibc tests that explicitly
261 # append -Wno-format and with enabled Wformat options that produced warnings
262 # that turns into errors. Remove -Wformat=1|2 or -Wformat-..-arg
263 BuildFlags="$(echo $BuildFlags | sed -re 's/-Wformat((=[1-2])|((-\w+)+))?(\s|$)//g')"
264
265 BuildCC="%__cc"
266 BuildCCplus="%__cxx"
267 add_ons=",libidn"
268
269 BuildFlags="$BuildFlags -g"
270 %if %{disable_assert}
271         BuildFlags="$BuildFlags -DNDEBUG=1"
272 %endif
273 %ifarch %ix86
274         add_ons=$add_ons
275 %endif
276 %ifarch %arm aarch64
277         add_ons=$add_ons
278 %endif
279 %ifarch mipsel
280         # fails to build otherwise - need to recheck and fix
281         %define enable_stackguard_randomization 0
282 %endif
283
284 configure_and_build_glibc() {
285         local dirname="$1"; shift
286         local cflags="$1"; shift
287         local addons="$1"; shift
288         mkdir "cc-$dirname"
289         cd "cc-$dirname"
290         conf_cflags="$cflags -funwind-tables -fPIC"
291         %{?asan: conf_cflags="$conf_cflags -DASAN_INIT_FIRST "}
292
293         profile="--disable-profile"
294 %if %{build_profile}
295         if [ "$dirname" = "base" ] ; then
296             profile="--enable-profile"
297         fi
298 %endif
299         CFLAGS="$conf_cflags" BUILD_CFLAGS="$conf_cflags" \
300         CC="$BuildCC" CXX="$BuildCCplus"  ../configure \
301                 --prefix=%{_prefix} \
302                 --libexecdir=%{_libexecdir} --infodir=%{_infodir} \
303                 --enable-add-ons=$addons \
304                 $profile \
305                 "$@" \
306 %if %{enable_stackguard_randomization}
307                 --enable-stackguard-randomization \
308 %endif
309                 --build=%{target} --host=%{target} \
310 %ifnarch %{multiarcharches}
311                 --disable-multi-arch \
312 %endif
313 %ifarch %{ix86} x86_64 
314                 --disable-mathvec \
315 %endif
316                 --enable-kernel=%{enablekernel} \
317                 --enable-bind-now  --enable-obsolete-rpc \
318                 --disable-nscd \
319                 --disable-experimental-malloc \
320                 libc_cv_pie_default=yes
321         # explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
322         make %{?_smp_mflags} #CFLAGS="$cflags" BUILD_CFLAGS="$cflags"
323         cd ..
324 }
325
326 configure_flags="--prefix=/usr --without-cvs --without-selinux --enable-stackguard-randomization --enable-obsolete-rpc --disable-mathvec"
327
328 configure_flags="$configure_flags --disable-sanity-checks"
329
330 build_asan() {
331   HERE=%{_builddir}/%{name}-%{version}
332   J=${J:-32}
333   GLIBC=$HERE
334   ASAN_BUILD=$HERE/asan-build
335   unset CXXFLAGS
336   unset CFLAGS
337   unset LDFLAGS
338   #chmod +x $HERE/asan-glibc-gcc-wrapper.py
339   #build static wrapper, because we don't want asan to intercept allocators
340   g++ -o gcc-wrapper gcc-wrapper.cc -O3 -funroll-loops -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-exceptions -static
341
342   rm -rf $ASAN_BUILD
343   mkdir -p $ASAN_BUILD
344   cd $ASAN_BUILD
345 #  CC=$HERE/asan-glibc-gcc-wrapper.py $GLIBC/configure $configure_flags
346   CC=$HERE/gcc-wrapper $GLIBC/configure $configure_flags
347
348   # Quick build - builds only libraries, but does not create symlinks.
349   make -r -j $J -C $GLIBC objdir=`pwd` subdir_lib
350   #make -r -j $J -C $GLIBC objdir=`pwd` install_root=$ASAN_INST install-lib
351   cd $HERE
352 }
353
354         #
355         # Build base glibc
356         #
357         configure_and_build_glibc base "$BuildFlags" "$add_ons"
358
359 %{?asan:
360 %ifarch %{asan_arch}
361 build_asan
362 %endif
363 }
364 #
365 # Build html documentation
366 #
367 %if %{build_html}
368 make -C cc-base html
369 %endif
370
371 #
372 # Build glibc_post_upgrade binary
373 #
374 $BuildCC -static %{optflags} -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
375      -Lcc-base -Bcc-base/csu \
376     '-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
377     '-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_libdir}/gconv"'
378
379
380 #######################################################################
381 ###
382 ### CHECK
383 ###
384 #######################################################################
385
386 %check
387 # The testsuite will fail if asneeded is used
388 export LD_AS_NEEDED=0
389 # This has to pass on all platforms!
390 # Exceptions:
391 # None!
392 make %{?_smp_mflags} -C cc-base check-abi
393
394 #######################################################################
395 ###
396 ### INSTALL
397 ###
398 #######################################################################
399
400 %install
401 # We don't want to strip the .symtab from our libraries in find-debuginfo.sh,
402 # certainly not from libpthread.so.* because it is used by libthread_db to find
403 # some non-exported symbols in order to detect if threading support
404 # should be enabled.  These symbols are _not_ exported, and we can't easily
405 # export them retroactively without changing the ABI.  So we have to
406 # continue to "export" them via .symtab, instead of .dynsym :-(
407 # But we also want to keep .symtab and .strtab of other libraries since some
408 # debugging tools currently require these sections directly inside the main
409 # files - specifically valgrind and PurifyPlus.
410 export STRIP_KEEP_SYMTAB=*.so*
411
412 # Make sure we will create the gconv-modules.cache
413 mkdir -p %{buildroot}%{_libdir}/gconv
414 touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
415
416 # Install base glibc
417 make %{?_smp_mflags} install_root=%{buildroot} install -C cc-base
418
419 install_optimized_variant() {
420         local dirname="$1"; shift
421         local subdir="$1"; shift
422         local subdir_up="$1"; shift
423
424 cd "cc-$dirname"
425 destdir=$RPM_BUILD_ROOT/%{_lib}/$subdir
426 mkdir -p $destdir
427 # Don't run a complete make install, we know which libraries
428 # we want
429 for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
430 do
431   libbase=${lib#*/}
432   libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
433   # Only install if different from base lib
434   if cmp -s ${lib}.so ../cc-base/${lib}.so; then
435     ln -sf $subdir_up/$libbaseso $destdir/$libbaseso
436   else
437     cp -a ${lib}.so $destdir/$libbaseso
438   fi
439   # Emulate ldconfig
440   ln -sf $libbaseso $destdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
441 done
442 cd ..
443 }
444
445
446 # Install locales
447 %if %{build_locales}
448         # XXX Do not install locales in parallel!
449         cd cc-base
450         # localedef creates hardlinks to other locales if possible
451         # this will not work if we generate them in parallel.
452         # thus we need to run fdupes on  /usr/lib/locale/
453         # Still, on my system this is a speed advantage:
454         # non-parallel build for install-locales: 9:34mins
455         # parallel build with fdupes: 7:08mins
456         make %{?_smp_mflags} install_root=%{buildroot} localedata/install-locales
457         %fdupes %{buildroot}/usr/lib/locale
458         cd ..
459 %endif
460 # Create file list for glibc-locale package
461 %{find_lang} libc
462
463 # Prepare obsolete/, used only on some architectures:
464 export RPM_BUILD_ROOT
465 %ifarch %ix86
466 mkdir -p %{buildroot}/%{_lib}/obsolete
467 %endif
468
469 # NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
470 # the generic one (RH#162634)
471 # cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
472
473
474 # Miscelanna:
475
476 install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
477
478 install -m 644 %{SOURCE7} %{buildroot}/etc
479 install -m 644 %{SOURCE5} %{buildroot}/etc
480 install -m 644 posix/gai.conf %{buildroot}/etc
481
482 mkdir -p %{buildroot}/etc/default
483 install -m 644 nis/nss %{buildroot}/etc/default/
484
485 mkdir -p %{buildroot}%{_includedir}/resolv
486 install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
487 install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
488
489 %if %{build_html}
490 mkdir -p %{buildroot}%{_datadir}/doc/glibc
491 cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
492 %endif
493
494
495 #
496 # Create ld.so.conf
497 #
498 cat > %{buildroot}/etc/ld.so.conf <<EOF
499 %if "%{_lib}" == "lib64"
500 /usr/local/lib64
501 %endif
502 /usr/local/lib
503 include /etc/ld.so.conf.d/*.conf
504 # /lib64, /lib, /usr/lib64 and /usr/lib gets added
505 # automatically by ldconfig after parsing this file.
506 # So, they do not need to be listed.
507 EOF
508 # Add ldconfig cache directory for directory ownership
509 mkdir -p %{buildroot}/var/cache/ldconfig
510 # Empty the ld.so.cache:
511 rm -f %{buildroot}/etc/ld.so.cache
512 touch %{buildroot}/etc/ld.so.cache
513
514 # Don't look at ldd! We don't wish a /bin/sh requires
515 chmod 644 %{buildroot}%{_bindir}/ldd
516
517 # Remove timezone data, now coming in standalone package:
518 for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
519         rm -f %{buildroot}/$i
520 done
521 rm -rf %{buildroot}%{_datadir}/zoneinfo
522
523 %ifarch armv7hl
524 # Provide compatibility link
525 ln -s ld-%{glibc_major_version}.so %{buildroot}/lib/ld-linux.so.3
526 %endif
527
528 # Move getconf to %{_libexecdir}/getconf/ to avoid cross device link
529 mv %{buildroot}%{_bindir}/getconf %{buildroot}%{_libexecdir}/getconf/getconf
530 ln -s %{_libexecdir}/getconf/getconf %{buildroot}%{_bindir}/getconf
531
532 #######################################################################
533 ###
534 ### ...
535 ###
536 #######################################################################
537
538 %{?asan:
539 %ifarch %{asan_arch}
540 HERE=%{_builddir}/%{name}-%{version}
541 GLIBC=$HERE
542 ASAN_BUILD=$HERE/asan-build
543 cp $ASAN_BUILD/libc.so %{buildroot}/%{_lib}/libc-2.24-asan.so
544 %endif
545 }
546
547 %post -p %{_sbindir}/glibc_post_upgrade
548
549 %postun -p /sbin/ldconfig
550
551 %post locale
552 for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do
553         [ -d "$l.d" ] || continue
554         echo "###X# The following is autogenerated from extra files in the .d directory:" >>"$l"
555         cat "$l.d"/* >>"$l"
556 done
557 /usr/sbin/iconvconfig
558
559 %post info
560 %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
561
562 %postun info
563 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
564
565 %files
566 %manifest %{name}.manifest
567 # glibc
568 %defattr(-,root,root)
569 %license LICENSES COPYING COPYING.LIB
570 %config(noreplace) /etc/bindresvport.blacklist
571 %config /etc/ld.so.conf
572 %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
573 %config(noreplace) /etc/rpc
574 %verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
575 %verify(not md5 size mtime) %config(noreplace) /etc/gai.conf
576 %config(noreplace) /etc/default/nss
577 /%{_lib}/ld-%{glibc_major_version}.so
578
579 # Each architecture has a different name for the dynamic linker:
580 %ifarch %arm
581 %ifarch armv7hl
582 /%{_lib}/ld-linux-armhf.so.3
583 # Keep compatibility link
584 /%{_lib}/ld-linux.so.3
585 %else
586 /%{_lib}/ld-linux.so.3
587 %endif
588 %endif
589 %ifarch x86_64
590 /%{_lib}/ld-linux-x86-64.so.2
591 %endif
592 %ifarch %ix86 %sparc
593 /%{_lib}/ld-linux.so.2
594 %endif
595 %ifarch aarch64
596 /lib/ld-linux-aarch64.so.1
597 /%{_lib}/ld-linux-aarch64.so.1
598 %endif
599
600 /%{_lib}/libanl-%{glibc_major_version}.so
601 /%{_lib}/libanl.so.1
602 /%{_lib}/libc-%{glibc_major_version}.so
603 /%{_lib}/libc.so.6*
604 /%{_lib}/libcidn-%{glibc_major_version}.so
605 /%{_lib}/libcidn.so.1
606 /%{_lib}/libcrypt-%{glibc_major_version}.so
607 /%{_lib}/libcrypt.so.1
608 /%{_lib}/libdl-%{glibc_major_version}.so
609 /%{_lib}/libdl.so.2*
610 /%{_lib}/libm-%{glibc_major_version}.so
611 /%{_lib}/libm.so.6*
612 /%{_lib}/libnsl-%{glibc_major_version}.so
613 /%{_lib}/libnsl.so.1
614 /%{_lib}/libnss_compat-%{glibc_major_version}.so
615 /%{_lib}/libnss_compat.so.2
616 /%{_lib}/libnss_db-%{glibc_major_version}.so
617 /%{_lib}/libnss_db.so.2
618 /%{_lib}/libnss_dns-%{glibc_major_version}.so
619 /%{_lib}/libnss_dns.so.2
620 /%{_lib}/libnss_files-%{glibc_major_version}.so
621 /%{_lib}/libnss_files.so.2
622 /%{_lib}/libnss_optfiles-%{glibc_major_version}.so
623 /%{_lib}/libnss_optfiles.so.2
624 /%{_lib}/libnss_hesiod-%{glibc_major_version}.so
625 /%{_lib}/libnss_hesiod.so.2
626 /%{_lib}/libnss_nis-%{glibc_major_version}.so
627 /%{_lib}/libnss_nis.so.2
628 /%{_lib}/libnss_nisplus-%{glibc_major_version}.so
629 /%{_lib}/libnss_nisplus.so.2
630 /%{_lib}/libpthread-%{glibc_major_version}.so
631 /%{_lib}/libpthread.so.0
632 /%{_lib}/libthread_db-1.0.so
633 /%{_lib}/libthread_db.so.1
634 /%{_lib}/libresolv-%{glibc_major_version}.so
635 /%{_lib}/libresolv.so.2
636 /%{_lib}/librt-%{glibc_major_version}.so
637 /%{_lib}/librt.so.1
638 /%{_lib}/libutil-%{glibc_major_version}.so
639 /%{_lib}/libutil.so.1
640 %define optimized_libs() \
641         %dir %attr(0755,root,root) /%{_lib}/%1\
642         /%{_lib}/%1/libc-%{glibc_major_version}.so\
643         /%{_lib}/%1/libc.so.6*\
644         /%{_lib}/%1/libm-%{glibc_major_version}.so\
645         /%{_lib}/%1/libm.so.6*\
646         /%{_lib}/%1/libpthread-%{glibc_major_version}.so\
647         /%{_lib}/%1/libpthread.so.0\
648         /%{_lib}/%1/librt-%{glibc_major_version}.so\
649         /%{_lib}/%1/librt.so.1\
650         /%{_lib}/%1/libthread_db-1.0.so\
651         /%{_lib}/%1/libthread_db.so.1
652
653 %dir %attr(0700,root,root) /var/cache/ldconfig
654 /sbin/ldconfig
655 %{_bindir}/gencat
656 %{_bindir}/getconf
657 %{_bindir}/getent
658 %{_bindir}/iconv
659 %attr(755,root,root) %{_bindir}/ldd
660 %ifarch %ix86 sparc sparcv9
661         %{_bindir}/lddlibc4
662 %endif
663 %{_bindir}/locale
664 %{_bindir}/localedef
665 %dir %attr(0755,root,root) %{_libexecdir}/getconf
666 %{_libexecdir}/getconf/*
667 %{_sbindir}/glibc_post_upgrade
668 %{_sbindir}/iconvconfig
669 /%{_lib}/libBrokenLocale-%{glibc_major_version}.so
670 /%{_lib}/libBrokenLocale.so.1
671
672 %ifarch %ix86
673
674 %files obsolete
675 %manifest %{name}.manifest
676 %license COPYING.LIB
677 %defattr (755,root,root,755)
678 %dir /%{_lib}/obsolete/
679         #%dir /%{_lib}/obsolete/noversion
680         #/%{_lib}/obsolete/noversion/libNoVersion-%{glibc_major_version}.so
681         #/%{_lib}/obsolete/noversion/libNoVersion.so.1
682 %endif
683
684 %files locale -f libc.lang
685 %manifest %{name}.manifest
686 %license COPYING COPYING.LIB
687 %defattr(-,root,root)
688 %{_datadir}/locale/locale.alias
689 %if %{build_locales}
690 /usr/lib/locale/*
691 %endif
692 %{_libdir}/gconv
693
694 %{?asan:
695 %ifarch %{asan_arch}
696 %files asan
697 %manifest %{name}.manifest
698 /%{_lib}/libc-2.24-asan.so
699 %endif
700 }
701
702 %files devel
703 %manifest %{name}.manifest
704 %defattr(-,root,root)
705 %license COPYING COPYING.LIB 
706 %doc NEWS README BUGS CONFORMANCE
707 %{_bindir}/rpcgen
708 %{_includedir}/*
709 %{_libdir}/*.o
710 %{_libdir}/*.so
711 # These static libraries are needed even for shared builds
712 %{_libdir}/libc_nonshared.a
713 %{_libdir}/libg.a
714 %{_libdir}/libieee.a
715 %ifarch ppc ppc64 s390 s390x sparc sparcv8 sparcv9 sparcv9v
716 # This is not built on sparc64.
717         %{_libdir}/libnldbl_nonshared.a
718 %endif
719 %{_libdir}/libmcheck.a
720 %{_libdir}/libpthread_nonshared.a
721 %{_libdir}/librpcsvc.a
722
723 %files devel-static
724 %manifest %{name}.manifest
725 %defattr(-,root,root)
726 %{_libdir}/libBrokenLocale.a
727 %{_libdir}/libanl.a
728 %{_libdir}/libc.a
729 %{_libdir}/libcrypt.a
730 %{_libdir}/libdl.a
731 %{_libdir}/libm.a
732 %{_libdir}/libnsl.a
733 %{_libdir}/libpthread.a
734 %{_libdir}/libresolv.a
735 %{_libdir}/librt.a
736 %{_libdir}/libutil.a
737
738 %files info
739 %manifest %{name}.manifest
740 %defattr(-,root,root)
741 %doc %{_infodir}/libc.info.gz
742 %doc %{_infodir}/libc.info-?.gz
743 %doc %{_infodir}/libc.info-??.gz
744
745 %if %{build_html}
746 %files html
747 %manifest %{name}.manifest
748 %defattr(-,root,root)
749 %doc %{_prefix}/share/doc/glibc
750 %endif
751
752 %files i18ndata
753 %manifest %{name}.manifest
754 %defattr(-,root,root)
755 %{_prefix}/share/i18n
756
757 %if %{build_profile}
758 %files profile
759 %manifest %{name}.manifest
760 %license COPYING COPYING.LIB
761 %defattr(-,root,root)
762 %{_libdir}/libc_p.a
763 %{_libdir}/libBrokenLocale_p.a
764 %{_libdir}/libanl_p.a
765 %{_libdir}/libm_p.a
766 %{_libdir}/libcrypt_p.a
767 %{_libdir}/libpthread_p.a
768 %{_libdir}/libresolv_p.a
769 %{_libdir}/libnsl_p.a
770 %{_libdir}/librt_p.a
771 %{_libdir}/librpcsvc_p.a
772 %{_libdir}/libutil_p.a
773 %{_libdir}/libdl_p.a
774 %endif
775
776 %files devel-utils
777 %manifest %{name}.manifest
778 %defattr(-,root,root)
779 /%{_lib}/libmemusage.so
780 /%{_lib}/libpcprofile.so
781 /%{_libdir}/libBrokenLocale.so
782 /%{_lib}/libSegFault.so
783 /%{_lib}/libthread_db-1.0.so
784 /%{_lib}/libthread_db.so.1
785 /%{_libdir}/libthread_db.so
786 %dir /%{_libdir}/audit
787 /%{_libdir}/audit/sotruss-lib.so
788 # These need gd-devel for building
789 # %%{_bindir}/memusage
790 # %%{_bindir}/memusagestat
791 %{_bindir}/mtrace
792 %{_bindir}/pcprofiledump
793 %{_bindir}/sotruss
794 %{_bindir}/xtrace
795 %{_bindir}/pldd
796 %{_bindir}/catchsegv
797 %{_bindir}/sprof
798
799 %files extra
800 %manifest %{name}.manifest
801 %license COPYING.LIB
802 %defattr(-,root,root)
803 %{_bindir}/makedb
804 /var/db/Makefile
805
806
807 %docs_package