Skip to content

edk2: 202302 -> 202305#241786

Merged
RaitoBezarius merged 1 commit intoNixOS:masterfrom
Luflosi:update/edk2
Jul 8, 2023
Merged

edk2: 202302 -> 202305#241786
RaitoBezarius merged 1 commit intoNixOS:masterfrom
Luflosi:update/edk2

Conversation

@Luflosi
Copy link
Contributor

@Luflosi Luflosi commented Jul 5, 2023

Description of changes

https://github.com/tianocore/edk2/releases/tag/edk2-stable202305

This includes "[OpenSSL] Update OpenSSL version to version 1.1.1t to include CVE fix".

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@Luflosi Luflosi added 1.severity: security Issues which raise a security issue, or PRs that fix one backport release-23.05 labels Jul 5, 2023
@ofborg ofborg bot requested review from LunNova and RaitoBezarius July 5, 2023 23:32
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 5, 2023
@RaitoBezarius
Copy link
Member

What the hell EDK2…

@ajs124
Copy link
Member

ajs124 commented Jul 6, 2023

maybe we should just take openssl from nixpkgs. something like this would probably work:

--- a/pkgs/development/compilers/edk2/default.nix
+++ b/pkgs/development/compilers/edk2/default.nix
@@ -8,6 +8,7 @@
 , llvmPackages_9
 , lib
 , buildPackages
+, openssl
 }:
 
 let
@@ -46,6 +47,12 @@ edk2 = buildStdenv.mkDerivation {
     })
   ];
 
+  prePatch = ''
+    rm -rf CryptoPkg/Library/OpensslLib/openssl
+    tar xf ${openssl.src} -C CryptoPkg/Library/OpensslLib
+    mv -v CryptoPkg/Library/OpensslLib/openssl-* CryptoPkg/Library/OpensslLib/openssl
+  '';
+
   # submodules
   src = fetchFromGitHub {
     owner = "tianocore";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a8687892e8c..f6c0befe390 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7270,7 +7270,9 @@ with pkgs;
 
   edit = callPackage ../applications/editors/edit { };
 
-  edk2 = callPackage ../development/compilers/edk2 { };
+  edk2 = callPackage ../development/compilers/edk2 {
+    openssl = openssl_1_1;
+  };
 
   edk2-uefi-shell = callPackage ../tools/misc/edk2-uefi-shell { };

@Luflosi
Copy link
Contributor Author

Luflosi commented Jul 6, 2023

I can't tell if this is a good or a bad idea. If you look at tianocore/edk2@4ca4041 for example, there are more changes than just changes to the openssl submodule. This may or may not lead to issues when we change the openssl version.

@ajs124
Copy link
Member

ajs124 commented Jul 6, 2023

hm, fair enough

Copy link
Member

@LunNova LunNova left a comment

Choose a reason for hiding this comment

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

Let's merge this first, that approach might be worth doing in another PR but this one should be backported.

@mweinelt mweinelt added the 12.approvals: 2 This PR was reviewed and approved by two persons. label Jul 7, 2023
@RaitoBezarius RaitoBezarius merged commit a471203 into NixOS:master Jul 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2023

Backport failed for release-23.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-23.05
git worktree add -d .worktree/backport-241786-to-release-23.05 origin/release-23.05
cd .worktree/backport-241786-to-release-23.05
git checkout -b backport-241786-to-release-23.05
ancref=$(git merge-base 30a8e2f43bd834eaed9a4a32cbbbdd0436351681 2edeba8e6ca61315478ab265221cd4c4dcebe95b)
git cherry-pick -x $ancref..2edeba8e6ca61315478ab265221cd4c4dcebe95b

@Luflosi Luflosi deleted the update/edk2 branch July 8, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants