Skip to content

Commit 93dc340

Browse files
authored
OpenSSL / zlib security updates. (#163)
* Updated zlib sources to version 1.2.12. * Updated zlib version to build. * Updated OpenSSL 1.1.1 sources to version 1.1.1m. * Updated OpenSSL 1.0.2 sources to version 1.0.2v-chevah4. * Updated OpenSSL versions to build and test for. * Ignore safety warning for click, it's only used for testing. * Build win32 package on Windows Server 2019 from now on. * Bring over brink.sh updates from server repo. * Also bring over brink.conf updates from server repo. * Updated libffi sources to version 3.4.2. * Updated libffi versions to build. * Skip OpenSSL tests on arm64 for now. * Removed AIX workaround for installing libffi. * Try building libffi with no workarounds. * Give macOS 11 a try. * Back to building on macOS 10.15.
1 parent 241e9fe commit 93dc340

File tree

6,108 files changed

+76818
-46458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,108 files changed

+76818
-46458
lines changed

.github/workflows/bare.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
# Workflow won't be cancelled at the first failed job.
168168
fail-fast: false
169169
matrix:
170-
runs-on: [ windows-2019, windows-2016 ]
170+
runs-on: [ windows-2022, windows-2019 ]
171171
timeout-minutes: 60
172172
steps:
173173
# Add packages needed to build OpenSSL, cryptography, etc.

brink.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
BASE_REQUIREMENTS='pip==20.2.4 chevah-brink==0.79.0 paver==1.2.4'
2-
PYTHON_CONFIGURATION='default@2.7.18.ad5a0e1'
1+
BASE_REQUIREMENTS='pip==20.3.4chevah chevah-brink==0.79.0 paver==1.2.4'
2+
PYTHON_CONFIGURATION='default@2.7.18.241e9fe'
33
# For production packages there are 2 options:
44
BINARY_DIST_URI='https://github.com/chevah/python-package/releases/download'
55
#BINARY_DIST_URI='https://bin.chevah.com:20443/production'
66
# For testing packages, make sure this one is the last uncommented instance:
77
#BINARY_DIST_URI='https://bin.chevah.com:20443/testing'
8-
PIP_INDEX='https://bin.chevah.com:20443/pypi/simple'
8+
PIP_INDEX_URL='https://bin.chevah.com:20443/pypi/simple'
99

1010
# There are 2 build directories used in this repo:
1111
# * 'build' is a sub-dir used for building libffi / OpenSSL / Python / etc.

brink.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ PYTHON_VERSION='not.defined.yet'
8787
PYTHON_PLATFORM='unknown-os-and-arch'
8888
PYTHON_NAME='python2.7'
8989
BINARY_DIST_URI='https://github.com/chevah/python-package/releases/download'
90-
PIP_INDEX='https://pypi.org/simple'
90+
PIP_INDEX_URL='https://pypi.org/simple'
9191
BASE_REQUIREMENTS=''
9292

9393
#
@@ -258,6 +258,7 @@ update_path_variables() {
258258
export CHEVAH_OS=${OS}
259259
export CHEVAH_ARCH=${ARCH}
260260
export CHEVAH_CACHE=${CACHE_FOLDER}
261+
export PIP_INDEX_URL=${PIP_INDEX_URL}
261262

262263
}
263264

@@ -315,8 +316,8 @@ pip_install() {
315316
${PYTHON_BIN} -m \
316317
pip install \
317318
--trusted-host bin.chevah.com \
318-
--trusted-host deag.chevah.com \
319-
--index-url=$PIP_INDEX \
319+
--trusted-host pypi-internal.chevah.com \
320+
--index-url=$PIP_INDEX_URL \
320321
--build=${BUILD_FOLDER}/pip-build \
321322
$1
322323

@@ -811,11 +812,11 @@ detect_os() {
811812
ARCH="x64"
812813
case "$OS" in
813814
win)
814-
# 32bit build on Windows 2016, 64bit otherwise.
815+
# 32bit build on Windows 2019, 64bit otherwise.
815816
# Should work with a l10n pack too (tested with French).
816817
win_ver=$(systeminfo.exe | head -n 3 | tail -n 1 \
817818
| cut -d ":" -f 2)
818-
if [[ "$win_ver" =~ "Microsoft Windows Server 2016" ]]; then
819+
if [[ "$win_ver" =~ "Microsoft Windows Server 2019" ]]; then
819820
ARCH="x86"
820821
fi
821822
;;

chevah_build

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ set -o errexit
1111
set -o pipefail
1212

1313
PYTHON_BUILD_VERSION="2.7.18"
14-
LIBFFI_VERSION="3.2.1"
15-
ZLIB_VERSION="1.2.11"
14+
LIBFFI_VERSION="3.4.2"
15+
ZLIB_VERSION="1.2.12"
1616
BZIP2_VERSION="1.0.8"
1717
# We statically build the BSD libedit on selected platforms to get the
1818
# readline module available without linking to the GPL-only readline libs.
1919
LIBEDIT_VERSION="20170329-3.1"
20-
OPENSSL_VERSION="1.1.1m"
20+
OPENSSL_VERSION="1.1.1n"
2121
SQLITE_VERSION="3.37.2"
2222

2323
# Python modules versions to be used everywhere possible.
@@ -33,8 +33,8 @@ PYOPENSSL_VERSION="21.0.0"
3333
# Backported fix for https://github.com/pypa/pip/issues/9827
3434
# at https://github.com/chevah/pip/tree/20.3.4chevah.
3535
PIP_VERSION="20.3.4chevah1"
36-
# For pip <21.1.
37-
SAFETY_IGNORED_OPTS="-i 40291"
36+
# For pip <21.1 and click <8.0.0.
37+
SAFETY_IGNORED_OPTS="-i 40291 -i 47833"
3838
# setuptools 44.x is the last series to support Python 2.7.
3939
# More at https://github.com/pypa/setuptools/pull/1955.
4040
SETUPTOOLS_VERSION="44.1.1"
@@ -196,7 +196,7 @@ case $OS in
196196
# As of January 2021, OpenSSL 1.0.2u is the latest version from IBM.
197197
export BUILD_OPENSSL="yes"
198198
# 1.1.1 tests fail on AIX, use 1.0.2 with patches from Ubuntu 16.04 LTS.
199-
OPENSSL_VERSION="1.0.2v-chevah3"
199+
OPENSSL_VERSION="1.0.2v-chevah4"
200200
# Perl's Test::Simple and its deps are required for building OpenSSL.
201201
execute perl -MTest::Simple -e 1
202202
# cryptography 3.2.x, last version to support OpenSSL 1.0.2.

python-modules/chevah-python-test/test_python_binary_dist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,10 @@ def main():
504504
openssl_version = backend.openssl_version_text()
505505
if CHEVAH_OS.startswith(("win", "lnx", "macos", "aix")):
506506
# On some OS'es we build against our own OpenSSL.
507-
expecting = u'OpenSSL 1.1.1m 14 Dec 2021'
507+
expecting = u'OpenSSL 1.1.1n 15 Mar 2022'
508508
if CHEVAH_OS.startswith("aix"):
509509
# On AIX we are stuck with a patched 1.0.2.
510-
expecting = u'OpenSSL 1.0.2v-chevah3 15 Sep 2021'
510+
expecting = u'OpenSSL 1.0.2v-chevah4 06 Apr 2022'
511511
if openssl_version != expecting:
512512
sys.stderr.write('Expecting %s, got %s.\n' % (
513513
expecting, openssl_version))

src/libffi/chevahbs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
#
33
# Chevah Build Script for libffi.
44
#
5-
# For now it is supported only on AIX, Solaris and ArchLinux.
6-
#
5+
76
# Import shared code.
87
. ./functions.sh
98

@@ -21,30 +20,7 @@ chevahbs_compile() {
2120

2221
chevahbs_install() {
2322
install_folder=$1
24-
25-
# Installing fails on some OS'es.
26-
# Following workarounds should cover all 32/64bit cases for all arches.
27-
case $OS in
28-
aix*)
29-
execute ln -s ../install-sh powerpc-ibm-aix"$(oslevel)"/install-sh
30-
;;
31-
esac
32-
3323
execute $MAKE install DESTDIR=$INSTALL_FOLDER
34-
35-
if [ -z "$(ls -A $INSTALL_FOLDER/include)" ]; then
36-
# 3.2.1 installs its headers in $PREFIX/lib/libffi-$VERSION/include,
37-
# instead of $PREFIX/include, so we move them to the default location.
38-
execute mkdir -p $INSTALL_FOLDER/include
39-
execute mv $INSTALL_FOLDER/lib*/libffi-*/include/* \
40-
$INSTALL_FOLDER/include/
41-
execute rm -rf libffi-*
42-
# On some systems libffi is installed in lib64/ and then cffi is
43-
# searching for it in lib/ (this affects RHEL 5-7 and SLES 11-12).
44-
if [ -d $INSTALL_FOLDER/lib64 ]; then
45-
execute cp $INSTALL_FOLDER/lib64/* $INSTALL_FOLDER/lib/
46-
fi
47-
fi
4824
}
4925

5026

0 commit comments

Comments
 (0)