Skip to content

installer: Fix store mtime - #16558

Merged
Ericson2314 merged 3 commits into
masterfrom
fix-installer-mtime
Oct 3, 2026
Merged

Ericson2314 merged 3 commits into
masterfrom
fix-installer-mtime

Conversation

@xokdvium

@xokdvium xokdvium commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

The are several issues:

  • Store mtime is 1 second into the epoch, not epoch.
  • All installers currently rely on the tarball having the correct mtime - it wasn't.
  • BusyBox tar doesn't correctly preserve mtime when unpacking, so for single user installs explicitly touch the store object recursively to force the correct mtime manually. Done in -depth order.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@xokdvium
xokdvium requested a review from fgaz October 3, 2026 15:48
@xokdvium
xokdvium requested a review from edolstra as a code owner October 3, 2026 15:48
Comment on lines +197 to +200
# BusyBox tar is bad at preserving mtime because it doesn't seem to do the correct
# thing of doing a final fixup pass for fixing parent directory permissions and doesn't
# handle symlinks at all. So we can set the correct mtime here.
find "$dest/store/$i" -depth -exec touch -hmd "@1" {} +

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fgaz this issue affects alpine fwiw.

…st names

This ports the same hack as in the nix-installer repo to make test derivation names
not get dropped on the floor by DrvName extraction logic (which treated everything after
the dash - including the install case description - as part of the "version").
…taller repo

Aligns the test better to what's in the nix-installer repo and adds support for
custom checks for cases with some common tests.
It's 1, not 0 (see mtimeStore). Also busybox tar is busted at preserving mtime,
so hack around the issue by setting the correct mtime ourselves.
@xokdvium
xokdvium force-pushed the fix-installer-mtime branch from 70761c1 to 4620eab Compare October 3, 2026 18:42
@Ericson2314
Ericson2314 added this pull request to the merge queue Oct 3, 2026
Merged via the queue into master with commit e828077 Oct 3, 2026
20 checks passed
@Ericson2314
Ericson2314 deleted the fix-installer-mtime branch October 3, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants