public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tkimg] f43: update to 2.1.1, bump libtiff to 4.7.2 (the tkimg libtiff library glue still versions at 4.7.1, because I didnt want to break compat when/if upstream makes a similar change)
@ 2026-08-27 20:28 Tom spot Callaway
  0 siblings, 0 replies; only message in thread
From: Tom spot Callaway @ 2026-08-27 20:28 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/tkimg
Branch : f43
Commit : 600a5ed2b4c37a752a7edc7ac6c703431e4149f2
Author : Tom spot Callaway <spotaws@amazon.com>
Date   : 2026-08-27T13:48:10-04:00
Stats  : +226/-18 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/tkimg/c/600a5ed2b4c37a752a7edc7ac6c703431e4149f2?branch=f43

Log:
update to 2.1.1, bump libtiff to 4.7.2 (the tkimg libtiff library glue still versions at 4.7.1, because I didnt want to break compat when/if upstream makes a similar change)

---
diff --git a/.gitignore b/.gitignore
index 6c703ad..a2f0240 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,6 @@ tkimg-20091129.tar.gz
 /Img-2.1.0.tar.gz
 /v1.6.53.tar.gz
 /tiff-4.7.1.tar.gz
+/v1.6.58.tar.gz
+/Img-2.1.1.tar.gz
+/tiff-4.7.2.tar.gz

diff --git a/sources b/sources
index 8c07a38..4164d0b 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (Img-2.1.0.tar.gz) = b456551feaaa1e18f5ade92a76ddaeac439783d0799b535f64b24ad93129d5029fc3157dea951d815aefed1841e285f3272fbe5e22b26488425b47114a8e7a6d
-SHA512 (v1.6.53.tar.gz) = e854589401043c5f24e0365a578ccda8fde47766fa5990c7355581e4f0dc67bfefd7f1272fc25c269968135826cf583b1a10d01667af97e2ec4410cfaf2a700c
-SHA512 (tiff-4.7.1.tar.gz) = 89c5af880626888451caf8b78a2f57b2973719db837dce6530c1fb30318fc6fba7ef9f9d8e46c547821eae29322607cb5146bf3de39b3d7b70bcf5b68c4ee3b1
+SHA512 (v1.6.58.tar.gz) = 65f54d805e1f7c46a5fc335b984e4cbd4f934e0f02fbf6673c13800b49a4c11fbeb4098eebfb33079527a56c3d933e97631f91ab68dbb31442982784f9241ace
+SHA512 (Img-2.1.1.tar.gz) = 17cc892a0f0ddbae07039368e99b0a82df92fffb74295d35488229890daa81947d9f3c49ae828539d530d66608cdc03a668df26cf470dfffd6b8257f1ce4cb38
+SHA512 (tiff-4.7.2.tar.gz) = bad66954a7e7e158c6dcbfc0e2d0032b8f3e2a354b6d0fdbb8038a7963e36c5b8a433dd4ee81c6c4dabfb50094152d440aa1f32b5299098c9ae29e55de2e41fc

diff --git a/tkimg-2.1.1-libtiff-4.7.2.patch b/tkimg-2.1.1-libtiff-4.7.2.patch
new file mode 100644
index 0000000..59c1071
--- /dev/null
+++ b/tkimg-2.1.1-libtiff-4.7.2.patch
@@ -0,0 +1,198 @@
+--- a/tiff/tiffJpeg.c	2026-08-27 13:41:22.734823918 -0400
++++ b/tiff/tiffJpeg.c	2026-08-27 13:41:32.944099191 -0400
+@@ -1067,7 +1067,7 @@
+     sp->bytesperline = TIFFTileRowSize(tif);
+   } else {
+     segment_width = td->td_imagewidth;
+-    segment_height = td->td_imagelength - tif->tif_row;
++    segment_height = td->td_imagelength - tif->tif_dir.td_row;
+     if (segment_height > td->td_rowsperstrip)
+       segment_height = td->td_rowsperstrip;
+     sp->bytesperline = TIFFScanlineSize(tif);
+@@ -1090,7 +1090,7 @@
+   }
+   if (sp->cinfo.d.image_width == segment_width &&
+       sp->cinfo.d.image_height > segment_height &&
+-      tif->tif_row + segment_height == td->td_imagelength && !isTiled(tif)) {
++      tif->tif_dir.td_row + segment_height == td->td_imagelength && !isTiled(tif)) {
+     /* Some files have a last strip, that should be truncated, */
+     /* but their JPEG codestream has still the maximum strip */
+     /* height. Warn about this as this is non compliant, but */
+@@ -1302,7 +1302,7 @@
+       if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
+         return (0);
+ 
+-      ++tif->tif_row;
++      ++tif->tif_dir.td_row;
+       buf += sp->bytesperline;
+       cc -= sp->bytesperline;
+     } while (--nrows > 0);
+@@ -1393,7 +1393,7 @@
+         }
+       }
+ 
+-      ++tif->tif_row;
++      ++tif->tif_dir.td_row;
+       buf += sp->bytesperline;
+       cc -= sp->bytesperline;
+     } while (--nrows > 0);
+@@ -1442,8 +1442,8 @@
+   /* For last strip, limit number of rows to its truncated height */
+   /* even if the codestream height is larger (which is not compliant, */
+   /* but that we tolerate) */
+-  if ((uint32_t)nrows > td->td_imagelength - tif->tif_row && !isTiled(tif))
+-    nrows = td->td_imagelength - tif->tif_row;
++  if ((uint32_t)nrows > td->td_imagelength - tif->tif_dir.td_row && !isTiled(tif))
++    nrows = td->td_imagelength - tif->tif_dir.td_row;
+ 
+ #if defined(JPEG_LIB_MK1_OR_12BIT)
+   unsigned short *tmpbuf = NULL;
+@@ -1556,7 +1556,7 @@
+ #endif
+ 
+       sp->scancount++;
+-      tif->tif_row += sp->v_sampling;
++      tif->tif_dir.td_row += sp->v_sampling;
+ 
+       buf += sp->bytesperline;
+       cc -= sp->bytesperline;
+@@ -1900,7 +1900,7 @@
+     sp->bytesperline = TIFFTileRowSize(tif);
+   } else {
+     segment_width = td->td_imagewidth;
+-    segment_height = td->td_imagelength - tif->tif_row;
++    segment_height = td->td_imagelength - tif->tif_dir.td_row;
+     if (segment_height > td->td_rowsperstrip)
+       segment_height = td->td_rowsperstrip;
+     sp->bytesperline = TIFFScanlineSize(tif);
+@@ -2024,8 +2024,8 @@
+                    "fractional scanline discarded");
+ 
+   /* The last strip will be limited to image size */
+-  if (!isTiled(tif) && tif->tif_row + nrows > tif->tif_dir.td_imagelength)
+-    nrows = tif->tif_dir.td_imagelength - tif->tif_row;
++  if (!isTiled(tif) && tif->tif_dir.td_row + nrows > tif->tif_dir.td_imagelength)
++    nrows = tif->tif_dir.td_imagelength - tif->tif_dir.td_row;
+ 
+   if (sp->cinfo.c.data_precision == 12) {
+     line16_count = (int)((sp->bytesperline * 2) / 3);
+@@ -2060,7 +2060,7 @@
+     if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1)
+       return (0);
+     if (nrows > 0)
+-      tif->tif_row++;
++      tif->tif_dir.td_row++;
+     buf += sp->bytesperline;
+   }
+ 
+@@ -2152,7 +2152,7 @@
+         return (0);
+       sp->scancount = 0;
+     }
+-    tif->tif_row += sp->v_sampling;
++    tif->tif_dir.td_row += sp->v_sampling;
+     buf += bytesperclumpline;
+     nrows -= sp->v_sampling;
+   }
+@@ -2234,10 +2234,10 @@
+    * Must recalculate cached tile size in case sampling state changed.
+    * Should we really be doing this now if image size isn't set?
+    */
+-  if (tif->tif_tilesize > 0)
+-    tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1);
+-  if (tif->tif_scanlinesize > 0)
+-    tif->tif_scanlinesize = TIFFScanlineSize(tif);
++  if (tif->tif_dir.td_tilesize > 0)
++    tif->tif_dir.td_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1);
++  if (tif->tif_dir.td_scanlinesize > 0)
++    tif->tif_dir.td_scanlinesize = TIFFScanlineSize(tif);
+ }
+ 
+ static int JPEGVSetField(TIFF *tif, uint32_t tag, va_list ap) {
+--- a/tiff/tiffZip.c	2026-08-27 13:41:22.735823928 -0400
++++ b/tiff/tiffZip.c	2026-08-27 13:41:32.946929020 -0400
+@@ -177,7 +177,7 @@
+                 if( TIFFTileSize64(tif) != (uint64_t)occ )
+                     break;
+             } else {
+-                uint32_t strip_height = td->td_imagelength - tif->tif_row;
++                uint32_t strip_height = td->td_imagelength - tif->tif_dir.td_row;
+                 if (strip_height > td->td_rowsperstrip)
+                     strip_height = td->td_rowsperstrip;
+                 if( TIFFVStripSize64(tif, strip_height) != (uint64_t)occ )
+@@ -219,7 +219,7 @@
+                 {
+                     TIFFErrorExt(tif->tif_clientdata, module,
+                                  "Decoding error at scanline %lu",
+-                                 (unsigned long) tif->tif_row);
++                                 (unsigned long) tif->tif_dir.td_row);
+                     return 0;
+                 }
+ 
+@@ -250,7 +250,7 @@
+                 if (state == Z_DATA_ERROR) {
+                         TIFFErrorExt(tif->tif_clientdata, module,
+                             "Decoding error at scanline %lu, %s",
+-                             (unsigned long) tif->tif_row, SAFE_MSG(sp));
++                             (unsigned long) tif->tif_dir.td_row, SAFE_MSG(sp));
+                         return (0);
+                 }
+                 if (state != Z_OK) {
+@@ -262,7 +262,7 @@
+         if (occ != 0) {
+                 TIFFErrorExt(tif->tif_clientdata, module,
+                     "Not enough data at scanline %lu (short %" PRIu64 " bytes)",
+-                    (unsigned long) tif->tif_row, (uint64_t) occ);
++                    (unsigned long) tif->tif_dir.td_row, (uint64_t) occ);
+                 return (0);
+         }
+ 
+@@ -359,7 +359,7 @@
+                 if( TIFFTileSize64(tif) != (uint64_t)cc )
+                     break;
+             } else {
+-                uint32_t strip_height = td->td_imagelength - tif->tif_row;
++                uint32_t strip_height = td->td_imagelength - tif->tif_dir.td_row;
+                 if (strip_height > td->td_rowsperstrip)
+                     strip_height = td->td_rowsperstrip;
+                 if( TIFFVStripSize64(tif, strip_height) != (uint64_t)cc )
+@@ -409,7 +409,7 @@
+                 {
+                     TIFFErrorExt(tif->tif_clientdata, module,
+                                  "Encoder error at scanline %lu",
+-                                 (unsigned long) tif->tif_row);
++                                 (unsigned long) tif->tif_dir.td_row);
+                     return 0;
+                 }
+ 
+--- a/tiff/tiffPixar.c	2026-08-27 13:41:22.736823938 -0400
++++ b/tiff/tiffPixar.c	2026-08-27 13:41:32.950135500 -0400
+@@ -810,7 +810,7 @@
+                 if (state == Z_DATA_ERROR) {
+                         TIFFErrorExt(tif->tif_clientdata, module,
+                             "Decoding error at scanline %"PRIu32", %s",
+-                            tif->tif_row, sp->stream.msg ? sp->stream.msg : "(null)");
++                            tif->tif_dir.td_row, sp->stream.msg ? sp->stream.msg : "(null)");
+                         return (0);
+                 }
+                 if (state != Z_OK) {
+@@ -824,7 +824,7 @@
+         if (sp->stream.avail_out != 0) {
+                 TIFFErrorExt(tif->tif_clientdata, module,
+                     "Not enough data at scanline %"PRIu32" (short %u bytes)",
+-                    tif->tif_row, sp->stream.avail_out);
++                    tif->tif_dir.td_row, sp->stream.avail_out);
+                 return (0);
+         }
+ 
+@@ -1358,8 +1358,8 @@
+         /*
+          * Must recalculate sizes should bits/sample change.
+          */
+-        tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1);
+-        tif->tif_scanlinesize = TIFFScanlineSize(tif);
++        tif->tif_dir.td_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tmsize_t)(-1);
++        tif->tif_dir.td_scanlinesize = TIFFScanlineSize(tif);
+         result = 1;             /* NB: pseudo tag */
+         break;
+      default:

diff --git a/tkimg.spec b/tkimg.spec
index 7380edf..b03e74e 100644
--- a/tkimg.spec
+++ b/tkimg.spec
@@ -2,8 +2,8 @@
 %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
 
 Name:		tkimg
-Version:	2.1.0
-Release:	3%{?dist}
+Version:	2.1.1
+Release:	1%{?dist}
 Summary:	Image support library for Tk
 # The core tkimg code is TCL
 # tiff/ is libtiff
@@ -17,7 +17,7 @@ Summary:	Image support library for Tk
 License:	TCL AND libtiff AND HPND-Pbmplus AND URT-RLE AND IJG AND libpng-2.0 AND libpng-1.6.35 AND (BSD-4-Clause OR GPL-2.0-or-later) AND BSD-4-Clause AND MIT AND Zlib
 # Try saying that three times fast.
 URL:		http://sourceforge.net/projects/tkimg
-Source0:	https://downloads.sourceforge.net/project/tkimg/tkimg/2.1.0/Img-%{version}.tar.gz
+Source0:	https://downloads.sourceforge.net/project/tkimg/tkimg/2.1/tkimg%20%{version}/Img-%{version}.tar.gz
 BuildRequires:	make
 BuildRequires:	gcc
 BuildRequires:	tcl-devel tk-devel tcllib
@@ -33,22 +33,24 @@ BuildRequires:	tcl-devel tk-devel tcllib
 #  loading of shared libraries to load the support libraries at runtime.
 #  These have been abandoned in favor of the new approach.
 
-# Pulling in our own copy of libtiff 4.7.1 to fix a LOT of CVEs.
-Source1:	http://download.osgeo.org/libtiff/tiff-4.7.1.tar.gz
+# Latest libtiff
+Source1:	https://download.osgeo.org/libtiff/tiff-4.7.2.tar.gz
 
-# Patching things to apply to the libtiff 4.7.1 API
-Patch0:		tkimg-2.1.0-libtiff-4.7.1.patch
-
-# Pulling in our own copy of libpng 1.6.53 for some CVEs
-Source2:	https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.53.tar.gz
+# Pulling in our own copy of libpng 1.6.58 for some CVEs
+Source2:	https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.58.tar.gz
 
 # the tkimg copy of libpng disables some externs in a header
 Patch1:		tkimg-2.1.0-libpng-1.6.53.patch
 
+# libtiff 4.7.2 moved tif_row/tif_tilesize/tif_scanlinesize out of struct tiff
+# and into the tif_dir (TIFFDirectory) substructure as td_* members. Update
+# tkimg's bundled tiff codec sources (tiffJpeg.c, tiffZip.c, tiffPixar.c) to match.
+Patch2:		tkimg-2.1.1-libtiff-4.7.2.patch
+
 Provides: bundled(zlib) = 1.3.1
 Provides: bundled(libjpeg) = 9f
-Provides: bundled(libpng) = 1.6.53
-Provides: bundled(libtiff) = 4.7.1
+Provides: bundled(libpng) = 1.6.58
+Provides: bundled(libtiff) = 4.7.2
 Requires: tcl(abi) = 9.0
 Requires: tk >= 9.0
 
@@ -70,14 +72,15 @@ These are the header files needed to develop a %{name} application
 pushd compat
 rm -rf libtiff
 tar xf %{SOURCE1}
-mv tiff-4.7.1 libtiff
+mv tiff-4.7.2 libtiff
 rm -rf libpng
 tar xf %{SOURCE2}
-mv libpng-1.6.53 libpng
+mv libpng-1.6.58 libpng
 popd
 
-%patch -P0 -p1 -b .tiff471
+# %%patch -P0 -p1 -b .tiff471
 %patch -P1 -p1 -b .libpng-1.6.53
+%patch -P2 -p1 -b .libtiff-4.7.2
 
 %build
 export CFLAGS="%{optflags} -fno-strict-aliasing"
@@ -104,6 +107,10 @@ rm -rf %{buildroot}%{_mandir}/html
 %{tcl_sitearch}/Img%{version}/*.a
 
 %changelog
+* Thu Aug 27 2026 Tom Callaway <spot@fedoraproject.org> - 2.1.1-1
+- update to 2.1.1
+- bump libtiff to 4.7.2 (the tkimg libtiff library glue still versions at 4.7.1, because I didn't want to break compat when/if upstream makes a similar change)
+
 * Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-27 20:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-27 20:28 [rpms/tkimg] f43: update to 2.1.1, bump libtiff to 4.7.2 (the tkimg libtiff library glue still versions at 4.7.1, because I didnt want to break compat when/if upstream makes a similar change) Tom spot Callaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox