Skip to content

linux: Makes the -dev output reproducible - #57100

Merged
FRidh merged 1 commit into
NixOS:stagingfrom
samueldr:r13y/linux
May 4, 2019
Merged

FRidh merged 1 commit into
NixOS:stagingfrom
samueldr:r13y/linux

Conversation

@samueldr

@samueldr samueldr commented Mar 9, 2019

Copy link
Copy Markdown
Member
Motivation for this change

Makes the -dev output of the kernel reproducible.

The (temporary) file has been spotted by r13y.com

image

This file is, in turn, generated by a poor cleanup under try-run from the Makefiles. The particular one is this one:

It was found via using strace (and a good guess). The underlying cc call will call cc1 which will use -MD with the filename modified to be *.d, meaning try-run will not clean it up.

The file name is different each run, and cannot be derived. Thus the patterned rm.

Things done
  • ☑ Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • ☑ NixOS
  • ☑ Assured whether relevant documentation is up to date
  • ☑ Fits CONTRIBUTING.md.

cc @grahamc

@grahamc grahamc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM... :)

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any 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. labels Mar 9, 2019
@samueldr

samueldr commented Mar 9, 2019

Copy link
Copy Markdown
Member Author

Fails with 4.20, I'm thinking they changed just enough not to be an issue.

rm: missing operand
Try 'rm --help' for more information.

@samueldr

samueldr commented Mar 9, 2019

Copy link
Copy Markdown
Member Author

With -f it will not fail on the more recent builds that seemingly don't exhibit the same issues.

@samueldr

samueldr commented Mar 9, 2019 •

Copy link
Copy Markdown
Member Author

@GrahamcOfBorg build linux_latest

@srhb

srhb commented Mar 16, 2019

Copy link
Copy Markdown
Contributor

@GrahamcOfBorg build linux_latest

@FRidh
FRidh changed the base branch from master to staging April 16, 2019 17:09
@FRidh

FRidh commented Apr 16, 2019

Copy link
Copy Markdown
Member

please rebase and test again

@samueldr

samueldr commented Apr 17, 2019 •

Copy link
Copy Markdown
Member Author

Just rebased, built locally.

/nix/store/nbhrlpkci5w9h0f3d82q63w1mj3h3zi9-linux-5.0.7
/nix/store/m28ljx582c75svf554xvqpbyd909jhkr-linux-4.19.34
/nix/store/i5rv0ziwb5rv5qi5a21wmnwnz191lmlc-linux-4.4.178
/nix/store/isd0ckmmwpf6ys2lks8ncxp2b4cikcpj-linux-4.14.111

Re-ran with --check and they all passed.

@FRidh
FRidh merged commit e25f5c1 into NixOS:staging May 4, 2019
@samueldr
samueldr deleted the r13y/linux branch May 4, 2019 16:21
thiagokokada pushed a commit to thiagokokada/nixpkgs that referenced this pull request Oct 9, 2026
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]: <NixOS#57100>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants