Merge pull request #302172 from tpwrules/bubblewrap-no-32

build-fhsenv-bubblewrap: reference 32-bit binaries only if multiArch

authored by Atemu and committed by GitHub 44ec127d 384d9676

+7 -8
+6 -7
pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix
··· 40 isMultiBuild = multiArch && stdenv.system == "x86_64-linux"; 41 isTargetBuild = !isMultiBuild; 42 43 - # list of packages (usually programs) which are only be installed for the 44 - # host's architecture 45 targetPaths = targetPkgs pkgs ++ (if multiPkgs == null then [] else multiPkgs pkgs); 46 47 - # list of packages which are installed for both x86 and x86_64 on x86_64 48 - # systems 49 multiPaths = multiPkgs pkgsi686Linux; 50 51 # base packages of the chroot ··· 76 ]; 77 78 ldconfig = writeShellScriptBin "ldconfig" '' 79 - # due to a glibc bug, 64-bit ldconfig complains about patchelf'd 32-bit libraries, so we're using 32-bit ldconfig 80 - exec ${if stdenv.system == "x86_64-linux" then pkgsi686Linux.glibc.bin else pkgs.glibc.bin}/bin/ldconfig -f /etc/ld.so.conf -C /etc/ld.so.cache "$@" 81 ''; 82 83 etcProfile = writeText "profile" '' ··· 251 252 in runCommandLocal "${name}-fhs" { 253 passthru = { 254 - inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig; 255 }; 256 } '' 257 mkdir -p $out
··· 40 isMultiBuild = multiArch && stdenv.system == "x86_64-linux"; 41 isTargetBuild = !isMultiBuild; 42 43 + # list of packages (usually programs) which match the host's architecture 44 + # (which includes stuff from multiPkgs) 45 targetPaths = targetPkgs pkgs ++ (if multiPkgs == null then [] else multiPkgs pkgs); 46 47 + # list of packages which are for x86 (only multiPkgs, only for x86_64 hosts) 48 multiPaths = multiPkgs pkgsi686Linux; 49 50 # base packages of the chroot ··· 75 ]; 76 77 ldconfig = writeShellScriptBin "ldconfig" '' 78 + # due to a glibc bug, 64-bit ldconfig complains about patchelf'd 32-bit libraries, so we use 32-bit ldconfig when we have them 79 + exec ${if isMultiBuild then pkgsi686Linux.glibc.bin else pkgs.glibc.bin}/bin/ldconfig -f /etc/ld.so.conf -C /etc/ld.so.cache "$@" 80 ''; 81 82 etcProfile = writeText "profile" '' ··· 250 251 in runCommandLocal "${name}-fhs" { 252 passthru = { 253 + inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild; 254 }; 255 } '' 256 mkdir -p $out
+1 -1
pkgs/build-support/build-fhsenv-bubblewrap/default.nix
··· 252 --symlink /etc/ld.so.cache ${glibc}/etc/ld.so.cache \ 253 --ro-bind ${glibc}/etc/rpc ${glibc}/etc/rpc \ 254 --remount-ro ${glibc}/etc \ 255 - '' + optionalString (stdenv.isx86_64 && stdenv.isLinux) (indentLines '' 256 --tmpfs ${pkgsi686Linux.glibc}/etc \ 257 --symlink /etc/ld.so.conf ${pkgsi686Linux.glibc}/etc/ld.so.conf \ 258 --symlink /etc/ld.so.cache ${pkgsi686Linux.glibc}/etc/ld.so.cache \
··· 252 --symlink /etc/ld.so.cache ${glibc}/etc/ld.so.cache \ 253 --ro-bind ${glibc}/etc/rpc ${glibc}/etc/rpc \ 254 --remount-ro ${glibc}/etc \ 255 + '' + optionalString fhsenv.isMultiBuild (indentLines '' 256 --tmpfs ${pkgsi686Linux.glibc}/etc \ 257 --symlink /etc/ld.so.conf ${pkgsi686Linux.glibc}/etc/ld.so.conf \ 258 --symlink /etc/ld.so.cache ${pkgsi686Linux.glibc}/etc/ld.so.cache \