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

linux_*_hardened: refactor update script #86074

Merged
merged 8 commits into from May 11, 2020

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Apr 26, 2020

Motivation for this change

Successor to #86034, plus more refactoring, sans the updates.

Passes mypy --strict with PyGithub/PyGithub#1489:

emily@renko ~/s/nixpkgs (refactor-linux-hardened-update-script)> 
nix-shell -I nixpkgs=. -p "python38.withPackages (ps: [(ps.PyGithub.overrideAttrs (_: {src=/home/emily/src/PyGithub;})) ps.mypy])" --run "mypy --strict pkgs/os-specific/linux/kernel/hardened/update.py"
Success: no issues found in 1 source file

and successfully recreates hardened/patches.json from scratch locally.

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.
@emilazy emilazy requested review from edolstra, Infinisil, joachifm and nbp as code owners Apr 26, 2020
@emilazy emilazy mentioned this pull request Apr 26, 2020
1 of 10 tasks complete
@emilazy emilazy force-pushed the emilazy:refactor-linux-hardened-update-script branch from db5ad3c to 4f9a68a Apr 26, 2020
Copy link
Member

@NeQuissimus NeQuissimus left a comment

I'm no Python programmer but logically, this makes sense to me :D

@emilazy emilazy force-pushed the emilazy:refactor-linux-hardened-update-script branch from 4f9a68a to 7a18da1 May 3, 2020
@emilazy emilazy requested review from FRidh and jonringer as code owners May 3, 2020
@emilazy
Copy link
Member Author

@emilazy emilazy commented May 3, 2020

Rebased, and included a PyGithub version bump; now passes type-checking with the nixpkgs version!

@emilazy emilazy force-pushed the emilazy:refactor-linux-hardened-update-script branch from 7a18da1 to 065694f May 3, 2020
@jonringer
Copy link
Contributor

@jonringer jonringer commented May 3, 2020

please resolve conflicts :)

@emilazy emilazy force-pushed the emilazy:refactor-linux-hardened-update-script branch from 065694f to 584d6ee May 3, 2020
@emilazy
Copy link
Member Author

@emilazy emilazy commented May 3, 2020

Rebased~

emilazy added 2 commits May 3, 2020
$ isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --use-parentheses …
$ black --line-length=80 …

(per the black documentation)
@emilazy emilazy force-pushed the emilazy:refactor-linux-hardened-update-script branch from 584d6ee to 5a5a2d0 May 8, 2020
@emilazy
Copy link
Member Author

@emilazy emilazy commented May 8, 2020

Rebased for conflicts again.

cc @Mic92

@Mic92 Mic92 merged commit 885f65f into NixOS:master May 11, 2020
@emilazy emilazy deleted the emilazy:refactor-linux-hardened-update-script branch May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.