From fd39fd82d5b2be0a08f4ec1e508504f2b667dcff Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Tue, 18 Aug 2026 10:11:38 +0200 Subject: [PATCH] Fix building nispor in Konflux In newer rust-toolset build flags are now only applied when the %cargo_build macro is used, via the RUSTFLAGS environment variable it sets. nispor uses make rather than %cargo_build, so need to export RUSTFLAGS in %build explicitly. Resolves: RHEL-159656 --- nispor.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nispor.spec b/nispor.spec index 68ce622..2b65ee0 100644 --- a/nispor.spec +++ b/nispor.spec @@ -1,6 +1,6 @@ Name: nispor Version: 1.2.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: API for network status querying License: ASL 2.0 URL: https://github.com/nispor/nispor @@ -108,15 +108,12 @@ This package contains C binding of %{name}. # Source1 is vendored dependencies %cargo_prep -V 1 -# The cargo_prep will create `.cargo/config` which take precedence over -# `.cargo/config.toml` shipped by upstream which fix the SONAME of cdylib. -# To workaround that, merge upstream rustflags into cargo_prep created one. -_FLAGS=`sed -ne 's/rustflags = "\(.\+\)"/\1/p' .cargo/config.toml` -sed -i -e "s/rustflags = \[\(.\+\), \]$/rustflags = [\1, \"$_FLAGS\"]/" \ - .cargo/config -rm .cargo/config.toml - %build +# Export RUSTFLAGS so that make's internal cargo invocation picks up the RPM +# build flags (debuginfo, hardening) and the cdylib SONAME flag. The new +# %%cargo_prep no longer embeds these in .cargo/config.toml, and %%cargo_build +# is not used here because the Makefile drives the full build. +export RUSTFLAGS="%{build_rustflags} -Clink-arg=-Wl,-soname=libnispor.so.1" make pushd src/python %py3_build @@ -152,6 +149,9 @@ popd %{_libdir}/pkgconfig/nispor.pc %changelog +* Tue Aug 18 2026 Jan Vaclav - 1.2.14-2 +- Fix building nispor with Konflux (RHEL-159656) + * Wed Sep 20 2023 Matej Focko - 1.2.14-1 - New release 1.2.14 (Gris Ge) - bond: support changing bond mode (Gris Ge)