[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: contrib: libarchive: update to 3.8.0

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu May 29 06:51:00 UTC 2025



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
86d9e340 by Steve Lhomme at 2025-05-29T06:04:35+00:00
contrib: libarchive: update to 3.8.0

Fixes some security issues and bugs [^1].

[^1]: https://github.com/libarchive/libarchive/releases/tag/v3.8.0

(cherry picked from commit d942198743f8c059b1bf475bae48b43985b38fe0)

- - - - -
1f846116 by Steve Lhomme at 2025-05-29T06:04:35+00:00
contrib libarchive: link for uuid when building with xmllite

Fixes UWP builds of VLC with autotools

(cherry picked from commit d0b1b4aa062ffdcd7644b765b541a9f07419c5bf)

- - - - -


4 changed files:

- + contrib/src/libarchive/0001-cmake-add-uuid-library-when-using-xmllite.patch
- contrib/src/libarchive/0001-zstd-use-GetNativeSystemInfo-to-get-the-number-of-th.patch
- contrib/src/libarchive/SHA512SUMS
- contrib/src/libarchive/rules.mak


Changes:

=====================================
contrib/src/libarchive/0001-cmake-add-uuid-library-when-using-xmllite.patch
=====================================
@@ -0,0 +1,39 @@
+From ac96967e36808cf4fb7a523e37bec66a4888b106 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Mon, 26 May 2025 10:44:49 +0200
+Subject: [PATCH] [cmake] add uuid library when using xmllite
+
+Consecutive to 16fd043f51d911b106f2a7834ad8f08f65051977
+IID_ISequentialStream is required by the code.
+This GUID is defined in uuid.lib or libuuid.a in mingw-w64. It is required
+to link with that library to get the definition of the GUID. Some toolchains
+add it by default but not all.
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7096b7c0..e938df72 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1257,7 +1257,7 @@ ELSE(LIBXML2_FOUND)
+       # Check linkage as well; versions of mingw-w64 before v11.0.0
+       # do not contain an import library for xmllite.
+       cmake_push_check_state()
+-      SET(CMAKE_REQUIRED_LIBRARIES "xmllite")
++      SET(CMAKE_REQUIRED_LIBRARIES "xmllite" "uuid")
+       check_c_source_compiles("
+       #include <initguid.h>
+       #include <xmllite.h>
+@@ -1268,7 +1268,7 @@ ELSE(LIBXML2_FOUND)
+       cmake_pop_check_state()
+       IF(HAVE_XMLLITE_H)
+         SET(XMLLITE_FOUND TRUE)
+-        LIST(APPEND ADDITIONAL_LIBS "xmllite")
++        LIST(APPEND ADDITIONAL_LIBS "xmllite" "uuid")
+       ENDIF()
+     ENDIF()
+   ENDIF(EXPAT_FOUND)
+-- 
+2.45.1.windows.1
+


=====================================
contrib/src/libarchive/0001-zstd-use-GetNativeSystemInfo-to-get-the-number-of-th.patch
=====================================
@@ -1,7 +1,8 @@
-From 51214b8cbd6008105fd94807dfc9c0699459e9e2 Mon Sep 17 00:00:00 2001
+From 30308ee3c0b1eccc6747aac0cbabb6bfb171dd18 Mon Sep 17 00:00:00 2001
 From: Steve Lhomme <robux4 at ycbcr.xyz>
 Date: Mon, 23 Sep 2024 13:37:22 +0200
-Subject: [PATCH] zstd: use GetNativeSystemInfo() to get the number of threads
+Subject: [PATCH] set_format: use GetNativeSystemInfo() to get the number of
+ threads
 
 GetActiveProcessorCount() is not available in UWP [1] and
 it's not available before Windows 7.
@@ -12,10 +13,12 @@ SYSTEM_INFO::dwNumberOfProcessors gives the same information [2]
 [2] https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
 ---
  libarchive/archive_write_add_filter_zstd.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ libarchive/archive_write_set_format_7zip.c | 6 +++---
+ libarchive/archive_write_set_format_zip.c  | 5 +++--
+ 3 files changed, 9 insertions(+), 8 deletions(-)
 
 diff --git a/libarchive/archive_write_add_filter_zstd.c b/libarchive/archive_write_add_filter_zstd.c
-index 7ea3d18c..89b90387 100644
+index c0a6e5a3..0e2bdf44 100644
 --- a/libarchive/archive_write_add_filter_zstd.c
 +++ b/libarchive/archive_write_add_filter_zstd.c
 @@ -280,9 +280,9 @@ archive_compressor_zstd_options(struct archive_write_filter *f, const char *key,
@@ -31,6 +34,39 @@ index 7ea3d18c..89b90387 100644
  		}
  #endif
  		if (threads < 0 || threads > INT_MAX) {
+diff --git a/libarchive/archive_write_set_format_7zip.c b/libarchive/archive_write_set_format_7zip.c
+index 902d03f6..793a2e8c 100644
+--- a/libarchive/archive_write_set_format_7zip.c
++++ b/libarchive/archive_write_set_format_7zip.c
+@@ -533,9 +533,9 @@ _7z_options(struct archive_write *a, const char *key, const char *value)
+ 			threads = sysconf(_SC_NPROCESSORS_ONLN);
+ #elif !defined(__CYGWIN__) && defined(_WIN32_WINNT) && \
+ 	_WIN32_WINNT >= 0x0601 /* _WIN32_WINNT_WIN7 */
+-			DWORD winCores = GetActiveProcessorCount(
+-				ALL_PROCESSOR_GROUPS);
+-			threads = (intmax_t)winCores;
++			SYSTEM_INFO systemInfo;
++			GetNativeSystemInfo(&systemInfo);
++			threads = (intmax_t)systemInfo.dwNumberOfProcessors;
+ #else
+ 			threads = 1;
+ #endif
+diff --git a/libarchive/archive_write_set_format_zip.c b/libarchive/archive_write_set_format_zip.c
+index 3630b9f2..76356d40 100644
+--- a/libarchive/archive_write_set_format_zip.c
++++ b/libarchive/archive_write_set_format_zip.c
+@@ -453,8 +453,9 @@ archive_write_zip_options(struct archive_write *a, const char *key,
+ 			zip->threads = sysconf(_SC_NPROCESSORS_ONLN);
+ #elif !defined(__CYGWIN__) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0601
+ 			/* Windows 7 and up */
+-			DWORD activeProcs = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
+-			zip->threads = activeProcs <= SHRT_MAX ? (short)activeProcs : SHRT_MAX;
++			SYSTEM_INFO systemInfo;
++			GetNativeSystemInfo(&systemInfo);
++			zip->threads = systemInfo.dwNumberOfProcessors <= SHRT_MAX ? (short)systemInfo.dwNumberOfProcessors : SHRT_MAX;
+ #else
+ 			zip->threads = 1;
+ #endif
 -- 
-2.45.0.windows.1
+2.47.2
 


=====================================
contrib/src/libarchive/SHA512SUMS
=====================================
@@ -1 +1 @@
-dcc90cc0597c14867c094aaf13bb1ec4d6b2fee7f0d6d714a909f42085cc99f7e49ac78a51e312df39b5db57aa8d17bc794f1d8d7b1c8fb65bc598ff88eb5158  libarchive-3.7.8.tar.gz
+e563cd10cd447daf7c5d11c657cbc3d8971add4440264fb4754ea7670a249e8b7b1c31f62f78259867960392623dba73c2d20efc57dc02564c8f55841dc8f2cc  libarchive-3.8.0.tar.gz


=====================================
contrib/src/libarchive/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # LIBARCHIVE
-LIBARCHIVE_VERSION := 3.7.8
+LIBARCHIVE_VERSION := 3.8.0
 LIBARCHIVE_URL := $(GITHUB)/libarchive/libarchive/releases/download/v$(LIBARCHIVE_VERSION)/libarchive-$(LIBARCHIVE_VERSION).tar.gz
 
 PKGS += libarchive
@@ -44,6 +44,7 @@ $(TARBALLS)/libarchive-$(LIBARCHIVE_VERSION).tar.gz:
 libarchive: libarchive-$(LIBARCHIVE_VERSION).tar.gz .sum-libarchive
 	$(UNPACK)
 	$(APPLY) $(SRC)/libarchive/0001-zstd-use-GetNativeSystemInfo-to-get-the-number-of-th.patch
+	$(APPLY) $(SRC)/libarchive/0001-cmake-add-uuid-library-when-using-xmllite.patch
 	$(call pkg_static,"build/pkgconfig/libarchive.pc.in")
 	$(MOVE)
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/29e47660ced8e478ad4f7db095bd21b1ea9625d1...1f846116c1b15324b0edae18a4b541f619f3bc29

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/29e47660ced8e478ad4f7db095bd21b1ea9625d1...1f846116c1b15324b0edae18a4b541f619f3bc29
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list