@@ -69,7 +69,7 @@ if [ "${ADJUSTED_ID}" = "rhel" ] && [ "${VERSION_CODENAME-}" = "centos7" ]; then
6969fi
7070
7171# To find some devel packages, some rhel need to enable specific extra repos, but not on RedHat ubi images...
72- INSTALL_CMD_ADDL_REPO =" "
72+ INSTALL_CMD_ADDL_REPOS =" "
7373if [ ${ADJUSTED_ID} = " rhel" ] && [ ${ID} != " rhel" ]; then
7474 if [ ${MAJOR_VERSION_ID} = " 8" ]; then
7575 INSTALL_CMD_ADDL_REPOS=" --enablerepo powertools"
9393 INSTALL_CMD=" ${PKG_MGR_CMD} ${INSTALL_CMD_ADDL_REPOS} -y install --noplugins --setopt=install_weak_deps=0"
9494fi
9595
96+ # Install Time::Piece Perl module required by OpenSSL 3.0.18+ build system on CentOS 7/RHEL 7
97+ install_time_piece () {
98+ echo " (*) Ensuring Time::Piece Perl module is available for OpenSSL 3.0.18+ build..."
99+
100+ # Check if Time::Piece is already available (it's usually in Perl core)
101+ if perl -MTime::Piece -e ' exit 0' 2> /dev/null; then
102+ echo " (*) Time::Piece already available"
103+ return 0
104+ fi
105+
106+ echo " (*) Time::Piece not found, installing perl-Time-Piece package..."
107+
108+ # Install perl-Time-Piece package for CentOS 7/RHEL 7
109+ if ${INSTALL_CMD} perl-Time-Piece; then
110+ echo " (*) perl-Time-Piece installed for OpenSSL 3.0.18+ build"
111+ else
112+ echo " (!) Failed to install perl-Time-Piece package. This will cause OpenSSL 3.0.18+ build to fail"
113+ return 1
114+ fi
115+ }
116+
96117# Clean up
97118clean_up () {
98119 case ${ADJUSTED_ID} in
@@ -620,6 +641,8 @@ install_from_source() {
620641 case ${VERSION_CODENAME} in
621642 centos7|rhel7)
622643 check_packages perl-IPC-Cmd
644+ # Install Time::Piece Perl module required by OpenSSL 3.0.18+ build system
645+ install_time_piece
623646 install_openssl3
624647 ADDL_CONFIG_ARGS=" --with-openssl=${SSL_INSTALL_PATH} --with-openssl-rpath=${SSL_INSTALL_PATH} /lib"
625648 ;;
0 commit comments