Package: src:libzstd
Version: 1.6.0+dfsg-0.1
Tags: patch

Please find attached the diff for the 1.6.0 upload to experimental. I'm planning to upload to unstable once the package is built on all architectures. It's also blocking the upload of glibc 2.44 to unstable.
diff -Nru libzstd-1.5.7+dfsg/debian/changelog 
libzstd-1.6.0+dfsg/debian/changelog
--- libzstd-1.5.7+dfsg/debian/changelog 2026-08-01 18:42:00.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/changelog 2026-12-02 11:17:38.000000000 +0100
@@ -1,3 +1,16 @@
+libzstd (1.6.0+dfsg-0.1) experimental; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream version.
+    - Addresses CVE-2026-124851. Closes: #1155105.
+    - Fixes ftbfs with -Werror=deprecated-declarations. Closes: #1155268.
+    - Fixes compression failures on 32-bit architectures. Closes: #1131441.
+  * Don't ship the zstd binary as a debug build. Closes: #1070168.
+  * Fix build with glibc 2.44 (Aurelien Jarno). Closes: #1150137.
+  * d/libzstd-dev.install: Use cmake files installed by upstream.
+
+ -- Matthias Klose <[email protected]>  Wed, 02 Dec 2026 11:17:38 +0100
+
 libzstd (1.5.7+dfsg-4) unstable; urgency=medium
 
   * Declare compliance with Policy 4.7.4 with no changes.
diff -Nru libzstd-1.5.7+dfsg/debian/libzstd-dev.install 
libzstd-1.6.0+dfsg/debian/libzstd-dev.install
--- libzstd-1.5.7+dfsg/debian/libzstd-dev.install       2026-08-01 
18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/libzstd-dev.install       2026-12-02 
11:17:38.000000000 +0100
@@ -1,6 +1,5 @@
-obj-${DEB_HOST_GNU_TYPE}/zstdConfig*.cmake 
usr/lib/${DEB_HOST_MULTIARCH}/cmake/zstd
-obj-${DEB_HOST_GNU_TYPE}/CMakeFiles/Export/*/zstdTargets*.cmake 
usr/lib/${DEB_HOST_MULTIARCH}/cmake/zstd
 usr/include
 usr/lib/${DEB_HOST_MULTIARCH}/*.a
 usr/lib/${DEB_HOST_MULTIARCH}/*.so
 usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig
+usr/lib/${DEB_HOST_MULTIARCH}/cmake
diff -Nru 
libzstd-1.5.7+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
 
libzstd-1.6.0+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
--- 
libzstd-1.5.7+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
  2026-08-01 18:03:20.000000000 +0200
+++ 
libzstd-1.6.0+dfsg/debian/patches/0006-Use-bash-for-test-script-portablitity.patch
  2026-12-02 11:17:38.000000000 +0100
@@ -13,4 +13,4 @@
 +#!/bin/bash
  
  set -e # exit immediately on error
- # set -x # print commands before execution (debug)
+ set -x # print commands before execution (debug)
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0008-Address-embedded-zlib.patch 
libzstd-1.6.0+dfsg/debian/patches/0008-Address-embedded-zlib.patch
--- libzstd-1.5.7+dfsg/debian/patches/0008-Address-embedded-zlib.patch  
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0008-Address-embedded-zlib.patch  
2026-12-02 11:17:38.000000000 +0100
@@ -2,7 +2,7 @@
 Author: Sascha Steinbiss <[email protected]>
 --- a/zlibWrapper/Makefile
 +++ b/zlibWrapper/Makefile
-@@ -13,7 +13,7 @@
+@@ -13,7 +13,7 @@ ZLIB_PATH ?= .
  ZSTDLIBDIR = ../lib
  ZSTDLIBRARY = $(ZSTDLIBDIR)/libzstd.a
  ZLIBWRAPPER_PATH = .
@@ -11,9 +11,9 @@
  EXAMPLE_PATH = examples
  PROGRAMS_PATH = ../programs
  TEST_FILE = ../doc/zstd_compression_format.md
-@@ -83,14 +83,14 @@
- #.c.o:
- #     $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+@@ -93,14 +93,14 @@ gzfinishtest: gzfinishtest.o zstd_zlibwr
+ gzfinishtest_zstd: gzfinishtest.o zstdTurnedOn_zlibwrapper.o $(GZFILES) 
$(ZSTDLIBRARY)
+       $(LINK.o) $^ $(LDLIBS) $(OUTPUT_OPTION)
  
 -minigzip: minigzip.o zstd_zlibwrapper.o $(GZFILES) $(ZSTDLIBRARY)
 +minigzip: minigzip.o zstd_zlibwrapper.o $(ZSTDLIBRARY)
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch 
libzstd-1.6.0+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch
--- libzstd-1.5.7+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch       
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0013-skip-memory-greedy-tests.patch       
2026-12-02 11:17:38.000000000 +0100
@@ -2,7 +2,7 @@
 From: Alex Mestiashvili <[email protected]>
 --- a/tests/playTests.sh
 +++ b/tests/playTests.sh
-@@ -1854,8 +1854,13 @@
+@@ -1971,8 +1971,13 @@ roundTripTest -g8M "19 --long"
  roundTripTest -g5000000000 -P99 "1 --zstd=wlog=25"
  roundTripTest -g3700000000 -P0 "1 --zstd=strategy=6,wlog=25"   # ensure 
btlazy2 can survive an overflow rescale
  
@@ -18,7 +18,7 @@
  
  println "\n===>   zstd long, long distance matching round-trip tests "
  roundTripTest -g270000000 "1 --single-thread --long"
-@@ -1872,9 +1877,14 @@
+@@ -1989,9 +1994,14 @@ then
      println "\n===>   zstdmt long round-trip tests "
      roundTripTest -g80000000 -P99 "19 -T2" " "
      roundTripTest -g5000000000 -P99 "1 -T2" " "
diff -Nru 
libzstd-1.5.7+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch 
libzstd-1.6.0+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch
--- libzstd-1.5.7+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch  
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0015-Skip-dev-random-tests-on-hurd.patch  
2026-12-02 11:17:38.000000000 +0100
@@ -6,7 +6,7 @@
 From: Alex Mestiashvili <[email protected]>
 --- a/tests/playTests.sh
 +++ b/tests/playTests.sh
-@@ -494,14 +494,19 @@
+@@ -542,14 +542,19 @@ cp tmp tmp2
  zstd -v --rm tmp2 -o tmp2.zst -c > tmp3.zst
  test -f tmp2
  test -f tmp3.zst
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch 
libzstd-1.6.0+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch
--- libzstd-1.5.7+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch    
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0017-alpha-fbfs-st_mtime.patch    
2026-12-02 11:17:38.000000000 +0100
@@ -2,7 +2,7 @@
 From: Helmut Grohne <[email protected]>
 --- a/programs/util.c
 +++ b/programs/util.c
-@@ -29,7 +29,7 @@
+@@ -45,7 +45,7 @@
  #else
  #  include <unistd.h>     /* chown, stat */
  #  include <sys/stat.h>   /* utimensat, st_mtime */
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch 
libzstd-1.6.0+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch
--- libzstd-1.5.7+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch       
2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0018-kfreebsd-ftbfs-utime-now.patch       
2026-12-02 11:17:38.000000000 +0100
@@ -5,7 +5,7 @@
 
 --- a/programs/util.c
 +++ b/programs/util.c
-@@ -30,7 +30,7 @@
+@@ -46,7 +46,7 @@
  #  include <unistd.h>     /* chown, stat */
  #  include <sys/stat.h>   /* utimensat, st_mtime */
  #  if (PLATFORM_POSIX_VERSION >= 200809L && (defined(st_mtime) || 
defined(__alpha__))) \
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0022-tests-timeout.patch 
libzstd-1.6.0+dfsg/debian/patches/0022-tests-timeout.patch
--- libzstd-1.5.7+dfsg/debian/patches/0022-tests-timeout.patch  2026-08-01 
18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0022-tests-timeout.patch  2026-12-02 
11:17:38.000000000 +0100
@@ -8,11 +8,11 @@
 
 --- a/tests/cli-tests/run.py
 +++ b/tests/cli-tests/run.py
-@@ -640,7 +640,7 @@
+@@ -640,7 +640,7 @@ if __name__ == "__main__":
          help="Preserve the scratch directory TEST_DIR/scratch/ for debugging 
purposes."
      )
      parser.add_argument("--verbose", action="store_true", help="Verbose test 
output.")
--    parser.add_argument("--timeout", default=200, type=int, help="Test case 
timeout in seconds. Set to 0 to disable timeouts.")
+-    parser.add_argument("--timeout", default=800, type=int, help="Test case 
timeout in seconds. Set to 0 to disable timeouts.")
 +    parser.add_argument("--timeout", default=60 * 50, type=int, help="Test 
case timeout in seconds. Set to 0 to disable timeouts.")
      parser.add_argument(
          "--exec-prefix",
diff -Nru libzstd-1.5.7+dfsg/debian/patches/0023-cmake-min-3.13.patch 
libzstd-1.6.0+dfsg/debian/patches/0023-cmake-min-3.13.patch
--- libzstd-1.5.7+dfsg/debian/patches/0023-cmake-min-3.13.patch 2026-08-01 
18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/patches/0023-cmake-min-3.13.patch 2026-12-02 
11:17:38.000000000 +0100
@@ -16,5 +16,5 @@
 -cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
 +cmake_minimum_required(VERSION 3.24.0 FATAL_ERROR)
  
- # As of 2018-12-26 ZSTD has been validated to build with cmake version 3.13.2 
new policies.
- # Set and use the newest cmake policies that are validated to work
+ #-----------------------------------------------------------------------------
+ # Setup CMake environment
diff -Nru libzstd-1.5.7+dfsg/debian/patches/fix-glibc-2.44-build.diff 
libzstd-1.6.0+dfsg/debian/patches/fix-glibc-2.44-build.diff
--- libzstd-1.5.7+dfsg/debian/patches/fix-glibc-2.44-build.diff 1970-01-01 
01:00:00.000000000 +0100
+++ libzstd-1.6.0+dfsg/debian/patches/fix-glibc-2.44-build.diff 2026-12-02 
11:17:38.000000000 +0100
@@ -0,0 +1,11 @@
+--- a/programs/Makefile
++++ b/programs/Makefile
+@@ -253,7 +253,7 @@ endif
+ 
+ ## zstd-small: minimal target, supporting only zstd compression and 
decompression. no bench. no legacy. no other format.
+ CLEAN += zstd-small zstd-frugal
+-zstd-small: CFLAGS = -Os -Wl,-s
++zstd-small: CFLAGS += -Os -Wl,-s
+ zstd-frugal zstd-small: $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c 
fileio.c fileio_asyncio.c
+       $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE 
-UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=0 $^ -o $@$(EXT)
+ 
diff -Nru libzstd-1.5.7+dfsg/debian/patches/series 
libzstd-1.6.0+dfsg/debian/patches/series
--- libzstd-1.5.7+dfsg/debian/patches/series    2026-08-01 18:03:20.000000000 
+0200
+++ libzstd-1.6.0+dfsg/debian/patches/series    2026-12-02 11:17:38.000000000 
+0100
@@ -8,3 +8,4 @@
 0022-tests-timeout.patch
 0023-cmake-min-3.13.patch
 0024-no-lessopen-test.patch
+fix-glibc-2.44-build.diff
diff -Nru libzstd-1.5.7+dfsg/debian/rules libzstd-1.6.0+dfsg/debian/rules
--- libzstd-1.5.7+dfsg/debian/rules     2026-08-01 18:03:20.000000000 +0200
+++ libzstd-1.6.0+dfsg/debian/rules     2026-12-02 11:17:38.000000000 +0100
@@ -52,8 +52,17 @@
 execute_after_dh_auto_build:
        dh_auto_build -D contrib/pzstd
 
+# The upstream test suite rebuilds programs/zstd in place with DEBUGLEVEL=2
+# (assert() and DEBUGLOG enabled), which dh_auto_install would then ship.
+# Keep the release binary aside and put it back once the tests have run.
+execute_before_dh_auto_test:
+       cp -p programs/zstd debian/zstd.release
+
+execute_after_dh_auto_test:
+       cp -p debian/zstd.release programs/zstd
+
 override_dh_auto_install:
-       dh_auto_install -- libdir=/usr/lib/${DEB_HOST_MULTIARCH}
+       libdir=/usr/lib/${DEB_HOST_MULTIARCH} dh_auto_install
        dh_auto_install -D contrib/pzstd
 
 override_dh_makeshlibs:

Reply via email to