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