Bug 1861329 - Provide override for the %cmake macro in EPEL8 compatible with the new %cmake macro in Fedora
Summary: Provide override for the %cmake macro in EPEL8 compatible with the new %cmake...
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: epel-rpm-macros
Version: epel8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-28 10:08 UTC by Mattias Ellert
Modified: 2022-01-16 16:04 UTC (History)
6 users (show)

Fixed In Version: epel-rpm-macros-8-15
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-30 18:13:22 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1858941 0 unspecified CLOSED Please upgrade CMake to 3.17+ and include newly updated macros from Fedora 2024-10-01 16:45:52 UTC
Red Hat Bugzilla 1858983 0 unspecified CLOSED cmake: Sync Fedora macros for optional support for out-of-source builds 2023-06-27 12:27:06 UTC

Description Mattias Ellert 2020-07-28 10:08:32 UTC
Description of problem:

In Fedora 33 the %cmake macro changed to use out-of-source builds by default.

The new macro is backported to Fedora 31 and 32, where the new behaviour is not the default in order not introduce breakage in released Fedora. But it can be used there by adding

%undefine __cmake_in_source_build

to the specfile.

The new macro has also been backported to the %cmake3 macro in the cmake3 package in EPEL 7, where the new behaviour is also not the default but can be activated by undefining __cmake3_in_source_build.

Which leaves EPEL 8 as a special case where the new macro can not be used.

While cmake3 in EPEL 7 is an EPEL package that can be adapted to the new macro in EPEL, cmake in EPEL 8 is a RHEL package. So unless redhat can be persuaded to updated the package in RHEL to provide the new functionality, the %cmake macro must be overridden in EPEL 8 if the new functionality should be provided.

Note that the cmake version if RHEL 8 (3.11.4) does not support the -S and -B flags, so the macro must be reimplemented to not use these in EPEL 8.

Version-Release number of selected component (if applicable):

cmake-3.11.4-7.el8.x86_64
epel-rpm-macros-8-13.noarch

How reproducible:

Always

Steps to Reproduce:
1. Add %undefine __cmake_in_source_build to an EPEL 8 specfile
2. Build the package expecting the behaviour of the new %cmake makro
3. See it fail

Additional info:

https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

Comment 1 Mattias Ellert 2020-07-29 12:30:27 UTC
See PR:
https://src.fedoraproject.org/rpms/epel-rpm-macros/pull-request/18

Comment 2 Fedora Update System 2020-07-29 22:59:19 UTC
FEDORA-EPEL-2020-996d6678c8 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-996d6678c8

Comment 3 Fedora Update System 2020-07-30 18:13:22 UTC
FEDORA-EPEL-2020-996d6678c8 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Vasiliy Glazov 2020-11-25 20:08:02 UTC
I want to reopen this bug because solution not work.
Please see comment at https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-996d6678c8
I have the same issue.

Comment 5 Kevin Fenzi 2021-05-02 18:01:37 UTC
Is this still not working? Can you re-test now and if it's not working submit a PR?

Comment 6 Sergio Basto 2021-07-14 22:45:12 UTC
hi,
I'm seeing the problem on epel8-playground, I think .

I'm building fortune-mod on epel8 [1], it builds well on epel-8, but not on epel-8-playground , on epel-8-playground cmake doesn't do "CMake out-of-source builds" [2]

HTH

[1]
https://koji.fedoraproject.org/koji/packageinfo?packageID=1756


[2]

 /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCOOKIEDIR=/usr/share/games/fortune -DLOCALDIR=/usr/share/games/fortune -DNO_OFFENSIVE=TRUE
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.

Comment 7 Sergio Basto 2022-01-16 16:04:34 UTC
https://src.fedoraproject.org/rpms/epel-rpm-macros/pull-request/19

seems to me that is fixed , can we close this bug ?


Note You need to log in before you can comment on or make changes to this bug.