mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
glibcUnstable: added low-priority expression for the latest glibc 2.8 snapshot
svn path=/nixpkgs/trunk/; revision=12315
This commit is contained in:
parent
8ff43a1636
commit
5f8571613d
4 changed files with 151 additions and 0 deletions
63
pkgs/development/libraries/glibc-2.8/builder.sh
Normal file
63
pkgs/development/libraries/glibc-2.8/builder.sh
Normal file
|
@ -0,0 +1,63 @@
|
|||
# glibc cannot have itself in its rpath.
|
||||
export NIX_NO_SELF_RPATH=1
|
||||
export NIX_DONT_SET_RPATH=1
|
||||
|
||||
source $stdenv/setup
|
||||
|
||||
# Explicitly tell glibc to use our pwd, not /bin/pwd.
|
||||
export PWD_P=$(type -tP pwd)
|
||||
|
||||
# Needed to install share/zoneinfo/zone.tab.
|
||||
export BASH_SHELL=$SHELL
|
||||
|
||||
|
||||
preConfigure=preConfigure
|
||||
preConfigure() {
|
||||
|
||||
for i in configure io/ftwtest-sh; do
|
||||
# Can't use substituteInPlace here because replace hasn't been
|
||||
# built yet in the bootstrap.
|
||||
sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
|
||||
done
|
||||
|
||||
# In the glibc 2.6/2.7 tarballs C-translit.h is a little bit older
|
||||
# than C-translit.h.in, forcing Make to rebuild it unnecessarily.
|
||||
# This wouldn't be problem except that it requires Perl, which we
|
||||
# don't want as a dependency in the Nixpkgs bootstrap. So force
|
||||
# the output file to be newer.
|
||||
touch locale/C-translit.h
|
||||
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postConfigure=postConfigure
|
||||
postConfigure() {
|
||||
# Hack: get rid of the `-static' flag set by the bootstrap stdenv.
|
||||
# This has to be done *after* `configure' because it builds some
|
||||
# test binaries.
|
||||
export NIX_CFLAGS_LINK=
|
||||
export NIX_LDFLAGS_BEFORE=
|
||||
}
|
||||
|
||||
|
||||
postInstall=postInstall
|
||||
postInstall() {
|
||||
if test -n "$installLocales"; then
|
||||
make localedata/install-locales
|
||||
fi
|
||||
rm $out/etc/ld.so.cache
|
||||
(cd $out/include && ln -s $kernelHeaders/include/* .) || exit 1
|
||||
|
||||
# Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink
|
||||
# "lib64" to "lib".
|
||||
if test -n "$is64bit"; then
|
||||
ln -s lib $out/lib64
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
genericBuild
|
58
pkgs/development/libraries/glibc-2.8/default.nix
Normal file
58
pkgs/development/libraries/glibc-2.8/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ stdenv, fetchurl, kernelHeaders
|
||||
, installLocales ? true
|
||||
, profilingLibraries ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec
|
||||
{
|
||||
name = "glibc-2.8-20080707";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl
|
||||
{
|
||||
url = "ftp://sources.redhat.com/pub/glibc/snapshots/${name}.tar.bz2";
|
||||
sha256 = "e317b854807f52cd539ed9b6bf8b1c2977e650e27e90baa787444bd3b74f5e72";
|
||||
};
|
||||
|
||||
inherit kernelHeaders installLocales;
|
||||
|
||||
inherit (stdenv) is64bit;
|
||||
|
||||
patches = [
|
||||
/* Fix for NIXPKGS-79: when doing host name lookups, when
|
||||
nsswitch.conf contains a line like
|
||||
|
||||
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
|
||||
|
||||
don't return an error when mdns4_minimal can't be found. This
|
||||
is a bug in Glibc: when a service can't be found, NSS should
|
||||
continue to the next service unless "UNAVAIL=return" is set.
|
||||
("NOTFOUND=return" refers to the service returning a NOTFOUND
|
||||
error, not the service itself not being found.) The reason is
|
||||
that the "status" variable (while initialised to UNAVAIL) is
|
||||
outside of the loop that iterates over the services, the
|
||||
"files" service sets status to NOTFOUND. So when the call to
|
||||
find "mdns4_minimal" fails, "status" will still be NOTFOUND,
|
||||
and it will return instead of continuing to "dns". Thus, the
|
||||
line
|
||||
|
||||
hosts: mdns4_minimal [NOTFOUND=return] dns mdns4
|
||||
|
||||
does work because "status" will contain UNAVAIL after the
|
||||
failure to find mdns4_minimal. */
|
||||
./nss-skip-unavail.patch
|
||||
];
|
||||
|
||||
# `--with-tls --without-__thread' enables support for TLS but causes
|
||||
# it not to be used. Required if we don't want to barf on 2.4
|
||||
# kernels. Or something.
|
||||
configureFlags="--enable-add-ons
|
||||
--with-headers=${kernelHeaders}/include
|
||||
${if profilingLibraries then "--enable-profile" else "--disable-profile"}";
|
||||
|
||||
# Workaround for this bug:
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=411
|
||||
# I.e. when gcc is compiled with --with-arch=i686, then the
|
||||
# preprocessor symbol `__i686' will be defined to `1'. This causes
|
||||
# the symbol __i686.get_pc_thunk.dx to be mangled.
|
||||
NIX_CFLAGS_COMPILE = "-U__i686";
|
||||
}
|
25
pkgs/development/libraries/glibc-2.8/nss-skip-unavail.patch
Normal file
25
pkgs/development/libraries/glibc-2.8/nss-skip-unavail.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff -rc glibc-2.7-orig/sysdeps/posix/getaddrinfo.c glibc-2.7/sysdeps/posix/getaddrinfo.c
|
||||
*** glibc-2.7-orig/sysdeps/posix/getaddrinfo.c 2007-10-17 18:05:12.000000000 +0200
|
||||
--- glibc-2.7/sysdeps/posix/getaddrinfo.c 2008-04-08 12:17:09.000000000 +0200
|
||||
***************
|
||||
*** 498,505 ****
|
||||
int no_data = 0;
|
||||
int no_inet6_data = 0;
|
||||
service_user *nip = NULL;
|
||||
- enum nss_status inet6_status = NSS_STATUS_UNAVAIL;
|
||||
- enum nss_status status = NSS_STATUS_UNAVAIL;
|
||||
int no_more;
|
||||
int old_res_options;
|
||||
|
||||
--- 498,503 ----
|
||||
***************
|
||||
*** 689,694 ****
|
||||
--- 687,694 ----
|
||||
|
||||
while (!no_more)
|
||||
{
|
||||
+ enum nss_status inet6_status = NSS_STATUS_UNAVAIL;
|
||||
+ enum nss_status status = NSS_STATUS_UNAVAIL;
|
||||
nss_gethostbyname3_r fct = NULL;
|
||||
if (req->ai_flags & AI_CANONNAME)
|
||||
/* No need to use this function if we do not look for
|
|
@ -2614,6 +2614,11 @@ let pkgs = rec {
|
|||
#installLocales = false;
|
||||
});
|
||||
|
||||
glibcUnstable = lowPrio (import ../development/libraries/glibc-2.8 {
|
||||
inherit fetchurl stdenv kernelHeaders;
|
||||
installLocales = getPkgConfig "glibc" "locales" false;
|
||||
});
|
||||
|
||||
glibc_multi =
|
||||
assert system == "x86_64-linux";
|
||||
runCommand "${glibc.name}-multi"
|
||||
|
|
Loading…
Reference in a new issue