Skip to content

fix(python-geographiclib): neutralize MinGW macros to avoid empty subshell#17418

Merged
reubeno merged 1 commit into
4.0from
chrco/fix-python-geographiclib
May 24, 2026
Merged

fix(python-geographiclib): neutralize MinGW macros to avoid empty subshell#17418
reubeno merged 1 commit into
4.0from
chrco/fix-python-geographiclib

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

@christopherco christopherco commented May 24, 2026

The upstream Fedora spec wraps the MinGW install steps in a subshell:

(
%mingw32_py3_install_wheel
%mingw64_py3_install_wheel
)
%mingw_debug_install_post

Azure Linux does not ship MinGW toolchains, so existing overlays replaced the MinGW macros inside the subshell with empty strings. That left an empty ( ) block, which bash rejects with syntax error near unexpected token ')' when %install runs, failing the build.

Change the MinGW %build and %install overlays to substitute the bash no-op : instead of an empty string. The subshell stays syntactically valid and the macros become true no-ops at runtime.

Fixes: AB#20285

@christopherco christopherco marked this pull request as ready for review May 24, 2026 04:56
Copilot AI review requested due to automatic review settings May 24, 2026 04:56
@christopherco christopherco requested a review from reubeno as a code owner May 24, 2026 04:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a build failure in the python-geographiclib component caused by previously stripping MinGW install macros while leaving behind an empty subshell (( )) in %install, which triggers a bash syntax error during RPM build on Azure Linux (which does not ship MinGW toolchains).

Changes:

  • Add two %install-scoped spec-search-replace overlays to remove the now-orphaned ( and ) lines.
  • Refresh the rendered spec output and bump Release accordingly.
  • Update the component lock fingerprint to reflect the config change.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
specs/p/python-geographiclib/python-geographiclib.spec Rendered spec updated (Release bump; MinGW subshell parens removed so %install remains valid).
locks/python-geographiclib.lock Updates input-fingerprint to match the new component configuration.
base/comps/python-geographiclib/python-geographiclib.comp.toml Adds two overlays to strip the orphaned subshell parens in %install.

Comment thread base/comps/python-geographiclib/python-geographiclib.comp.toml Outdated
…shell

The upstream Fedora spec wraps the MinGW install steps in a subshell:

    (
    %mingw32_py3_install_wheel
    %mingw64_py3_install_wheel
    )
    %mingw_debug_install_post

Azure Linux does not ship MinGW toolchains, so existing overlays
replaced the MinGW macros with empty strings. That left an empty
`( )` block, which bash rejects with `syntax error near unexpected
token ')'` when %install runs, failing the build.

Change the MinGW %build and %install overlays to substitute the
bash no-op `:` instead of an empty string. The subshell stays
syntactically valid and the macros become true no-ops at runtime.
@christopherco christopherco force-pushed the chrco/fix-python-geographiclib branch from 27fbb2f to 308d39d Compare May 24, 2026 06:42
@christopherco christopherco changed the title fix(python-geographiclib): strip empty MinGW install subshell fix(python-geographiclib): neutralize MinGW macros to avoid empty subshell May 24, 2026
@reubeno reubeno merged commit b1b7832 into 4.0 May 24, 2026
11 checks passed
@reubeno reubeno deleted the chrco/fix-python-geographiclib branch May 24, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants