Merge pull request #286360 from hellwolf/fix-fhsenv-bubblewrap-etc-paths
build-fhsenv-bubblewrap: fix fhsenv etc entries
This commit is contained in:
commit
3115d3209d
@ -123,6 +123,8 @@ let
|
|||||||
ro_mounts=()
|
ro_mounts=()
|
||||||
symlinks=()
|
symlinks=()
|
||||||
etc_ignored=()
|
etc_ignored=()
|
||||||
|
|
||||||
|
# loop through all entries of root in the fhs environment, except its /etc.
|
||||||
for i in ${fhsenv}/*; do
|
for i in ${fhsenv}/*; do
|
||||||
path="/''${i##*/}"
|
path="/''${i##*/}"
|
||||||
if [[ $path == '/etc' ]]; then
|
if [[ $path == '/etc' ]]; then
|
||||||
@ -136,6 +138,7 @@ let
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# loop through the entries of /etc in the fhs environment.
|
||||||
if [[ -d ${fhsenv}/etc ]]; then
|
if [[ -d ${fhsenv}/etc ]]; then
|
||||||
for i in ${fhsenv}/etc/*; do
|
for i in ${fhsenv}/etc/*; do
|
||||||
path="/''${i##*/}"
|
path="/''${i##*/}"
|
||||||
@ -144,7 +147,11 @@ let
|
|||||||
if [[ $path == '/fonts' || $path == '/ssl' ]]; then
|
if [[ $path == '/fonts' || $path == '/ssl' ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
if [[ -L $i ]]; then
|
||||||
|
symlinks+=(--symlink "$i" "/etc$path")
|
||||||
|
else
|
||||||
ro_mounts+=(--ro-bind "$i" "/etc$path")
|
ro_mounts+=(--ro-bind "$i" "/etc$path")
|
||||||
|
fi
|
||||||
etc_ignored+=("/etc$path")
|
etc_ignored+=("/etc$path")
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -156,6 +163,7 @@ let
|
|||||||
ro_mounts+=(--ro-bind /etc /.host-etc)
|
ro_mounts+=(--ro-bind /etc /.host-etc)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# link selected etc entries from the actual root
|
||||||
for i in ${lib.escapeShellArgs etcBindEntries}; do
|
for i in ${lib.escapeShellArgs etcBindEntries}; do
|
||||||
if [[ "''${etc_ignored[@]}" =~ "$i" ]]; then
|
if [[ "''${etc_ignored[@]}" =~ "$i" ]]; then
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user