waagent: fix storage rules (#340098)

This commit is contained in:
Aleksana 2024-09-08 10:54:49 +08:00 committed by GitHub
commit 00b9c915a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 11 deletions

View File

@ -1,11 +1,12 @@
{ coreutils
, fetchFromGitHub
, lib
, python39
{
coreutils,
fetchFromGitHub,
lib,
python39,
bash,
}:
let
inherit (lib) makeBinPath;
# the latest python version that waagent test against according to https://github.com/Azure/WALinuxAgent/blob/28345a55f9b21dae89472111635fd6e41809d958/.github/workflows/ci_pr.yml#L75
python = python39;
@ -26,12 +27,14 @@ python.pkgs.buildPythonApplication rec {
];
doCheck = false;
# azure-product-uuid chmod rule invokes chmod to change the mode of
# product_uuid (which is not a device itself).
# Replace this with an absolute path.
# Replace tools used in udev rules with their full path and ensure they are present.
postPatch = ''
substituteInPlace config/66-azure-storage.rules \
--replace-fail readlink ${coreutils}/bin/readlink \
--replace-fail cut ${coreutils}/bin/cut \
--replace-fail /bin/sh ${bash}/bin/sh
substituteInPlace config/99-azure-product-uuid.rules \
--replace "/bin/chmod" "${coreutils}/bin/chmod"
--replace-fail "/bin/chmod" "${coreutils}/bin/chmod"
'';
propagatedBuildInputs = [ python.pkgs.distro ];

View File

@ -17032,8 +17032,6 @@ with pkgs;
eltclsh = callPackage ../development/tools/eltclsh { };
waagent = callPackage ../applications/networking/cluster/waagent { };
wasm = ocamlPackages.wasm;
wasm3 = callPackage ../development/interpreters/wasm3 { };