Skip to content

Commit fe5c8a3

Browse files
authored
Revert "Update sqlite and ssl (#90)" (#92)
* Revert "Update sqlite and ssl (#90)" This reverts commit 5bfe33c. * Update build-ubuntu-22.04-risc.yml * Update Dockerfile (remove 3.8)
1 parent d79f61f commit fe5c8a3

File tree

6 files changed

+47
-55
lines changed

6 files changed

+47
-55
lines changed

alpine/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.21
1+
FROM alpine:3.16.2
22
WORKDIR /root
33

44
# Set environment variables for rust and pyenv
@@ -7,15 +7,21 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"
77
ENV PATH="/root/.cargo/bin:${PATH}"
88
ENV RUST_BACKTRACE=1
99

10-
RUN apk add bash git curl python3 openssl openssl-dev perl linux-headers make gcc musl-dev patch patchelf py3-pip
10+
RUN sh -c "echo https://mirrors.edge.kernel.org/alpine/v3.16.2/community >> /etc/apk/repositories"
11+
RUN apk add bash git curl python3 openssl openssl-dev perl linux-headers make gcc musl-dev patch patchelf
1112
# Additional pyenv dependencies
1213
RUN apk add --no-cache build-base libffi-dev bzip2-dev zlib-dev xz-dev readline-dev sqlite-dev tk-dev
1314

1415
# Install Rust
1516
RUN curl --proto '=https' --tlsv1.2 -sSf -o rustup https://sh.rustup.rs
1617
RUN sh ./rustup -y
1718

19+
# Build a copy of openssl - needed for the rust-openssl crate
20+
COPY build-openssl.sh .
21+
RUN sh ./build-openssl.sh
22+
1823
RUN curl https://pyenv.run | bash && \
24+
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.8 && \
1925
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.9 && \
2026
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.10 && \
2127
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --skip-existing 3.11 && \

alpine/build-openssl.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/x86_64-linux-musl/asm
4+
ln -s /usr/include/asm-generic /usr/include/x86_64-linux-musl/asm-generic
5+
ln -s /usr/include/linux /usr/include/x86_64-linux-musl/linux
6+
7+
mkdir /musl
8+
9+
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz
10+
tar zxvf OpenSSL_1_1_1w.tar.gz
11+
cd openssl-OpenSSL_1_1_1w/ || exit
12+
13+
CC="/usr/bin/x86_64-alpine-linux-musl-gcc -static" ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-x86_64
14+
make depend
15+
make -j"$(nproc)"
16+
make install

rocky8/Dockerfile

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,25 @@ RUN yum -y groupinstall "Development Tools" && \
1717

1818
# Compile newer version of sqlite3
1919
RUN cd ~ && \
20-
wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \
21-
tar -xzf sqlite-autoconf-3450100.tar.gz && \
22-
cd sqlite-autoconf-3450100 && \
20+
wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \
21+
tar -xzf sqlite-autoconf-3400100.tar.gz && \
22+
cd sqlite-autoconf-3400100 && \
2323
CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr/sqlite3 && \
2424
make && \
2525
make install && \
2626
cd ~ && \
2727
rm -rf ~/sqlite-autoconf*
2828

29-
# Compile newer version of openssl \
30-
RUN cd ~ && \
31-
yum -y install perl-IPC-Cmd perl-Pod-Html && \
32-
wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz && \
33-
tar -xzf openssl-3.0.15.tar.gz && \
34-
cd openssl-3.0.15 && \
35-
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl --libdir=lib no-ssl3 no-idea no-dtls no-srp no-comp shared && \
36-
make && \
37-
make install && \
38-
cd ~ && \
39-
rm -rf ~/openssl-3.0.15*
40-
4129
# Compile newer version of python3
42-
RUN yum -y install zlib-devel bzip2 bzip2-devel readline-devel tk-devel libffi-devel xz-devel && \
30+
RUN yum -y install openssl openssl-devel zlib-devel bzip2 bzip2-devel readline-devel tk-devel libffi-devel xz-devel && \
4331
cd ~ && \
4432
# Set up pyenv \
45-
export PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" && \
4633
git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
47-
pyenv install 3.11 --verbose && \
48-
pyenv global 3.11 && \
34+
pyenv install 3.10 && \
35+
pyenv global 3.10 && \
4936
pip install --upgrade pip && \
5037
pip install --no-cache-dir py3createtorrent awscli && \
51-
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \
52-
python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))' && \
38+
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")' && \
5339
yum clean all
5440

5541
# Add nodejs

ubuntu-20.04/Dockerfile

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,42 +42,27 @@ RUN apt-get update && \
4242
vim \
4343
wget \
4444
xz-utils \
45-
zlib1g-dev \
46-
checkinstall && \
45+
zlib1g-dev && \
4746
rm -rf /var/lib/apt/lists/*
4847

4948
# Compile newer version of sqlite3 \
5049
RUN cd ~ && \
51-
wget -q https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \
52-
tar -xzf sqlite-autoconf-3450100.tar.gz && \
53-
cd sqlite-autoconf-3450100 && \
50+
wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \
51+
tar -xzf sqlite-autoconf-3400100.tar.gz && \
52+
cd sqlite-autoconf-3400100 && \
5453
CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \
5554
make && \
5655
make install && \
5756
cd ~ && \
5857
rm -rf ~/sqlite-autoconf*
5958

60-
# Compile newer version of openssl \
61-
RUN cd ~ && \
62-
wget -q https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz && \
63-
tar -xzf openssl-3.0.15.tar.gz && \
64-
cd openssl-3.0.15 && \
65-
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl --libdir=lib no-ssl3 no-idea no-dtls no-srp no-comp shared && \
66-
make && \
67-
make install && \
68-
cd ~ && \
69-
rm -rf ~/openssl-3.0.15*
70-
7159
# Set up pyenv \
7260
RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
73-
export PYTHON_CONFIGURE_OPTS="--with-openssl=/usr/local/ssl --with-openssl-rpath=auto --enable-shared --enable-optimizations" && \
74-
pyenv install 3.11 --verbose && \
75-
pyenv global 3.11 && \
61+
pyenv install 3.10 && \
62+
pyenv global 3.10 && \
7663
pip install --upgrade pip && \
7764
pip install --no-cache-dir py3createtorrent && \
78-
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")' && \
79-
python3 -c 'import sys; import ssl; sys.exit(ssl.OPENSSL_VERSION_INFO != (3,0,0,15,0))'
80-
65+
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")'
8166

8267
# Add nodejs
8368
ENV NODE_MAJOR=18

ubuntu-22.04-risc/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ RUN curl -L -O https://ftpmirror.gnu.org/gnu/binutils/binutils-2.38.tar.gz && \
1818

1919
FROM base AS sqlite
2020

21-
RUN curl -L -O https://sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \
22-
tar -xvzf sqlite-autoconf-3450100.tar.gz && \
23-
cd sqlite-autoconf-3450100 && \
21+
RUN curl -L -O https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \
22+
tar -xvzf sqlite-autoconf-3400100.tar.gz && \
23+
cd sqlite-autoconf-3400100 && \
2424
CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/opt/sqlite3 && \
2525
make && \
2626
make install && \

ubuntu-22.04/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ RUN apt-get update && \
4747

4848
# Compile newer version of sqlite3 \
4949
RUN cd ~ && \
50-
wget -q https://sqlite.org/2024/sqlite-autoconf-3450100.tar.gz && \
51-
tar -xzf sqlite-autoconf-3450100.tar.gz && \
52-
cd sqlite-autoconf-3450100 && \
50+
wget -q https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz && \
51+
tar -xzf sqlite-autoconf-3400100.tar.gz && \
52+
cd sqlite-autoconf-3400100 && \
5353
CFLAGS="-DSQLITE_MAX_VARIABLE_NUMBER=500000" ./configure --prefix=/usr && \
5454
make && \
5555
make install && \
@@ -58,12 +58,11 @@ RUN cd ~ && \
5858

5959
# Set up pyenv
6060
RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
61-
export PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" && \
62-
pyenv install 3.11 --verbose && \
63-
pyenv global 3.11 && \
61+
pyenv install 3.10 && \
62+
pyenv global 3.10 && \
6463
pip install --upgrade pip && \
6564
pip install --no-cache-dir py3createtorrent && \
66-
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.45.1")'
65+
python3 -c 'import sys; import sqlite3; sys.exit(sqlite3.sqlite_version != "3.40.1")'
6766

6867
# Add nodejs
6968
ENV NODE_MAJOR=18

0 commit comments

Comments
 (0)