Skip to content

Commit e26e753

Browse files
authored
[#5576] Build OpenSSL, Python, cryptography on Windows. (#147)
* Updated brink stuff. * Removed support for old Unices. * Removed Python 2.7.8 sources. * Not really needing texinfo any more. * Unbreak Solaris version check on Solaris 10. * More related comment updates. * Imported OpenSSL build BATs for VS 2010 from pyca/infra repo. * Try adapting the pyca/infra BATs for our build. * Some more adapting from pyca/infra repo. * Install and test for Visual Studio 2010. * No need to install windows-sdk-7.1, which fails anyway. * Minor Windows build fixes. * Cheat with the OpenSSL build under Windows, for now. * Build OpenSSL and cryptography on Windows. * Build on Windows 2016. Improved package checks. * Build OpenSSL statically on Windows too. * Apply ActivePython's patches as hot fixes. * Minor cleanups. * Updated external deps sheets. * Changes after own review. * Updated OpenSSL 1.1.1 sources to 1.1.1k. * Updated OpenSSL version in our scripts. * Documented updated OpenSSL version. * BUILD_CFFI is not needed any more.
1 parent f61b1f6 commit e26e753

File tree

7,504 files changed

+1042
-1686787
lines changed

Some content is hidden

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

7,504 files changed

+1042
-1686787
lines changed

.github/workflows/main.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108

109109
# Fix back Homebrew, to make everything functional.
110110
- name: Unhack Homebrew
111+
if: failure() && env.TMATE_DEBUG == 'yes'
111112
run: |
112113
sudo find /usr/local -name 'libintl*' -exec chmod a+r {} +
113114
sudo find /usr/local -name 'libffi*' -exec chmod a+r {} +
@@ -135,9 +136,14 @@ jobs:
135136
limit-access-to-actor: true
136137

137138

138-
windows-2019:
139-
runs-on: windows-2019
140-
timeout-minutes: 30
139+
windows:
140+
runs-on: ${{ matrix.runs-on }}
141+
strategy:
142+
# Workflow won't be cancelled at the first failed job.
143+
fail-fast: false
144+
matrix:
145+
runs-on: [ windows-2019, windows-2016 ]
146+
timeout-minutes: 45
141147
steps:
142148
- uses: chevah/auto-cancel-redundant-job@v1
143149
- uses: actions/checkout@v2
@@ -153,8 +159,7 @@ jobs:
153159

154160
# Add packages needed to build our patched pycrypto.
155161
- name: Prepare OS
156-
run: |
157-
chocolatey install --yes --no-progress make vcpython27
162+
run: chocolatey install --yes --no-progress make vcpython27 nasm 7zip
158163

159164
# Explicitly run our scripts with Bash, not PowerShell (GitHub's default).
160165
- name: Download needed deps for the detected OS

brink.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BASE_REQUIREMENTS='pip==20.2.4 chevah-brink==0.78.1 paver==1.2.4'
2-
PYTHON_CONFIGURATION='[email protected].bd461724:[email protected]'
2+
PYTHON_CONFIGURATION='[email protected].f61b1f61'
33
BINARY_DIST_URI='http://binary.chevah.com/production'
44
PIP_INDEX='http://pypi.chevah.com/simple'
55

brink.sh

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ PYTHON_CONFIGURATION='NOT-YET-DEFINED'
8787
PYTHON_VERSION='not.defined.yet'
8888
PYTHON_PLATFORM='unknown-os-and-arch'
8989
PYTHON_NAME='python2.7'
90-
BINARY_DIST_URI='https://binary.chevah.com/production'
90+
BINARY_DIST_URI='http://binary.chevah.com/production'
9191
PIP_INDEX='http://pypi.chevah.com'
9292
BASE_REQUIREMENTS=''
9393

@@ -556,8 +556,8 @@ install_dependencies(){
556556
# Check version of current OS to see if it is supported.
557557
# If it's too old, exit with a nice informative message.
558558
# If it's supported, return through eval the version numbers to be used for
559-
# naming the package, for example: '7' for RHEL 7.7, '2' for Amazon 2,
560-
# '2004' for Ubuntu 20.04', '312' for Alpine Linux 3.12, '11' for Solaris 11.
559+
# naming the package, for example: '8' for RHEL 8.2, '2004' for Ubuntu 20.04,
560+
# '312' for Alpine Linux 3.12, '71' for AIX 7.1, '114' for Solaris 11.4.
561561
#
562562
check_os_version() {
563563
# First parameter should be the human-readable name for the current OS.
@@ -786,46 +786,31 @@ detect_os() {
786786
;;
787787
SunOS)
788788
ARCH=$(isainfo -n)
789-
os_version_raw=$(uname -r | cut -d'.' -f2)
790-
check_os_version "Solaris" 10 "$os_version_raw" os_version_chevah
791-
OS="sol${os_version_chevah}"
792-
case "$OS" in
793-
sol10)
794-
# Solaris 10u8 (from 10/09) updated libc version, so for
795-
# older releases up to 10u7 (from 5/09) we build on 10u3.
796-
# The "sol10u3" code path also shows the way to link to
797-
# OpenSSL 0.9.7 libs bundled in /usr/sfw/ with Solaris 10.
798-
# Update number is taken from first line of /etc/release.
799-
un=$(head -1 /etc/release | cut -d_ -f2 | sed s/[^0-9]*//g)
800-
if [ "$un" -lt 8 ]; then
801-
OS="sol10u3"
802-
fi
789+
ver_major=$(uname -r | cut -d'.' -f2)
790+
case $ver_major in
791+
10)
792+
ver_minor=$(\
793+
head -1 /etc/release | cut -d_ -f2 | sed s/[^0-9]*//g)
803794
;;
804-
sol11)
805-
# Solaris 11 releases prior to 11.4 bundled OpenSSL libs
806-
# missing support for Elliptic-curve crypto. From here on:
807-
# * Solaris 11.4 (or newer) with OpenSSL 1.0.2 is "sol11",
808-
# * Solaris 11.2/11.3 with OpenSSL 1.0.1 is "sol112",
809-
# * Solaris 11.0/11.1 with OpenSSL 1.0.0 is not supported.
810-
minor_version=$(uname -v | cut -d'.' -f2)
811-
if [ "$minor_version" -lt 4 ]; then
812-
OS="sol112"
813-
fi
795+
11)
796+
ver_minor=$(head -1 /etc/release | awk '{print $3}')
797+
;;
798+
*)
799+
# Not sure if $ver_minor detection works on other versions.
800+
(>&2 echo "Unsupported Solaris version: ${ver_major}.")
801+
exit 15
814802
;;
815803
esac
804+
os_version_raw="${ver_major}.${ver_minor}"
805+
check_os_version "Solaris" 11.4 "$os_version_raw" os_version_chevah
806+
OS="sol${os_version_chevah}"
816807
;;
817808
AIX)
818809
ARCH="ppc$(getconf HARDWARE_BITMODE)"
819810
os_version_raw=$(oslevel)
820-
check_os_version AIX 5.3 "$os_version_raw" os_version_chevah
811+
check_os_version AIX 7.1 "$os_version_raw" os_version_chevah
821812
OS="aix${os_version_chevah}"
822813
;;
823-
HP-UX)
824-
ARCH=$(uname -m)
825-
os_version_raw=$(uname -r | cut -d'.' -f2-)
826-
check_os_version HP-UX 11.31 "$os_version_raw" os_version_chevah
827-
OS="hpux${os_version_chevah}"
828-
;;
829814
*)
830815
(>&2 echo "Unsupported operating system: ${OS}.")
831816
exit 14
@@ -840,10 +825,6 @@ detect_os() {
840825
"amd64"|"x86_64")
841826
ARCH="x64"
842827
case "$OS" in
843-
sol10*)
844-
# On Solaris 10, x64 built fine prior to adding "bcrypt".
845-
ARCH="x86"
846-
;;
847828
win)
848829
# 32bit build on Windows 2016, 64bit otherwise.
849830
# Should work with a l10n pack too (tested with French).

0 commit comments

Comments
 (0)