Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37402151
en ru br
ALT Linux repositórios
S:2.38.0.23.0e1ef6779a-alt1
5.0: 2.9-alt5
4.1: 2.5.1-alt4.M41.2
4.0: 2.5-alt4.M40.2
3.0: 2.3.5-alt5

Outros repositórios

Group :: Sistema/Base
RPM: glibc

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Name: glibc
Version: 2.5
Release: alt4.M40.2
Serial: 6

Summary: The GNU libc libraries
License: LGPL
Group: System/Base
Url: http://www.gnu.org/software/libc/
Packager: Dmitry V. Levin <ldv at altlinux.org>

%def_with optimization
%def_disable archopt
%def_enable langify
%def_with tls
%def_with __thread

%ifdef __buildreqs
%def_disable check
%else
%def_enable check
%endif #__buildreqs

# Build arch-optimized subpackage only?

%if_enabled archopt

%define _optlevel 3
%def_disable profile
%def_without locales
%def_without debug

%else #disabled archopt

%def_enable profile
%def_with locales

%if %defined __buildreqs
%def_without debug
%else
%def_with debug
%endif #__buildreqs

%endif #disabled archopt

%define enablekernel 2.6.9

%define basever 2.5

Source0: ftp://ftp.gnu.org/gnu/glibc/glibc-%version-%release.tar
Source1: glibc-fedora-%version-%release.tar
Source2: glibc-helpers-%version-%release.tar

Source11: nscd.init
Source12: nsswitch.conf
Source13: bindresvport.blacklist
Source14: find-provides.sh
Source15: find-requires.sh
Source16: README.ALT

# CVS

Patch1: glibc-2.5-cvs-2_5-200701121824.patch
Patch2: glibc-2.5-cvs-20061013-fixes.patch

# FC

Patch101: glibc-fedora-alt.patch
Patch102: glibc-2.5-rh210130.patch
Patch103: glibc-2.5-rh-tzfile64.patch
Patch104: glibc-2.5-rh-memusage.patch

# SuSE

Patch201: glibc-2.5-suse-localedef-archive.patch
Patch202: glibc-2.3.90-suse-fnmatch.patch
Patch203: glibc-2.5-suse-bindresvport-blacklist.patch

# Debian

Patch251: glibc-2.3.4-deb-timing.patch

# ALT/Owl

Patch302: glibc-2.5-obsd-alt-strlcpy-strlcat.patch
Patch303: glibc-2.5-alt-texinfo.patch
Patch304: glibc-2.5-alt-pt_chown.patch
Patch305: glibc-2.3.5-alt-string2.patch
Patch306: glibc-2.5-alt-sys-mount.patch
Patch307: glibc-2.5-alt-getopt-optind.patch
Patch308: glibc-2.5-alt-tmpfile.patch
#Patch309: glibc-2.5-alt-fts-free-cleanup.patch
Patch310: glibc-2.5-alt-asprintf.patch
Patch311: glibc-2.5-alt-libio-bound.patch
Patch312: glibc-2.5-owl-alt-syslog-ident.patch
Patch313: glibc-2.5-mjt-owl-alt-syslog-timestamp.patch
Patch314: glibc-2.5-owl-alt-res_randomid.patch
Patch315: glibc-2.5-alt-crypt.patch
Patch316: glibc-2.5-alt-iconv_prog-replace.patch
Patch317: glibc-2.5-alt-versioning.patch
Patch318: glibc-2.5-alt-ldconfig-exit-during-install.patch
Patch319: glibc-2.5-alt-i18n.patch
Patch320: glibc-2.5-alt-relocate-helper-libs.patch
Patch321: glibc-2.5-alt-xtrace-xvt.patch
Patch322: glibc-2.5-owl-alt-ldd.patch
Patch323: glibc-2.5-alt-ldconfig-search_dir.patch
Patch324: glibc-2.5-alt-linux-dl-execstack.patch
Patch325: glibc-2.5-alt-assume_kernel.patch
Patch326: glibc-2.5-alt-libgd.patch
Patch327: glibc-2.5-alt-tmp-scripts.patch
Patch328: glibc-2.5-owl-rpcgen-cpp.patch
Patch329: glibc-2.5-owl-alt-resolv-QFIXEDSZ-underfills.patch
Patch330: glibc-2.5-owl-alt-sanitize-env.patch
Patch331: glibc-2.5-alt-__locale_getenv.patch
Patch332: glibc-2.5-alt-getconf.patch
Patch333: glibc-2.5-alt-nscd-path.patch
Patch334: glibc-2.5-alt-default_nss.patch

Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile, libc-headers,
Obsoletes: linuxthreads, gencat, ldconfig

%define libc_locales_list aa af am an ar as az be bg bn br bs byn ca cs csb cy da de dz el en es et eu fa fi fo fr fy ga gd gez gl gu gv he hi hr hsb hu hy id is it iw ja ka kk kl km kn ko ku kw ky lg lo lt lv mg mi mk ml mn mr ms mt nb ne nl nn no nr nso oc om or pa pl pt ro ru rw se si sid sk sl so sq sr ss st sv ta te tg th ti tig tl tn tr ts tt uk ur uz ve vi wa xh yi zh zu
%define libc_locales %(for i in %libc_locales_list;do echo -n "locale-$i locales-$i ";done)
%define renamed_locales ru_RU.iso88595 ru_UA.koi8u uk_UA.koi8u

PreReq: %name-core = %serial:%version-%release
PreReq: %name-nss = %serial:%version-%release
PreReq: %name-locales = %serial:%version-%release
PreReq: %name-gconv-modules = %serial:%version-%release
PreReq: iconv = %serial:%version-%release
PreReq: %name-timezones = %serial:%version-%release
PreReq: %name-utils = %serial:%version-%release

# Due to AS_NEEDED and --hash-style=gnu.

BuildPreReq: binutils >= 1:2.17.50.0.3-alt1

# Due to enablekernel.

BuildPreReq: glibc-kernheaders >= %enablekernel

BuildPreReq: rpm-build >= 4.0.4-alt61

# This is required for building auxiliary programs.

BuildPreReq: libgd2-devel

# g++ is requires for test suit.

BuildPreReq: gcc4.1-c++

%define _gconvdir %_libdir/gconv
%define __find_provides %_sourcedir/find-provides.sh
%define __find_requires %_sourcedir/find-requires.sh

%package preinstall
Summary: The GNU libc preinstall utilities
Group: System/Base
AutoReq: no
PreReq: filesystem
Provides: /sbin/glibc_preinstall

%package core
Summary: The GNU libc core libraries and utilities
Group: System/Libraries
AutoReq: no
PreReq: setup
PreReq: %name-preinstall >= %serial:%version-%release
Conflicts: %name < %serial:%version-%release
Conflicts: glibc-core-archopt < %serial:%version-%release
Conflicts: glibc-core-archopt > %serial:%version-%release
Provides: linuxthreads, ldconfig, /sbin/ldconfig, /sbin/post_ldconfig, /sbin/postun_ldconfig
Provides: /sbin/glibc_fix_nsswitch, /sbin/glibc_post_upgrade
# The dynamic linker supports DT_GNU_HASH
Provides: rtld(GNU_HASH)
Obsoletes: linuxthreads, ldconfig

%package nss
Summary: The GNU libc Name Service Switch subsystem
Group: System/Libraries
PreReq: %name-core = %serial:%version-%release
Conflicts: %name < %serial:%version-%release

%package locales
Summary: The GNU libc locales
Group: System/Internationalization
PreReq: %name-core = %serial:%version-%release
Provides: %name-locales-virtual = %serial:%version-%release
Provides: locale locales %libc_locales
Obsoletes: locale locales %libc_locales
Obsoletes: %name-locales-junior
Conflicts: %name < %serial:%version-%release

%package i18ndata
Summary: Files for building customized GNU libc locales
Group: System/Base
PreReq: %name-core = %serial:%version-%release
Obsoletes: %name-localedata
Provides: %name-localedata
Conflicts: %name < %serial:%version-%release
Conflicts: mutt < 1.3.22.1i

%package gconv-modules
Summary: The GNU libc charset conversion modules
Group: System/Base
PreReq: %name-core = %serial:%version-%release
Conflicts: %name < %serial:%version-%release
# hack
Provides: %(test %_lib = lib64 && s='()(64bit)' || s=; for n in CNS GB ISOIR165 JIS JISX0213 KSC; do echo -n "lib$n.so$s %_libdir/gconv/lib$n.so$s "; done)

%package -n iconv
Summary: The GNU libc charset conversion modules
Group: System/Base
PreReq: %name-core = %serial:%version-%release, %name-gconv-modules = %serial:%version-%release
Conflicts: %name < %serial:%version-%release
Provides: /usr/sbin/iconvconfig

%package timezones
Summary: The GNU libc timezones data
Group: System/Base
PreReq: %name-core = %serial:%version-%release
Conflicts: %name < %serial:%version-%release
Provides: zoneinfo
Obsoletes: zoneinfo

%package utils
Summary: The GNU libc misc utilities
Group: System/Base
PreReq: %name-core = %serial:%version-%release
Conflicts: %name < %serial:%version-%release
Requires: mktemp >= 1:1.3.1
Provides: gencat
Obsoletes: gencat

%package devel
Summary: Include and object files required for C development
Group: Development/C
Requires(post): %install_info
Requires(preun): %uninstall_info
Requires: %name = %serial:%version-%release, glibc-kernheaders >= 2.6.9, kernel-headers-common >= 1.1.4-alt1
Conflicts: texinfo < 3.11
%ifarch %ix86
# Earlier gcc's had atexit reference in crtendS.o, which does not
# work with this glibc where atexit is in libc_nonshared.a
Conflicts: gcc < 0:2.96-ipl9mdk
%endif
Obsoletes: libc-headers, libc-devel, linuxthreads-devel

%package devel-static
Summary: Static libraries for C development
Group: Development/C
Requires: %name-devel = %serial:%version-%release
Obsoletes: libc-static

%package profile
Summary: The GNU libc libraries, including support for gprof profiling
Group: Development/C
Requires: %name = %serial:%version-%release
Obsoletes: libc-profile

%package debug
Summary: The GNU libc utilities for software debugging
Group: Development/C
Requires: %name-devel = %serial:%version-%release
Obsoletes: libc-debug

%package core-debug
Summary: The GNU libc core libraries with debugging information
Group: Development/C
AutoProv: yes, nolib
Requires: %name-core = %serial:%version-%release

%package nss-debug
Summary: The GNU libc Name Service Switch libraries with debugging information
Group: Development/C
AutoProv: yes, nolib
Requires: %name-nss = %serial:%version-%release, %name-core-debug = %serial:%version-%release

%package devel-debug
Summary: Static standard C libraries with debugging information
Group: Development/C
AutoProv: yes, nolib
Requires: %name-devel = %serial:%version-%release, %name-core-debug = %serial:%version-%release, %name-nss-debug = %serial:%version-%release

%package -n nscd
Summary: A Name Service Caching Daemon (nscd)
Group: System/Servers
Conflicts: kernel < 2.2.0
PreReq: shadow-utils
Requires(post): %post_service
Requires(preun): %preun_service
PreReq: %name-core = %serial:%version-%release

%package core-%_target_cpu
Summary: The GNU libc core libraries built with optimization for %_target_cpu processor
Group: System/Libraries
PreReq: %name-core = %serial:%version-%release
Provides: %name-core-archopt = %serial:%version-%release

%description
The GNU C library defines all of the library functions that are specified
by the ISO C standard, as well as additional features specific to POSIX
and other derivatives of the Unix operating system, and extensions
specific to the GNU system.

The GNU libc is a set of standard libraries which are used by multiple
programs on the system.  In order to save disk space and memory, as well
as to make upgrading easier, common system code is kept in one place
and shared between programs.

%description preinstall
This package contains glibc preinstall utility.

%description core
This package contains most essential GNU libc libraries and files,
including dynamic linker and its configurator, standard C library and
the standard math library.  Without these files a GNU/Linux system will
not function.

%description locales
This package contains GNU libc locales, files that tell your system
about your language, names of days and months, charset, and other
language/territory/charset specific things.

%description i18ndata
This package contains source files required for building locales.  Locales
are files, that tell your system about your language, names of days and
months, alphabet and other language/territory/charset specific things.

%description gconv-modules
This package contains helper modules necessary to convert data between
various charsets.

%description -n iconv
This package contains program that can convert text files between
various charsets.

%description timezones
This package contains files, utilities and databases for operating
timezones data in the system.

%description utils
This package contains miscellaneous non-essential %name utilities that
didn't fit in specific packages.

%description nss
NSS is a Name Service Switch subsystem.  The basic idea is to put the
implementation of the different services offered to access the databases
in separate modules.

%description devel
This package contains the header and object files necessary for developing
programs which use the standard C libraries (which are used by nearly all
programs).  If you are developing programs which will use the standard
C libraries, your system needs to have these standard header and object
files available in order to create the executables.

%description devel-static
This package package contains the GNU libc static libraries necessary for
developing statically linked programs which use the standard C libraries.

%description profile
This package includes the GNU libc libraries and support for profiling
using the gprof program.  Profiling is analyzing a program's functions
to see how much CPU time they use and determining which functions are
calling other functions during execution.  To use gprof to profile a
program, your program needs to use the GNU libc libraries from this
package instead of the standard GNU libc libraries.

%description debug
This package contains utilities for software debugging,
including:
+ memusage
+ memusagestat
+ pcprofiledump
+ xtrace

%description core-debug
This package contains GNU libc core shared libraries with debugging
information.  You need this if you want to step into C library routines
during debugging.  To use these libraries, you need to set
LD_LIBRARY_PATH=%_libdir/debug
in your environment before starting debugger.  If you want to see glibc
source files during debugging, you should
rpm -i glibc-%version-%release.src.rpm
rpm -bp %%_specdir/glibc.spec

%description nss-debug
This package contains GNU libc NSS libraries with debugging information.
You need this if you want to step into C library routines during
debugging.  To use these libraries, you need to set
LD_LIBRARY_PATH=%_libdir/debug
in your environment before starting debugger.  If you want to see glibc
source files during debugging, you should
rpm -i glibc-%version-%release.src.rpm
rpm -bp %%_specdir/glibc.spec

%description devel-debug
This package contains GNU libc static libraries with debugging
information.  You need this only if you want to step into C library
routines during debugging programs statically linked against one or
more of the standard C libraries.  To use this debugging information,
you need to link binaries with -L%_libdir/debug compiler option.
If you want to see glibc source files during debugging, you should
rpm -i glibc-%version-%release.src.rpm
rpm -bp %%_specdir/glibc.spec

%description -n nscd
Nscd caches name service lookups and can dramatically improve performance
with NIS+, and may help with DNS as well.  Note that you can't use nscd
with 2.0 kernels because of bugs in the kernel-side thread support.
Unfortunately, nscd happens to hit these bugs particularly hard.

%description core-%_target_cpu
This package contains most essential GNU libc libraries, optimized for
run on %_target_cpu processor.

%prep
%setup -q -a1 -a2 -n %name-%version-%release

### CVS

# glibc-2_5-branch
%patch1 -p0

# HEAD

%patch2 -p0

### FC

# Usual glibc-fedora.patch
%patch101 -p0

# RH#210130

#%patch102 -p1

# Update from tzcode2006o.

%patch103 -p1

# Fix memusage.

%patch104 -p1

### SuSE

# Add new option --archive to localedef, change default to --no-archive.
%patch201 -p1

# Change fnmatch: if conversion to wide character fails, fall back to

# single byte matching.
%patch202 -p1

# Change bindresvport to ignore ports listed in /etc/bindresvport.blacklist file.

%patch203 -p1

### Debian

# Align rtld_global and rtld_global_ro sizes for using i686 optimized library.
%patch251 -p1

### ALT/Owl

# Import strlcpy/strlcat from OpenBSD.
%patch302 -p1

# Fix texinfo documentation according to ALT info policy.

%patch303 -p1

# Do not install pt_chown.

%patch304 -p1

# Fix -Wpointer-arith issue in string2.h

%patch305 -p1

# Update sys/mount.h MS_* flags from linux-2.6.17, fix for gcc -pedantic support.

%patch306 -p1

# Set proper optind when argc < 1.

%patch307 -p1

# Allow tmpfile(3) to use $TMPDIR.

%patch308 -p1

# Change asprintf/vasprintf error handling.

%patch310 -p1

# Check for potential integer overflow in fread*/fwrite*.

%patch311 -p1

# Don't blindly trust __progname for the syslog ident.

%patch312 -p1

# use ctime_r() instead of strftime_r() in syslog(3).

%patch313 -p1

# Improve res_randomid in the resolver.

%patch314 -p1

# Blowfish-crypt support (based on crypt_blowfish-1.0.1 by Solar Designer).

# Gensalt interface.
# Export UFC-crypt and MD5-crypt interface.
# Export MD5 library.
%patch315 -p1

# Add "--replace" option to iconv utility.

%patch316 -p1

# Export __libc_enable_secure.

%patch317 -p1

# Change ldconfig to exit during distribution install.

%patch318 -p1

# Support more ru_* locales.  Fix tt_RU.

%patch319 -p1

# Relocate helper libraries from /%_lib to %_libdir.

%patch320 -p1

# xtrace.sh: If `TERMINAL_PROG' is not set, set it to `xvt'.

%patch321 -p1

# ldd: Always execute traced object directly with dynamic linker.

%patch322 -p1

# ldconfig: Revert symlink handling changes in search_dir().

%patch323 -p1

# Fix mprotect return code handling in _dl_make_stack_executable().

%patch324 -p1

# Fix _dl_osversion_init(), _dl_non_dynamic_init() and

# dl_main() functions to not assume too old kernel version.
%patch325 -p1

# memusagestat: Fix linkage.

%patch326 -p1

# memusage, xtrace: Fix tmp file handling.

%patch327 -p1

# Avoid hardcoding of cpp binary, use execvp instead of execv.

%patch328 -p1

# Avoid potential reads beyond end of undersized DNS responses.

%patch329 -p1

# Sanitize the environment in a paranoid way.

%patch330 -p1

# Introduce and export __locale_getenv.

%patch331 -p1

# Introduce _CS_LIBDIR and _CS_SLIB to confstr and getconf.

%patch332 -p1

# Change persistent storage paths from /var/db to /var/lib.

%patch333 -p1

# Change /etc/default/nss to /etc/nss.conf.

%patch334 -p1

find -type f -name \*.orig -delete -print

install -pm644 %_sourcedir/README.ALT .

find -type f -name configure -print0 |
xargs -r0 touch --
touch locale/programs/*-kw.h

################################################################################

%build
%define buildtarget build-%_target

%if_without optimization
%define _optlevel %nil
%define optflags_optimization -O%_optlevel %optflags_debug
%if %undefined parallelmflags
%define parallelmflags %nil
%endif # parallelmflags
%else #with optimization

%if %undefined parallelmflags
%define parallelmflags -s
%endif # parallelmflags

%add_optflags -DNDEBUG=1 -U_FORTIFY_SOURCE -fno-stack-protector

%endif #without optimization

%define _configure_script ../configure
%define _configure_target  --host=%_target_platform --build=%_target_platform

# workaround

unset LD_PRELOAD LD_ASSUME_KERNEL ||:

export CC=%__cc CXX=%__cxx ac_cv_lib_audit_audit_log_avc=no

AddOns=`echo */configure |sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d'`

rm -rf %buildtarget
mkdir %buildtarget
pushd %buildtarget

Pthreads=nptl

%configure \
%{?_disable_profile:%_disable_profile} \
--without-cvs \
--enable-bind-now \
--enable-add-ons=$Pthreads$AddOns \
%{subst_with tls} \
%{subst_with __thread} \
--enable-kernel=%enablekernel \
#

%make_build -r PARALLELMFLAGS=%parallelmflags

%if_enabled check
# Increase timeouts
perl -pi -e 's/alarm \(TIMEOUT\)/alarm (TIMEOUT * 15 * '$NPROCS' < 600 ? TIMEOUT * 15 * '$NPROCS' : 600)/' \
../test-skeleton.c
%make_build -r PARALLELMFLAGS=%parallelmflags -k check LDFLAGS=-Wl,--no-as-needed ||:
%endif #enabled check

popd #%buildtarget

make -C %name-helpers-%version-%release enablekernel=%enablekernel

%if_with debug
rm -rf %buildtarget-debug
mkdir %buildtarget-debug
pushd %buildtarget-debug

export CFLAGS="%optflags %optflags_debug"
%configure \
--disable-profile \
--without-cvs \
--without-gd \
--enable-add-ons=$Pthreads$AddOns \
%{subst_with tls} \
%{subst_with __thread} \
--enable-kernel=%enablekernel \
#

%make_build -r PARALLELMFLAGS=%parallelmflags

popd #%buildtarget-debug
%endif #with debug

################################################################################

%install
[ -n "$NPROCS" ] || NPROCS=%__nprocs
%make_install -j$NPROCS install install_root=%buildroot -C %buildtarget

# Remove the files we don't want to distribute.

# ...

# Relocate shared libraries used by catchsegv, memusage and xtrace.

mv %buildroot/%_lib/lib{memusage,pcprofile,SegFault}.so \
%buildroot%_libdir/ ||:

%if_with debug
%make_install install install_root=%buildroot/debug -C %buildtarget-debug

# NPTL <bits/stdio-lock.h> is not usable outside of glibc,

# so include the generic one (RH#162634)
cp -a bits/stdio-lock.h %buildroot%_includedir/bits/stdio-lock.h
# And <bits/libc-lock.h> needs sanitizing as well.
cp -a fedora/libc-lock.h %buildroot%_includedir/bits/libc-lock.h

rm %buildroot/debug/%_lib/lib{memusage,pcprofile,SegFault}.so

/bin/ls -1 %buildroot/debug/%_lib/*.so* |
egrep -v '/%_lib/libnss_([^f]|files\.so\.1)' |
sed -e "s|%buildroot/debug/%_lib|%_libdir/debug|g" >core-debug.files

/bin/ls -1 %buildroot/debug/%_lib/*.so* |
fgrep nss |
fgrep -v /%_lib/libnss_files-%basever.so |
fgrep -v /%_lib/libnss_files.so.2 |
sed -e "s|%buildroot/debug/%_lib|%_libdir/debug|g" >nss-debug.files

/bin/ls -1 %buildroot/debug%_libdir/lib*.so |
sed -e "s|%buildroot/debug%_libdir|%_libdir/debug|g" >>devel-debug.files

mkdir -p %buildroot%_libdir/debug
mv %buildroot/debug/%_lib/* %buildroot/debug%_libdir/*.{so,a,o}* \
%buildroot%_libdir/debug/
rm -rf %buildroot/debug
for f in %buildroot%_libdir/debug/*.so; do
if [ -L "$f" ]; then
t=`readlink "$f"`
t=${t##*/}
ln -snf "$t" "$f"
fi
done
%endif #with debug

%if_enabled archopt

mkdir -p %buildroot/%_lib/%_target_cpu
mv %buildroot/%_lib/*.so* %buildroot/%_lib/%_target_cpu/

%else #disabled archopt

# Install upgrade programs.

make -C %name-helpers-%version-%release install

%if_with locales
pushd %buildtarget
%make_build install-locales -C ../localedata \
install_root=%buildroot \
objdir=`pwd`
popd

# Hardlink identical locale files together.

./%name-helpers-%version-%release/linkify -vc %buildroot%_libdir/locale

# Convert these locale directories into symlinks.

for n in %renamed_locales; do
t=%buildroot%_libdir/locale/"${n%%.*}"
rm -rf "$t"
ln -s "$n" "$t"
done
%endif #with locales

ln -sf libbsd-compat.a %buildroot%_libdir/libbsd.a

install -pD -m755 %_sourcedir/nscd.init %buildroot%_initdir/nscd
install -pD -m644 %_sourcedir/nsswitch.conf %buildroot%_sysconfdir/nsswitch.conf
install -pm644 nscd/nscd.conf %buildroot%_sysconfdir/
mkdir -pm711 %buildroot/var/{lib,run}/nscd
mksock %buildroot/var/run/nscd/socket

# Install nss.conf

install -pm644 nis/nss %buildroot%_sysconfdir/nss.conf

# Install gai.conf

install -pm644 posix/gai.conf %buildroot%_sysconfdir/

# Install bindresvport.blacklist

install -pm644 %_sourcedir/bindresvport.blacklist %buildroot%_sysconfdir/

# Include ld.so.conf and ld.so.conf.d

mkdir -p %buildroot%_sysconfdir/ld.so.conf.d
echo 'include /etc/ld.so.conf.d/*.conf' >%buildroot%_sysconfdir/ld.so.conf

# Include %%ghost ld.so.cache

install -pD -m644 /dev/null %buildroot%_sysconfdir/ld.so.cache

# Include gconv-modules.cache

install -pD -m644 /dev/null %buildroot%_gconvdir/gconv-modules.cache

# Replace the symlink with the file for our default timezone.

rm %buildroot%_sysconfdir/localtime
cp -p %buildroot%_datadir/zoneinfo/Europe/Moscow \
%buildroot%_sysconfdir/localtime

# Remove unpackaged files

rm %buildroot{%_infodir/dir,%_datadir/locale/locale.alias}

# The last bit: more documentation.

rm -rf doc
mkdir doc
# BUGS removed from the list
cp -pL LICENSES README* NEWS INSTALL FAQ NOTES PROJECTS \
hesiod/README.hesiod crypt/README.ufc-crypt ChangeLog ChangeLog.?? \
doc/
cp -pL timezone/README doc/README.timezone
find doc -type f -size +8k -print0 |
xargs -r0 bzip2 -9

>devel.files
>devel-static.files
for f in `/bin/ls -1 %buildroot%_libdir/lib*.a |
 grep -v '_p.a$' |
 sed -e "s|%buildroot||g"`; do
if [ -e "%buildroot${f%%.a}.so" ]; then
echo "$f" >>devel-static.files
else
echo "$f" >>devel.files
fi
done

%find_lang libc

%if_with locales
%if_enabled langify
(
cd %buildroot%_libdir/locale
for f in *; do
n=${f%%%% at *}
n=${f%%%%.*}
n=${f%%%%_*}
echo "%%lang($n) %%attr(-,root,root) %_libdir/locale/$f"
done
) >>libc.lang
%endif #enabled langify

echo '%%dir %_datadir/locale' >>libc.lang
for lang in %libc_locales_list; do
mkdir -p "%buildroot%_datadir/locale/$lang"/LC_{MESSAGES,TIME}
echo "%%lang($lang) %%dir %_datadir/locale/$lang" >>libc.lang
echo "%%lang($lang) %%dir %_datadir/locale/$lang/LC_MESSAGES" >>libc.lang
echo "%%lang($lang) %%dir %_datadir/locale/$lang/LC_TIME" >>libc.lang
done
%endif #with locales

%endif #enabled archopt

%if_without optimization

%set_strip_method none

%else #with optimization

# Strip ld and libpthread but keep some symbols required for debugging.

find %buildroot/lib -type f \( -name ld-\*.so -or -name libpthread-\*.so \) -print0 |
    xargs -r0 strip --strip-debug -R .comment --
%add_strip_skiplist */ld-*.so* */libpthread-*.so

%endif #without optimization

# due to libpthread.

%set_verify_elf_method unresolved=relaxed

%if_enabled archopt
%post core-%_target_cpu -p /sbin/glibc_post_upgrade
%postun core-%_target_cpu
[ $1 -gt 0 ] || /sbin/glibc_post_upgrade
%endif #enabled archopt

%pre core -p /sbin/glibc_preinstall
%post core -p /sbin/glibc_post_upgrade
%postun core -p /sbin/postun_ldconfig

%post nss -p /sbin/post_ldconfig
%postun nss -p /sbin/postun_ldconfig

%post -n iconv
%_sbindir/iconvconfig

%pre locales
for n in %renamed_locales; do
f="%_libdir/locale/${n%%.*}"
if [ -d "$f" -a ! -L "$f" ]; then
%__rm -rf "$f"
/bin/touch "$f.RPMLOCK"
fi
done

%post locales
for n in %renamed_locales; do
d="%_libdir/locale/$n"
f="%_libdir/locale/${n%%.*}"
if [ -f "$f.RPMLOCK" -a -d "$f" -a ! -d "$d.RPMSAVE" ]; then
%__mv "$d" "$d.RPMSAVE"
%__rm -f "$f.RPMLOCK"
fi
done

%triggerpostun locales -- %name-locales, %name < 6:2.2.4-alt3
for n in %renamed_locales; do
d="%_libdir/locale/$n"
if [ -d "$d.RPMSAVE" -a ! -d "$d" ]; then
%__mv "$d.RPMSAVE" "$d"
fi
done

%post devel
%install_info libc.info

%pre devel
# This used to be a link and it is causing nightmares now.
if [ -L %_includedir/scsi ]; then
%__rm -f %_includedir/scsi
fi

%preun devel
%uninstall_info libc.info

%pre -n nscd
/usr/sbin/useradd -M -o -r -u 28 -d / -s /dev/null -c "NSCD Daemon" nscd ||:

%post -n nscd
%post_service nscd

%preun -n nscd
%preun_service nscd

%triggerpostun core -p /sbin/glibc_fix_nsswitch -- %name < 6:2.2.4-alt3, %name-nss < 6:2.2.4-alt4

%if_enabled archopt

%files core-%_target_cpu
/%_lib/%_target_cpu/ld*
/%_lib/%_target_cpu/lib[acdmpru]*

%else #disabled archopt

%files
%doc doc/*

%files preinstall
/sbin/glibc_preinstall

%files core
/%_lib/*.so*
%exclude /%_lib/libnss_[a-eg-z]*
/sbin/glibc_post_upgrade
/sbin/glibc_fix_nsswitch*
/sbin/*ldconfig
%ghost %_sysconfdir/ld.so.cache
%dir %_sysconfdir/ld.so.conf.d
%config(noreplace) %_sysconfdir/bindresvport.blacklist
%config(noreplace) %_sysconfdir/gai.conf
%config(noreplace) %_sysconfdir/ld.so.conf
%config(noreplace) %_sysconfdir/localtime
%config(noreplace) %_sysconfdir/nss.conf
%config(noreplace) %_sysconfdir/nsswitch.conf
%config(noreplace) %_sysconfdir/rpc

%files nss
/%_lib/libnss_*.so*
%exclude /%_lib/libnss_f*

%if_with locales
%files locales -f libc.lang
%_bindir/locale*
%dir %_libdir/locale
%if_disabled langify
%_libdir/locale/*
%endif #disabled langify
%endif #with locales

%files gconv-modules
%dir %_gconvdir
%_gconvdir/*.so
%verify(not md5 size mtime) %config(noreplace) %_gconvdir/gconv-modules*

%files -n iconv
%_bindir/iconv*
%_sbindir/iconv*

%files timezones
%_datadir/zoneinfo
%_bindir/tzselect
%_sbindir/zdump
%_sbindir/zic

%files utils
/sbin/sln
%_sbindir/rpcinfo
%_bindir/*
%exclude %_bindir/iconv*
%exclude %_bindir/locale*
%exclude %_bindir/memusage*
%exclude %_bindir/pcprofiledump
%exclude %_bindir/tzselect
%exclude %_bindir/xtrace
%_libexecdir/getconf

%files devel -f devel.files
%_libdir/lib*.so
%exclude %_libdir/libmemusage.so
%exclude %_libdir/libpcprofile.so
%_libdir/*.o
%_includedir/*
%_infodir/*.info*

%files devel-static -f devel-static.files

%if_enabled profile
%files profile
%_libdir/lib*_p.a
%endif #enabled profile

%files debug
%_bindir/memusage*
%_bindir/pcprofiledump
%_bindir/xtrace
%_libdir/libmemusage.so
%_libdir/libpcprofile.so

%files -n nscd
%config(noreplace) %_sysconfdir/nscd.conf
%_initdir/nscd
%_sbindir/nscd*
%attr(711,root,root) %dir /var/run/nscd
%attr(1770,root,nscd) %dir /var/lib/nscd
%attr(666,root,root) %ghost /var/run/nscd/socket

%files i18ndata
%_datadir/i18n

%if_with debug
%files core-debug -f core-debug.files
%files nss-debug -f nss-debug.files
%files devel-debug -f devel-debug.files
%_libdir/debug/*.o
%_libdir/debug/*.a
%endif #with debug

%endif #enabled archopt

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009