lightningd: removing bionic and python 3.7 support

Changelog-Removed: support for python v<=3.7 & Ubuntu bionic has been
removed.

clnrest's flask & gevent libraries require Python v>=3.8.
This commit is contained in:
Shahana Farooqui 2023-07-19 15:46:50 -07:00 committed by Rusty Russell
parent e5d0d6958c
commit 2e72387700
3 changed files with 8 additions and 82 deletions

View File

@ -1,69 +0,0 @@
FROM bionic
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV RUST_PROFILE=release
ENV PATH=/root/.cargo/bin:/root/.pyenv/shims:/root/.pyenv/bin:$PATH
ENV PROTOC_VERSION=22.0
RUN sed -i '/updates/d' /etc/apt/sources.list && \
sed -i '/security/d' /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
sudo \
build-essential \
libsodium23 \
libpq-dev \
git \
file \
autoconf \
debianutils \
gettext \
zip \
unzip \
wget
# Need to fetch a python version that is >= 3.7 since that's the
# lowest version supported by pyln. This is just temporary until we
# drop support for ubuntu 18.04
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv \
&& apt-get install -y --no-install-recommends \
libbz2-dev \
libffi-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
zlib1g-dev \
&& pyenv install 3.7.0 \
&& pyenv global 3.7.0
RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \
&& rm /tmp/get-pip.py \
&& pip install poetry
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
rm rustup-install.sh && \
/root/.cargo/bin/rustup install 1.65
# Download protoc manually, it is in the update repos which we
# disabled above, so `apt-get` can't find it anymore.
RUN cd /tmp/ && \
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
mv bin/protoc /usr/local/bin && \
rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip
RUN mkdir /build
WORKDIR /build
CMD poetry export -o requirements.txt --without-hashes \
&& pip install -r requirements.txt\
&& mkdir -p /repro \
&& cd /repro \
&& unzip /build/release/*.zip \
&& cd clightning* \
&& tools/repro-build.sh \
&& cp *.xz /build/release/

View File

@ -38,9 +38,6 @@ the non-updated repos).
The following table lists the codenames of distributions that we currently support:
- Ubuntu 18.06:
- Distribution Version: 18.04
- Codename: bionic
- Ubuntu 20.04:
- Distribution Version: 20.04
- Codename: focal
@ -51,7 +48,7 @@ The following table lists the codenames of distributions that we currently suppo
Depending on your host OS release you might not have `debootstrap` manifests for versions newer than your host OS. Due to this we run the `debootstrap` commands in a container of the latest version itself:
```shell
for v in bionic focal jammy; do
for v in focal jammy; do
echo "Building base image for $v"
sudo docker run --rm -v $(pwd):/build ubuntu:22.04 \
bash -c "apt-get update && apt-get install -y debootstrap && debootstrap $v /build/$v"
@ -62,16 +59,16 @@ done
Verify that the image corresponds to our expectation and is runnable:
```shell
sudo docker run bionic cat /etc/lsb-release
sudo docker run jammy cat /etc/lsb-release
```
Which should result in the following output for `bionic`:
Which should result in the following output for `jammy`:
```shell
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
```
## Builder image setup
@ -83,7 +80,6 @@ For this purpose we have a number of Dockerfiles in the [`contrib/reprobuild`](h
We can then build the builder image by calling `docker build` and passing it the `Dockerfile`:
```shell
sudo docker build -t cl-repro-bionic - < contrib/reprobuild/Dockerfile.bionic
sudo docker build -t cl-repro-focal - < contrib/reprobuild/Dockerfile.focal
sudo docker build -t cl-repro-jammy - < contrib/reprobuild/Dockerfile.jammy
```
@ -99,7 +95,6 @@ Finally, after this rather lengthy setup we can perform the actual build. At th
We'll need the release directory available for this, so create it now if it doesn't exist:`mkdir release`, then we can simply execute the following command inside the git repository (remember to checkout the tag you are trying to build):
```bash
sudo docker run --rm -v $(pwd):/repo -ti cl-repro-bionic
sudo docker run --rm -v $(pwd):/repo -ti cl-repro-focal
sudo docker run --rm -v $(pwd):/repo -ti cl-repro-jammy
```

View File

@ -150,7 +150,7 @@ for target in $TARGETS; do
echo "Fedora Image Built"
;;
Ubuntu)
for d in bionic focal jammy; do
for d in focal jammy; do
# Capitalize the first letter of distro
D=$(echo "$d" | awk '{print toupper(substr($0,1,1))substr($0,2)}')
echo "Building Ubuntu $D Image"
@ -197,7 +197,7 @@ if [ -z "${TARGETS##* deb *}" ]; then
BLDDIR="${TMPDIR}/clightning-${VERSION}"
ARCH="$(dpkg-architecture -q DEB_BUILD_ARCH)"
for SUITE in bionic focal hirsute xenial hirsute impish; do
for SUITE in focal hirsute xenial hirsute impish; do
mkdir -p "${BLDDIR}"
echo "Building ${BARE_VERSION} in ${TMPDIR}"