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

nixos-img: disable patchelf on executable-marked OS image #1034

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/by-name/buildVerityUKI/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ nixos-config:
realRoothash=$(${lib.getExe jq} -r "[.[] | select(.roothash != null)] | .[0].roothash" $out/repart-output.json)
sed -i "0,/${roothashPlaceholder}/ s/${roothashPlaceholder}/$realRoothash/" $out/${oldAttrs.pname}_${oldAttrs.version}.raw
'';
dontPatchELF = true;
})
3 changes: 3 additions & 0 deletions packages/by-name/kata/kata-image/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ let
'';

dontInstall = true;
dontPatchELF = true;
};
packageIndex = builtins.fromJSON (builtins.readFile ./package-index.json);
rpmSources = lib.forEach packageIndex (
Expand Down Expand Up @@ -95,6 +96,7 @@ let

runHook postBuild
'';
dontPatchELF = true;
};

tdnfConf = writeText "tdnf.conf" ''
Expand Down Expand Up @@ -239,6 +241,7 @@ let
in
"dm-mod.create=\"dm-verity,,,ro,0 ${toString dataSectors} verity 1 /dev/vda1 /dev/vda2 ${dataBlockSize} ${hashBlockSize} ${dataBlocks} 0 sha256 ${rootHash} ${salt}\" root=/dev/dm-0";
};
dontPatchELF = true;
};
in
kata-image
2 changes: 2 additions & 0 deletions packages/by-name/microsoft/kata-igvm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ let
'';
};

dontPatchELF = true;

meta = {
description = "The Contrast runtime IGVM file defines the initial state of a pod-VM.";
license = lib.licenses.asl20;
Expand Down
4 changes: 3 additions & 1 deletion packages/by-name/microsoft/kata-image/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ let

runHook postBuild
'';

dontInstall = true;
dontPatchELF = true;
};
packageIndex = builtins.fromJSON (builtins.readFile ./package-index.json);
rpmSources = lib.forEach packageIndex (
Expand Down Expand Up @@ -84,6 +84,7 @@ let

runHook postBuild
'';
dontPatchELF = true;
};

tdnfConf = writeText "tdnf.conf" ''
Expand Down Expand Up @@ -198,4 +199,5 @@ stdenv.mkDerivation rec {
rm -rf $out
mv /build/raw.img $out
'';
dontPatchELF = true;
}