abandon submodule technique
parent
4cf8c4b911
commit
b4bbd7ab89
@ -1,3 +0,0 @@
|
||||
[submodule "cpython"]
|
||||
path = cpython
|
||||
url = https://github.com/python/cpython.git
|
@ -1,12 +1,14 @@
|
||||
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
|
||||
sed -i -E 's/^deb-src/# deb-src/' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y dpkg-dev debhelper build-essential sudo wget curl
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y dpkg-dev debhelper && \
|
||||
useradd builder && \
|
||||
install -d /target -o builder -g builder
|
||||
RUN useradd builder && \
|
||||
install -d /build -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
|
||||
ADD scripts/bootstrap.sh /bootstrap.sh
|
||||
ADD scripts/build.sh /build.sh
|
||||
|
||||
ENTRYPOINT ["/bootstrap.sh"]
|
||||
|
@ -0,0 +1,22 @@
|
||||
Deb builder for extpython
|
||||
|
||||
Build process:
|
||||
|
||||
- ./build.sh to kick off the process, runs a docker image - docker run -it --rm -v $PWD:/src ubuntu:bionic bash
|
||||
- ./build-inner.sh called in the container, prepares the environment
|
||||
- ./build-inner.sh switches to an underpriv'd user and calls...
|
||||
- ./build-deb.sh - does the actual build
|
||||
|
||||
TODO:
|
||||
- parameterize the build:
|
||||
- vars.sh needs to pass PYTHON_RELEASE down into the makefile
|
||||
- debian metadata files need to obey this too:
|
||||
- changelog: package name and version
|
||||
- control: package name
|
||||
- Makefile: a component of the --prefix path
|
||||
|
||||
TODO later:
|
||||
- upload resulting deb to artifact
|
||||
- support other than Bionic
|
||||
- separate process into creating the builder image & building the deb itself
|
||||
- parameter for pre-loaded pip modules
|
@ -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
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo docker run -it --rm --workdir=/target/src -v $PWD:/target/src extbuilder ./build-inner.sh
|
@ -1 +0,0 @@
|
||||
Subproject commit 1bf9cc509326bc42cd8cb1650eb9bf64550d817e
|
@ -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
|
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# get metadata
|
||||
cd /src
|
||||
. vars.sh
|
||||
|
||||
# install deps
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y $CPYTHON_DEPS
|
||||
|
||||
# run the build
|
||||
sudo -Hu builder /build.sh
|
||||
|
||||
# export the debs
|
||||
OUTDIR="/src/out/$PYTHON_RELEASE/"
|
||||
mkdir -p $OUTDIR
|
||||
cp /build/out/* $OUTDIR
|
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /src/vars.sh
|
||||
|
||||
# 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
|
||||
|
||||
# get debian metadata
|
||||
# todo generate the metadata here
|
||||
cp -r /src/debian /src/Makefile ./
|
||||
|
||||
# build the deb
|
||||
time dpkg-buildpackage -us -uc -b
|
||||
|
||||
cd ..
|
||||
mkdir out
|
||||
mv *.buildinfo *.changes *.deb out/
|
||||
cd out
|
||||
sha256sum *
|
@ -0,0 +1,5 @@
|
||||
extpython-python3.7 (3.7.3) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Dave Pedu <dave@davepedu.com> Thu, 30 May 2019 08:47:19 -0800
|
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHON_RELEASE=3.7.3
|
||||
# export PYTHON_TARBALL="https://github.com/python/cpython/archive/v${PYTHON_RELEASE}.tar.gz"
|
||||
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"
|
Loading…
Reference in New Issue