Notification time stamped 2023-03-01 04:07:23 UTC
From 400fdc1ef89d3343c9c5f8d3f4277861303d3b36 Mon Sep 17 00:00:00 2001 From: Florian Weimer fweimer@redhat.com Date: Mar 01 2023 04:07:02 +0000 Subject: Merge branch 'rawhide' into private-f38-toolchain
---
diff --git a/changelog b/changelog index 35ff670..1bcb550 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +* Tue Feb 28 2023 Maxwell G gotmax@e.email - 253-1 +- Include RUSTFLAGS in %%set_build_flags +- Fixes: rhbz#2167183 + * Tue Feb 28 2023 Tom Stellard tstellar@redhat.com - 252-1 - Rename _pkg_extra_* macros to _distro_extra_*
diff --git a/macros b/macros index 84b7d2c..cfb357b 100644 --- a/macros +++ b/macros @@ -148,6 +148,7 @@ FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \ FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \ VALAFLAGS="${VALAFLAGS:-%{build_valaflags}}" ; export VALAFLAGS ; \ + RUSTFLAGS="${RUSTFLAGS:-%{build_rustflags}}" ; export RUSTFLAGS ; \ LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \ LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \ CC="${CC:-%{__cc}}" ; export CC ; \ diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 86448e4..7f72777 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -4,7 +4,7 @@ # 2) When making changes, increment the version (in baserelease) by 1. # rpmdev-bumpspec and other tools update the macro below, which is used # in Version: to get the desired effect. -%global baserelease 252 +%global baserelease 253
Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config @@ -105,7 +105,8 @@ Requires: perl-srpm-macros # ↓ Has Python BRPs originaly present in redhat-rpm-config Requires: python-srpm-macros >= 3.11-7 Requires: qt5-srpm-macros -Requires: rust-srpm-macros +# rust-srpm-macros v24 contains %%build_rustflags defintion +Requires: rust-srpm-macros >= 24 Requires: rpmautospec-rpm-macros Requires: package-notes-srpm-macros Requires: pyproject-srpm-macros diff --git a/tests/rustflags/main.fmf b/tests/rustflags/main.fmf new file mode 100644 index 0000000..02226e2 --- /dev/null +++ b/tests/rustflags/main.fmf @@ -0,0 +1,7 @@ +summary: Test that conditional support for RUSTFLAGS works + +require: + - redhat-rpm-config + - rpm + - rust-packaging +test: ./runtest.sh diff --git a/tests/rustflags/runtest.sh b/tests/rustflags/runtest.sh new file mode 100755 index 0000000..b6a3be0 --- /dev/null +++ b/tests/rustflags/runtest.sh @@ -0,0 +1,22 @@ +#!/usr/bin/bash +set -e -u -o pipefail + +# Allow for local testing +rargs=() +if [ -n "${MACROS_PATH:-}" ]; then + default_macros_path="$(rpm --showrc | grep 'Macro path' | awk -F ': ' '{print $2}')" + rargs+=("--macros" "${default_macros_path}:${MACROS_PATH}") +fi + +build_rustflags="$(rpm -E '%{build_rustflags}')" +# For good measure +[ "${build_rustflags}" != "%{build_rustflags}" ] +# +flags="$(rpm "${rargs[@]}" -E '%set_build_flags')" + +echo 'Check that RUSTFLAGS is set after evaluating %set_build_flags' +( + eval "${flags}" + # set -u will make this fail if $RUSTFLAGS isn't defined + [ "${RUSTFLAGS}" = "${build_rustflags}" ] +)
https://src.fedoraproject.org/rpms/redhat-rpm-config/c/400fdc1ef89d3343c9c5f...
scm-commits@lists.fedoraproject.org