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