libtiff: 4.4 -> 4.5

This commit is contained in:
Anthony Roussel 2022-12-30 22:12:44 +01:00
parent ccef3ab7d8
commit 4d4af86db6
No known key found for this signature in database
GPG key ID: 9DC4987B1A55E75E
3 changed files with 28 additions and 46 deletions

View file

@ -1,9 +1,10 @@
{ lib, stdenv
, fetchurl
, fetchpatch
, fetchFromGitLab
, nix-update-script
, autoreconfHook
, pkg-config
, sphinx
, libdeflate
, libjpeg
@ -23,11 +24,13 @@
stdenv.mkDerivation rec {
pname = "libtiff";
version = "4.4.0";
version = "4.5.0";
src = fetchurl {
url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
sha256 = "1vdbk3sc497c58kxmp02irl6nqkfm9rjs3br7g59m59qfnrj6wli";
src = fetchFromGitLab {
owner = "libtiff";
repo = "libtiff";
rev = "v${version}";
hash = "sha256-KG6rB940JMjFUTAgtkzg+Zh75gylPY6Q7/4gEbL0Hcs=";
};
patches = [
@ -36,32 +39,6 @@ stdenv.mkDerivation rec {
# libc++abi 11 has an `#include <version>`, this picks up files name
# `version` in the project's include paths
./rename-version.patch
(fetchpatch {
name = "CVE-2022-34526.patch";
url = "https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990.patch";
sha256 = "sha256-faKsdJjvQwNdkAKjYm4vubvZvnULt9zz4l53zBFr67s=";
})
(fetchpatch {
name = "CVE-2022-2953.patch";
url = "https://gitlab.com/libtiff/libtiff/-/commit/48d6ece8389b01129e7d357f0985c8f938ce3da3.patch";
sha256 = "sha256-h9hulV+dnsUt/2Rsk4C1AKdULkvweM2ypIJXYQ3BqQU=";
})
(fetchpatch {
name = "CVE-2022-3626.CVE-2022-3627.CVE-2022-3597.patch";
url = "https://gitlab.com/libtiff/libtiff/-/commit/236b7191f04c60d09ee836ae13b50f812c841047.patch";
excludes = [ "doc/tools/tiffcrop.rst" ];
sha256 = "sha256-L2EMmmfMM4oEYeLapO93wvNS+HlO0yXsKxijXH+Wuas=";
})
(fetchpatch {
name = "CVE-2022-3598.CVE-2022-3570.patch";
url = "https://gitlab.com/libtiff/libtiff/-/commit/cfbb883bf6ea7bedcb04177cc4e52d304522fdff.patch";
sha256 = "sha256-SLq2+JaDEUOPZ5mY4GPB6uwhQOG5cD4qyL5o9i8CVVs=";
})
(fetchpatch {
name = "CVE-2022-3970.patch";
url = "https://gitlab.com/libtiff/libtiff/-/commit/227500897dfb07fb7d27f7aa570050e62617e3be.patch";
sha256 = "sha256-pgItgS+UhMjoSjkDJH5y7iGFZ+yxWKqlL7BdT2mFcH0=";
})
];
postPatch = ''
@ -71,14 +48,15 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
postFixup = ''
moveToOutput include/tif_dir.h $dev_private
moveToOutput include/tif_config.h $dev_private
moveToOutput include/tif_dir.h $dev_private
moveToOutput include/tif_hash_set.h $dev_private
moveToOutput include/tiffiop.h $dev_private
'';
# If you want to change to a different build system, please make
# sure cross-compilation works first!
nativeBuildInputs = [ autoreconfHook pkg-config ];
nativeBuildInputs = [ autoreconfHook pkg-config sphinx ];
propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection)
@ -88,9 +66,12 @@ stdenv.mkDerivation rec {
doCheck = true;
passthru.tests = {
inherit libgeotiff imagemagick graphicsmagick gdal openimageio freeimage imlib;
inherit (python3Packages) pillow imread;
passthru = {
tests = {
inherit libgeotiff imagemagick graphicsmagick gdal openimageio freeimage imlib;
inherit (python3Packages) pillow imread;
};
updateScript = nix-update-script { };
};
meta = with lib; {

View file

@ -2,15 +2,16 @@ diff --git i/libtiff/Makefile.am w/libtiff/Makefile.am
index 44522b62..d66e5948 100644
--- i/libtiff/Makefile.am
+++ w/libtiff/Makefile.am
@@ -36,8 +36,11 @@ EXTRA_DIST = \
@@ -36,8 +36,12 @@ EXTRA_DIST = \
tiffconf.h.cmake.in
libtiffinclude_HEADERS = \
+ tif_config.h \
+ tif_dir.h \
+ tif_hash_set.h \
tiff.h \
tiffio.h \
+ tiffiop.h \
tiffvers.h
if HAVE_CXX

View file

@ -6,15 +6,15 @@
TODO \
- VERSION
+ VERSION.txt
EXTRA_DIST = \
cmake \
@@ -61,7 +61,7 @@ SUBDIRS = port libtiff tools build contrib test man html
@@ -61,7 +61,7 @@ SUBDIRS = port libtiff tools build contrib test doc
release:
(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
- (rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION)
+ (rm -f $(top_srcdir)/VERSION.txt && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION.txt)
(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h)
(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),;s,LIBTIFF_MAJOR_VERSION,$(LIBTIFF_MAJOR_VERSION),;s,LIBTIFF_MINOR_VERSION,$(LIBTIFF_MINOR_VERSION),;s,LIBTIFF_MICRO_VERSION,$(LIBTIFF_MICRO_VERSION),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h)
pkgconfigdir = $(libdir)/pkgconfig