Unverified Commit 00b9c915 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

waagent: fix storage rules (#340098)

parents bf584dbb d300e2a8
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
{ 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 ];
+0 −2
Original line number Diff line number Diff line
@@ -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 { };