Skip to content

Commit 4d9c6c2

Browse files
authored
Merge pull request #128 from clux/auto-update-protoc
Auto update protoc and fix updater pins
2 parents 93d1104 + c00ed68 commit 4d9c6c2

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ RUN apt-get update && apt-get install -y \
3535
--no-install-recommends && \
3636
rm -rf /var/lib/apt/lists/*
3737

38-
# Install a more recent release of protoc (protobuf-compiler in jammy is 4 years old and misses some features)
39-
ENV PROTOC_VER="25.2"
40-
RUN cd /tmp && \
41-
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip -o protoc.zip && \
42-
unzip protoc.zip && \
43-
cp bin/protoc /usr/bin/protoc && \
44-
rm -rf *
45-
4638
# Install rust using rustup
4739
ARG CHANNEL
4840
ENV RUSTUP_VER="1.26.0" \
@@ -60,17 +52,25 @@ RUN chmod a+X /root
6052

6153
# Convenience list of versions and variables for compilation later on
6254
# This helps continuing manually if anything breaks.
63-
ENV SSL_VER="1.1.1q" \
55+
ENV SSL_VER="1.1.1w" \
6456
CURL_VER="8.4.0" \
6557
ZLIB_VER="1.3.1" \
6658
PQ_VER="11.12" \
67-
SQLITE_VER="3430100" \
59+
SQLITE_VER="3450100" \
60+
PROTOBUF_VER="25.2" \
6861
CC=musl-gcc \
6962
PREFIX=/musl \
7063
PATH=/usr/local/bin:/root/.cargo/bin:$PATH \
7164
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
7265
LD_LIBRARY_PATH=$PREFIX
7366

67+
# Install a more recent release of protoc (protobuf-compiler in jammy is 4 years old and misses some features)
68+
RUN cd /tmp && \
69+
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VER}/protoc-${PROTOBUF_VER}-linux-x86_64.zip -o protoc.zip && \
70+
unzip protoc.zip && \
71+
cp bin/protoc /usr/bin/protoc && \
72+
rm -rf *
73+
7474
# Set up a prefix for musl build libraries, make the linker's job of finding them easier
7575
# Primarily for the benefit of postgres.
7676
# Lastly, link some linux-headers for openssl 1.1 (not used herein)
@@ -120,7 +120,7 @@ RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.
120120
cd .. && rm -rf postgresql-$PQ_VER
121121

122122
# Build libsqlite3 using same configuration as the alpine linux main/sqlite package
123-
RUN curl -sSL https://www.sqlite.org/2023/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
123+
RUN curl -sSL https://www.sqlite.org/2024/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
124124
cd sqlite-autoconf-$SQLITE_VER && \
125125
CFLAGS="-DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_RTREE -DSQLITE_USE_URI -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1" \
126126
CC="musl-gcc -fPIC -pie" \

justfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# See https://just.systems/man/
22

3+
[private]
34
default:
4-
@just --list --unsorted --color=always | rg -v " default"
5+
@just --list --unsorted --color=always
56

67
_build channel:
78
docker build --build-arg CHANNEL="{{channel}}" -t clux/muslrust:temp .
@@ -33,7 +34,3 @@ clean-tests:
3334
sudo find . -iname Cargo.lock -exec rm {} \;
3435
sudo find . -mindepth 3 -maxdepth 3 -name target -exec rm -rf {} \;
3536
sudo rm -f test/dieselsqlitecrate/main.db
36-
37-
# mode: makefile
38-
# End:
39-
# vim: set ft=make :

update_libs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def rustup_version():
8585
'CURL': pkgver('curl'),
8686
#'PQ': pkgver('postgresql-old-upgrade'), # see https://github.com/clux/muslrust/issues/81
8787
'SQLITE': convert_sqlite_version(pkgver('sqlite')),
88-
'SSL': convert_openssl_version(pkgver('openssl')),
88+
'SSL': convert_openssl_version(pkgver('openssl-1.1')),
89+
'PROTOBUF': pkgver('protobuf'),
8990
'ZLIB': pkgver('zlib'),
9091
'RUSTUP': rustup_version()
9192
}

0 commit comments

Comments
 (0)