From 2cbf2c7f3f03e5634cd3e6a5e9798e88289cb2f4 Mon Sep 17 00:00:00 2001 From: Rongxin Liu Date: Tue, 17 Dec 2024 19:56:47 -0500 Subject: [PATCH 1/2] update Dockerfile and shell.c.patch for version upgrades of OpenJDK, Node.js, Python, Ruby, and SQLite --- Dockerfile | 40 ++++++++++++++++++++-------------------- shell.c.patch | 5 +++-- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f42d79..67455d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,10 +22,10 @@ RUN apt update && \ # http://jdk.java.net/23/ RUN cd /tmp && \ if [ "$BUILDARCH" = "arm64" ]; then ARCH="aarch64"; else ARCH="x64"; fi && \ - curl --remote-name https://download.java.net/java/GA/jdk23/3c5b90190c68498b986a97f276efd28a/37/GPL/openjdk-23_linux-${ARCH}_bin.tar.gz && \ - tar xzf openjdk-23_linux-${ARCH}_bin.tar.gz && \ - rm --force openjdk-23_linux-${ARCH}_bin.tar.gz && \ - mv jdk-23 /opt/jdk && \ + curl --remote-name https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-${ARCH}_bin.tar.gz && \ + tar xzf openjdk-23.0.1_linux-${ARCH}_bin.tar.gz && \ + rm --force openjdk-23.0.1_linux-${ARCH}_bin.tar.gz && \ + mv jdk-23.0.1 /opt/jdk && \ mkdir --parent /opt/bin && \ ln --symbolic /opt/jdk/bin/* /opt/bin/ && \ chmod a+rx /opt/bin/* @@ -36,7 +36,7 @@ RUN cd /tmp && \ # https://github.com/tj/n#installation RUN curl --location https://raw.githubusercontent.com/tj/n/master/bin/n --output /usr/local/bin/n && \ chmod a+x /usr/local/bin/n && \ - n 22.6.0 + n 22.12.0 # Install Node.js packages @@ -64,16 +64,16 @@ RUN apt update && \ # Install Python 3.12.x # https://www.python.org/downloads/ RUN cd /tmp && \ - curl --remote-name https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz && \ - tar xzf Python-3.12.7.tgz && \ - rm --force Python-3.12.7.tgz && \ - cd Python-3.12.7 && \ + curl --remote-name https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz && \ + tar xzf Python-3.12.8.tgz && \ + rm --force Python-3.12.8.tgz && \ + cd Python-3.12.8 && \ CFLAGS="-Os" ./configure --disable-static --enable-optimizations --enable-shared --with-lto --without-tests && \ ./configure && \ make && \ make install && \ cd .. && \ - rm --force --recursive Python-3.12.7 && \ + rm --force --recursive Python-3.12.8 && \ ln --relative --symbolic /usr/local/bin/pip3 /usr/local/bin/pip && \ ln --relative --symbolic /usr/local/bin/python3 /usr/local/bin/python && \ pip3 install --no-cache-dir --upgrade pip @@ -89,16 +89,16 @@ RUN apt update && \ apt clean && \ rm --force --recursive /var/lib/apt/lists/* && \ cd /tmp && \ - curl https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.5.tar.gz --output ruby-3.3.5.tar.gz && \ - tar xzf ruby-3.3.5.tar.gz && \ - rm --force ruby-3.3.5.tar.gz && \ - cd ruby-3.3.5 && \ + curl https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.6.tar.gz --output ruby-3.3.6.tar.gz && \ + tar xzf ruby-3.3.6.tar.gz && \ + rm --force ruby-3.3.6.tar.gz && \ + cd ruby-3.3.6 && \ if [ "$BUILDARCH" = "arm64" ]; then ASFLAGS=-mbranch-protection=pac-ret; else ASFLAGS=; fi && \ ASFLAGS=${ASFLAGS} CFLAGS=-Os ./configure --disable-install-doc --enable-load-relative && \ make && \ make install && \ cd .. && \ - rm --force --recursive ruby-3.3.5 + rm --force --recursive ruby-3.3.6 # Install Ruby packages @@ -117,14 +117,14 @@ RUN echo "gem: --no-document" > /etc/gemrc && \ # https://www.sqlite.org/howtocompile.html#compiling_the_command_line_interface COPY shell.c.patch /tmp RUN cd /tmp && \ - curl --remote-name https://www.sqlite.org/2024/sqlite-amalgamation-3460100.zip && \ - unzip sqlite-amalgamation-3460100.zip && \ - rm --force sqlite-amalgamation-3460100.zip && \ - cd sqlite-amalgamation-3460100 && \ + curl --remote-name https://www.sqlite.org/2024/sqlite-amalgamation-3470200.zip && \ + unzip sqlite-amalgamation-3470200.zip && \ + rm --force sqlite-amalgamation-3470200.zip && \ + cd sqlite-amalgamation-3470200 && \ patch shell.c < /tmp/shell.c.patch && \ gcc -D HAVE_READLINE -D SQLITE_DEFAULT_FOREIGN_KEYS=1 -D SQLITE_OMIT_DYNAPROMPT=1 shell.c sqlite3.c -lpthread -ldl -lm -lreadline -lncurses -o /usr/local/bin/sqlite3 && \ cd .. && \ - rm --force --recursive sqlite-amalgamation-3460100 && \ + rm --force --recursive sqlite-amalgamation-3470200 && \ rm --force /tmp/shell.c.patch diff --git a/shell.c.patch b/shell.c.patch index 4e4f4dc..ecf34a2 100644 --- a/shell.c.patch +++ b/shell.c.patch @@ -1,4 +1,5 @@ -30886,30888d30885 -< sputf(stdout, "SQLite version %s %.19s%s\n" /*extra-version-info*/ +33142,33145d33141 +< sqlite3_fprintf(stdout, +< "SQLite version %s %.19s%s\n" /*extra-version-info*/ < "Enter \".help\" for usage hints.\n", < sqlite3_libversion(), sqlite3_sourceid(), SHELL_CIO_CHAR_SET); From 167b0ea524d1cb925c98d1fbf62581cd8a03ce01 Mon Sep 17 00:00:00 2001 From: Rongxin Liu Date: Tue, 17 Dec 2024 21:02:22 -0500 Subject: [PATCH 2/2] update workflow to use Ubuntu 22.04 for finalization job --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd1f496..af5f472 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,7 +83,7 @@ jobs: finalize: needs: [build-amd64, build-arm64] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Log into Docker Hub uses: docker/login-action@v3