Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto update protoc and fix updater pins #128

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ RUN apt-get update && apt-get install -y \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*

# Install a more recent release of protoc (protobuf-compiler in jammy is 4 years old and misses some features)
ENV PROTOC_VER="25.2"
RUN cd /tmp && \
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip -o protoc.zip && \
unzip protoc.zip && \
cp bin/protoc /usr/bin/protoc && \
rm -rf *

# Install rust using rustup
ARG CHANNEL
ENV RUSTUP_VER="1.26.0" \
Expand All @@ -60,17 +52,25 @@ RUN chmod a+X /root

# Convenience list of versions and variables for compilation later on
# This helps continuing manually if anything breaks.
ENV SSL_VER="1.1.1q" \
ENV SSL_VER="1.1.1w" \
CURL_VER="8.4.0" \
ZLIB_VER="1.3.1" \
PQ_VER="11.12" \
SQLITE_VER="3430100" \
SQLITE_VER="3450100" \
PROTOBUF_VER="25.2" \
CC=musl-gcc \
PREFIX=/musl \
PATH=/usr/local/bin:/root/.cargo/bin:$PATH \
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
LD_LIBRARY_PATH=$PREFIX

# Install a more recent release of protoc (protobuf-compiler in jammy is 4 years old and misses some features)
RUN cd /tmp && \
curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VER}/protoc-${PROTOBUF_VER}-linux-x86_64.zip -o protoc.zip && \
unzip protoc.zip && \
cp bin/protoc /usr/bin/protoc && \
rm -rf *

# Set up a prefix for musl build libraries, make the linker's job of finding them easier
# Primarily for the benefit of postgres.
# Lastly, link some linux-headers for openssl 1.1 (not used herein)
Expand Down Expand Up @@ -120,7 +120,7 @@ RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.
cd .. && rm -rf postgresql-$PQ_VER

# Build libsqlite3 using same configuration as the alpine linux main/sqlite package
RUN curl -sSL https://www.sqlite.org/2023/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
RUN curl -sSL https://www.sqlite.org/2024/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
cd sqlite-autoconf-$SQLITE_VER && \
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" \
CC="musl-gcc -fPIC -pie" \
Expand Down
7 changes: 2 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# See https://just.systems/man/

[private]
default:
@just --list --unsorted --color=always | rg -v " default"
@just --list --unsorted --color=always

_build channel:
docker build --build-arg CHANNEL="{{channel}}" -t clux/muslrust:temp .
Expand Down Expand Up @@ -33,7 +34,3 @@ clean-tests:
sudo find . -iname Cargo.lock -exec rm {} \;
sudo find . -mindepth 3 -maxdepth 3 -name target -exec rm -rf {} \;
sudo rm -f test/dieselsqlitecrate/main.db

# mode: makefile
# End:
# vim: set ft=make :
3 changes: 2 additions & 1 deletion update_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def rustup_version():
'CURL': pkgver('curl'),
#'PQ': pkgver('postgresql-old-upgrade'), # see https://github.com/clux/muslrust/issues/81
'SQLITE': convert_sqlite_version(pkgver('sqlite')),
'SSL': convert_openssl_version(pkgver('openssl')),
'SSL': convert_openssl_version(pkgver('openssl-1.1')),
'PROTOBUF': pkgver('protobuf'),
'ZLIB': pkgver('zlib'),
'RUSTUP': rustup_version()
}
Expand Down
Loading