public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Autumn Nash <autumnnash@microsoft.com>
To: git-commits@fedoraproject.org
Subject: [rpms/onnx] test-1.21.0: Replace hardcoded redhat-linux-build with %{_vpath_builddir} via env var
Date: Mon, 08 Jun 2026 15:18:29 GMT	[thread overview]
Message-ID: <178093190907.1.13842311940901942939.rpms-onnx-4edebee5cc49@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/onnx
            Branch : test-1.21.0
            Commit : 4edebee5cc49e9e53f1ede139d9e6dbf7fc80b3c
            Author : Autumn Nash <autumnnash@microsoft.com>
            Date   : 2026-05-04T18:19:53+00:00
            Stats  : +6/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/onnx/c/4edebee5cc49e9e53f1ede139d9e6dbf7fc80b3c?branch=test-1.21.0

            Log:
            Replace hardcoded redhat-linux-build with %{_vpath_builddir} via env var

The 0002 patch hardcodes "redhat-linux-build" as the CMake build directory
name in setup.py. This breaks on distros where %{_vpath_builddir} expands
to a different value (e.g. azurelinux-linux-build).

Fix by reading VPATH_BUILDDIR from the environment with a fallback to
"redhat-linux-build" for backward compatibility, and exporting the macro
value in %build.

---
diff --git a/0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch b/0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch
index c125320..cae7fed 100644
--- a/0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch
+++ b/0002-Let-pyproject_wheel-use-binaries-from-cmake_build.patch
@@ -16,7 +16,7 @@ index 7d2cb9e50..af9049a1e 100644
  
  TOP_DIR = os.path.realpath(os.path.dirname(__file__))
 -CMAKE_BUILD_DIR = os.path.join(TOP_DIR, ".setuptools-cmake-build")
-+CMAKE_BUILD_DIR = os.path.join(TOP_DIR, "redhat-linux-build")
++CMAKE_BUILD_DIR = os.path.join(TOP_DIR, os.environ.get("VPATH_BUILDDIR", "redhat-linux-build"))
  
  WINDOWS = os.name == "nt"
  

diff --git a/onnx.spec b/onnx.spec
index 36aca09..8e71cb6 100644
--- a/onnx.spec
+++ b/onnx.spec
@@ -1,6 +1,6 @@
 Name:       onnx
 Version:    1.17.0
-Release:    12%{?dist}
+Release:    13%{?dist}
 Summary:    Open standard for machine learning interoperability
 License:    Apache-2.0
 
@@ -74,6 +74,7 @@ sed -r \
 %pyproject_buildrequires requirements-reference.txt
 
 %build
+export VPATH_BUILDDIR=%{_vpath_builddir}
 %cmake \
     -DONNX_USE_LITE_PROTO=OFF \
     -DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
@@ -130,6 +131,9 @@ export PYTEST_ADDOPTS="-k 'not test_make_tensor_raw'"
 %{_bindir}/check-node
 
 %changelog
+* Sun May 04 2026 Autumn Nash <autumnnash@microsoft.com> - 1.17.0-13
+- Replace hardcoded redhat-linux-build with %%{_vpath_builddir} via env var
+
 * Mon Feb 16 2026 Diego Herrera <dherrera@fedoraproject.org> - 1.17.0-12
 - Re-enable s390x
 

                 reply	other threads:[~2026-06-08 15:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178093190907.1.13842311940901942939.rpms-onnx-4edebee5cc49@fedoraproject.org \
    --to=autumnnash@microsoft.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox