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