mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
Fixes CVE-2025-52520 and CVE-2025-53506.
https://tomcat.apache.org/security-11.html#Fixed_in_Apache_Tomcat_11.0.9
(cherry picked from commit 82aed1e3a4)
77 lines
1.8 KiB
Nix
77 lines
1.8 KiB
Nix
{
|
|
fetchurl,
|
|
gitUpdater,
|
|
jre,
|
|
lib,
|
|
nixosTests,
|
|
stdenvNoCC,
|
|
testers,
|
|
}:
|
|
|
|
let
|
|
common =
|
|
{ version, hash }:
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "apache-tomcat";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "mirror://apache/tomcat/tomcat-${lib.versions.major version}/v${version}/bin/apache-tomcat-${version}.tar.gz";
|
|
inherit hash;
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"webapps"
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir $out
|
|
mv * $out
|
|
mkdir -p $webapps/webapps
|
|
mv $out/webapps $webapps/
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = gitUpdater {
|
|
url = "https://github.com/apache/tomcat.git";
|
|
allowedVersions = "^${lib.versions.major version}\\.";
|
|
ignoredVersions = "-M.*";
|
|
};
|
|
tests = {
|
|
inherit (nixosTests) tomcat;
|
|
version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "JAVA_HOME=${jre} ${finalAttrs.finalPackage}/bin/version.sh";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://tomcat.apache.org/";
|
|
description = "Implementation of the Java Servlet and JavaServer Pages technologies";
|
|
platforms = jre.meta.platforms;
|
|
maintainers = with lib.maintainers; [ anthonyroussel ];
|
|
license = lib.licenses.asl20;
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
};
|
|
});
|
|
|
|
in
|
|
{
|
|
tomcat9 = common {
|
|
version = "9.0.107";
|
|
hash = "sha256-08qgrQpltJMafTrsok5VQc90O6X6nlGr2ls6MdC0hX0=";
|
|
};
|
|
|
|
tomcat10 = common {
|
|
version = "10.1.43";
|
|
hash = "sha256-hZ0Vx/DgjlQ6klv4RyjuIWbHELFKYvvJvn9Y8XqpZ10=";
|
|
};
|
|
|
|
tomcat11 = common {
|
|
version = "11.0.9";
|
|
hash = "sha256-YsVio60p26PqBPWK4x6/yGXPISAzUWP88PwD1CbtOoc=";
|
|
};
|
|
}
|