Restore the rpm mtime on vmlinuz after signing #74

Merged
TheDarkWizard merged 1 commit from pin-vmlinuz-mtime into main 2026-07-20 06:10:16 +00:00

Follow-up to 55d5035: the faketime pin made the signature bytes deterministic, but the ~290MB kernel-cachyos layer still churned nightly. sbsign writes a fresh output file whose mtime is the real build wallclock (LD_PRELOAD can't fake what the kernel stamps on the inode), and chunkah embeds mtimes in the layer tar, so the layer re-hashed on every build even when the kernel didn't change. Confirmed by diffing the gnome 20260717/20260718 amd64 manifests: the layer changed on a day with no kernel-cachyos update.

Touch vmlinuz back to the rpm's timestamp (the same instant the signature is already pinned to). Verify by checking the kernel layer digest stays identical across the next two nightlies without a kernel update.

Should cut roughly 290MB per edition per nightly off both the runner pushes and every machine's daily update.

Follow-up to 55d5035: the faketime pin made the signature bytes deterministic, but the ~290MB kernel-cachyos layer still churned nightly. sbsign writes a fresh output file whose mtime is the real build wallclock (LD_PRELOAD can't fake what the kernel stamps on the inode), and chunkah embeds mtimes in the layer tar, so the layer re-hashed on every build even when the kernel didn't change. Confirmed by diffing the gnome 20260717/20260718 amd64 manifests: the layer changed on a day with no kernel-cachyos update. Touch vmlinuz back to the rpm's timestamp (the same instant the signature is already pinned to). Verify by checking the kernel layer digest stays identical across the next two nightlies without a kernel update. Should cut roughly 290MB per edition per nightly off both the runner pushes and every machine's daily update.
Restore the rpm mtime on vmlinuz after signing
Some checks failed
bluebuild / Check if a rebuild is needed (pull_request) Successful in 4m26s
PR Rebase Hint / Post rebase command (pull_request) Successful in 11m45s
bluebuild / Release (pull_request) Has been cancelled
bluebuild / Generate Release (pull_request) Has been cancelled
bluebuild / Build Budgie NVIDIA (Budgie NVIDIA, recipe-budgie-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build Budgie (Budgie, recipe-budgie.yml) (pull_request) Has been cancelled
bluebuild / Build COSMIC NVIDIA (COSMIC NVIDIA, recipe-cosmic-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build COSMIC (COSMIC, recipe-cosmic.yml) (pull_request) Has been cancelled
bluebuild / Build GNOME NVIDIA (GNOME NVIDIA, recipe-gnome-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build GNOME (GNOME, recipe-gnome.yml) (pull_request) Has been cancelled
bluebuild / Build Hyprland DMS NVIDIA (Hyprland DMS NVIDIA, recipe-hyprland-dms-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build Hyprland DMS (Hyprland DMS, recipe-hyprland-dms.yml) (pull_request) Has been cancelled
bluebuild / Build Hyprland Noctalia NVIDIA (Hyprland Noctalia NVIDIA, recipe-hyprland-noctalia-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build Hyprland Noctalia (Hyprland Noctalia, recipe-hyprland-noctalia.yml) (pull_request) Has been cancelled
bluebuild / Build KDE NVIDIA (KDE NVIDIA, recipe-kde-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build KDE (KDE, recipe-kde.yml) (pull_request) Has been cancelled
bluebuild / Build Niri DMS NVIDIA (Niri DMS NVIDIA, recipe-niri-dms-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build Niri DMS (Niri DMS, recipe-niri-dms.yml) (pull_request) Has been cancelled
bluebuild / Build Niri Noctalia NVIDIA (Niri Noctalia NVIDIA, recipe-niri-noctalia-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build Niri Noctalia (Niri Noctalia, recipe-niri-noctalia.yml) (pull_request) Has been cancelled
bluebuild / Build Nourish NVIDIA (Nourish NVIDIA, recipe-nourish-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build Nourish (Nourish, recipe-nourish.yml) (pull_request) Has been cancelled
bluebuild / Build XFCE NVIDIA (XFCE NVIDIA, recipe-xfce-nvidia.yml) (pull_request) Has been cancelled
bluebuild / Build XFCE (XFCE, recipe-xfce.yml) (pull_request) Has been cancelled
240fc17be6
The faketime pin from 55d5035 made the sbsign signature bytes
deterministic, but the kernel layer kept churning every night anyway:
sbsign writes a brand-new output file, and the inode mtime it gets is
the real build wallclock (LD_PRELOAD faketime only fakes the process
clock, it cannot change what the kernel stamps on the file). Chunkah
embeds mtimes in the layer tar, so the ~290MB kernel-cachyos layer
re-hashed on every build even with an identical kernel. Diffing the
gnome 20260717 and 20260718 manifests showed the layer changing on a
day kernel-cachyos did not update.

Touch vmlinuz back to the timestamp rpm gave it (the package build
time, the same instant the signature is already pinned to), so the
layer only changes when the kernel actually does.

🧪 Test this PR on a real install

Once the build checks on this PR pass, a signed test image is published for each edition this PR builds. Pick the one matching your hardware and, from an existing Monolith install (which already has the signing policy), rebase onto it:

gnome

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome:pr-74-44
systemctl reboot

kde

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/kde:pr-74-44
systemctl reboot

xfce

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/xfce:pr-74-44
systemctl reboot

cosmic

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/cosmic:pr-74-44
systemctl reboot

budgie

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/budgie:pr-74-44
systemctl reboot

hyprland-noctalia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-noctalia:pr-74-44
systemctl reboot

hyprland-dms

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-dms:pr-74-44
systemctl reboot

niri-noctalia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-noctalia:pr-74-44
systemctl reboot

niri-dms

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-dms:pr-74-44
systemctl reboot

nourish

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/nourish:pr-74-44
systemctl reboot

gnome-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome-nvidia:pr-74-44
systemctl reboot

kde-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/kde-nvidia:pr-74-44
systemctl reboot

xfce-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/xfce-nvidia:pr-74-44
systemctl reboot

cosmic-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/cosmic-nvidia:pr-74-44
systemctl reboot

budgie-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/budgie-nvidia:pr-74-44
systemctl reboot

hyprland-noctalia-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-noctalia-nvidia:pr-74-44
systemctl reboot

hyprland-dms-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-dms-nvidia:pr-74-44
systemctl reboot

niri-noctalia-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-noctalia-nvidia:pr-74-44
systemctl reboot

niri-dms-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-dms-nvidia:pr-74-44
systemctl reboot

nourish-nvidia

rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/nourish-nvidia:pr-74-44
systemctl reboot

The tags are rebuilt on every new commit here, so rpm-ostree upgrade pulls the latest build. When you're done testing, return to your edition's released image (:latest).

The commands cover the editions this PR affected when it was opened; commits that touch more editions publish their tags too, just without a refreshed comment. The test tags stop updating once this PR is merged or closed.

### 🧪 Test this PR on a real install **Once the build checks on this PR pass**, a signed test image is published for each edition this PR builds. Pick the one matching your hardware and, from an existing Monolith install (which already has the signing policy), rebase onto it: **`gnome`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome:pr-74-44 systemctl reboot ``` **`kde`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/kde:pr-74-44 systemctl reboot ``` **`xfce`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/xfce:pr-74-44 systemctl reboot ``` **`cosmic`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/cosmic:pr-74-44 systemctl reboot ``` **`budgie`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/budgie:pr-74-44 systemctl reboot ``` **`hyprland-noctalia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-noctalia:pr-74-44 systemctl reboot ``` **`hyprland-dms`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-dms:pr-74-44 systemctl reboot ``` **`niri-noctalia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-noctalia:pr-74-44 systemctl reboot ``` **`niri-dms`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-dms:pr-74-44 systemctl reboot ``` **`nourish`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/nourish:pr-74-44 systemctl reboot ``` **`gnome-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/gnome-nvidia:pr-74-44 systemctl reboot ``` **`kde-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/kde-nvidia:pr-74-44 systemctl reboot ``` **`xfce-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/xfce-nvidia:pr-74-44 systemctl reboot ``` **`cosmic-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/cosmic-nvidia:pr-74-44 systemctl reboot ``` **`budgie-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/budgie-nvidia:pr-74-44 systemctl reboot ``` **`hyprland-noctalia-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-noctalia-nvidia:pr-74-44 systemctl reboot ``` **`hyprland-dms-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/hyprland-dms-nvidia:pr-74-44 systemctl reboot ``` **`niri-noctalia-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-noctalia-nvidia:pr-74-44 systemctl reboot ``` **`niri-dms-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/niri-dms-nvidia:pr-74-44 systemctl reboot ``` **`nourish-nvidia`** ```bash rpm-ostree rebase ostree-image-signed:docker://forge.waywardinn.com/monolith-os/nourish-nvidia:pr-74-44 systemctl reboot ``` The tags are rebuilt on every new commit here, so `rpm-ostree upgrade` pulls the latest build. When you're done testing, return to your edition's released image (`:latest`). _The commands cover the editions this PR affected when it was opened; commits that touch more editions publish their tags too, just without a refreshed comment. The test tags stop updating once this PR is merged or closed._
Sign in to join this conversation.
No description provided.