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 40 isMultiBuild = multiArch && stdenv.system == "x86_64-linux"; 41 41 isTargetBuild = !isMultiBuild; 42 42 43 - # list of packages (usually programs) which are only be installed for the 44 - # host's architecture 43 + # list of packages (usually programs) which match the host's architecture 44 + # (which includes stuff from multiPkgs) 45 45 targetPaths = targetPkgs pkgs ++ (if multiPkgs == null then [] else multiPkgs pkgs); 46 46 47 - # list of packages which are installed for both x86 and x86_64 on x86_64 48 - # systems 47 + # list of packages which are for x86 (only multiPkgs, only for x86_64 hosts) 49 48 multiPaths = multiPkgs pkgsi686Linux; 50 49 51 50 # base packages of the chroot ··· 76 75 ]; 77 76 78 77 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 "$@" 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 "$@" 81 80 ''; 82 81 83 82 etcProfile = writeText "profile" '' ··· 251 250 252 251 in runCommandLocal "${name}-fhs" { 253 252 passthru = { 254 - inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig; 253 + inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild; 255 254 }; 256 255 } '' 257 256 mkdir -p $out
+1 -1
pkgs/build-support/build-fhsenv-bubblewrap/default.nix
··· 252 252 --symlink /etc/ld.so.cache ${glibc}/etc/ld.so.cache \ 253 253 --ro-bind ${glibc}/etc/rpc ${glibc}/etc/rpc \ 254 254 --remount-ro ${glibc}/etc \ 255 - '' + optionalString (stdenv.isx86_64 && stdenv.isLinux) (indentLines '' 255 + '' + optionalString fhsenv.isMultiBuild (indentLines '' 256 256 --tmpfs ${pkgsi686Linux.glibc}/etc \ 257 257 --symlink /etc/ld.so.conf ${pkgsi686Linux.glibc}/etc/ld.so.conf \ 258 258 --symlink /etc/ld.so.cache ${pkgsi686Linux.glibc}/etc/ld.so.cache \