From c306d7dd9d5d9a1c63eea1502d8b10bf5176a030 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 23 Nov 2022 11:48:18 +0000 Subject: [PATCH] Include fix for meson 0.64 https://gitlab.com/libblkio/libblkio/-/merge_requests/149 --- libblkio/149.patch | 37 +++++++++++++++++++++++++++++++++++++ libblkio/libblkio.spec | 8 ++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 libblkio/149.patch diff --git a/libblkio/149.patch b/libblkio/149.patch new file mode 100644 index 0000000..b93651b --- /dev/null +++ b/libblkio/149.patch @@ -0,0 +1,37 @@ +From c2195221fcec63ee8b6350379fab03b82210e9e3 Mon Sep 17 00:00:00 2001 +From: Stefan Hajnoczi +Date: Tue, 22 Nov 2022 14:03:17 -0500 +Subject: [PATCH] cargo-build.sh: support optimization=plain + +meson 0.64.0 added optimization=plain. It means that no optimization +flags are explicitly passed to the compiler. This is useful in +situations where the environment wants to control compiler flags (e.g. +nix, rpm, etc), typically via CFLAGS, CXXFLAGS, etc. + +Make sure to handle optimization=plain so that cargo-build.sh doesn't +exit early. + +Signed-off-by: Stefan Hajnoczi +--- + src/cargo-build.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/cargo-build.sh b/src/cargo-build.sh +index 2ad5463..9879d44 100755 +--- a/src/cargo-build.sh ++++ b/src/cargo-build.sh +@@ -16,6 +16,11 @@ case "${meson_debug}" in + esac + + case "${meson_optimization}" in ++ plain) ++ # A release build without explicit optimization flags ++ profile=release ++ args+=( --release ) ++ ;; + 0) + profile=debug + rustflags+=( -C opt-level=0 ) +-- +GitLab + diff --git a/libblkio/libblkio.spec b/libblkio/libblkio.spec index 68c0704..2280f23 100644 --- a/libblkio/libblkio.spec +++ b/libblkio/libblkio.spec @@ -5,11 +5,15 @@ Version: 1.1.1 Summary: Block device I/O library Name: libblkio -Release: 6%{?dist} +Release: 7%{?dist} URL: %{forgeurl} Source0: %{forgesource} License: Apache-2.0 OR MIT +# Fix for meson 0.64 +# (https://gitlab.com/libblkio/libblkio/-/merge_requests/149) +Patch: 149.patch + # Basic build requirements. BuildRequires: gcc, gcc-c++ BuildRequires: make @@ -85,5 +89,5 @@ sed -e 's/--locked/--offline/' -i src/cargo-build.sh %changelog -* Tue Nov 22 2022 Richard W.M. Jones - 1.1.1-6 +* Wed Nov 23 2022 Richard W.M. Jones - 1.1.1-7 - Initial package -- 1.8.3.1