Image Customizer: Fix special directories and partition customization.#7043
Merged
cwize1 merged 1 commit intomicrosoft:mainfrom Jan 18, 2024
Merged
Image Customizer: Fix special directories and partition customization.#7043cwize1 merged 1 commit intomicrosoft:mainfrom
cwize1 merged 1 commit intomicrosoft:mainfrom
Conversation
romoh
reviewed
Dec 18, 2023
romoh
approved these changes
Dec 18, 2023
dmcilvaney
approved these changes
Jan 17, 2024
b1fc75d to
73faa3b
Compare
Currently, the `safechroot.Chroot` class will auto-mount a bunch of the special directories (e.g. /dev, /proc, etc.). This is done (presumably) to permit more Linux utils to be runnable under the chroot. However, when the image customizer tool is doing file-copy based partition customization, it has to make sure it avoids copying the contents of the special directories to avoiding messing up the host system. Currently, this is done by just explictly excluding the special directories from the copy operation. However, this can result in problems. For example, a directory not being created (e.g. /tmp) or a mount directory not receiving the correct extended attributes (e.g. SELinux). This change adds an initialization option to `safechroot.Chroot` to set whether or not the special-directories are mounted. This allows the partition customization to do just a straight file-copy.
73faa3b to
6557e62
Compare
cwize1
added a commit
that referenced
this pull request
Jan 18, 2024
cwize1
added a commit
that referenced
this pull request
Jan 18, 2024
BettyRain
pushed a commit
that referenced
this pull request
Jan 23, 2024
BettyRain
pushed a commit
that referenced
this pull request
Jan 26, 2024
sharath-srikanth-chellappa
pushed a commit
that referenced
this pull request
Jan 26, 2024
sharath-srikanth-chellappa
pushed a commit
that referenced
this pull request
Jan 26, 2024
sharath-srikanth-chellappa
pushed a commit
that referenced
this pull request
Jan 26, 2024
BettyRain
pushed a commit
that referenced
this pull request
Jan 27, 2024
Adub17030MS
pushed a commit
that referenced
this pull request
Feb 9, 2024
Xiaohong-Deng
pushed a commit
to Xiaohong-Deng/azurelinux
that referenced
this pull request
Nov 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./SPECS/LICENSES-AND-NOTICES/data/licenses.json,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
Currently, the
safechroot.Chrootclass will auto-mount a bunch of the special directories (e.g. /dev, /proc, etc.). This is done (presumably) to permit more Linux utils to be runnable under the chroot.However, when the image customizer tool is doing file-copy based partition customization, it has to make sure it avoids copying the contents of the special directories to avoiding messing up the host system. Currently, this is done by just explictly excluding the special directories from the copy operation. However, this can result in problems. For example, a directory not being created (e.g. /tmp) or a mount directory not receiving the correct extended attributes (e.g. SELinux).
This change adds an initialization option to
safechroot.Chrootto set whether or not the special-directories are mounted. This allows the partition customization to do just a straight file-copy.Change Log
Does this affect the toolchain?
NO
Test Methodology