Skip to content

Conversation

@DrDaveD
Copy link
Contributor

@DrDaveD DrDaveD commented Aug 26, 2021

This has been broken since the 0.6.1-1 commit and has been causing the CI rpm builds to fail.

@djw8605 djw8605 merged commit 3756489 into scitokens:master Aug 26, 2021
@DrDaveD DrDaveD deleted the fix-cmake3-rpm branch August 27, 2021 10:50
@olifre
Copy link
Contributor

olifre commented Sep 1, 2021

As discussed in #51, this breaks on EL8 derived distros.

@djw8605
Copy link
Contributor

djw8605 commented Sep 1, 2021

Should we put 'ifs' around the cmake requirement and macro?

@olifre
Copy link
Contributor

olifre commented Sep 1, 2021

That's the way @brianhlin did it in #51:

%if 0%{?rhel} < 8 && 0%{?osg}
BuildRequires: cmake3
%else
BuildRequires: cmake
%endif

I commented that it might be better to use:

%if 0%{?el} < 8

(instead of rhel) since we also want to catch CentOS 8 of course, so I think this would fix CI and also work on CentOS 8.
Given the way cmake is packaged, we can't go any other way than using ifs.

@DrDaveD
Copy link
Contributor Author

DrDaveD commented Sep 1, 2021

@olifre Did you verify it on CentOS 8.4? I have a Rocky 8.4 and installing 'cmake3' gets a cmake package and dependencies which include /usr/bin/cmake3 and a %cmake3 rpm macro. It looks like it will work fine to me. I'm guessing the problem was only on 8.3.

@olifre
Copy link
Contributor

olifre commented Sep 1, 2021

@olifre Did you verify it on CentOS 8.4?

Yes, I did:

[root@xrootd001-dev ~]# yum info cmake3
Last metadata expiration check: 2:27:53 ago on Wed Sep  1 18:26:18 2021.
Error: No matching Packages to list
[root@xrootd001-dev ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 8.4.2105
Release:        8.4.2105
Codename:       n/a

So if there's a cmake3 package in RockyLinux 8.4, it's a difference to CentOS 8.4. Checking the cmake package on the same system:

[root@xrootd001-dev ~]# yum info cmake 
Last metadata expiration check: 2:28:26 ago on Wed Sep  1 18:26:18 2021.
Installed Packages
Name         : cmake
Version      : 3.18.2
Release      : 11.el8_4
Architecture : x86_64
Size         : 26 M
Source       : cmake-3.18.2-11.el8_4.src.rpm
Repository   : @System
From repo    : appstream
Summary      : Cross-platform make system
URL          : http://www.cmake.org
License      : BSD and MIT and zlib
Description  : CMake is used to control the software compilation process using simple
             : platform and compiler independent configuration files. CMake generates
             : native makefiles and workspaces that can be used in the compiler
             : environment of your choice. CMake is quite sophisticated: it is possible
             : to support complex environments requiring system configuration, preprocessor
             : generation, code generation, and template instantiation.

i.e. the cmake package from the @System repo is version 3, and there is no cmake3 package.

@DrDaveD
Copy link
Contributor Author

DrDaveD commented Sep 1, 2021

Sure but if you do yum install cmake3 it will install the cmake-3 package so it's fine. It must have a Provides: cmake3 statement. It comes from the "appstream" repository so make sure that's enabled. In my own git fork of this repo I have tagged an 0.6.3 to test the build and it succeeded on the OBS build on CentOS_8.

@olifre
Copy link
Contributor

olifre commented Sep 1, 2021

Sure but if you do yum install cmake3 it will install the cmake-3 package so it's fine. It must have a Provides: cmake3 statement.

Indeed, you are right:
https://git.rockylinux.org/staging/rpms/cmake/-/blob/r8/SPECS/cmake.spec#L180

I can also reproduce that this works on CentOS 8.4, sorry for checking only with yum info which apparently does not take such aliases / Provides into account 😭 . Then indeed this is not an issue, and all is well with cmake3, sorry for the noise!

@DrDaveD
Copy link
Contributor Author

DrDaveD commented Sep 1, 2021

Oh but the Centos_7 build failed with

+ %ldconfig_scriptlets
/var/tmp/rpm-tmp.Uj6BXr: line 38: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.Uj6BXr (%install)

Those come from epel-rpm-macros. I will try to figure out if those need an explicit BuildRequires or what.

@DrDaveD
Copy link
Contributor Author

DrDaveD commented Sep 1, 2021

#64 makes the OBS el7 build work.

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