resetting manifest requested domain to floor
[platform/upstream/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 #
16
17 # Run with osc --with=fast_build to have a shorter turnaround
18 # It will avoid building some parts of glibc
19 %bcond_with    fast_build
20
21 %define crypt_bf_version 1.2
22
23 Name:           glibc
24 %define testsuite_build ("%{name}" == "glibc-testsuite")
25 Summary:        Standard Shared Libraries (from the GNU C Library)
26 License:        LGPL-2.1+ and SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
27 Group:          Base/Libraries
28 BuildRequires:  fdupes
29 BuildRequires:  makeinfo
30 BuildRequires:  xz
31 BuildRequires:  gcc-c++
32 BuildRequires:  gettext-tools
33 BuildRequires:  libstdc++-devel
34 #BuildRequires:  pkgconfig(systemd)
35
36 %define _filter_GLIBC_PRIVATE 1
37 %if %_target_cpu == "i686"
38 # For i686 let's only build what's different from i586, so
39 # no need to build documentation
40 %define build_profile 1
41 %define build_locales 1
42 %define build_html 0
43 %else
44 %if %{with fast_build}
45 %define build_profile 0
46 %define build_locales 0
47 %define build_html 0
48 %else
49 # Default:
50 %define build_profile 1
51 %define build_locales 1
52 %define build_html 1
53 %endif
54 %endif
55
56 %define disable_assert 0
57 %define enable_stackguard_randomization 1
58
59
60 %ifarch x86_64
61 %define enablekernel 2.6.16
62 %else
63 %define enablekernel 2.6.16
64 %endif
65 Conflicts:      kernel < %{enablekernel}
66 %ifarch armv7l armv7hl
67 # The old runtime linker link gets not provided by rpm find.provides, but it exists
68 Provides:       ld-linux.so.3
69 Provides:       ld-linux.so.3(GLIBC_2.4)
70 %endif
71 Version:        2.17
72 Release:        0
73 %define glibc_major_version 2.17
74 %define git_id c758a6861537
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 Source20:       nscd.conf
84 Source21:       nscd.service
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 Group:          Base/Libraries
134 Requires(post): /usr/bin/cat
135 Requires:       glibc = %{version}
136
137 %description locale
138 Locale data for the internationalisation features of the GNU C library.
139
140 %package -n nscd
141 Summary:        Name Service Caching Daemon
142 License:        GPL-2.0+
143 Group:          System/Services
144 Provides:       glibc:/usr/sbin/nscd
145 Requires:       glibc = %{version}
146
147 %description -n nscd
148 Nscd caches name service lookups and can dramatically improve
149 performance with NIS, NIS+, and LDAP.
150
151 %package profile
152 Summary:        Libc Profiling and Debugging Versions
153 License:        LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
154 Group:          Development/Libraries
155 Requires:       glibc = %{version}
156
157 %description profile
158 This package contains special versions of the GNU C library which are
159 necessary for profiling and debugging.
160
161 %package devel
162 Summary:        Include Files and Libraries Mandatory for Development
163 License:        BSD-3-Clause and LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
164 Group:          Development/Libraries
165 Requires:       glibc = %{version}
166 Requires:       linux-kernel-headers
167
168 %description devel
169 These libraries are needed to develop programs which use the standard C
170 library.
171
172 %package devel-static
173 Summary:        C library static libraries for -static linking
174 License:        BSD-3-Clause and LGPL-2.1+ and SUSE-LGPL-2.1+-with-GCC-exception and GPL-2.0+
175 Group:          Development/Libraries
176 Requires:       %{name}-devel = %{version}
177 # Provide Fedora name for package to make packaging easier
178 Provides:       %{name}-static = %version
179
180 %description devel-static
181 The glibc-devel-static package contains the C library static libraries
182 for -static linking.  You don't need these, unless you link statically,
183 which is highly discouraged.
184
185 %package utils
186 Summary:        Development utilities from GNU C library
187 License:        LGPL-2.1+
188 Group:          Development/Languages
189 Requires:       glibc = %{version}
190
191 %description utils
192 The glibc-utils package contains mtrace, a memory leak tracer and
193 xtrace, a function call tracer which can be helpful during program
194 debugging.
195
196 If you are unsure if you need this, don't install this package.
197
198 %package extra
199 Summary:        Extra binaries from GNU C Library
200 License:        LGPL-2.1+
201 Group:          Development/Languages
202 Requires:       glibc = %{version}
203
204 %description extra
205 The glibc-extra package contains some extra binaries for glibc that
206 are not essential but recommend to use.
207
208 makedb: A program to create a database for nss
209
210 %package obsolete
211 Summary:        Obsolete Shared Libraries from the GNU C Library
212 License:        LGPL-2.0+
213 Group:          System/Libraries
214 Requires:       glibc = %{version}
215
216 %description obsolete
217 This package provides some old libraries from the GNU C Library which
218 are no longer supported. Additional it provides a compatibility library
219 for old binaries linked against glibc 2.0.
220
221 Install this package if you need one of this libraries to get old
222 binaries working, but since this libraries are not supported and there
223 is no gurantee that they work for you, you should try to get newer
224 versions of your software.
225
226 %prep
227 %setup -n glibc-%{version} -q 
228 cp %{SOURCE1001} .
229
230 %build
231 if [ -x /bin/uname.bin ]; then
232         /bin/uname.bin -a
233 else
234         uname -a
235 fi
236 uptime || :
237 ulimit -a
238 nice
239 # We do not want configure to figure out the system its building one
240 # to support a common ground and thus set build and host to the
241 # target_cpu.
242 %ifarch %arm
243 %define target %{_target_cpu}-tizen-linux-gnueabi
244 %else
245 %define target %{_target_cpu}-tizen-linux
246 %endif
247 # Don't use as-needed, it breaks glibc assumptions
248 # Before enabling it, run the testsuite and verify that it
249 # passes completely
250 export LD_AS_NEEDED=0
251 # Adjust glibc version.h
252 echo "#define CONFHOST \"%{target}\"" >> version.h
253 echo "#define GITID \"%{git_id}\"" >> version.h
254 #
255 # Default CFLAGS and Compiler
256 #
257 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//" )
258 BuildFlags="$BuildFlags -O2 -g -U_FORTIFY_SOURCE"
259 BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=[0-9]*##')"
260 BuildCC="%__cc"
261 BuildCCplus="%__cxx"
262 add_ons=",libidn"
263
264
265 BuildFlags="$BuildFlags -g"
266 %if %{disable_assert}
267         BuildFlags="$BuildFlags -DNDEBUG=1"
268 %endif
269 %ifarch %ix86
270         add_ons=$add_ons
271 %endif
272 %ifarch %arm 
273         add_ons=$add_ons,ports
274 %endif
275 %ifarch %arm
276         # fails to build otherwise - need to recheck and fix
277         %define enable_stackguard_randomization 0
278 %endif
279
280 configure_and_build_glibc() {
281         local dirname="$1"; shift
282         local cflags="$1"; shift
283         local addons="$1"; shift
284         mkdir "cc-$dirname"
285         cd "cc-$dirname"
286 %ifarch %arm
287         # remove asynchronous-unwind-tables during configure as it causes
288         # some checks to fail spuriously on arm
289         conf_cflags="${cflags/-fasynchronous-unwind-tables/}"
290         conf_cflags="${conf_cflags/-funwind-tables/}"
291 %else
292         conf_cflags="$cflags"
293 %endif
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=nptl$addons \
306                 $profile \
307                 "$@" \
308 %if %{enable_stackguard_randomization}
309                 --enable-stackguard-randomization \
310 %endif
311                 --build=%{target} --host=%{target} \
312 %ifarch %{ix86} x86_64 
313                 --enable-multi-arch \
314 %endif
315                 --enable-kernel=%{enablekernel} \
316                 --enable-bind-now  --enable-obsolete-rpc
317         # explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
318         make %{?_smp_mflags} #CFLAGS="$cflags" BUILD_CFLAGS="$cflags"
319         cd ..
320 }
321
322         #
323         # Build base glibc
324         #
325         configure_and_build_glibc base "$BuildFlags" "$add_ons"
326
327 #
328 # Build html documentation
329 #
330 %if %{build_html}
331 make -C cc-base html
332 %endif
333
334 #
335 # Build glibc_post_upgrade binary
336 #
337 $BuildCC -static %{optflags} -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
338      -Lcc-base -Bcc-base/csu \
339     '-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
340     '-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_libdir}/gconv"'
341
342
343 #######################################################################
344 ###
345 ### CHECK
346 ###
347 #######################################################################
348
349 %check
350 # The testsuite will fail if asneeded is used
351 export LD_AS_NEEDED=0
352 %if %{testsuite_build}
353 # Increase timeout
354 export TIMEOUTFACTOR=16
355 %ifarch %ix86 x86_64
356         make %{?_smp_mflags} -C cc-base -k check || echo make check failed
357 %else
358         make %{?_smp_mflags} -C cc-base check
359 %endif
360 %endif
361 # This has to pass on all platforms!
362 # Exceptions:
363 # None!
364 make %{?_smp_mflags} -C cc-base check-abi
365
366 #######################################################################
367 ###
368 ### INSTALL
369 ###
370 #######################################################################
371
372 %install
373 %if !%{testsuite_build}
374 # We don't want to strip the .symtab from our libraries in find-debuginfo.sh,
375 # certainly not from libpthread.so.* because it is used by libthread_db to find
376 # some non-exported symbols in order to detect if threading support
377 # should be enabled.  These symbols are _not_ exported, and we can't easily
378 # export them retroactively without changing the ABI.  So we have to
379 # continue to "export" them via .symtab, instead of .dynsym :-(
380 # But we also want to keep .symtab and .strtab of other libraries since some
381 # debugging tools currently require these sections directly inside the main
382 # files - specifically valgrind and PurifyPlus.
383 export STRIP_KEEP_SYMTAB=*.so*
384
385 # Make sure we will create the gconv-modules.cache
386 mkdir -p %{buildroot}%{_libdir}/gconv
387 touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
388
389 # Install base glibc
390 make %{?_smp_mflags} install_root=%{buildroot} install -C cc-base
391
392 install_optimized_variant() {
393         local dirname="$1"; shift
394         local subdir="$1"; shift
395         local subdir_up="$1"; shift
396
397 cd "cc-$dirname"
398 destdir=$RPM_BUILD_ROOT/%{_lib}/$subdir
399 mkdir -p $destdir
400 # Don't run a complete make install, we know which libraries
401 # we want
402 for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
403 do
404   libbase=${lib#*/}
405   libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
406   # Only install if different from base lib
407   if cmp -s ${lib}.so ../cc-base/${lib}.so; then
408     ln -sf $subdir_up/$libbaseso $destdir/$libbaseso
409   else
410     cp -a ${lib}.so $destdir/$libbaseso
411   fi
412   # Emulate ldconfig
413   ln -sf $libbaseso $destdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
414 done
415 cd ..
416 }
417
418
419 # Install locales
420 %if %{build_locales}
421         # XXX Do not install locales in parallel!
422         cd cc-base
423         # localedef creates hardlinks to other locales if possible
424         # this will not work if we generate them in parallel.
425         # thus we need to run fdupes on  /usr/lib/locale/
426         # Still, on my system this is a speed advantage:
427         # non-parallel build for install-locales: 9:34mins
428         # parallel build with fdupes: 7:08mins
429         make %{?_smp_mflags} install_root=%{buildroot} localedata/install-locales
430         %fdupes %{buildroot}/usr/lib/locale
431         cd ..
432 %endif
433 # Create file list for glibc-locale package
434 %{find_lang} libc
435
436 # Prepare obsolete/, used only on some architectures:
437 export RPM_BUILD_ROOT
438 %ifarch %ix86
439 mkdir -p %{buildroot}/%{_lib}/obsolete
440 %endif
441
442 # NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
443 # the generic one (RH#162634)
444 cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
445
446
447 # Miscelanna:
448
449 install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
450
451 install -m 644 %{SOURCE7} %{buildroot}/etc
452 install -m 644 %{SOURCE5} %{buildroot}/etc
453 install -m 644 posix/gai.conf %{buildroot}/etc
454
455 mkdir -p %{buildroot}/etc/default
456 install -m 644 nis/nss %{buildroot}/etc/default/
457
458 mkdir -p %{buildroot}%{_includedir}/resolv
459 install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
460 install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
461
462 %if %{build_html}
463 mkdir -p %{buildroot}%{_datadir}/doc/glibc
464 cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
465 %endif
466
467
468 # nscd tools:
469
470 cp nscd/nscd.conf %{buildroot}/etc
471 mkdir -p %{buildroot}/etc/init.d
472 ln -sf /sbin/service %{buildroot}/usr/sbin/rcnscd
473 mkdir -p %{buildroot}/var/run/nscd
474 touch %{buildroot}/var/run/nscd/{passwd,group,hosts}
475 touch %{buildroot}/var/run/nscd/{socket,nscd.pid}
476
477 #
478 # Create ld.so.conf
479 #
480 cat > %{buildroot}/etc/ld.so.conf <<EOF
481 %ifarch x86_64
482 /usr/local/lib64
483 %endif
484 /usr/local/lib
485 include /etc/ld.so.conf.d/*.conf
486 # /lib64, /lib, /usr/lib64 and /usr/lib gets added
487 # automatically by ldconfig after parsing this file.
488 # So, they do not need to be listed.
489 EOF
490 # Add ldconfig cache directory for directory ownership
491 mkdir -p %{buildroot}/var/cache/ldconfig
492 # Empty the ld.so.cache:
493 rm -f %{buildroot}/etc/ld.so.cache
494 touch %{buildroot}/etc/ld.so.cache
495
496 # Don't look at ldd! We don't wish a /bin/sh requires
497 chmod 644 %{buildroot}%{_bindir}/ldd
498
499 # Remove timezone data, now coming in standalone package:
500 for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
501         rm -f %{buildroot}/$i
502 done
503 rm -rf %{buildroot}%{_datadir}/zoneinfo
504
505 # Remove the buildflags tracking section and the build-id
506 #for o in %{buildroot}/%{_libdir}/crt[1in].o %{buildroot}/%{_libdir}/lib*_nonshared.a; do
507 #       objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o
508 #done
509
510 mkdir -p %{buildroot}/usr/lib/tmpfiles.d/
511 install -m 644 %{SOURCE20} %{buildroot}/usr/lib/tmpfiles.d/
512 mkdir -p %{buildroot}/usr/lib/systemd/system
513 install -m 644 %{SOURCE21} %{buildroot}/usr/lib/systemd/system
514
515 %ifarch armv7l armv7hl
516 # Provide compatibility link
517 ln -s ld-%{glibc_major_version}.so %{buildroot}/lib/ld-linux.so.3
518 %endif
519
520 # Move getconf to %{_libexecdir}/getconf/ to avoid cross device link
521 mv %{buildroot}%{_bindir}/getconf %{buildroot}%{_libexecdir}/getconf/getconf
522 ln -s %{_libexecdir}/getconf/getconf %{buildroot}%{_bindir}/getconf
523 %endif # !%{testsuite_build}
524
525 #######################################################################
526 ###
527 ### ...
528 ###
529 #######################################################################
530
531 # Note: glibc_post_upgrade does:
532 # %%set_permissions %%{_libexecdir}/pt_chown
533 # since we cannot do it in our own post section
534
535 %post -p %{_sbindir}/glibc_post_upgrade
536
537 %if 0
538 # Enabling the following lines will generate a 
539 # requires on /bin/sh but glibc should not require any other binary
540 # packages. Therefore we do the change with the built-in lua:
541 # %%verifyscript
542 # %%verify_permissions -e %%{_libexecdir}/pt_chown
543 %endif
544
545 %verifyscript -p <lua>
546 os.execute("/usr/bin/chkstat -n --warn --system -e %{_libexecdir}/pt_chown")
547
548 %postun -p /sbin/ldconfig
549
550 %post locale
551 for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do
552         [ -d "$l.d" ] || continue
553         echo "###X# The following is autogenerated from extra files in the .d directory:" >>"$l"
554         cat "$l.d"/* >>"$l"
555 done
556 /usr/sbin/iconvconfig
557
558 %post info
559 %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
560
561 %postun info
562 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
563
564 %post -n nscd
565 mkdir -p /var/run/nscd
566 exit 0
567
568
569 %if !%{testsuite_build}
570 %files
571 %manifest %{name}.manifest
572 #######################################################################
573 ###
574 ### FILES
575 ###
576 #######################################################################
577
578 # glibc
579 %defattr(-,root,root)
580 %doc LICENSES
581 %config(noreplace) /etc/bindresvport.blacklist
582 %config /etc/ld.so.conf
583 %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
584 %config(noreplace) /etc/rpc
585 %verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
586 %verify(not md5 size mtime) %config(noreplace) /etc/gai.conf
587 %config(noreplace) /etc/default/nss
588 /%{_lib}/ld-%{glibc_major_version}.so
589
590 # Each architecture has a different name for the dynamic linker:
591 %ifarch %arm
592 %ifarch armv7l armv7hl
593 /%{_lib}/ld-linux-armhf.so.3
594 # Keep compatibility link
595 /%{_lib}/ld-linux.so.3
596 %else
597 /%{_lib}/ld-linux.so.3
598 %endif
599 %endif
600 %ifarch x86_64
601 /%{_lib}/ld-linux-x86-64.so.2
602 %endif
603 %ifarch %ix86 %sparc
604 /%{_lib}/ld-linux.so.2
605 %endif
606
607 /%{_lib}/libBrokenLocale-%{glibc_major_version}.so
608 /%{_lib}/libBrokenLocale.so.1
609 /%{_lib}/libSegFault.so
610 /%{_lib}/libanl-%{glibc_major_version}.so
611 /%{_lib}/libanl.so.1
612 /%{_lib}/libc-%{glibc_major_version}.so
613 /%{_lib}/libc.so.6*
614 /%{_lib}/libcidn-%{glibc_major_version}.so
615 /%{_lib}/libcidn.so.1
616 /%{_lib}/libcrypt-%{glibc_major_version}.so
617 /%{_lib}/libcrypt.so.1
618 /%{_lib}/libdl-%{glibc_major_version}.so
619 /%{_lib}/libdl.so.2*
620 /%{_lib}/libm-%{glibc_major_version}.so
621 /%{_lib}/libm.so.6*
622 /%{_lib}/libnsl-%{glibc_major_version}.so
623 /%{_lib}/libnsl.so.1
624 /%{_lib}/libnss_compat-%{glibc_major_version}.so
625 /%{_lib}/libnss_compat.so.2
626 /%{_lib}/libnss_db-%{glibc_major_version}.so
627 /%{_lib}/libnss_db.so.2
628 /%{_lib}/libnss_dns-%{glibc_major_version}.so
629 /%{_lib}/libnss_dns.so.2
630 /%{_lib}/libnss_files-%{glibc_major_version}.so
631 /%{_lib}/libnss_files.so.2
632 /%{_lib}/libnss_hesiod-%{glibc_major_version}.so
633 /%{_lib}/libnss_hesiod.so.2
634 /%{_lib}/libnss_nis-%{glibc_major_version}.so
635 /%{_lib}/libnss_nis.so.2
636 /%{_lib}/libnss_nisplus-%{glibc_major_version}.so
637 /%{_lib}/libnss_nisplus.so.2
638 /%{_lib}/libpthread-%{glibc_major_version}.so
639 /%{_lib}/libpthread.so.0
640 /%{_lib}/libresolv-%{glibc_major_version}.so
641 /%{_lib}/libresolv.so.2
642 /%{_lib}/librt-%{glibc_major_version}.so
643 /%{_lib}/librt.so.1
644 /%{_lib}/libthread_db-1.0.so
645 /%{_lib}/libthread_db.so.1
646 /%{_lib}/libutil-%{glibc_major_version}.so
647 /%{_lib}/libutil.so.1
648 %define optimized_libs() \
649         %dir %attr(0755,root,root) /%{_lib}/%1\
650         /%{_lib}/%1/libc-%{glibc_major_version}.so\
651         /%{_lib}/%1/libc.so.6*\
652         /%{_lib}/%1/libm-%{glibc_major_version}.so\
653         /%{_lib}/%1/libm.so.6*\
654         /%{_lib}/%1/libpthread-%{glibc_major_version}.so\
655         /%{_lib}/%1/libpthread.so.0\
656         /%{_lib}/%1/librt-%{glibc_major_version}.so\
657         /%{_lib}/%1/librt.so.1\
658         /%{_lib}/%1/libthread_db-1.0.so\
659         /%{_lib}/%1/libthread_db.so.1
660
661 %dir %attr(0700,root,root) /var/cache/ldconfig
662 /sbin/ldconfig
663 %{_bindir}/gencat
664 %{_bindir}/getconf
665 %{_bindir}/getent
666 %{_bindir}/iconv
667 %attr(755,root,root) %{_bindir}/ldd
668 %ifarch %ix86 sparc sparcv9
669         %{_bindir}/lddlibc4
670 %endif
671 %{_bindir}/locale
672 %{_bindir}/localedef
673 %verify(not mode caps) %attr(4755,root,root) %{_libexecdir}/pt_chown
674 %dir %attr(0755,root,root) %{_libexecdir}/getconf
675 %{_libexecdir}/getconf/*
676 %{_sbindir}/glibc_post_upgrade
677 %{_sbindir}/iconvconfig
678
679 %ifarch %ix86
680
681 %files obsolete
682 %manifest %{name}.manifest
683 %defattr (755,root,root,755)
684 %dir /%{_lib}/obsolete/
685         #%dir /%{_lib}/obsolete/noversion
686         #/%{_lib}/obsolete/noversion/libNoVersion-%{glibc_major_version}.so
687         #/%{_lib}/obsolete/noversion/libNoVersion.so.1
688 %endif
689
690 %files locale -f libc.lang
691 %manifest %{name}.manifest
692 %defattr(-,root,root)
693 %{_datadir}/locale/locale.alias
694 %if %{build_locales}
695 /usr/lib/locale/*
696 %endif
697 %{_libdir}/gconv
698
699 %files devel
700 %manifest %{name}.manifest
701 %defattr(-,root,root)
702 %doc COPYING COPYING.LIB NEWS README BUGS CONFORMANCE
703 %{_bindir}/catchsegv
704 %{_bindir}/rpcgen
705 %{_bindir}/sprof
706 %{_includedir}/*
707 %{_libdir}/*.o
708 %{_libdir}/*.so
709 # These static libraries are needed even for shared builds
710 %{_libdir}/libbsd-compat.a
711 %{_libdir}/libc_nonshared.a
712 %{_libdir}/libg.a
713 %{_libdir}/libieee.a
714 %ifarch ppc ppc64 s390 s390x sparc sparcv8 sparcv9 sparcv9v
715 # This is not built on sparc64.
716         %{_libdir}/libnldbl_nonshared.a
717 %endif
718 %{_libdir}/libmcheck.a
719 %{_libdir}/libpthread_nonshared.a
720 %{_libdir}/librpcsvc.a
721
722 %files devel-static
723 %manifest %{name}.manifest
724 %defattr(-,root,root)
725 %{_libdir}/libBrokenLocale.a
726 %{_libdir}/libanl.a
727 %{_libdir}/libc.a
728 %{_libdir}/libcrypt.a
729 %{_libdir}/libdl.a
730 %{_libdir}/libm.a
731 %{_libdir}/libnsl.a
732 %{_libdir}/libpthread.a
733 %{_libdir}/libresolv.a
734 %{_libdir}/librt.a
735 %{_libdir}/libutil.a
736
737 %files info
738 %manifest %{name}.manifest
739 %defattr(-,root,root)
740 %doc %{_infodir}/libc.info.gz
741 %doc %{_infodir}/libc.info-?.gz
742 %doc %{_infodir}/libc.info-??.gz
743
744 %if %{build_html}
745 %files html
746 %manifest %{name}.manifest
747 %defattr(-,root,root)
748 %doc %{_prefix}/share/doc/glibc
749 %endif
750
751 %files i18ndata
752 %manifest %{name}.manifest
753 %defattr(-,root,root)
754 %{_prefix}/share/i18n
755
756 %files -n nscd
757 %manifest %{name}.manifest
758 %defattr(-,root,root)
759 %config(noreplace) /etc/nscd.conf
760 %{_sbindir}/nscd
761 %{_sbindir}/rcnscd
762 /usr/lib/systemd/system/nscd.service
763 %dir /usr/lib/tmpfiles.d
764 /usr/lib/tmpfiles.d/nscd.conf
765 %dir %attr(0755,root,root) %ghost /var/run/nscd
766 %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
767 %attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
768 %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
769 %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
770 %attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
771
772 %if %{build_profile}
773 %files profile
774 %manifest %{name}.manifest
775 %defattr(-,root,root)
776 %{_libdir}/libc_p.a
777 %{_libdir}/libBrokenLocale_p.a
778 %{_libdir}/libanl_p.a
779 %{_libdir}/libm_p.a
780 %{_libdir}/libcrypt_p.a
781 %{_libdir}/libpthread_p.a
782 %{_libdir}/libresolv_p.a
783 %{_libdir}/libnsl_p.a
784 %{_libdir}/librt_p.a
785 %{_libdir}/librpcsvc_p.a
786 %{_libdir}/libutil_p.a
787 %{_libdir}/libdl_p.a
788 %endif
789
790 %files utils
791 %manifest %{name}.manifest
792 %defattr(-,root,root)
793 /%{_lib}/libmemusage.so
794 /%{_lib}/libpcprofile.so
795 %dir /%{_libdir}/audit
796 /%{_libdir}/audit/sotruss-lib.so
797 # These need gd-devel for building
798 # %%{_bindir}/memusage
799 # %%{_bindir}/memusagestat
800 %{_bindir}/mtrace
801 %{_bindir}/pcprofiledump
802 %{_bindir}/sotruss
803 %{_bindir}/xtrace
804 %{_bindir}/pldd
805
806 %files extra
807 %manifest %{name}.manifest
808 %defattr(-,root,root)
809 %{_bindir}/makedb
810 /var/lib/misc/Makefile
811
812 %endif # !%{testsuite_build}
813
814 %docs_package