Skip to content

Commit 039620e

Browse files
authored
AIX fixes for building on IBM Cloud. (#151)
* Install OpenSSL manually under AIX. * Check for more commands under AIX. * Limit build parallelism on AIX. * Use bin.chevah.com instead of binary.chevah.com. * Updated deps spreadsheets. * Testing Start-BitsTransfer. * Work around the 500 error on Windows. * Use the real curl on Windows. * Reenabled compat tests under Docker. * Moved chevah user creation back to its place under Docker. * Minor improvements inspired by chevah/compat. * Unbreak package uploading under Windows.
1 parent c3cdaec commit 039620e

File tree

9 files changed

+573
-949
lines changed

9 files changed

+573
-949
lines changed

.github/workflows/bare.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,25 @@ jobs:
5858
5959
- name: Detect OS and build Python
6060
run: |
61-
cd python-package/
61+
cd $CHEVAH_REPO
6262
./brink.sh detect_os
6363
./chevah_build build
6464
6565
- name: Own tests
6666
run: |
67-
cd python-package/
67+
cd $CHEVAH_REPO
6868
./chevah_build test
6969
7070
- name: Compat tests
7171
run: |
72-
cd python-package/
72+
cd $CHEVAH_REPO
7373
./chevah_build compat
7474
7575
# Upload using a (per-OS selected) sftp command, then show final links.
7676
- name: Upload testing package
7777
run: |
7878
mkdir -pv ~/.ssh/
79-
cd python-package/
79+
cd $CHEVAH_REPO
8080
touch priv_key
8181
chmod 600 priv_key
8282
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key
@@ -122,7 +122,7 @@ jobs:
122122
123123
- name: Detect OS and build Python
124124
run: |
125-
cd python-package/
125+
cd $CHEVAH_REPO
126126
./brink.sh detect_os
127127
./chevah_build build
128128
@@ -135,18 +135,18 @@ jobs:
135135
136136
- name: Own tests
137137
run: |
138-
cd python-package/
138+
cd $CHEVAH_REPO
139139
./chevah_build test
140140
141141
- name: Compat tests
142142
run: |
143-
cd python-package/
143+
cd $CHEVAH_REPO
144144
./chevah_build compat
145145
146146
- name: Upload testing package
147147
run: |
148148
mkdir -pv ~/.ssh/
149-
cd python-package/
149+
cd $CHEVAH_REPO
150150
touch priv_key
151151
chmod 600 priv_key
152152
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key
@@ -174,9 +174,11 @@ jobs:
174174
- name: Prepare OS
175175
shell: powershell
176176
run: |
177-
chocolatey install --yes --no-progress make nasm 7zip
177+
chocolatey install --yes --no-progress make nasm 7zip curl
178178
# There's no vcpython27 choco pkg since Microsoft removed the installer.
179-
start-bitstransfer https://binary.chevah.com/third-party-stuff/VCForPython27.msi
179+
#Start-BitsTransfer https://bin.chevah.com:20443/third-party-stuff/VCForPython27.msi
180+
# Pending upstream fix for SFTPPlus, we use the real curl for now.
181+
curl.exe -O https://bin.chevah.com:20443/third-party-stuff/VCForPython27.msi
180182
msiexec /quiet /i VCForPython27.msi
181183
182184
- name: Clone sources independently
@@ -196,20 +198,20 @@ jobs:
196198
- name: Detect OS and build Python
197199
shell: bash
198200
run: |
199-
cd python-package/
201+
cd $CHEVAH_REPO
200202
./brink.sh detect_os
201203
./chevah_build build
202204
203205
- name: Own tests
204206
shell: bash
205207
run: |
206-
cd python-package/
208+
cd $CHEVAH_REPO
207209
./chevah_build test
208210
209211
- name: Compat tests
210212
shell: bash
211213
run: |
212-
cd python-package/
214+
cd $CHEVAH_REPO
213215
./chevah_build compat
214216
215217
# To use an RSA key with SFTPPlus, install upstream OpenSSH package,
@@ -229,7 +231,7 @@ jobs:
229231
- name: Upload testing package
230232
shell: bash
231233
run: |
232-
cd python-package
234+
cd $CHEVAH_REPO
233235
./publish_dist.sh
234236
rm priv_key
235237

.github/workflows/docker.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: |
4141
apk upgrade -U
4242
apk add git curl bash gcc make m4 automake libtool patch zlib-dev libffi-dev ncurses-dev linux-headers musl-dev openssl-dev lddtree shadow sudo openssh-client
43-
curl -o /usr/local/bin/paxctl https://binary.chevah.com/third-party-stuff/alpine/paxctl-3.12
43+
curl -o /usr/local/bin/paxctl https://bin.chevah.com:20443/third-party-stuff/alpine/paxctl-3.12
4444
chmod +x /usr/local/bin/paxctl
4545
4646
# Stick to CentOS 8.2 as OpenSSL got updated in 8.3 from 1.1.1c to 1.1.1g.
@@ -59,13 +59,13 @@ jobs:
5959
sed -i s/^mirrorlist=/#mirrorlist=/ /etc/yum.repos.d/*.repo
6060
sed -i s@^#baseurl=http://mirror.centos.org/centos/\$releasever/@baseurl=http://vault.centos.org/5.11/@ /etc/yum.repos.d/*.repo
6161
yum -y upgrade
62-
# Use http://binary.chevah.com/third-party-stuff/centos5/tuxad/
62+
# Use https://bin.chevah.com:20443/third-party-stuff/centos5/tuxad/
6363
# when tuxad.de dissapears, it has the minimum required stuff.
6464
rpm -i http://www.tuxad.de/rpms/tuxad-release-5-1.noarch.rpm
6565
yum -y install wget curl gcc44 make m4 automake libtool patch sudo which openssh-clients
6666
ln -s /usr/bin/gcc44 /usr/local/bin/gcc
67-
wget --mirror --no-parent https://binary.chevah.com/third-party-stuff/centos5/endpoint/
68-
cd binary.chevah.com/third-party-stuff/centos5/endpoint/
67+
wget --mirror --no-parent https://bin.chevah.com:20443/third-party-stuff/centos5/endpoint/
68+
cd bin.chevah.com\:20443/third-party-stuff/centos5/endpoint/
6969
rpm -i local-perl-*.rpm
7070
rpm -i --nodeps git{-core,}-2.5.0-1.ep.x86_64.rpm
7171
@@ -97,27 +97,27 @@ jobs:
9797
9898
- name: Detect OS and build Python
9999
run: |
100-
cd /home/chevah/python-package
100+
cd /home/chevah/$CHEVAH_REPO
101101
./brink.sh detect_os
102102
./chevah_build build
103103
104104
- name: Own tests
105105
run: |
106-
cd /home/chevah/python-package
106+
cd /home/chevah/$CHEVAH_REPO
107107
./chevah_build test
108108
109-
# And compat tests must run as regular user with sudo rights.
110-
# Compat tests are disabled pending https://github.com/chevah/compat/pull/113.
111-
#- name: Compat tests
112-
# run: |
113-
# chown -R chevah /home/chevah/python-package
114-
# su chevah -lc "umask 002; cd /home/chevah/python-package; ./chevah_build compat"
109+
# Compat tests must run as regular user with sudo rights.
110+
- name: Compat tests
111+
run: |
112+
chown -R chevah /home/chevah/$CHEVAH_REPO
113+
cd /home/chevah/$CHEVAH_REPO
114+
su chevah -c "./chevah_build compat"
115115
116116
# Using `~/` is problematic under Docker, use `/root/`.
117117
- name: Upload testing package
118118
run: |
119119
mkdir -pv /root/.ssh/
120-
cd /home/chevah/python-package
120+
cd /home/chevah/$CHEVAH_REPO
121121
touch priv_key
122122
chmod 600 priv_key
123123
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key

README.rst

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Python Portable Package
22
=======================
33

4+
.. image:: https://github.com/chevah/python-package/workflows/Bare/badge.svg
5+
:target: https://github.com/chevah/python-package/actions/workflows/bare.yaml
6+
7+
.. image:: https://github.com/chevah/python-package/workflows/Docker/badge.svg
8+
:target: https://github.com/chevah/python-package/actions/workflows/docker.yaml
9+
410
Build system for a portable Python distribution.
511

612
Used by Chevah's Buildbot setup to generate and publish binary Python
@@ -10,7 +16,7 @@ Please check https://github.com/chevah/python-package/releases for
1016
latest packages. For older releases or platforms no longer supported,
1117
please check https://binary.chevah.com/production/python/.
1218

13-
Building steps as used by Buildbot:
19+
Building steps:
1420

1521
* Login to a system running on the desired platform (e.g. Ubuntu Server 20.04).
1622
* Get the code for this repository from GitHub.
@@ -21,19 +27,20 @@ Building steps as used by Buildbot:
2127

2228
You can try the above steps on your own to build and test a new Python package.
2329

24-
To have new Python packages uploaded (typically for all supported platforms),
25-
you should try the following, after securing access to Chevah infrastructure:
30+
Use ``./chevah_build help`` to discover all available commands.
2631

27-
* ``./brink.sh test_remote group-all --properties=force_upload_production=yes
32+
New testing packages are uploaded automatically for green GitHub builds at
33+
https://bin.chevah.com:20443/testing/.
2834

29-
Use ``./chevah_build help`` to discover all available commands.
35+
Production packages are available both through GitHub releases and at
36+
https://bin.chevah.com:20443/production/.
3037

3138

3239
Patching upstream code
3340
----------------------
3441

3542
This repository contains a lot of imported code from upstream repos:
36-
Python, OpenSSL, SQLite, gmp, libffi, PyCrypto, etc.
43+
Python, OpenSSL, SQLite, libffi, etc.
3744

3845
You can find those sources in two sub-directories:
3946

@@ -64,10 +71,10 @@ An example for creating a patch for src/python/Python-2.7.13/Lib/site.py::
6471
External dependencies and associated vulnerabilities
6572
----------------------------------------------------
6673

67-
This Python package builds on and links to third-party libraries.
74+
This Python package builds and/or links to third-party libraries.
6875

69-
To document them for all OS'es and to list their known vulnerabilities,
70-
the LibreOffice spreadsheet ``external_deps.fods`` is used.
76+
Their known vulnerabilities are documented for all OS'es in the
77+
LibreOffice spreadsheet ``external_deps.fods``.
7178

72-
For your convenience, this flat ODS file is also exported in CSV format in
79+
For your convenience, this flat ODS file is also exported in CSV format as
7380
``external_deps.csv``.

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.79.0 paver==1.2.4'
2-
PYTHON_CONFIGURATION='default@2.7.18.e26e753c'
2+
PYTHON_CONFIGURATION='default@2.7.18.c3cdaec'
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'

chevah_build

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ case $OS in
197197
export BUILD_OPENSSL="yes"
198198
# 1.1.1 tests fail on AIX, use 1.0.2 with patches from Ubuntu 16.04 LTS.
199199
OPENSSL_VERSION="1.0.2v-chevah2"
200+
# Perl's Test::Simple and its deps are required for building OpenSSL.
201+
execute perl -MTest::Simple -e 1
200202
# cryptography 3.2.x, last version to support OpenSSL 1.0.2.
201203
export CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes"
202204
PIP_LIBRARIES=$PIP_LIBRARIES_OPENSSL_102
@@ -244,6 +246,8 @@ case $OS in
244246
# But 10.13 has version 2.2.7, while cryptography 2.9 requires 2.7.
245247
# Therefore, we build OpenSSL for both stdlib and cryptography.
246248
export BUILD_OPENSSL="yes"
249+
# Perl's Test::Simple and its deps are required for building OpenSSL.
250+
execute perl -MTest::Simple -e 1
247251
;;
248252
fbsd*)
249253
export CC="clang"
@@ -366,14 +370,19 @@ check_dependencies() {
366370
check_command="apk info -q -e"
367371
;;
368372
# On remaining OS'es we just check for some of the needed commands.
369-
macos)
370-
packages="$CC make m4 libtool git patch"
371-
;;
372373
lnx)
373374
# Generic Linux builds need Perl 5.10.0+ for building OpenSSL.
374375
# For testing OpenSSL, Test::More 0.96 or newer is needed.
375376
packages="$CC make m4 git patch perl"
376377
;;
378+
aix*)
379+
# /usr/bin/patch is not good enough, GNU patch is needed.
380+
# seq is from coreutils RPM.
381+
packages="git gmake patch xlc_r seq sudo"
382+
;;
383+
macos)
384+
packages="$CC make m4 libtool git patch"
385+
;;
377386
win)
378387
# To not get confused by MSYS2's perl, we check for wperl.
379388
packages="git patch wperl nasm 7z"

0 commit comments

Comments
 (0)