Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[staging] kernel/manual-config: prevent chmod errors when there is no arch specific Makefile #107525

Merged
merged 1 commit into from Sep 21, 2021

Conversation

xaverdh
Copy link
Contributor

@xaverdh xaverdh commented Dec 24, 2020

Motivation for this change

fix #107346
(same as #107473 but targeted at staging)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@layus layus left a comment

Choose a reason for hiding this comment

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

Even better than the original :-). Still LGTM.

Copy link
Member

@Emantor Emantor left a comment

Choose a reason for hiding this comment

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

Please provide a commit message that explains the issue and the fix. I had to read the corresponding issue to understand why this change is needed, this should be clear from the commit message.

@@ -249,8 +249,7 @@ let
find . -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w

# Keep root and arch-specific Makefiles
chmod u-w Makefile
chmod u-w arch/$arch/Makefile*
chmod u-w Makefile arch/"$arch"/Makefile*
Copy link
Member

Choose a reason for hiding this comment

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

Why did you change $arch to "$arch"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its quoted in all other places in this file. Even if I somewhat doubt people will start adding architectures with spaces in them, its good to be consistent I guess?

…h specific Makefile

In such cases the glob pattern might not match anything and chmod will complain about the missing argument.
@xaverdh
Copy link
Contributor Author

xaverdh commented Dec 31, 2020

Please provide a commit message that explains the issue and the fix. I had to read the corresponding issue to understand why this change is needed, this should be clear from the commit message.

I made the commit message more elaborate. This issue with chmod pops up every now and then in nixpkgs code.. Maybe we should actually patch chmod in nixpkgs to behave differently (totally out of the scope of this pr though).

@ofborg ofborg bot requested review from andresilva and layus December 31, 2020 10:30
@xaverdh xaverdh requested a review from Emantor January 17, 2021 13:07
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/552

@xaverdh
Copy link
Contributor Author

xaverdh commented Sep 4, 2021

cc @SuperSandro2000 (needs merger)

@SuperSandro2000 SuperSandro2000 merged commit f0955be into NixOS:staging Sep 21, 2021
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.

None yet

6 participants