rocmPackages: fix version handling

This commit is contained in:
Indy Ray 2024-02-29 23:25:55 +01:00 committed by Martin Schwaighofer
parent edd570c596
commit 2bddd18639
49 changed files with 59 additions and 52 deletions

View file

@ -37,6 +37,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -175,6 +175,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -52,7 +52,7 @@ let
in
makeImpureTest {
name = "opencl-example";
testedPackage = "rocmPackages_5.clr";
testedPackage = "rocmPackages_6.clr";
sandboxPaths = [ "/sys" "/dev/dri" "/dev/kfd" ];

View file

@ -7,7 +7,7 @@
makeImpureTest {
name = "rocm-smi";
testedPackage = "rocmPackages_5.clr";
testedPackage = "rocmPackages_6.clr";
nativeBuildInputs = [ clinfo rocm-smi ];
OCL_ICD_VENDORS = "${clr.icd}/etc/OpenCL/vendors";

View file

@ -89,6 +89,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -34,6 +34,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.unix;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -39,6 +39,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -94,6 +94,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -41,6 +41,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -85,6 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ bsd3 ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -105,6 +105,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -61,6 +61,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ]; # mitx11
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -45,6 +45,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -95,6 +95,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -131,6 +131,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -43,6 +43,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ unfree ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -26,7 +26,7 @@ let
((patch++))
extVersion="$(echo "$deb" | grep -o -P "(?<=\.....).*(?=\..*-)")"
if (( ''${#extVersion} == 5 )) && (( $extVersion <= ${extVersion} )); then
if (( ''${#extVersion} == 6 )) && (( $extVersion <= ${extVersion} )); then
url="https://repo.radeon.com/rocm/apt/${major}.${minor}.$patch/pool/main/h/${prefix}/"
res="$(curl -sL "$url")"
deb="${prefix}$(echo "$res" | grep -o -P "(?<=href=\"${prefix}).*(?=\">)" | tail -1)"
@ -39,14 +39,19 @@ let
version="$(echo $extVersion | sed "s/0/./1" | sed "s/0/./1")"
IFS='.' read -a version_arr <<< "$version"
if (( ''${#extVersion} == 5 )); then
if (( ''${version_arr[0]} > 6 )); then
echo "'rocmPackages_6.${prefix}-bin' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${prefix}-bin'." 1>&2
exit 1
fi
if (( ''${#extVersion} == 6 )); then
repoVersion="$version"
if (( ''${version:4:1} == 0 )); then
repoVersion=''${version:0:3}
fi
update-source-version rocmPackages_5.${prefix}-bin "$version" "" "$apt/$repoVersion/$pool$deb" --ignore-same-hash
update-source-version rocmPackages_6.${prefix}-bin "$version" "" "$apt/$repoVersion/$pool$deb" --ignore-same-hash
fi
'';
in [ updateScript ]

View file

@ -170,6 +170,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ ncsa ] ++ extraLicenses;
maintainers = with maintainers; [ acowley lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = isBroken;
broken = isBroken || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -166,6 +166,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -233,6 +233,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -137,6 +137,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -86,6 +86,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ bsd2 bsd3 ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -119,7 +119,7 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
# broken = versions.minor finalAttrs.version != versions.minor rocm-smi.version;
# broken = versions.minor finalAttrs.version != versions.minor rocm-smi.version || versionAtLeast finalAttrs.version "7.0.0";
broken = true; # Too many errors, unsure how to fix
};
})

View file

@ -110,6 +110,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -204,6 +204,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -106,6 +106,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -164,6 +164,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = with maintainers; [ kira-bruneau ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -54,5 +54,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ gpl2 gpl3 bsd3 ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -30,6 +30,6 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.mit;
maintainers = teams.rocm.members;
platforms = platforms.unix;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -50,6 +50,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = licenses.ncsa;
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -33,6 +33,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -45,6 +45,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = licenses.ncsa;
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -74,6 +74,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ ncsa ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -49,6 +49,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = [ "x86_64-linux" ];
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -49,6 +49,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ bsd2 mit ];
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -58,6 +58,6 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.ncsa;
maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
platforms = platforms.linux;
broken = stdenv.isAarch64 || versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = stdenv.isAarch64 || versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -126,6 +126,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ asl20 ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -81,6 +81,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -131,6 +131,6 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ]; # mitx11
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor clr.version;
broken = versions.minor finalAttrs.version != versions.minor clr.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -54,6 +54,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ ncsa ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -83,6 +83,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -95,6 +95,6 @@ stdenv.mkDerivation (finalAttrs: {
platforms = platforms.linux;
timeout = 14400; # 4 hours
maxSilent = 14400; # 4 hours
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -144,6 +144,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -82,6 +82,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ asl20 ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -98,6 +98,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ]; # mitx11
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor clr.version;
broken = versions.minor finalAttrs.version != versions.minor clr.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -100,6 +100,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -83,6 +83,6 @@ stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
};
})

View file

@ -60,6 +60,6 @@ buildPythonPackage rec {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
platforms = platforms.linux;
broken = versions.minor version != versions.minor stdenv.cc.version;
broken = versions.minor version != versions.minor stdenv.cc.version || versionAtLeast version "7.0.0";
};
}

View file

@ -23,10 +23,11 @@ let
IFS='.' read -a version_arr <<< "$version"
if [ "''${#version_arr[*]}" == 2 ]; then
version="''${version}.0"
if (( ''${version_arr[0]} > 6 )); then
echo "'rocmPackages_6.${pname}' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." 1>&2
exit 1
fi
update-source-version rocmPackages_5.${pname} "$version" --ignore-same-hash
update-source-version rocmPackages_6.${pname} "$version" --ignore-same-hash
'';
in [ updateScript ]