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

[Backport release-22.11] storcli: 7.2106.00 -> 7.2309.00, perccli: 7.1910.00 -> 7.2110.00 #204511

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 28 additions & 14 deletions pkgs/tools/misc/perccli/default.nix
@@ -1,37 +1,51 @@
{ lib
, stdenvNoCC
, fetchurl
, fetchzip
, rpmextract
}:

stdenvNoCC.mkDerivation rec {
pname = "perccli";
version = "7.1910.00";
version = "7.2110.00";

src = fetchzip {
# On pkg update: manually adjust the version in the URL because of the different format.
url = "https://dl.dell.com/FOLDER09074160M/1/PERCCLI_7.211.0_Linux.tar.gz";
sha256 = "sha256-8gk+0CrgeisfN2hNpaO1oFey57y7KuNy2i6PWTikDls=";

src = fetchurl {
url = "https://dl.dell.com/FOLDER07815522M/1/PERCCLI_${version}_A12_Linux.tar.gz";
sha256 = "sha256-Gt/kr5schR/IzFmnhXO57gjZpOJ9NSnPX/Sj7zo8Qjk=";
# Dell seems to block "uncommon" user-agents, such as Nixpkgs's custom one.
# Sending no user-agent at all seems to be fine though.
curlOptsList = [ "--user-agent" "" ];
};

nativeBuildInputs = [ rpmextract ];

buildCommand = ''
tar xf $src
rpmextract PERCCLI_*_Linux/perccli-*.noarch.rpm
install -D ./opt/MegaRAID/perccli/perccli64 $out/bin/perccli64
ln -s perccli64 $out/bin/perccli

# Not needed because the binary is statically linked
#eval fixupPhase
unpackPhase = ''
rpmextract $src/perccli-00${version}00.0000-1.noarch.rpm
'';

dontPatch = true;
dontConfigure = true;
dontBuild = true;

installPhase = let
inherit (stdenvNoCC.hostPlatform) system;
platforms = {
x86_64-linux = ''
install -D ./opt/MegaRAID/perccli/perccli64 $out/bin/perccli64
ln -s perccli64 $out/bin/perccli
'';
};
in platforms.${system} or (throw "unsupported system: ${system}");

# Not needed because the binary is statically linked
dontFixup = true;

meta = with lib; {
description = "Perccli Support for PERC RAID controllers";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ panicgh ];
platforms = with platforms; intersectLists x86_64 linux;
platforms = [ "x86_64-linux" ];
};
}
45 changes: 31 additions & 14 deletions pkgs/tools/misc/storcli/default.nix
@@ -1,35 +1,52 @@
{ lib
, stdenvNoCC
, fetchurl
, fetchzip
, rpmextract
, unzip
}:

stdenvNoCC.mkDerivation rec {
pname = "storcli";
version = "7.2106.00";
version = "7.2309.00";

src = fetchurl {
url = "https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/00${version}00.0000_Unified_StorCLI.zip";
sha256 = "sha256-sRMpNXCdcysliVQwRE/1yAeU/cp+y0f2F8BPiWyotxQ=";
src = fetchzip {
url = "https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/Unified_storcli_all_os_${version}00.0000.zip";
sha256 = "sha256-n2MzT2LHLHWMWhshWXJ/Q28w9EnLrW6t7hLNveltxLo=";
};

nativeBuildInputs = [ rpmextract unzip ];
nativeBuildInputs = [ rpmextract ];

unpackPhase = let
inherit (stdenvNoCC.hostPlatform) system;
platforms = {
x86_64-linux = "Linux";
aarch64-linux = "ARM/Linux";
};
platform = platforms.${system} or (throw "unsupported system: ${system}");
in ''
rpmextract $src/${platform}/storcli-00${version}00.0000-1.*.rpm
'';

dontPatch = true;
dontConfigure = true;
dontBuild = true;

buildCommand = ''
unzip $src
rpmextract Unified_storcli_all_os/Linux/storcli-*.noarch.rpm
installPhase = ''
install -D ./opt/MegaRAID/storcli/storcli64 $out/bin/storcli64
ln -s storcli64 $out/bin/storcli

# Not needed because the binary is statically linked
#eval fixupPhase
'';

# Not needed because the binary is statically linked
dontFixup = true;

meta = with lib; {
# Unfortunately there is no better page for this.
# Filter for downloads, set 100 items per page. Sort by newest does not work.
# Then search manually for the latest version.
homepage = "https://www.broadcom.com/site-search?q=storcli";
description = "Storage Command Line Tool";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ panicgh ];
platforms = with platforms; intersectLists x86_64 linux;
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}