libtiff: Prepare release 4.5.1 (118c5)

From 118c5d1082659bd4dd3e751002394075d2c4368b Mon Sep 17 00:00:00 2001
From: Su_Laus <[EMAIL REDACTED]>
Date: Thu, 18 May 2023 22:41:56 +0200
Subject: [PATCH] Prepare release 4.5.1 - Update till 18.05.23 after
 fix_559_DNG_1.6_passcount_error

---
 ChangeLog               | 95 +++++++++++++++++++++++++++++++++++++----
 doc/releases/v4.5.1.rst | 28 ++++++++++++
 2 files changed, 114 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c38a0c53..9d26af85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,75 @@
-2023-05-07  Su_Laus  <sulau@freenet.de>
+2023-05-18  Even Rouault  <even.rouault@spatialys.com>
 
-	Prepare release 4.5.1.
+	Merge branch 'fix_559_DNG_1.6_passcount_error' into 'master'
+	Fix #559 DNG 1.6 passcount assertion
+
+	Closes #574 et #559
+
+	See merge request libtiff/libtiff!489
+
+2023-05-18  Even Rouault  <even.rouault@spatialys.com>
+
+	Merge branch 'fix_557_TagExtender_for_CustomDirectories_not_possible' into 'master'
+	manpage: TIFFSetTagExtender() cannot add tags to custom directories. Closes #557.
+
+	Closes #557
+
+	See merge request libtiff/libtiff!490
+
+2023-05-17  Su_Laus  <sulau@freenet.de>
+
+	Documentation update: TIFFSetTagExtender() cannot add tags to custom directories.
+	Closes #557.
+
+2023-05-16  Even Rouault  <even.rouault@spatialys.com>
+
+	Merge branch 'fix_558' into 'master'
+	Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB, and make 'H' flag of TIFFOpen()...
+
+	See merge request libtiff/libtiff!488
+
+2023-05-16  Su_Laus  <sulau@freenet.de>
+
+	Fix #559 DNG 1.6 passcount assertion.
+	Amend DNG tags definition introduced with MR 482:
+	- DNG 1.6 tags specified as UTF-8 strings are defined as variable TIFF_BYTE with  passcount=TRUE.
+	- For all tags with TIFF_SETGET_C32_UINT8 the readcount and writecount were corrected to -3 (TIFF_VARIABLE2).
+
+	Testprogram to write and read all tags defined within LibTIFF is introduced.
+	It also checks for valid passcount flag setting for the defined tags but some special tags are excluded from that check.
+
+	Closes #559.
+
+2023-05-09  Even Rouault  <even.rouault@spatialys.com>
+
+	Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB, and make 'H' flag of TIFFOpen() to warn and an alias of FILLORDER_MSB2LSB
+
+	tif_lerc.c: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN.
+
+2023-05-07  Even Rouault  <even.rouault@spatialys.com>
+
+	Merge branch 'fix_484_TIFFDirectory_32_64_bit' into 'master'
+	Fix 484 TIFFDirectory td_fieldsset uses unsigned long which can be 32 or 64 bits.
+
+	Closes #484
+
+	See merge request libtiff/libtiff!471
+
+2023-05-07  Even Rouault  <even.rouault@spatialys.com>
+
+	Merge branch 'DNG_1.6_EP_tags' into 'master'
+	Add DNG tags up to version 1.6.0.0 and some TIFF/EP tags and update documentation
+
+	See merge request libtiff/libtiff!482
+
+2023-05-07  Even Rouault  <even.rouault@spatialys.com>
+
+	Merge branch 'issue547' into 'master'
+	do not install libtiff-4.pc when tiff-install is reset
+
+	Closes #547
+
+	See merge request libtiff/libtiff!481
 
 2023-05-06  Even Rouault  <even.rouault@spatialys.com>
 
@@ -41,16 +110,19 @@
 
 	LZWDecode(): avoid crash when trying to read again from a strip whith a missing end-of-information marker (fixes #548)
 
-2023-04-21  Even Rouault  <even.rouault@spatialys.com>
+2023-04-25  Su_Laus  <sulau@freenet.de>
 
-	Merge branch 'mymaster1' into 'master'
-	fix runtime error: applying zero offset to null pointer
+	Add DNG tags up to version 1.6.0.0 and some TIFF/EP tags and update documentation
+	Amend MR !337 'Add support for DNG tags up to version 1.6.0.0 and some TIFF/EP tags' from Sami Liedes:
+	- Set most tags to OkToChange=1.
+	- Define BATTERYLEVEL tag as ASCII and convert values of rational variant to ASCII.
+	- TIFF documentation updated for tags recognized by LibTiff (DNG 1.6 and others).
+	- TIFF/EP tags added, which are equivalent to EXIF tags. This addresses part of #418 as well.
+	- Definition of tags reformatted (clang-format off) for better readability of tag comments in tiff.h and tif_dirinfo.c
 
-	See merge request libtiff/libtiff!479
+2023-04-23  Roman  <kosobrodov@fastmail.fm>
 
-2023-04-21  xiaoxiaoafeifei  <lliangliang2007@163.com>
-
-	countInkNamesString(): fix `UndefinedBehaviorSanitizer`: applying zero offset to null pointer
+	do not install libtiff-4.pc when tiff-install is reset.
 
 2023-04-21  Even Rouault  <even.rouault@spatialys.com>
 
@@ -177,6 +249,11 @@
 
 	Closes #527
 
+2023-02-08  Su_Laus  <sulau@freenet.de>
+
+	Fix 484 TIFFDirectory td_fieldsset uses unsigned long which can be 32 or 64 bits.
+	Closes #484
+
 2023-02-08  Even Rouault  <even.rouault@spatialys.com>
 
 	Merge branch 'test_ifd_loop_detection_fix_CoverityScan_ln_55' into 'master'
diff --git a/doc/releases/v4.5.1.rst b/doc/releases/v4.5.1.rst
index 1a32c50a..9abadf3e 100644
--- a/doc/releases/v4.5.1.rst
+++ b/doc/releases/v4.5.1.rst
@@ -33,6 +33,14 @@ None
 Software configuration changes
 ------------------------------
 
+* test: add :file:`test_write_read_tags.c`, which writes and then 
+  reads and checks nearly all tags defined in :file:`tif_dirinfo.c`.
+
+* Definition of tags reformatted (clang-format off) for better
+  readability of tag comments in tiff.h and tif_dirinfo.c
+
+* Do not install libtiff-4.pc when tiff-install is reset.
+
 * test: avoid running tool tests if not built
   (:issue:`421`).
 
@@ -50,6 +58,16 @@ Library changes
 
 New/improved functionalities:
 
+* Hardcode HOST_FILLORDER to FILLORDER_LSB2MSB and make 'H' flag of
+  :c:func:`TIFFOpen` to warn and an alias of FILLORDER_MSB2LSB. 
+  :file:`tif_lerc.c`: use WORDS_BIGENDIAN instead of HOST_BIGENDIAN.
+
+* Add DNG tags up to version 1.6.0.0 and some TIFF/EP tags and update documentation.
+	- Set most tags to OkToChange=1.
+	- Define BATTERYLEVEL tag as ASCII and convert values of rational variant to ASCII.
+	- TIFF documentation updated for tags recognized by LibTiff (DNG 1.6 and others).
+	- TIFF/EP tags added, which are equivalent to EXIF tags.
+
 * Optimize relative seeking within :c:func:`TIFFSetDirectory`
   by using the learned list of IFD offsets.
 
@@ -66,6 +84,14 @@ API/ABI breaks:
 
 Bug fixes:
 
+* TIFFDirectory td_fieldsset type changed from unsigned long, which can
+  be 32 or 64 bits, to uint32_t (fixes :issue:`484`).
+
+*	tif_ojpeg.c: checking for division by zero (fixes :issue:`554`).
+
+* LZWDecode(): avoid crash when trying to read again from a strip whith
+  a missing end-of-information marker (fixes :issue:`548`).
+
 * Fixed runtime error: applying zero offset to null pointer
   in :c:func:`countInkNamesString`.
 
@@ -107,6 +133,8 @@ New/improved functionality:
 
 Bug fixes:
 
+*	:program:`tiffcrop`: Consider error return of writeSelections() (fixes :issue:`553`).
+
 * :program:`tiffcrop`: fix memory leak
   (:issue:`475`).