From 54e727133a5a1d599d5e4ecdbb3b2ae01bcb42bd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 27 Oct 2014 12:31:53 +0100 Subject: Remove tabs/whitespace --- pkgs/stdenv/linux/make-bootstrap-tools.nix | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'pkgs/stdenv/linux') diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 9116b2225690..820fc978bda6 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -83,7 +83,7 @@ rec { ''; }; - build = + build = stdenv.mkDerivation { name = "build"; @@ -91,7 +91,7 @@ rec { buildInputs = [nukeReferences cpio]; buildCommand = '' - set -x + set -x mkdir -p $out/bin $out/lib $out/libexec # Copy what we need of Glibc. @@ -105,20 +105,20 @@ rec { cp -d ${glibc}/lib/libnsl*.so* $out/lib cp -d ${glibc}/lib/libutil*.so* $out/lib cp -d ${glibc}/lib/crt?.o $out/lib - + cp -rL ${glibc}/include $out chmod -R u+w $out/include - + # Hopefully we won't need these. rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video find $out/include -name .install -exec rm {} \; find $out/include -name ..install.cmd -exec rm {} \; mv $out/include $out/include-glibc - + # Copy coreutils, bash, etc. cp ${coreutils_}/bin/* $out/bin (cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users) - + cp ${bash}/bin/bash $out/bin cp ${findutils}/bin/find $out/bin cp ${findutils}/bin/xargs $out/bin @@ -135,7 +135,7 @@ rec { cp ${patchelf}/bin/* $out/bin cp -d ${gnugrep.pcre}/lib/libpcre*.so* $out/lib # needed by grep - + # Copy what we need of GCC. cp -d ${gcc.gcc}/bin/gcc $out/bin cp -d ${gcc.gcc}/bin/cpp $out/bin @@ -164,14 +164,14 @@ rec { cp -d ${mpc}/lib/libmpc*.so* $out/lib cp -d ${zlib}/lib/libz.so* $out/lib cp -d ${libelf}/lib/libelf.so* $out/lib - + # Copy binutils. for i in as ld ar ranlib nm strip readelf objdump; do cp ${binutils}/bin/$i $out/bin done chmod -R u+w $out - + # Strip executables even further. for i in $out/bin/* $out/libexec/gcc/*/*/*; do if test -x $i -a ! -L $i; then @@ -210,9 +210,9 @@ rec { allowedReferences = []; }; - + unpack = - + stdenv.mkDerivation { name = "unpack"; @@ -245,7 +245,7 @@ rec { name = "test"; realBuilder = "${unpack}/bin/bash"; - + buildCommand = '' export PATH=${unpack}/bin ls -l @@ -267,7 +267,7 @@ rec { export CPP="cpp -idirafter ${unpack}/include-glibc -B${unpack}" export CC="gcc -idirafter ${unpack}/include-glibc -B${unpack} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${unpack}/lib" export CXX="g++ -idirafter ${unpack}/include-glibc -B${unpack} -Wl,-dynamic-linker,$ldlinux -Wl,-rpath,${unpack}/lib" - + echo '#include ' >> foo.c echo '#include ' >> foo.c echo 'int main() { printf("Hello World\n"); return 0; }' >> foo.c @@ -286,5 +286,5 @@ rec { make install ''; # */ }; - + } -- cgit 1.4.1 From e8992c5084e31198af3fa2c624655203391ecd60 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 29 Oct 2014 13:36:03 +0100 Subject: Update the stdenv bootstrap tools generator The static curl program is gone, replaced by curl inside of the bootstrap tools tarball. Also, we generate a .tar.xz archive rather than .cpio.bz2, making the download smaller. The separate {sh,cpio,mkdir,ln,bzip2} programs have been replaced by a single busybox program. --- pkgs/stdenv/linux/make-bootstrap-tools.nix | 142 ++++++++++------------------- 1 file changed, 47 insertions(+), 95 deletions(-) (limited to 'pkgs/stdenv/linux') diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 820fc978bda6..651ccee74fdc 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -1,4 +1,4 @@ -{system ? builtins.currentSystem}: +{ system ? builtins.currentSystem }: with import ../../top-level/all-packages.nix {inherit system;}; @@ -6,80 +6,27 @@ rec { # We want coreutils without ACL support. - coreutils_ = coreutils.override (args: { + coreutilsMinimal = coreutils.override (args: { aclSupport = false; }); - # bzip2 wants utime.h, a header 'legacy' in uclibc - uclibcForBzip2 = uclibc.override { - extraConfig = '' - UCLIBC_SUSV3_LEGACY y - UCLIBC_SUSV4_LEGACY y - ''; - }; - - gccLinkStatic = wrapGCCWith (import ../../build-support/gcc-wrapper) uclibcForBzip2 - stdenv.gcc.gcc; - stdenvLinkStatic = overrideGCC stdenv gccLinkStatic; - - curlStatic = import ../../tools/networking/curl { - stdenv = stdenvLinkStatic; - inherit fetchurl; + curlMinimal = curl.override { zlibSupport = false; sslSupport = false; - linkStatic = true; - }; - - - bzip2Static = import ../../tools/compression/bzip2 { - stdenv = stdenvLinkStatic; - inherit fetchurl; - linkStatic = true; + scpSupport = false; }; - #gccNoShared = wrapGCC ( gcc.gcc.override { enableShared = false; } ); - - busyboxStaticSh = busybox.override { + busyboxMinimal = busybox.override { + enableStatic = true; + enableMinimal = true; extraConfig = '' - CLEAR - CONFIG_STATIC y - CONFIG_ASH y - CONFIG_BASH_COMPAT y - CONFIG_ASH_ALIAS y - CONFIG_ASH_GETOPTS y - CONFIG_ASH_CMDCMD y - CONFIG_ASH_JOB_CONTROL y CONFIG_ASH_BUILTIN_ECHO y - CONFIG_ASH_BUILTIN_PRINTF y CONFIG_ASH_BUILTIN_TEST y - ''; - }; - - busyboxStaticLn = busybox.override { - extraConfig = '' - CLEAR - CONFIG_STATIC y - CONFIG_LN y - ''; - }; - - busyboxStaticMkdir = busybox.override { - extraConfig = '' - CLEAR - CONFIG_STATIC y + CONFIG_ASH_OPTIMIZE_FOR_SIZE y CONFIG_MKDIR y - ''; - }; - - busyboxStaticCpio = busybox.override { - extraConfig = '' - CLEAR - CONFIG_STATIC y - CONFIG_CPIO y - # (shlevy) Are these necessary? - CONFIG_FEATURE_CPIO_O y - CONFIG_FEATURE_CPIO_P y + CONFIG_TAR y + CONFIG_UNXZ y ''; }; @@ -116,7 +63,7 @@ rec { mv $out/include $out/include-glibc # Copy coreutils, bash, etc. - cp ${coreutils_}/bin/* $out/bin + cp ${coreutilsMinimal}/bin/* $out/bin (cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users) cp ${bash}/bin/bash $out/bin @@ -124,7 +71,7 @@ rec { cp ${findutils}/bin/xargs $out/bin cp -d ${diffutils}/bin/* $out/bin cp -d ${gnused}/bin/* $out/bin - cp -d ${gnugrep}/bin/* $out/bin + cp -d ${gnugrep}/bin/grep $out/bin cp ${gawk}/bin/gawk $out/bin cp -d ${gawk}/bin/awk $out/bin cp ${gnutar}/bin/tar $out/bin @@ -133,6 +80,8 @@ rec { cp -d ${gnumake}/bin/* $out/bin cp -d ${patch}/bin/* $out/bin cp ${patchelf}/bin/* $out/bin + cp ${curlMinimal}/bin/curl $out/bin + cp -d ${curlMinimal}/lib/libcurl* $out/lib cp -d ${gnugrep.pcre}/lib/libpcre*.so* $out/lib # needed by grep @@ -151,6 +100,8 @@ rec { rm -rf $out/lib/gcc/*/*/plugin #rm -f $out/lib/gcc/*/*/*.a cp -rd ${gcc.gcc}/libexec/* $out/libexec + chmod -R u+w $out/libexec + rm -rf $out/libexec/gcc/*/*/plugin mkdir $out/include cp -rd ${gcc.gcc}/include/c++ $out/include chmod -R u+w $out/include @@ -159,8 +110,6 @@ rec { cp -d ${gmpxx}/lib/libgmp*.so* $out/lib cp -d ${mpfr}/lib/libmpfr*.so* $out/lib - cp -d ${ppl}/lib/libppl*.so* $out/lib - cp -d ${cloogppl}/lib/libcloog*.so* $out/lib cp -d ${mpc}/lib/libmpc*.so* $out/lib cp -d ${zlib}/lib/libz.so* $out/lib cp -d ${libelf}/lib/libelf.so* $out/lib @@ -169,6 +118,7 @@ rec { for i in as ld ar ranlib nm strip readelf objdump; do cp ${binutils}/bin/$i $out/bin done + cp -d ${binutils}/lib/lib*.so* $out/lib chmod -R u+w $out @@ -189,19 +139,10 @@ rec { mv $out/.pack $out/pack mkdir $out/on-server - (cd $out/pack && (find | cpio -o -H newc)) | bzip2 > $out/on-server/bootstrap-tools.cpio.bz2 - - mkdir $out/in-nixpkgs - cp ${busyboxStaticSh}/bin/busybox $out/in-nixpkgs/sh - cp ${busyboxStaticCpio}/bin/busybox $out/in-nixpkgs/cpio - cp ${busyboxStaticMkdir}/bin/busybox $out/in-nixpkgs/mkdir - cp ${busyboxStaticLn}/bin/busybox $out/in-nixpkgs/ln - cp ${curlStatic}/bin/curl $out/in-nixpkgs - cp ${bzip2Static}/bin/bzip2 $out/in-nixpkgs - chmod u+w $out/in-nixpkgs/* - strip $out/in-nixpkgs/* - nuke-refs $out/in-nixpkgs/* - bzip2 $out/in-nixpkgs/curl + tar cvfJ $out/on-server/bootstrap-tools.tar.xz -C $out/pack . + cp ${busyboxMinimal}/bin/busybox $out/on-server + chmod u+w $out/on-server/busybox + nuke-refs $out/on-server/busybox ''; # */ # The result should not contain any references (store paths) so @@ -213,19 +154,30 @@ rec { unpack = - stdenv.mkDerivation { + derivation { name = "unpack"; + inherit system; + builder = "${build}/on-server/busybox"; + args = [ "ash" "-e" "-c" "eval \"$buildCommand\"" ]; buildCommand = '' - ${build}/in-nixpkgs/mkdir $out - ${build}/in-nixpkgs/bzip2 -d < ${build}/on-server/bootstrap-tools.cpio.bz2 | (cd $out && ${build}/in-nixpkgs/cpio -v -i) + export PATH=${build}/on-server:$out/bin + + busybox mkdir $out + < ${build}/on-server/bootstrap-tools.tar.xz busybox unxz | busybox tar x -C $out for i in $out/bin/* $out/libexec/gcc/*/*/*; do - echo patching $i - if ! test -L $i; then - LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 \ - $out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib --force-rpath $i - fi + if [ -L "$i" ]; then continue; fi + if [ -z "''${i##*/liblto*}" ]; then continue; fi + echo patching "$i" + LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 \ + $out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib --force-rpath "$i" + done + + for i in $out/lib/libpcre*; do + if [ -L "$i" ]; then continue; fi + echo patching "$i" + $out/bin/patchelf --set-rpath $out/lib --force-rpath "$i" done # Fix the libc linker script. @@ -241,10 +193,11 @@ rec { test = - stdenv.mkDerivation { + derivation { name = "test"; - - realBuilder = "${unpack}/bin/bash"; + inherit system; + builder = "${build}/on-server/busybox"; + args = [ "ash" "-e" "-c" "eval \"$buildCommand\"" ]; buildCommand = '' export PATH=${unpack}/bin @@ -259,8 +212,7 @@ rec { awk --version grep --version gcc --version - - ${build}/in-nixpkgs/sh -c 'echo Hello World' + curl --version ldlinux=$(echo ${unpack}/lib/ld-linux*.so.2) @@ -270,12 +222,12 @@ rec { echo '#include ' >> foo.c echo '#include ' >> foo.c - echo 'int main() { printf("Hello World\n"); return 0; }' >> foo.c + echo 'int main() { printf("Hello World\\n"); return 0; }' >> foo.c $CC -o $out/bin/foo foo.c $out/bin/foo echo '#include ' >> bar.cc - echo 'int main() { std::cout << "Hello World\n"; }' >> bar.cc + echo 'int main() { std::cout << "Hello World\\n"; }' >> bar.cc $CXX -v -o $out/bin/bar bar.cc $out/bin/bar -- cgit 1.4.1 From 41a479b15f2f26fde3952e384d1aff37bde7186b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 29 Oct 2014 14:44:56 +0100 Subject: busybox: Optionally use uclibc --- pkgs/os-specific/linux/busybox/default.nix | 12 +++++++----- pkgs/stdenv/linux/make-bootstrap-tools.nix | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'pkgs/stdenv/linux') diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index 6073692c70a8..47f9fb9a5a40 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, enableStatic ? false, enableMinimal ? false, extraConfig ? "" }: +{ lib, stdenv, uclibc, fetchurl, enableStatic ? false, enableMinimal ? false, useUclibc ? false, extraConfig ? "" }: let configParser = '' @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { CONFIG_PREFIX "$out" CONFIG_INSTALL_NO_USR y - ${stdenv.lib.optionalString enableStatic '' + ${lib.optionalString enableStatic '' CONFIG_STATIC y ''} @@ -54,6 +54,8 @@ stdenv.mkDerivation rec { EOF make oldconfig + '' + lib.optionalString useUclibc '' + makeFlagsArray+=("CC=gcc -isystem ${uclibc}/include -B${uclibc}/lib -L${uclibc}/lib") ''; crossAttrs = { @@ -70,8 +72,8 @@ stdenv.mkDerivation rec { meta = { description = "Tiny versions of common UNIX utilities in a single small executable"; homepage = http://busybox.net/; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.viric ]; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 651ccee74fdc..e202f691fa8d 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -17,6 +17,7 @@ rec { }; busyboxMinimal = busybox.override { + useUclibc = true; enableStatic = true; enableMinimal = true; extraConfig = '' -- cgit 1.4.1 From 119ce1ab03d0b3250e9e350f0686e095060014b0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 29 Oct 2014 17:26:29 +0100 Subject: Update the stdenv-linux bootstrap tools --- pkgs/stdenv/linux/bootstrap/i686.nix | 41 +++--------------- pkgs/stdenv/linux/bootstrap/x86_64.nix | 9 ++-- pkgs/stdenv/linux/default.nix | 11 ++--- .../stdenv/linux/scripts/unpack-bootstrap-tools.sh | 50 ++++++++-------------- 4 files changed, 32 insertions(+), 79 deletions(-) (limited to 'pkgs/stdenv/linux') diff --git a/pkgs/stdenv/linux/bootstrap/i686.nix b/pkgs/stdenv/linux/bootstrap/i686.nix index 7b6b3ee80344..04712360d152 100644 --- a/pkgs/stdenv/linux/bootstrap/i686.nix +++ b/pkgs/stdenv/linux/bootstrap/i686.nix @@ -1,39 +1,12 @@ -let - - fetch = { file, sha256 }: import { - url = "http://tarballs.nixos.org/stdenv-linux/i686/r24519/${file}"; - inherit sha256; +{ + busybox = import { + url = http://tarballs.nixos.org/stdenv-linux/i686/ac8e5cd145fa5f22bab1b01d8b4db4d26d22e65c/busybox; + sha256 = "0314dskcp6gp0jpy87phpjz1r13zh0grb40yvdl9s4l2rxzgzr2v"; executable = true; }; -in { - sh = fetch { - file = "sh"; - sha256 = "1l6sdhyqjlh4m5gj3pfpi8aisp1m012lpwxfcc4v1x8g429mflmy"; - }; - - bzip2 = fetch { - file = "bzip2"; - sha256 = "1p5nkrdn52jm6rsx8x3wwjpsh83f2qsjl1qckkgnkplwhj23zjp7"; - }; - - mkdir = fetch { - file = "mkdir"; - sha256 = "02ff7i9ph9ahiapsg2v9c3pwr7sl73sk4n7ic112ljkrgwkail33"; - }; - - cpio = fetch { - file = "cpio"; - sha256 = "046if3aqqramyhrn2yxrjf4bfkl8x1bcqxhvi7ml9nrv9smx8irg"; - }; - - curl = fetch { - file = "curl.bz2"; - sha256 = "1v0yfb4gcdyqpl2fxlxjh337r28c23iqm7vwck4p4643xd55di7q"; - }; - - bootstrapTools = { - url = http://tarballs.nixos.org/stdenv-linux/i686/r24519/bootstrap-tools.cpio.bz2; - sha256 = "0imypaxy6piwbk8ff2y1nr7yk49pqmdgdbv6g8miq1zs5yfip6ij"; + bootstrapTools = import { + url = http://tarballs.nixos.org/stdenv-linux/i686/ac8e5cd145fa5f22bab1b01d8b4db4d26d22e65c/bootstrap-tools.tar.xz; + sha256 = "025r3vifkqlw0i5nvlkmfrvbn0v73r1pr6jkqckgs585y7nmsjhz"; }; } diff --git a/pkgs/stdenv/linux/bootstrap/x86_64.nix b/pkgs/stdenv/linux/bootstrap/x86_64.nix index 71961e6961e6..2950e42ae0a5 100644 --- a/pkgs/stdenv/linux/bootstrap/x86_64.nix +++ b/pkgs/stdenv/linux/bootstrap/x86_64.nix @@ -1,10 +1,9 @@ -# Use the static tools for i686-linux. They work on x86_64-linux -# machines as well. +# Use busybox for i686-linux since it works on x86_64-linux as well. (import ./i686.nix) // { - bootstrapTools = { - url = http://tarballs.nixos.org/stdenv-linux/x86_64/r23302/bootstrap-tools.cpio.bz2; - sha256 = "0w89kqhx47yl0jifp2vffp073pyrqha5f312kp971smi4h41drna"; + bootstrapTools = import { + url = http://tarballs.nixos.org/stdenv-linux/x86_64/ac8e5cd145fa5f22bab1b01d8b4db4d26d22e65c/bootstrap-tools.tar.xz; + sha256 = "01485vvwxb7fsx8c8il5hip0bhh4xy2gg76sj4zc98gl4v1jbfq9"; }; } diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 0467b60ca476..a5d8f5ba7265 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -40,20 +40,15 @@ rec { bootstrapTools = derivation { name = "bootstrap-tools"; - builder = bootstrapFiles.sh; + builder = bootstrapFiles.busybox; args = if system == "armv5tel-linux" || system == "armv6l-linux" || system == "armv7l-linux" then [ ./scripts/unpack-bootstrap-tools-arm.sh ] - else [ ./scripts/unpack-bootstrap-tools.sh ]; + else [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ]; - # FIXME: get rid of curl. - inherit (bootstrapFiles) bzip2 mkdir curl cpio; - - tarball = import { - inherit (bootstrapFiles.bootstrapTools) url sha256; - }; + tarball = bootstrapFiles.bootstrapTools; inherit system; diff --git a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh b/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh index 422dc6dd5fef..9db5d2c88e5d 100644 --- a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh @@ -1,9 +1,7 @@ -set -e - # Unpack the bootstrap tools tarball. echo Unpacking the bootstrap tools... -$mkdir $out -$bzip2 -d < $tarball | (cd $out && $cpio -i) +$builder mkdir $out +< $tarball $builder unxz | $builder tar x -C $out # Set the ELF interpreter / RPATH in the bootstrap binaries. echo Patching the bootstrap tools... @@ -21,32 +19,17 @@ fi LD_LIBRARY_PATH=$out/lib $LD_BINARY $out/bin/cp $out/bin/patchelf . for i in $out/bin/* $out/libexec/gcc/*/*/*; do - echo patching $i - if ! test -L $i; then - LD_LIBRARY_PATH=$out/lib $LD_BINARY \ - $out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath $i - LD_LIBRARY_PATH=$out/lib $LD_BINARY \ - $out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath $i - fi -done -for i in $out/lib/librt* ; do - echo patching $i - if ! test -L $i; then - LD_LIBRARY_PATH=$out/lib $LD_BINARY \ - $out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath $i - LD_LIBRARY_PATH=$out/lib $LD_BINARY \ - $out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath $i - fi + if [ -L "$i" ]; then continue; fi + if [ -z "${i##*/liblto*}" ]; then continue; fi + echo patching "$i" + LD_LIBRARY_PATH=$out/lib $out/lib/ld-linux*.so.2 \ + $out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath "$i" done -for i in $out/lib/libgmp* $out/lib/libppl* $out/lib/libcloog* $out/lib/libmpc* $out/lib/libpcre* $out/lib/libstdc++*.so.*[0-9]; do - echo trying to patch $i - if test -f $i -a ! -L $i; then - LD_LIBRARY_PATH=$out/lib $LD_BINARY \ - $out/bin/patchelf --set-rpath $out/lib --force-rpath $i - LD_LIBRARY_PATH=$out/lib $LD_BINARY \ - $out/bin/patchelf --set-rpath $out/lib --force-rpath $i - fi +for i in $out/lib/libpcre*; do + if [ -L "$i" ]; then continue; fi + echo patching "$i" + $out/bin/patchelf --set-rpath $out/lib --force-rpath "$i" done # Fix the libc linker script. @@ -60,13 +43,16 @@ mv $out/lib/libpthread.so.tmp $out/lib/libpthread.so ln -s bash $out/bin/sh ln -s bzip2 $out/bin/bunzip2 -# Mimic the gunzip script as in gzip installations +# Provide a gunzip script. cat > $out/bin/gunzip < $out/bin/curl -chmod +x $out/bin/curl +# Provide fgrep/egrep. +echo "#! $out/bin/sh" > $out/bin/egrep +echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep +echo "#! $out/bin/sh" > $out/bin/fgrep +echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep +chmod +x $out/bin/egrep $out/bin/fgrep -- cgit 1.4.1 From 3bd2cfa85373a94f88fd90d9b6b0953c9c3c63a9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 3 Nov 2014 18:50:28 +0100 Subject: Update bootstrap tools with the fix for GCC bug 61801 --- pkgs/stdenv/linux/bootstrap/i686.nix | 8 ++++---- pkgs/stdenv/linux/bootstrap/x86_64.nix | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'pkgs/stdenv/linux') diff --git a/pkgs/stdenv/linux/bootstrap/i686.nix b/pkgs/stdenv/linux/bootstrap/i686.nix index 04712360d152..88bd984bab96 100644 --- a/pkgs/stdenv/linux/bootstrap/i686.nix +++ b/pkgs/stdenv/linux/bootstrap/i686.nix @@ -1,12 +1,12 @@ { busybox = import { - url = http://tarballs.nixos.org/stdenv-linux/i686/ac8e5cd145fa5f22bab1b01d8b4db4d26d22e65c/busybox; - sha256 = "0314dskcp6gp0jpy87phpjz1r13zh0grb40yvdl9s4l2rxzgzr2v"; + url = http://tarballs.nixos.org/stdenv-linux/i686/73b75f6157db79fc899154a497823e82e409e76d/busybox; + sha256 = "159208615405938d9830634f15d38adf5a9c33643926845c44499dbe6dd62042"; executable = true; }; bootstrapTools = import { - url = http://tarballs.nixos.org/stdenv-linux/i686/ac8e5cd145fa5f22bab1b01d8b4db4d26d22e65c/bootstrap-tools.tar.xz; - sha256 = "025r3vifkqlw0i5nvlkmfrvbn0v73r1pr6jkqckgs585y7nmsjhz"; + url = http://tarballs.nixos.org/stdenv-linux/i686/73b75f6157db79fc899154a497823e82e409e76d/bootstrap-tools.tar.xz; + sha256 = "68c430b84dbeac0bd1bea4cdd3159dce44a76445e07860caed1972b4608c42ca"; }; } diff --git a/pkgs/stdenv/linux/bootstrap/x86_64.nix b/pkgs/stdenv/linux/bootstrap/x86_64.nix index 2950e42ae0a5..96822f57e504 100644 --- a/pkgs/stdenv/linux/bootstrap/x86_64.nix +++ b/pkgs/stdenv/linux/bootstrap/x86_64.nix @@ -3,7 +3,7 @@ { bootstrapTools = import { - url = http://tarballs.nixos.org/stdenv-linux/x86_64/ac8e5cd145fa5f22bab1b01d8b4db4d26d22e65c/bootstrap-tools.tar.xz; - sha256 = "01485vvwxb7fsx8c8il5hip0bhh4xy2gg76sj4zc98gl4v1jbfq9"; + url = http://tarballs.nixos.org/stdenv-linux/x86_64/73b75f6157db79fc899154a497823e82e409e76d/bootstrap-tools.tar.xz; + sha256 = "e29d47a5dc9f1ff10c3fbaacbd03a3cca0c784299df09fcdd9e25797ec6414ad"; }; } -- cgit 1.4.1 From cef0bcefc6544513fec9dec49686932ef15f1734 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 15 Nov 2014 21:47:05 +0100 Subject: linux-headers: Update to 3.12.32 We can do this because bootstrap-tools contains an unxz program now (via busybox). --- pkgs/os-specific/linux/kernel-headers/3.12.nix | 6 +++--- pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'pkgs/stdenv/linux') diff --git a/pkgs/os-specific/linux/kernel-headers/3.12.nix b/pkgs/os-specific/linux/kernel-headers/3.12.nix index 9bf189c40eda..2fd34c68edc6 100644 --- a/pkgs/os-specific/linux/kernel-headers/3.12.nix +++ b/pkgs/os-specific/linux/kernel-headers/3.12.nix @@ -4,7 +4,7 @@ assert cross == null -> stdenv.isLinux; let - version = "3.12.6"; + version = "3.12.32"; kernelHeadersBaseConfig = if cross == null @@ -17,8 +17,8 @@ stdenv.mkDerivation { name = "linux-headers-${version}"; src = fetchurl { - url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.bz2"; - sha256 = "1qh6f1az0flfrbkdjx1i9r7yf31ad0gxigax91nd33z2jmd6h4df"; + url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; + sha256 = "1hzws2bf267hfk81ywqcxspkyi1lg56x63izdc0pv1338xcfas53"; }; targetConfig = if cross != null then cross.config else null; diff --git a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh b/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh index 9db5d2c88e5d..52953c9b88da 100644 --- a/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/scripts/unpack-bootstrap-tools.sh @@ -55,4 +55,9 @@ echo "#! $out/bin/sh" > $out/bin/egrep echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep echo "#! $out/bin/sh" > $out/bin/fgrep echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep -chmod +x $out/bin/egrep $out/bin/fgrep + +# Provide xz (actually only xz -d will work). +echo "#! $out/bin/sh" > $out/bin/xz +echo "exec $builder unxz \"\$@\"" >> $out/bin/xz + +chmod +x $out/bin/egrep $out/bin/fgrep $out/bin/xz -- cgit 1.4.1