diff --git a/fedora_patches/revert-unstable-rust-feature.patch b/fedora_patches/revert-unstable-rust-feature.patch new file mode 100644 index 00000000..7f9dbd91 --- /dev/null +++ b/fedora_patches/revert-unstable-rust-feature.patch @@ -0,0 +1,51 @@ +Copyright 2024-2025 The Trivalent Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed under the License is +distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and limitations under the License. +--- +diff --git a/third_party/crabbyavif/src/src/capi/io.rs b/third_party/crabbyavif/src/src/capi/io.rs +index e7994ce..60a3c13 100644 +--- a/third_party/crabbyavif/src/src/capi/io.rs ++++ b/third_party/crabbyavif/src/src/capi/io.rs +@@ -207,7 +207,7 @@ impl Drop for avifIOWrapper { + } + + impl crate::decoder::IO for avifIOWrapper { +- #[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))] ++ #[cfg_attr(feature = "disable_cfi", no_sanitize(cfi))] + fn read(&mut self, offset: u64, size: usize) -> AvifResult<&[u8]> { + // SAFETY: Calling into a C function. + let res = unsafe { +diff --git a/third_party/crabbyavif/src/src/lib.rs b/third_party/crabbyavif/src/src/lib.rs +index 90fa411..a05f0a5 100644 +--- a/third_party/crabbyavif/src/src/lib.rs ++++ b/third_party/crabbyavif/src/src/lib.rs +@@ -13,7 +13,7 @@ + // limitations under the License. + + #![deny(unsafe_op_in_unsafe_fn)] +-#![cfg_attr(feature = "disable_cfi", feature(sanitize))] ++#![cfg_attr(feature = "disable_cfi", feature(no_sanitize))] + + #[macro_use] + mod internal_utils; +diff --git a/third_party/crabbyavif/src/src/reformat/libyuv.rs b/third_party/crabbyavif/src/src/reformat/libyuv.rs +index 9df874c..e277d86 100644 +--- a/third_party/crabbyavif/src/src/reformat/libyuv.rs ++++ b/third_party/crabbyavif/src/src/reformat/libyuv.rs +@@ -372,7 +372,7 @@ fn find_conversion_function( + // Returns Ok(Some(false)) if only YUV was converted and alpha + // needs to be imported separately. + // Returns Ok(None) if the conversion is not implemented. +-#[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))] ++#[cfg_attr(feature = "disable_cfi", no_sanitize(cfi))] + pub(crate) fn yuv_to_rgb(image: &image::Image, rgb: &mut rgb::Image) -> AvifResult> { + if (rgb.depth != 8 && rgb.depth != 10) || !image.depth_valid() { + return Ok(None); // Not implemented.