diff options
author | Ryan Lahfa <masterancpp@gmail.com> | 2023-05-15 09:50:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 09:50:46 +0200 |
commit | c6ef6dbc89f414e7e5e34320b27472b31a04bb8f (patch) | |
tree | 65447eb677659c91b6cb15c86e1c5005c6d8d122 | |
parent | c5445c0fda2adaea8113b01d2fabeb2d50f40aa5 (diff) | |
parent | eae5f83649645c1db5fd0474b95ab709aabed5fd (diff) | |
download | nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.tar nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.tar.gz nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.tar.bz2 nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.tar.lz nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.tar.xz nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.tar.zst nixlib-c6ef6dbc89f414e7e5e34320b27472b31a04bb8f.zip |
Merge pull request #231806 from erdnaxe/chipsec-fix
chipsec: 1.8.1 -> 1.10.6; unbreak
-rw-r--r-- | pkgs/tools/security/chipsec/compile-ko.diff | 14 | ||||
-rw-r--r-- | pkgs/tools/security/chipsec/default.nix | 10 | ||||
-rw-r--r-- | pkgs/tools/security/chipsec/ko-path.diff | 16 |
3 files changed, 21 insertions, 19 deletions
diff --git a/pkgs/tools/security/chipsec/compile-ko.diff b/pkgs/tools/security/chipsec/compile-ko.diff index 0ab2c80a6251..2ac6f69b4f64 100644 --- a/pkgs/tools/security/chipsec/compile-ko.diff +++ b/pkgs/tools/security/chipsec/compile-ko.diff @@ -1,10 +1,10 @@ -diff --git i/setup.py w/setup.py -index cfe2665..5795874 100755 ---- i/setup.py -+++ w/setup.py -@@ -179,7 +179,7 @@ class build_ext(_build_ext): - driver_build_function = self._build_win_driver - self._build_win_compression() +diff --git a/setup.py b/setup.py +index 3465765c..ae128922 100755 +--- a/setup.py ++++ b/setup.py +@@ -137,7 +137,7 @@ class build_ext(_build_ext): + elif platform.system().lower() == "windows": + driver_build_function = self._build_win_driver - if not self.skip_driver: + if True: diff --git a/pkgs/tools/security/chipsec/default.nix b/pkgs/tools/security/chipsec/default.nix index 2acdc9bb09f0..8842cbab248c 100644 --- a/pkgs/tools/security/chipsec/default.nix +++ b/pkgs/tools/security/chipsec/default.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "chipsec"; - version = "1.8.1"; + version = "1.10.6"; disabled = !stdenv.isLinux; @@ -18,7 +18,7 @@ python3.pkgs.buildPythonApplication rec { owner = "chipsec"; repo = "chipsec"; rev = version; - hash = "sha256-bK8wlwhP0pi8rOs8ysbSZ+0aZOaX4mckfH/p4OLGnes="; + hash = "sha256-+pbFG1SmSO/cnt1e+kel7ereC0I1OCJKKsS0KaJDWdc="; }; patches = lib.optionals withDriver [ ./ko-path.diff ./compile-ko.diff ]; @@ -28,7 +28,7 @@ python3.pkgs.buildPythonApplication rec { nativeBuildInputs = [ libelf nasm - ]; + ] ++ lib.optionals withDriver kernel.moduleBuildDependencies; nativeCheckInputs = with python3.pkgs; [ distro @@ -72,7 +72,9 @@ python3.pkgs.buildPythonApplication rec { ''; license = licenses.gpl2Only; homepage = "https://github.com/chipsec/chipsec"; - maintainers = with maintainers; [ johnazoidberg ]; + maintainers = with maintainers; [ johnazoidberg erdnaxe ]; platforms = [ "x86_64-linux" ] ++ lib.optional (!withDriver) "x86_64-darwin"; + # https://github.com/chipsec/chipsec/issues/1793 + broken = withDriver && kernel.kernelOlder "5.4" && kernel.isHardened; }; } diff --git a/pkgs/tools/security/chipsec/ko-path.diff b/pkgs/tools/security/chipsec/ko-path.diff index ad26d232d964..f7359600a8e6 100644 --- a/pkgs/tools/security/chipsec/ko-path.diff +++ b/pkgs/tools/security/chipsec/ko-path.diff @@ -1,13 +1,13 @@ -diff --git c/chipsec/helper/linux/linuxhelper.py i/chipsec/helper/linux/linuxhelper.py -index c51b5e6..4be05ea 100644 ---- c/chipsec/helper/linux/linuxhelper.py -+++ i/chipsec/helper/linux/linuxhelper.py -@@ -152,7 +152,7 @@ class LinuxHelper(Helper): +diff --git a/chipsec/helper/linux/linuxhelper.py b/chipsec/helper/linux/linuxhelper.py +index 2fd65140..f3f26bcb 100644 +--- a/chipsec/helper/linux/linuxhelper.py ++++ b/chipsec/helper/linux/linuxhelper.py +@@ -153,7 +153,7 @@ class LinuxHelper(Helper): else: - a2 = "a2=0x{}".format(phys_mem_access_prot) + a2 = f'a2=0x{phys_mem_access_prot}' -- driver_path = os.path.join(chipsec.file.get_main_dir(), "chipsec", "helper", "linux", "chipsec.ko" ) -+ driver_path = os.path.join(chipsec.file.get_main_dir(), "drivers", "linux", "chipsec.ko" ) +- driver_path = os.path.join(chipsec.file.get_main_dir(), "chipsec", "helper", "linux", "chipsec.ko") ++ driver_path = os.path.join(chipsec.file.get_main_dir(), "drivers", "linux", "chipsec.ko") if not os.path.exists(driver_path): driver_path += ".xz" if not os.path.exists(driver_path): |