Skip to content

Preserve ZIP modified times when signing packages#20

Merged
Marc-André Moreau (mamoreau-devolutions) merged 1 commit into
Devolutions:masterfrom
bgrainger:fix/nupkg-zip-timestamps
May 31, 2026
Merged

Preserve ZIP modified times when signing packages#20
Marc-André Moreau (mamoreau-devolutions) merged 1 commit into
Devolutions:masterfrom
bgrainger:fix/nupkg-zip-timestamps

Conversation

@bgrainger

Copy link
Copy Markdown
Contributor

Summary

  • preserve ZIP entry modified timestamps when portable package signing rewrites existing entries
  • stamp rewritten and newly added ZIP entries with local wall-clock time so Windows shows Date modified metadata
  • add focused regression tests for generic ZIP repacks and NuGet signature rewriting

Validation

  • cargo clippy --workspace --all-targets --locked
  • cargo test --workspace --locked (fails in pre-existing tests/fixture_vector_manifest.rs due tests/fixtures/msix-minimal/AppxManifest.xml size mismatch)
  • bash scripts/linux-portable-validation.sh

Portable package signing rewrote ZIP entries with zip::write::FileOptions defaults, which left DOS timestamps at 1980-01-01. That made signed files inside NuGet packages lose their Windows Date modified metadata.

Preserve timestamps on copied ZIP entries, stamp rewritten and new entries with local wall-clock time, and cover the behavior with targeted NuGet and ZIP repack tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) merged commit a380ade into Devolutions:master May 31, 2026
18 checks passed
@bgrainger Bradley Grainger (bgrainger) deleted the fix/nupkg-zip-timestamps branch May 31, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants