Skip to content

Preserve file modes for bundled infrastructure#2179

Closed
lbussell wants to merge 4 commits into
mainfrom
lbussell-restore-bundled-script-modes
Closed

Preserve file modes for bundled infrastructure#2179
lbussell wants to merge 4 commits into
mainfrom
lbussell-restore-bundled-script-modes

Conversation

@lbussell

@lbussell lbussell commented Jul 17, 2026

Copy link
Copy Markdown
Member

PR #2159 embedded infrastructure file contents and paths in ImageBuilder, but .NET embedded resources do not carry Unix file modes. As a result, the update command recreated executable helper scripts as 0644, producing the mode-only changes in #2177.

Generate ContentFileModes.txt from Git's index and embed it alongside the infrastructure resources. ImageBuilder applies the captured mode for every file it writes on Unix, without maintaining a runtime path allowlist. A build check rejects stale generated metadata when building from a Git checkout.

Validated by building the Linux ImageBuilder container and running update inside it: the four affected scripts are recorded by Git as 100755, while regular helper scripts remain 100644.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2766ec6-d521-4b4e-9a97-b4d3f8400e4b
@lbussell
lbussell requested a review from a team as a code owner July 17, 2026 21:22
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2766ec6-d521-4b4e-9a97-b4d3f8400e4b
@lbussell lbussell changed the title Restore bundled PowerShell script file modes Preserve executable modes for bundled scripts Jul 17, 2026
lbussell added 2 commits July 17, 2026 14:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2766ec6-d521-4b4e-9a97-b4d3f8400e4b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2766ec6-d521-4b4e-9a97-b4d3f8400e4b
@lbussell lbussell changed the title Preserve executable modes for bundled scripts Preserve file modes for bundled infrastructure Jul 17, 2026
@lbussell

Copy link
Copy Markdown
Member Author

Back to the drawing board for a bit...

@lbussell lbussell closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant