From a4deb47a9270cb4cbeba00ccaaecdd494431fb8d Mon Sep 17 00:00:00 2001 From: clux Date: Tue, 13 Feb 2024 19:13:23 +0000 Subject: [PATCH 1/3] Move protoc within updater Signed-off-by: clux --- Dockerfile | 16 ++++++++-------- update_libs.py | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4312140..2f1cb62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" \ @@ -65,12 +57,20 @@ ENV SSL_VER="1.1.1q" \ ZLIB_VER="1.3.1" \ PQ_VER="11.12" \ SQLITE_VER="3430100" \ + PROTOC_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${PROTOC_VER}/protoc-${PROTOC_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) diff --git a/update_libs.py b/update_libs.py index aabc6be..a2470d9 100755 --- a/update_libs.py +++ b/update_libs.py @@ -86,6 +86,7 @@ def rustup_version(): #'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')), + 'PROTOBUF': pkgver('protobuf'), 'ZLIB': pkgver('zlib'), 'RUSTUP': rustup_version() } From 87d710e2d31db72aeb1e1f5b26054564f6c94c4c Mon Sep 17 00:00:00 2001 From: clux Date: Tue, 13 Feb 2024 19:16:08 +0000 Subject: [PATCH 2/3] fix updater script and pin versions correctly Signed-off-by: clux --- Dockerfile | 10 +++++----- update_libs.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f1cb62..ebfbd17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,12 +52,12 @@ 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" \ - CURL_VER="8.4.0" \ +ENV SSL_VER="1.1.1w" \ + CURL_VER="8.6.0" \ ZLIB_VER="1.3.1" \ PQ_VER="11.12" \ - SQLITE_VER="3430100" \ - PROTOC_VER="25.2" \ + SQLITE_VER="3450100" \ + PROTOBUF_VER="25.2" \ CC=musl-gcc \ PREFIX=/musl \ PATH=/usr/local/bin:/root/.cargo/bin:$PATH \ @@ -66,7 +66,7 @@ ENV SSL_VER="1.1.1q" \ # 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${PROTOC_VER}/protoc-${PROTOC_VER}-linux-x86_64.zip -o protoc.zip && \ + 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 * diff --git a/update_libs.py b/update_libs.py index a2470d9..7138729 100755 --- a/update_libs.py +++ b/update_libs.py @@ -85,7 +85,7 @@ 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() From c00ed6836e0e2101da8ff6eaac979c87257736da Mon Sep 17 00:00:00 2001 From: clux Date: Tue, 13 Feb 2024 19:29:30 +0000 Subject: [PATCH 3/3] fix build and avoid #128 for now Signed-off-by: clux --- Dockerfile | 4 ++-- justfile | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ebfbd17..7688d84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ 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.1w" \ - CURL_VER="8.6.0" \ + CURL_VER="8.4.0" \ ZLIB_VER="1.3.1" \ PQ_VER="11.12" \ SQLITE_VER="3450100" \ @@ -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" \ diff --git a/justfile b/justfile index fcc0ede..7d08678 100644 --- a/justfile +++ b/justfile @@ -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 . @@ -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 :