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