Skip to content

linux: trivial builder clean‐ups - #571141

Merged
zowoq merged 18 commits into
staging-nixosfrom
wip-emily/push-zormruotwwmw
Oct 9, 2026
Merged

zowoq merged 18 commits into
staging-nixosfrom
wip-emily/push-zormruotwwmw

Conversation

@emilazy

@emilazy emilazy commented Oct 7, 2026

Copy link
Copy Markdown
Member

Miscellaneous clean‐ups in preparation for the image rebuild and deterministic module signing work, mostly removing long‐obsolete things and moving logic outside of Bash where possible. This is best reviewed commit‐by‐commit.


This is part of the end‐to‐end NixOS boot security project, funded through NGI Fediversity Fund, a fund established by NLnet with financial support from the European Commission’s Next Generation Internet programme.

Things done

@emilazy emilazy mentioned this pull request Oct 7, 2026
3 of 13 tasks
nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci
nixpkgs-ci Bot requested review from a team, Atemu, AxerTheAxe, JerrySM64, andir, eljamm, lovesegfault, moni-dz, thiagokokada, thoughtpolice and zzzsyyy and removed request for a team October 7, 2026 01:47
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: kernel The Linux kernel labels Oct 7, 2026
@emilazy
emilazy changed the base branch from staging-nixos to staging October 7, 2026 01:48
@nixpkgs-ci nixpkgs-ci Bot closed this Oct 7, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Oct 7, 2026
@nixpkgs-branch-check
nixpkgs-branch-check Bot dismissed their stale review October 7, 2026 01:54

Review dismissed automatically

@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team October 7, 2026 01:54
@zowoq

zowoq commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Only kernel rebuilds so it's fine for this to go to staging-nixos.

@emilazy
emilazy changed the base branch from staging to staging-nixos October 7, 2026 05:05
@nixpkgs-ci nixpkgs-ci Bot closed this Oct 7, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Oct 7, 2026

@zowoq zowoq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, also built a couple of aarch64 native and riscv cross kernels.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 8, 2026
emilazy added 18 commits October 8, 2026 18:21
Otherwise the discrepancies can cause configuration inconsistency
because of e.g. Kconfig settings having defaults that depend on the
presence of the `openssl(1)` command.
This was added in 2c38df1, and has
been inert since f620b1b.
They’re already appended to `makeFlags`, so this was appending
them twice.
The hardened kernel was removed, but this is in any case redundant
to the blanket `patchShebangs scripts` a few lines below.
This was fixed in 4.16 with [e847f6aaf68f6156a5e9b26afe1a7316b9ab697e],
as was observed for 4.20 in the [original PR].

[e847f6aaf68f6156a5e9b26afe1a7316b9ab697e]:
<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e847f6aaf68f6156a5e9b26afe1a7316b9ab697e>

[original PR]: <#57100>
Kernel images already depend on `vmlinux` (also, `perf(8)` doesn’t
really need it any more, so the comment is inaccurate).
The `enableParallelInstalling` logic already handles this by default.
No reason for this to be inconsistent between invocations, and it
keeps flags out of our build targets variable.
Per [the documentation]:

> The value has to be a string that can be passed to date -d.

So we don’t need to run this through `date(1)` ourselves.

[the documentation]:
<https://docs.kernel.org/kbuild/kbuild.html#kbuild-build-timestamp>
No reason for this to be inconsistent between invocations, and it
keeps flags out of our build targets variable.
This is more consistent with how we handle the `modules` variable
and allows for easier reuse.
There’s no reason to run this separately.
This keeps targets out of our flags variable.
@emilazy
emilazy force-pushed the wip-emily/push-zormruotwwmw branch from 4bff6e6 to f64e61c Compare October 8, 2026 17:21

@nixpkgs-branch-check nixpkgs-branch-check Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR's base branch is set to staging-nixos, but this PR causes 1707 rebuilds.
It is therefore considered a mass rebuild.
Please change the base branch to the right base branch for your changes (probably staging).

@zowoq
zowoq added this pull request to the merge queue Oct 9, 2026
Merged via the queue into staging-nixos with commit 001ef8c Oct 9, 2026
29 checks passed
@zowoq
zowoq deleted the wip-emily/push-zormruotwwmw branch October 9, 2026 00:22
# Keep some extra files on some arches (powerpc, aarch64)
for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o; do
# Keep an extra file on powerpc
for f in arch/powerpc/lib/crtsavres.o; do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is only one static value now, so it doesn't need to be a loop any more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is an intermediate state - we add more back to the list in the next PR (though it also gets rewritten at the same time). Seems best not to collapse a loop over a list when we know it's going to grow again; otherwise I'd have cleaned this up, possibly in a separate commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: kernel The Linux kernel 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants