Custombuild problem with RHEL 8.3

dmtinc

Verified User
Joined
May 10, 2008
Messages
78
Location
Chile
Hi!

After some problems installing modsecurity on RHEL 8.3, I think something is missing:

* This system has been installed today only directadmin, nothing more configured.

For example this part of custombuild:

Code:
  if [ ! -e /usr/include/lua.h ] && [ ! -e /usr/local/include/lua.h ]; then
                if [ "${OS}" != "FreeBSD" ] && [ ! -e /etc/debian_version ]; then
                        if [ "${OS_CENTOS_VER}" = "8" ]; then
                                if [ "${CLOUDLINUX_OPT}" = "yes" ]; then
                                        yum -y install lua-devel --enablerepo=cloudlinux-PowerTools
                                elif [ -e /etc/yum.repos.d/CentOS-PowerTools.repo ] && grep -m1 -q '\[PowerTools\]' /etc/yum.repos.d/CentOS-PowerTools.repo; then
                                        yum -y install lua-devel --enablerepo=PowerTools
                                elif [ -e /etc/yum.repos.d/oracle-linux-ol8.repo ]; then
                                        yum -y install lua-devel --enablerepo=ol8_codeready_builder
                                else
                                        yum -y install lua-devel --enablerepo=powertools
                                fi
                        else
                                yum -y install lua-devel
                        fi
                fi
        fi

In Centos 8 you have the powertools repo but in rhel the repo is codeready-builder-for-rhel-8-x86_64-rpms and the command to enable it(permanently) is:

Code:
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms

Or enable per package install

Code:
yum -y install $package --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms

The validation between Centos and RHEL can be done based con the content of /etc/redhat-release or using the default name of the main repo file (like oracle linux):

Code:
/etc/yum.repos.d/redhat.repo

Centos:

# cat /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)

RHEL:

# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.3 (Ootpa)


I dont know in how many occurrences this problem can be present, but I have the same problem with this packages:

oniguruma-devel
libnghttp2-devel
yajl-devel

If I check in the build code:

Code:
[[email protected] custombuild]# grep "enablerepo=powertools" build
                                                yum -y install oniguruma-devel --enablerepo=powertools
                                                yum -y install autoconf213 --enablerepo=powertools
                                yum -y install libnghttp2-devel --enablerepo=powertools
                                        yum -y install ${RPM_TO_INSTALL} --enablerepo=powertools
                                yum -y install libnghttp2-devel --enablerepo=powertools
                                        yum -y install lua-devel --enablerepo=powertools
                                        yum -y install yajl-devel --enablerepo=powertools
[[email protected] custombuild]#

Regards!
 

dmtinc

Verified User
Joined
May 10, 2008
Messages
78
Location
Chile
Fixed, thank you for the report.
Hi,

A little copy error:

In line 13201 saids:

Code:
yum -y install autoconf213 --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms

Must be:

Code:
yum -y install oniguruma-devel --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms

In line 15386 saids

Code:
yum -y install autoconf213 --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms

Must be:

Code:
yum -y install libnghttp2-devel --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms

In line 16411 saids:

Code:
yum -y install autoconf213 --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms

Must be:

Code:
yum -y install ${RPM_TO_INSTALL} --enablerepo=codeready-builder-for-rhel-8-x86_64-rpms


the "build" script is on a git repo? I think can be more easy check the changes using the graphical git diff.
 
Top