1 Commits

Author SHA256 Message Date
ec213d9dd7 Merge pull request 'Factory' (#1) from factory into main 2025-10-08 12:58:13 +02:00
3 changed files with 136 additions and 4 deletions

View File

@@ -0,0 +1,55 @@
From f40bbc53bffb905b735c2584c80da396b7a97ed0 Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Tue, 25 Mar 2025 11:44:48 +0100
Subject: [PATCH] Don't export libzstd_static CMake target
Exporting the libzstd_static means it must be present when CMake looks for zstd, which breaks openSUSE policies.
---
build/cmake/lib/CMakeLists.txt | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
index 4e902a1..2ce926d 100644
--- a/build/cmake/lib/CMakeLists.txt
+++ b/build/cmake/lib/CMakeLists.txt
@@ -138,7 +138,8 @@ endif ()
if (ZSTD_BUILD_STATIC)
add_library(libzstd_static STATIC ${Sources} ${Headers})
target_include_directories(libzstd_static INTERFACE $<BUILD_INTERFACE:${PUBLIC_INCLUDE_DIRS}>)
- list(APPEND library_targets libzstd_static)
+ # The static library is not added to the array to avoid requiring it when looking for zstd
+ # list(APPEND library_targets libzstd_static)
if (ZSTD_MULTITHREAD_SUPPORT)
set_property(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD")
if (UNIX)
@@ -207,7 +208,7 @@ if (ZSTD_BUILD_SHARED)
OUTPUT_NAME zstd
VERSION ${ZSTD_FULL_VERSION}
SOVERSION ${zstd_VERSION_MAJOR})
-
+
if (ZSTD_FRAMEWORK)
set_target_properties(
libzstd_shared
@@ -283,6 +284,18 @@ install(TARGETS ${library_targets}
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
+if(ZSTD_BUILD_STATIC)
+ install(TARGETS libzstd_static
+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ FRAMEWORK DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT runtime OPTIONAL
+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ )
+endif()
+
# uninstall target
if (NOT TARGET uninstall)
configure_file(
--
2.49.0

View File

@@ -1,5 +1,17 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 27 11:12:09 UTC 2025 - Ali Abdallah <ali.abdallah@suse.com> Tue Mar 25 10:45:34 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Add patch (non-upstreamable):
* 0001-Don-t-export-libzstd_static-CMake-target.patch
-------------------------------------------------------------------
Sat Mar 1 03:59:19 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- build with cmake as it is needed for building blender 4.4
this should not be a problem any more as cmake:mini is in ring0
-------------------------------------------------------------------
Thu Feb 20 02:56:07 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.de>
- update to 1.5.7: - update to 1.5.7:
* zstd now employs multiple threads by default * zstd now employs multiple threads by default
@@ -8,11 +20,41 @@ Thu Feb 27 11:12:09 UTC 2025 - Ali Abdallah <ali.abdallah@suse.com>
* Substantial --patch-from performance improvements * Substantial --patch-from performance improvements
- Drop pzstd.1.patch - not upstream, but also not needed - Drop pzstd.1.patch - not upstream, but also not needed
- Changes between 1.5.5 and 1.5.6: -------------------------------------------------------------------
* Introduce a new stable parameter ZSTD_c_targetCBlockSize, Thu Mar 28 15:56:09 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 1.5.6:
* Introduce a new stable parameter ZSTD_c_targetCBlockSize,
enabling the division of blocks into smaller segments to enabling the division of blocks into smaller segments to
enhance initial byte delivery speed for congested networks enhance initial byte delivery speed for congested networks
* library allows allow ganular binary size selection * library allows allow ganular binary size selection
- drop zstd-pr-3961.patch, merged upstream
-------------------------------------------------------------------
Thu Mar 14 07:13:30 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Backport PAC/BTI fix for aarch64
https://github.com/facebook/zstd/pull/3961 :
* zstd-pr-3961.patch
-------------------------------------------------------------------
Fri Dec 29 13:21:02 UTC 2023 - ecsos <ecsos@opensuse.org>
- Disable build of gzip for Leap 15.x to fix build error.
-------------------------------------------------------------------
Thu May 25 11:41:00 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Revert the addition of build specific cmake files: breaks
gdal, apache-arrow and possibly others -- boo#1211566
* note that shipping cmake files is not intentional or supported
upstream at the moment: gh#facebook/zstd#3642
-------------------------------------------------------------------
Wed May 10 01:42:06 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add cmake files manually because we do not want to add
cmake to the bootstrap ring0
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 13 11:15:39 UTC 2023 - Dirk Müller <dmueller@suse.com> Thu Apr 13 11:15:39 UTC 2023 - Dirk Müller <dmueller@suse.com>
@@ -126,6 +168,21 @@ Fri Feb 10 08:22:04 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
* misc: Fix `contrib/` seekable format * misc: Fix `contrib/` seekable format
* misc: Improve speed of the one-file library generator * misc: Improve speed of the one-file library generator
- rebase pzstd.1.patch - rebase pzstd.1.patch
* Dropped patches:
- Disallow-empty-output-directory.patch
- Fix-buffer-underflow-for-null-dir1.patch
Fixed upstream
-------------------------------------------------------------------
Thu Feb 9 08:39:08 UTC 2023 - Ali Abdallah <ali.abdallah@suse.com>
- Fix CVE-2022-4899, bsc#1209533
* Fix buffer underflow when dir1 == ""
* Disallow empty string as an argument for --output-dir-flat=""
and --output-dir-mirror="".
- Added patches:
* Disallow-empty-output-directory.patch
* Fix-buffer-underflow-for-null-dir1.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 3 09:03:22 UTC 2023 - Dirk Müller <dmueller@suse.com> Tue Jan 3 09:03:22 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package zstd # spec file for package zstd
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,8 @@
# #
%bcond_without cmake
%define libname libzstd1 %define libname libzstd1
%if 0%{?suse_version} <= 1500 %if 0%{?suse_version} <= 1500
%define with_gzip 0 %define with_gzip 0
@@ -33,6 +35,11 @@ Source0: https://github.com/facebook/zstd/releases/download/v%{version}/%
Source1: https://github.com/facebook/zstd/releases/download/v%{version}/%{name}-%{version}.tar.gz.sig Source1: https://github.com/facebook/zstd/releases/download/v%{version}/%{name}-%{version}.tar.gz.sig
Source2: zstd.keyring Source2: zstd.keyring
Source99: baselibs.conf Source99: baselibs.conf
# PATCH-FIX-OPENSUSE -- 0001-Don-t-export-libzstd_static-CMake-target.patch
Patch0: 0001-Don-t-export-libzstd_static-CMake-target.patch
%if %{with cmake}
BuildRequires: cmake
%endif
BuildRequires: gcc BuildRequires: gcc
# C++ is needed for pzstd only # C++ is needed for pzstd only
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@@ -113,11 +120,16 @@ an optimized deflate/zlib handling.
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects %global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags} -std=c++11" export CXXFLAGS="%{optflags} -std=c++11"
%if %{with cmake}
%cmake ./cmake -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON
%cmake_build
%else
# lib-mt is alias for multi-threaded library support # lib-mt is alias for multi-threaded library support
%make_build HAVE_ZLIB=1 prefix=%{_prefix} libdir=%{_libdir} -C lib lib-mt %make_build HAVE_ZLIB=1 prefix=%{_prefix} libdir=%{_libdir} -C lib lib-mt
for dir in programs contrib/pzstd; do for dir in programs contrib/pzstd; do
%make_build -C "$dir" %make_build -C "$dir"
done done
%endif
%check %check
export CFLAGS="%{optflags}" export CFLAGS="%{optflags}"
@@ -126,9 +138,14 @@ export CXXFLAGS="%{optflags} -std=c++11"
#make_build -C contrib/pzstd test-pzstd #make_build -C contrib/pzstd test-pzstd
%install %install
%if %{with cmake}
%cmake_install
rm %{buildroot}%{_datadir}/doc/packages/zstd/zstd_manual.html
%else
%make_install V=1 VERBOSE=1 prefix=%{_prefix} libdir=%{_libdir} %make_install V=1 VERBOSE=1 prefix=%{_prefix} libdir=%{_libdir}
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1 install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1
%endif
%if %{with_gzip} %if %{with_gzip}
ln -s zstd %{buildroot}/%{_bindir}/gzip ln -s zstd %{buildroot}/%{_bindir}/gzip
ln -s zstd %{buildroot}/%{_bindir}/gunzip ln -s zstd %{buildroot}/%{_bindir}/gunzip
@@ -158,6 +175,9 @@ ln -s zstdcat %{buildroot}/%{_bindir}/zcat
%{_includedir}/*.h %{_includedir}/*.h
%{_libdir}/pkgconfig/libzstd.pc %{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so %{_libdir}/libzstd.so
%if %{with cmake}
%{_libdir}/cmake/zstd/
%endif
%files -n lib%{name}-devel-static %files -n lib%{name}-devel-static
%license COPYING LICENSE %license COPYING LICENSE