Skip to content

Commit a700f78

Browse files
committed
wip: centos-7 devtoolset-11 install/setup and openssl-4.0.0 build
1 parent 9fa1e41 commit a700f78

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

ci/centos-7-setup-devtoolset-11.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sudo yum install -y centos-release-scl
2+
rm /etc/yum.repos.d/CentOS-SCLo-scl.repo
3+
sed -i 's,^#baseurl.*$,baseurl=https://vault.centos.org/7.9.2009/sclo/x86_64/rh/' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
4+
sed -i ',mirrorlist,d' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
5+
sudo yum update
6+
sudo yum install -y devtoolset-11
7+
# add source /opt/rh/devtoolset-11/enable to /usr/lib/rpm/find-debuginfo.sh at the top of the file just after the shebang

deps-packaging/openssl/cfbuild-openssl.spec

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Release: 1
77
Source0: openssl-%{openssl_version}.tar.gz
88
Patch0: 0006-Add-latomic-on-AIX-7.patch
99
Patch1: 0008-Define-_XOPEN_SOURCE_EXTENDED-as-1.patch
10-
Patch2: 0010-Provide-timespec-for-centos-7.patch
1110
License: MIT
1211
Group: Other
1312
Url: https://cfengine.com
@@ -24,12 +23,6 @@ mkdir -p %{_builddir}
2423
%patch0 -p1
2524
%patch1 -p1
2625

27-
# for some reason linux/time.h is not included and timespec struct is not defined which causes an error in crypto/thread/arch/thread_posix.c
28-
if [ "$OS_VERSION_MAJOR" = "7" ]
29-
then
30-
%patch2 -p1
31-
fi
32-
3326
%build
3427

3528
if [ -z "$MAKE" ]
@@ -68,11 +61,8 @@ then
6861
fi
6962
if [ "$OS_VERSION_MAJOR" = "7" ]
7063
then
71-
# https://github.com/openssl/openssl/commit/232f17f065e089cab931d2babbed548e5958e6b2 introduced a skip of new b64 encoder which uses avx2, centos-7 gcc 4.8.2 lacks full support for the avx2 related code so we leverage _M_ARM64EC macro
72-
# also, gcc 4.8.2 does not support some c99 constructs like in loop variable initialization so explicitly choose c99.
73-
# as described in crypto/sleep.c if nanosleep is unavailable, define OPENSSL_USE_USLEEP
74-
# in crypto/thread/arch/thread_posix.c deadline_ts is unused so skip that warning as error
75-
HACK_FLAGS="-D_M_ARM64EC -std=c99 -DOPENSSL_USE_USLEEP -Wno-unused-variable"
64+
# apparently our build doesn't quite work with devtoolset on centos so give it a hint where to find libraries with -L/opt/rh/devtoolset-11/root/usr/lib64
65+
HACK_FLAGS="-L/opt/rh/devtoolset-11/root/usr/lib64"
7666
fi
7767
fi
7868

@@ -178,8 +168,8 @@ CFEngine Build Automation -- openssl -- development files
178168
%{prefix}/bin/openssl
179169

180170
%dir %{prefix}/lib
181-
%{prefix}/lib/libssl.so.3
182-
%{prefix}/lib/libcrypto.so.3
171+
%{prefix}/lib/libssl.so.4
172+
%{prefix}/lib/libcrypto.so.4
183173
%{prefix}/ssl/openssl.cnf
184174
%{prefix}/ssl/ct_log_list.cnf
185175
%{prefix}/ssl/ct_log_list.cnf.dist

0 commit comments

Comments
 (0)