Merge #153413: openexr*: patch CVE-2021-45942, add test
... into staging
This commit is contained in:
commit
8a82612da4
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, zlib
|
, zlib
|
||||||
, cmake
|
, cmake
|
||||||
, imath
|
, imath
|
||||||
|
@ -19,9 +20,26 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-Bi6yTcZBWTsWWMm3A7FVYblvSXKLSkHmhGvpNYGiOzE=";
|
sha256 = "sha256-Bi6yTcZBWTsWWMm3A7FVYblvSXKLSkHmhGvpNYGiOzE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "CVE-2021-45942.patch";
|
||||||
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
|
||||||
|
sha256 = "1qa8662ga5i0lyfi9mkj9s9bygdg7h1i6ahki28c664kxrlsakch";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
# tests are determined to use /var/tmp on unix
|
||||||
|
postPatch = ''
|
||||||
|
cat <(find . -name tmpDir.h) <(echo src/test/OpenEXRCoreTest/main.cpp) | while read -r f ; do
|
||||||
|
substituteInPlace $f --replace '/var/tmp' "$TMPDIR"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
propagatedBuildInputs = [ imath zlib ];
|
propagatedBuildInputs = [ imath zlib ];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A high dynamic-range (HDR) image file format";
|
description = "A high dynamic-range (HDR) image file format";
|
||||||
homepage = "https://www.openexr.com/";
|
homepage = "https://www.openexr.com/";
|
||||||
|
|
|
@ -26,6 +26,13 @@ stdenv.mkDerivation rec {
|
||||||
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/2f19a01923885fda75ec9d19332de080ec7102bd.patch";
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/2f19a01923885fda75ec9d19332de080ec7102bd.patch";
|
||||||
sha256 = "1yxmrdzq1x1911wdzwnzr29jmg2r4wd4yx3vhjn0y5dpny0ri5y5";
|
sha256 = "1yxmrdzq1x1911wdzwnzr29jmg2r4wd4yx3vhjn0y5dpny0ri5y5";
|
||||||
})
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "CVE-2021-45942.patch";
|
||||||
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
|
||||||
|
stripLen = 4;
|
||||||
|
extraPrefix = "OpenEXR/IlmImf/";
|
||||||
|
sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
Loading…
Reference in a new issue