Merge pull request #330478 from SuperSandro2000/bwrap-no-chroot

buildFHSEnv: replace all chroot occurences with generic names
This commit is contained in:
Atemu 2024-07-28 23:00:08 +02:00 committed by GitHub
commit 142b0dcd96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ let
# list of packages which are for x86 (only multiPkgs, only for x86_64 hosts) # list of packages which are for x86 (only multiPkgs, only for x86_64 hosts)
multiPaths = multiPkgs pkgsi686Linux; multiPaths = multiPkgs pkgsi686Linux;
# base packages of the chroot # base packages of the fhsenv
# these match the host's architecture, glibc_multi is used for multilib # these match the host's architecture, glibc_multi is used for multilib
# builds. glibcLocales must be before glibc or glibc_multi as otherwiese # builds. glibcLocales must be before glibc or glibc_multi as otherwiese
# the wrong LOCALE_ARCHIVE will be used where only C.UTF-8 is available. # the wrong LOCALE_ARCHIVE will be used where only C.UTF-8 is available.
@ -84,7 +84,7 @@ let
''; '';
etcProfile = writeText "profile" '' etcProfile = writeText "profile" ''
export PS1='${name}-chrootenv:\u@\h:\w\$ ' export PS1='${name}-fhsenv:\u@\h:\w\$ '
export LOCALE_ARCHIVE='/usr/lib/locale/locale-archive' export LOCALE_ARCHIVE='/usr/lib/locale/locale-archive'
export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
export PATH="/run/wrappers/bin:/usr/bin:/usr/sbin:$PATH" export PATH="/run/wrappers/bin:/usr/bin:/usr/sbin:$PATH"
@ -123,8 +123,8 @@ let
${profile} ${profile}
''; '';
# Compose /etc for the chroot environment # Compose /etc for the fhs environment
etcPkg = runCommandLocal "${name}-chrootenv-etc" { } '' etcPkg = runCommandLocal "${name}-fhs-etc" { } ''
mkdir -p $out/etc mkdir -p $out/etc
pushd $out/etc pushd $out/etc
@ -215,7 +215,7 @@ let
then setupLibDirsTarget then setupLibDirsTarget
else setupLibDirsMulti; else setupLibDirsMulti;
# the target profile is the actual profile that will be used for the chroot # the target profile is the actual profile that will be used for the fhs
setupTargetProfile = '' setupTargetProfile = ''
mkdir -m0755 usr mkdir -m0755 usr
pushd usr pushd usr