[Rpm-maint] [rpm-software-management/rpm] Sanitize the helper tool search path in cmake (PR #2567)

Panu Matilainen notifications at github.com
Thu Jul 6 09:30:43 UTC 2023


By default cmake uses $PATH, which seems reasonable and even obvious until you start seeing things like /usr/lib64/ccache/cc in the macros file.

Have cmake use a sanitized path (the usual bins) by default and allow augmenting via MYPATH environment variable again (another thing temporarily lost in the cmake transition). This gives us more reasonable output even with ccache installed while still allowing flexibility for more custom setups.

In the autoconf days configure would AS,CC, CPP, CXX, LD and whatnot from the auto* environment directly, but cmake has no direct counterpart for many of those and for the rest, are equally infected by ccache hacks as find_program() is. Handle all the tool lookups with the same logic and same lookup. Also take care of c++ <-> CXX mapping, no compiler I know of installs a file called "cxx" anywhere in the path, its just "c++".
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2567

-- Commit Summary --

  * Sanitize the helper tool search path in cmake

-- File Changes --

    M CMakeLists.txt (19)
    M INSTALL (3)
    M macros.in (10)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2567.patch
https://github.com/rpm-software-management/rpm/pull/2567.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2567
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2567 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230706/0c52b739/attachment.html>


More information about the Rpm-maint mailing list