Package: libsnappy1v5 Version: 1.1.8-1 Severity: grave Tags: patch Dear Laszlo,
During my tests with Ceph, I noticed a grave regression: Ceph OSD (the process that does the actual storage for Ceph) cannot use Snappy anymore, because it can't find one symbole related to RTTI. The consequence is that it cannot load and use Snappy. This may be ok for newer clusters, but when upgrading from a cluster let's say in Bullseye, this may be desastrous: data wont be able to be unpacked, which means data loss. Please find attached a very small patch to re-enable RTTI support in Ceph. Note related upstream bug in Ceph: https://tracker.ceph.com/issues/53060 Moving forward, what I propose is probably the easiest way forward, at least for Ceph. Doing extra patching of the Ceph would be a way more hazardous. Your thoughts? Cheers, Thomas Goirand (zigo)
diff -Nru snappy-1.1.9/debian/changelog snappy-1.1.9/debian/changelog --- snappy-1.1.9/debian/changelog 2022-05-08 18:26:22.000000000 +0000 +++ snappy-1.1.9/debian/changelog 2023-02-16 12:37:39.000000000 +0000 @@ -1,3 +1,10 @@ +snappy (1.1.9-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Re-enable RTTI support. + + -- Thomas Goirand <z...@debian.org> Thu, 16 Feb 2023 12:37:39 +0000 + snappy (1.1.9-2) unstable; urgency=medium * Upload to Sid. diff -Nru snappy-1.1.9/debian/patches/re-enable-rtti-support.patch snappy-1.1.9/debian/patches/re-enable-rtti-support.patch --- snappy-1.1.9/debian/patches/re-enable-rtti-support.patch 1970-01-01 00:00:00.000000000 +0000 +++ snappy-1.1.9/debian/patches/re-enable-rtti-support.patch 2023-02-16 12:37:39.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Re-enable RTTI support +Author: Thomas Goirand <z...@debian.org> +Forwarded: no +Last-Update: 2023-02-16 + +--- snappy-1.1.9.orig/CMakeLists.txt ++++ snappy-1.1.9/CMakeLists.txt +@@ -51,10 +51,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" + string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-") + add_definitions(-D_HAS_EXCEPTIONS=0) +- +- # Disable RTTI. +- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") + else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Use -Wall for clang and gcc. + if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") +@@ -76,10 +72,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSV + # Disable C++ exceptions. + string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") +- +- # Disable RTTI. +- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make diff -Nru snappy-1.1.9/debian/patches/series snappy-1.1.9/debian/patches/series --- snappy-1.1.9/debian/patches/series 2021-12-04 18:21:57.000000000 +0000 +++ snappy-1.1.9/debian/patches/series 2023-02-16 12:37:39.000000000 +0000 @@ -4,3 +4,4 @@ 0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch use_packaged_testing.patch correct_testing_link.patch +re-enable-rtti-support.patch