Compare commits

...

24 Commits
3.6 ... master

Author SHA1 Message Date
dave fcdc57dcc5 add jammy 2023-08-29 21:05:05 -07:00
dave 0d104c4216 add 3.11 2023-08-29 21:03:26 -07:00
dave f0e0405343 more cleanup 2023-08-29 21:01:46 -07:00
dave 5dca315e8f fix output dirs 2023-08-29 20:58:27 -07:00
dave 1f1c7e6618 misc fixes 2023-08-29 15:29:33 -07:00
dave a496f1f9d5 add 3.10 for bionic/xenial 2023-08-29 15:27:46 -07:00
dave c73e9223f7 add ssl build for xenial 2023-08-29 15:25:49 -07:00
dave dc7d0f20a0 missing rules file for openssl 2023-08-29 15:23:58 -07:00
dave 41006a6ddb output debs to per-os-version dirs 2023-08-29 15:19:24 -07:00
dave 7084d7124a Update version matrix to show 3.10.0 builds 2022-06-03 13:22:56 -07:00
dave e0932334ea update openssl 2021-11-12 21:39:50 -08:00
dave e8386385b7 add 3.10.0 for focal and trusty 2021-11-11 20:34:11 -08:00
dave 5e4bb3344e Add focal 2.7 build 2021-10-27 20:14:44 -07:00
dave ea30eec9fe ssl builder for trusty 2021-06-12 10:09:25 -07:00
dave c184fb490b add python 3.9.5 2021-06-10 19:06:17 -07:00
dave 43dc2d76ae use intermediate dockerfile 2021-06-09 19:54:36 -07:00
dave fd2ccbd453 Add python 3.8.0b1 2019-06-11 21:55:41 -07:00
dave 829922cf3f final tweaks 2019-05-31 22:26:51 -07:00
dave 62605d1cd1 misc updates 2019-05-31 15:17:58 -07:00
dave f9ad705a53 multiple dist support 2019-05-31 14:28:45 -07:00
dave 03ef30b3b8 Update readme 2019-05-31 13:22:21 -07:00
dave ba8a95bcf4 Misc tweaks 2019-05-31 09:23:34 -07:00
dave 85e92b99c2 multi version support 2019-05-31 09:07:08 -07:00
dave b4bbd7ab89 abandon submodule technique 2019-05-31 07:43:42 -07:00
62 changed files with 724 additions and 39 deletions

View File

@ -1 +1,6 @@
cpython
.git
temp
/src/out
/builds/
/ssl/

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.DS_Store
/src/out/
/builds/

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "cpython"]
path = cpython
url = https://github.com/python/cpython.git

View File

@ -1,12 +0,0 @@
FROM ubuntu:bionic
RUN sed -i -E 's/(archive|security).ubuntu.com/192.168.1.142/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y dpkg-dev debhelper && \
useradd builder && \
install -d /target -o builder -g builder
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev

14
Dockerfile.bionic Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:bionic
RUN sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
RUN useradd builder && \
install -d /build -o builder -g builder
ADD scripts/bootstrap.sh /bootstrap.sh
ADD scripts/build.sh /build.sh
ENTRYPOINT ["/bootstrap.sh"]

14
Dockerfile.disco Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:disco
RUN sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
RUN useradd builder && \
install -d /build -o builder -g builder
ADD scripts/bootstrap.sh /bootstrap.sh
ADD scripts/build.sh /build.sh
ENTRYPOINT ["/bootstrap.sh"]

14
Dockerfile.focal Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:focal
RUN sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
RUN useradd builder && \
install -d /build -o builder -g builder
ADD scripts/bootstrap.sh /bootstrap.sh
ADD scripts/build.sh /build.sh
ENTRYPOINT ["/bootstrap.sh"]

14
Dockerfile.jammy Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:jammy
RUN sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
RUN useradd builder && \
install -d /build -o builder -g builder
ADD scripts/bootstrap.sh /bootstrap.sh
ADD scripts/build.sh /build.sh
ENTRYPOINT ["/bootstrap.sh"]

14
Dockerfile.trusty Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:trusty
RUN sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
RUN useradd builder && \
install -d /build -o builder -g builder
ADD scripts/bootstrap.sh /bootstrap.sh
ADD scripts/build.sh /build.sh
ENTRYPOINT ["/bootstrap.sh"]

14
Dockerfile.xenial Normal file
View File

@ -0,0 +1,14 @@
FROM ubuntu:xenial
RUN sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
RUN useradd builder && \
install -d /build -o builder -g builder
ADD scripts/bootstrap.sh /bootstrap.sh
ADD scripts/build.sh /build.sh
ENTRYPOINT ["/bootstrap.sh"]

76
README.md Normal file
View File

@ -0,0 +1,76 @@
extpython
=========
Isolated python .deb builder
Extpython is a collection of tools for building installable packages containing various versions of Python. The
installations are isolated from the operating system's python such that modules may be added, removed, or upgraded
without risk of breaking. The builds are executed in Docker.
*Example invocation:*
```
./images.sh # pulls / creates base images with dependencies
./build.sh trusty-3.9.5.sh # build using the recipe in the named script file
```
The vars file - `trusty-3.9.5.sh` above - contains information about what python version will be built. See
`src/bionic-3.9.5.sh` for an annotated example.
Version support matrix
----------------------
| | 2.7 | 3.6 | 3.7 | 3.8 | 3.9 | 3.10 | 3.11 |
|--------|--------|------------------|-------|----------------------|--------|---------|--------|
| 14.04 | | 3.6.7<br />3.6.8 | | | 3.9.5* | 3.10.0* | |
| 16.04 | | 3.6.7 | 3.7.3 | | 3.9.5 | 3.10.0* | |
| 18.04 | 2.7.16 | 3.6.7 | 3.7.3 | 3.8.0a4<br />3.8.0b1 | 3.9.5 | 3.10.0 | 3.11.5 |
| 19.04 | | | 3.7.3 | | | | |
| 20.04 | | | | | 3.9.5 | 3.10.0 | 3.11.5 |
| 22.04 | | | | | | | 3.11.5 |
\* with provided extpython-openssl packages - see below
Openssl
-------
Some versions of Python require a version of openssl that is newer than what ships on many of these host OSes. To
satisfy this requirement, extpython also builds an Openssl package that installs in a similar isolated manner.
See `./ssl/` for details.
TODO
----
* Parameter for pre-loaded pip modules
Uploading
---------
`curl -v 'http://artifact.scc.net.davepedu.com/addpkg?provider=tar&reponame=cpython&version=3.10.0' -F 'f=@cpython-3.10.0.tar.gz'`
`rpcli -s http://artifact.scc.net.davepedu.com upload -y apt -f builds/3.10.0/trusty/extpython-python3.10_3.10.0_amd64.deb -r extpython -p extpython-python3.10 -i 3.10.0 -a dist=trusty`
Testing
-------
Install extpython in a temporary container an run it.
`docker run -it --rm ubuntu:bionic bash`
```
sed -i -E 's/(archive|security).ubuntu.com/aptmirror/' /etc/apt/sources.list && \
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y wget gnupg && \
. /etc/lsb-release && \
wget -q -O- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/${DISTRIB_CODENAME}/install | bash -x /dev/stdin && \
apt-get install -y extpython-python3.10
```

View File

@ -1,11 +0,0 @@
#!/bin/bash
# export PATH=$PATH:/usr/bin
time dpkg-buildpackage -us -uc -b
ls -la ../
mkdir -p ./out
mv ../*.buildinfo ../*.changes ../*.deb

View File

@ -1,3 +1,16 @@
#!/bin/sh
#!/bin/bash -eux
sudo docker run -it --rm --workdir=/target/src -v $PWD:/target/src extbuilder ./build-inner.sh
VARSFILE=$1
. src/$VARSFILE
echo "FROM extbuilder-$EXTPYTHON_DIST" > Dockerfile.temp
echo "RUN apt-get update && \\" >> Dockerfile.temp
echo " DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" $CPYTHON_DEPS" >> Dockerfile.temp
# build image with just the deps
docker build -t extbuilder-${EXTPYTHON_DIST}-deps -f Dockerfile.temp .
rm -f Dockerfile.temp
time docker run -it --rm -e "VARSFILE=$VARSFILE" -v $PWD/src:/src extbuilder-${EXTPYTHON_DIST}-deps

@ -1 +0,0 @@
Subproject commit 1bf9cc509326bc42cd8cb1650eb9bf64550d817e

5
debian/changelog vendored
View File

@ -1,5 +0,0 @@
extpython-python3.7 (3.7.0) unstable; urgency=low
* Initial release
-- Dave Pedu <dave@davepedu.com> Wed, 17 OPct 2018 22:08:15 -0800

8
images.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash -ex
RELEASES="trusty xenial bionic focal jammy"
for release in $RELEASES ; do
docker pull ubuntu:${release}
docker build -t extbuilder-${release} -f Dockerfile.${release} .
done

20
scripts/bootstrap.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash -eux
# get metadata
ln -s /src/$VARSFILE /tmp/vars.sh
. /tmp/vars.sh
. /etc/lsb-release #for DISTRIB_CODENAME
if [ -v INSIDE_SCRIPT ] ; then
echo "$INSIDE_SCRIPT" > /tmp/inside.sh
cat /tmp/inside.sh
bash -x /tmp/inside.sh
fi
# run the build
sudo -Hu builder /build.sh
# export the debs
OUTDIR="/src/out/${PYTHON_RELEASE}/${DISTRIB_CODENAME}"
mkdir -p $OUTDIR
cp /build/out/* $OUTDIR

40
scripts/build.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash -eux
. /tmp/vars.sh
function template {
perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' < $1
}
# create build dir
cd /build
mkdir work
cd work
# get cpython source
mkdir cpython
wget -qO- cpython.tar.gz $PYTHON_TARBALL | tar zxf - -C cpython/ --strip-components=1
# generate debian metadata
mkdir debian
export BUILD_DATE=$(date -R)
template /src/debian/changelog | tee debian/changelog
template /src/debian/control | tee debian/control
cp /src/debian/compat debian/
cp /src/Makefile ./
sed -i -E "s/_OPT_DIR_/${PYTHON_MAJOR}/" Makefile
if [ -v RULESFILE ]; then
cp /src/debian/$RULESFILE debian/rules
else
cp /src/debian/rules debian/
fi
# build the deb
time dpkg-buildpackage -us -uc -b
cd ..
mkdir out
mv *.deb out/
cd out
sha256sum *

View File

@ -1,7 +1,7 @@
#!/usr/bin/make -f
PY3_SRC=./cpython/
PY3_CONFFLAGS=--prefix=$(DESTDIR)/opt/extpython/3.7.0 --with-ensurepip=install
PY3_CONFFLAGS=--prefix=$(DESTDIR)/opt/extpython/_OPT_DIR_ --with-ensurepip=install ${EXTRA_PY_CONFIGURE_FLAGS}
all:
cd $(PY3_SRC) && \
@ -10,8 +10,8 @@ all:
install:
cd $(PY3_SRC) && \
make install
# $(DESTDIR)/opt/extpython/3.7.0/bin/python3 $(DESTDIR)/opt/extpython/3.7.0/bin/pip3 install -r requirements.txt
make install -j8
# $(DESTDIR)/opt/extpython/3.7.0/bin/python3 $(DESTDIR)/opt/extpython/3.7/bin/pip3 install -r requirements.txt
clean:
cd $(PY3_SRC) && \

8
src/bionic-2.7.16.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=bionic
export PYTHON_RELEASE=2.7.16
export PYTHON_MAJOR=2.7
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

10
src/bionic-3.10.0.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=bionic
export PYTHON_RELEASE=3.10.0
export PYTHON_MAJOR=3.10
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

10
src/bionic-3.11.5.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=bionic
export PYTHON_RELEASE=3.11.5
export PYTHON_MAJOR=3.11
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

13
src/bionic-3.7.3.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash -eux
# Which dist to build on
export EXTPYTHON_DIST=bionic
# Release is used to select which tarball to download
export PYTHON_RELEASE=3.7.3
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
export PYTHON_MAJOR=3.7
# Tarball download URL
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
# Deps needed to build this package
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

8
src/bionic-3.8.0a4.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=bionic
export PYTHON_RELEASE=3.8.0a4
export PYTHON_MAJOR=3.8
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

8
src/bionic-3.8.0b1.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=bionic
export PYTHON_RELEASE=3.8.0b1
export PYTHON_MAJOR=3.8
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

10
src/bionic-3.9.5.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=bionic
export PYTHON_RELEASE=3.9.5
export PYTHON_MAJOR=3.9
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

5
src/debian/changelog Normal file
View File

@ -0,0 +1,5 @@
extpython-python${PYTHON_MAJOR} (${PYTHON_RELEASE}) unstable; urgency=low
* Initial release
-- Dave Pedu <dave@davepedu.com> ${BUILD_DATE}

13
src/debian/control Normal file
View File

@ -0,0 +1,13 @@
Source: extpython-python${PYTHON_MAJOR}
Section: unknown
Priority: optional
Maintainer: ubuntu <ubuntu@unknown>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage: <insert the upstream URL, if relevant>
Package: extpython-python${PYTHON_MAJOR}
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>

View File

@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
override_dh_usrlocal:
override_dh_strip:
override_dh_shlibdeps:
dh_shlibdeps -l /opt/extpython/ssl/1.1.1l/lib
%:
dh $@

View File

@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
override_dh_usrlocal:
override_dh_strip:
override_dh_shlibdeps:
dh_shlibdeps -l /opt/extpython/ssl/1.1.1k/lib
%:
dh $@

8
src/disco-3.7.3.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=disco
export PYTHON_RELEASE=3.7.3
export PYTHON_MAJOR=3.7
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

10
src/focal-2.7.18.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=focal
export PYTHON_RELEASE=2.7.18
export PYTHON_MAJOR=2.7
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

10
src/focal-3.10.0.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=focal
export PYTHON_RELEASE=3.10.0
export PYTHON_MAJOR=3.10
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

10
src/focal-3.11.5.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=focal
export PYTHON_RELEASE=3.11.5
export PYTHON_MAJOR=3.11
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

10
src/focal-3.9.5.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=focal
export PYTHON_RELEASE=3.9.5
export PYTHON_MAJOR=3.9
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

10
src/jammy-3.11.5.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=jammy
export PYTHON_RELEASE=3.11.5
export PYTHON_MAJOR=3.11
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

34
src/trusty-3.10.0.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash -eux
# Dist chooses which ubuntu base image we build in
export EXTPYTHON_DIST=trusty
# Release is used to select which tarball to download
export PYTHON_RELEASE=3.10.0
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
export PYTHON_MAJOR=3.10
# Tarball download URL
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
# Dependencies needed to build cpython
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
# Optional script to run in the build container early in the build process
export INSIDE_SCRIPT='#!/bin/bash -eux
wget -q -O- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/trusty/install | bash -x /dev/stdin
apt-get update -qq
apt-get install -y extpython-openssl-1-1
'
# Extra args for python's configure script
export EXTRA_PY_CONFIGURE_FLAGS=--with-openssl=/opt/extpython/ssl/1.1.1l
# Name of the rules makefile used to build the deb package
export RULESFILE=rules.openssl-1.1.1l
# Other arbitrary environment variables
# trusty's native openssl is too old, so we ship a newer version. Embed the library path
export LDFLAGS=-Wl,-rpath=/opt/extpython/ssl/1.1.1l/lib

8
src/trusty-3.6.8.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=trusty
export PYTHON_RELEASE=3.6.8
export PYTHON_MAJOR=3.6
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

34
src/trusty-3.9.5.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash -eux
# Dist chooses which ubuntu base image we build in
export EXTPYTHON_DIST=trusty
# Release is used to select which tarball to download
export PYTHON_RELEASE=3.9.5
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
export PYTHON_MAJOR=3.9
# Tarball download URL
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
# Dependencies needed to build cpython
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
# Optional script to run in the build container early in the build process
export INSIDE_SCRIPT='#!/bin/bash -eux
wget -q -O- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/trusty/install | bash -x /dev/stdin
apt-get update -qq
apt-get install -y extpython-openssl-1-1
'
# Extra args for python's configure script
export EXTRA_PY_CONFIGURE_FLAGS=--with-openssl=/opt/extpython/ssl/1.1.1k
# Name of the rules makefile used to build the deb package
export RULESFILE=rules.trusty-3.9.5
# Other arbitrary environment variables
# trusty's native openssl is too old, so we ship a newer version. Embed the library path
export LDFLAGS=-Wl,-rpath=/opt/extpython/ssl/1.1.1k/lib

25
src/xenial-3.10.0.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=xenial
export PYTHON_RELEASE=3.10.0
export PYTHON_MAJOR=3.10
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
# Optional script to run in the build container early in the build process
export INSIDE_SCRIPT='#!/bin/bash -eux
wget -q -O- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/xenial/install | bash -x /dev/stdin
apt-get update -qq
apt-get install -y extpython-openssl-1-1
'
# Extra args for python's configure script
export EXTRA_PY_CONFIGURE_FLAGS="--with-openssl=/opt/extpython/ssl/1.1.1l --enable-optimizations"
# Name of the rules makefile used to build the deb package
export RULESFILE=rules.openssl-1.1.1l
# Other arbitrary environment variables
# xenial's native openssl is too old, so we ship a newer version. Embed the library path
export LDFLAGS=-Wl,-rpath=/opt/extpython/ssl/1.1.1l/lib

13
src/xenial-3.7.3.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash -eux
# Which dist to build on
export EXTPYTHON_DIST=xenial
# Release is used to select which tarball to download
export PYTHON_RELEASE=3.7.3
# Major version no is used in paths and labels (extpython-python${}, /opt/extpython/${}/...)
export PYTHON_MAJOR=3.7
# Tarball download URL
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
# Deps needed to build this package
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev"

10
src/xenial-3.9.5.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash -eux
export EXTPYTHON_DIST=xenial
export PYTHON_RELEASE=3.9.5
export PYTHON_MAJOR=3.9
export PYTHON_TARBALL="http://artifact.scc.net.davepedu.com/repo/tar/cpython/cpython/cpython-${PYTHON_RELEASE}.tar.gz"
export CPYTHON_DEPS="libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev \
libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev uuid-dev"
export EXTRA_PY_CONFIGURE_FLAGS=--enable-optimizations

17
ssl/trusty/Makefile Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
all:
cd openssl && \
./config --prefix=/opt/extpython/ssl/1.1.1l --openssldir=/opt/extpython/ssl/1.1.1l shared zlib && \
make -j8
#&& \
#echo "testing...." && \
#make test
install:
cd openssl && \
make install
clean:
cd openssl && \
make clean || true

8
ssl/trusty/build-inner.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
sudo -Hu builder /src/build-user.sh
# export the debs
OUTDIR="/src/out/trusty/1.1.1l"
mkdir -p $OUTDIR
cp /build/out/* $OUTDIR

30
ssl/trusty/build-user.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash -eux
function template {
perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' < $1
}
cd /build
mkdir work
cd work
mkdir openssl
wget -O- -q http://artifact.scc.net.davepedu.com/repo/tar/openssl/openssl/openssl-1.1.1l.tar.gz | tar zxf - -C openssl/ --strip-components=1
# generate debian metadata
mkdir debian
export BUILD_DATE=$(date -R)
template /src/debian/changelog | tee debian/changelog
template /src/debian/control | tee debian/control
cp /src/debian/compat debian/
cp /src/debian/rules debian/
cp /src/Makefile ./
# build the deb
time dpkg-buildpackage -us -uc -b
cd ..
mkdir -p out
mv *.deb out/
cd out
sha256sum *

3
ssl/trusty/build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -eux
time docker run -it --rm -v $PWD:/src --entrypoint /src/build-inner.sh extbuilder-trusty-deps

View File

@ -0,0 +1,11 @@
extpython-openssl-1-1 (1.1.1l) unstable; urgency=low
* Initial release
-- Dave Pedu <dave@davepedu.com> ${BUILD_DATE}
extpython-openssl-1-1 (1.1.1k) unstable; urgency=low
* Initial release
-- Dave Pedu <dave@davepedu.com> ${BUILD_DATE}

1
ssl/trusty/debian/compat Normal file
View File

@ -0,0 +1 @@
9

View File

@ -1,4 +1,4 @@
Source: extpython-python3.7
Source: extpython-openssl-1-1
Section: unknown
Priority: optional
Maintainer: ubuntu <ubuntu@unknown>
@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage: <insert the upstream URL, if relevant>
Package: extpython-python3.7
Package: extpython-openssl-1-1
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>

13
ssl/trusty/debian/rules Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
override_dh_usrlocal:
override_dh_strip:
override_dh_shlibdeps:
dh_shlibdeps -l /opt/extpython/ssl/1.1.1l/lib
%:
dh $@

1
ssl/trusty/out/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*

17
ssl/xenial/Makefile Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
all:
cd openssl && \
./config --prefix=/opt/extpython/ssl/1.1.1l --openssldir=/opt/extpython/ssl/1.1.1l shared zlib && \
make -j8
#&& \
#echo "testing...." && \
#make test
install:
cd openssl && \
make install
clean:
cd openssl && \
make clean || true

8
ssl/xenial/build-inner.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash -eux
sudo -Hu builder /src/build-user.sh
# export the debs
OUTDIR="/src/out/xenial/1.1.1l"
mkdir -p $OUTDIR
cp /build/out/* $OUTDIR

30
ssl/xenial/build-user.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash -eux
function template {
perl -p -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' < $1
}
cd /build
mkdir work
cd work
mkdir openssl
wget -O- -q http://artifact.scc.net.davepedu.com/repo/tar/openssl/openssl/openssl-1.1.1l.tar.gz | tar zxf - -C openssl/ --strip-components=1
# generate debian metadata
mkdir debian
export BUILD_DATE=$(date -R)
template /src/debian/changelog | tee debian/changelog
template /src/debian/control | tee debian/control
cp /src/debian/compat debian/
cp /src/debian/rules debian/
cp /src/Makefile ./
# build the deb
time dpkg-buildpackage -us -uc -b
cd ..
mkdir -p out
mv *.deb out/
cd out
sha256sum *

3
ssl/xenial/build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -eux
time docker run -it --rm -v $PWD:/src --entrypoint /src/build-inner.sh extbuilder-xenial-deps

View File

@ -0,0 +1,5 @@
extpython-openssl-1-1 (1.1.1l) unstable; urgency=low
* Initial release
-- Dave Pedu <dave@davepedu.com> ${BUILD_DATE}

1
ssl/xenial/debian/compat Normal file
View File

@ -0,0 +1 @@
9

13
ssl/xenial/debian/control Normal file
View File

@ -0,0 +1,13 @@
Source: extpython-openssl-1-1
Section: unknown
Priority: optional
Maintainer: ubuntu <ubuntu@unknown>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage: <insert the upstream URL, if relevant>
Package: extpython-openssl-1-1
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>

13
ssl/xenial/debian/rules Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
override_dh_usrlocal:
override_dh_strip:
override_dh_shlibdeps:
dh_shlibdeps -l /opt/extpython/ssl/1.1.1l/lib
%:
dh $@

1
ssl/xenial/out/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*