From de1e6cd32711561a64057996d9865a3304f64f0d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 24 Apr 2025 15:30:04 +0200 Subject: [PATCH 1/4] WIP Trino 475 (with storage connector 474) --- .../474/0001-Add-CycloneDX-plugin.patch | 37 ++++++++++++++++++ .../stackable/patches/474/patchable.toml | 2 + trino-storage-connector/versions.py | 4 ++ trino/Dockerfile | 10 ++++- .../475/0001-Add-CycloneDX-plugin.patch | 38 +++++++++++++++++++ trino/stackable/patches/475/patchable.toml | 2 + trino/versions.py | 11 ++++++ 7 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch create mode 100644 trino-storage-connector/stackable/patches/474/patchable.toml create mode 100644 trino/stackable/patches/475/0001-Add-CycloneDX-plugin.patch create mode 100644 trino/stackable/patches/475/patchable.toml diff --git a/trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch b/trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch new file mode 100644 index 000000000..938a026bf --- /dev/null +++ b/trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch @@ -0,0 +1,37 @@ +From 1f5f2f18056f650b89f0399c188e3446975e1764 Mon Sep 17 00:00:00 2001 +From: Lukas Voetmand +Date: Fri, 6 Sep 2024 17:53:52 +0200 +Subject: Add CycloneDX plugin + +--- + pom.xml | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/pom.xml b/pom.xml +index ddd620e..bbfcb96 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -545,6 +545,23 @@ + + + ++ ++ org.cyclonedx ++ cyclonedx-maven-plugin ++ 2.9.1 ++ ++ application ++ 1.6 ++ ++ ++ ++ ++ makeBom ++ ++ package ++ ++ ++ + + + diff --git a/trino-storage-connector/stackable/patches/474/patchable.toml b/trino-storage-connector/stackable/patches/474/patchable.toml new file mode 100644 index 000000000..d5ec973f5 --- /dev/null +++ b/trino-storage-connector/stackable/patches/474/patchable.toml @@ -0,0 +1,2 @@ +upstream = "https://github.com/snowlift/trino-storage.git" +base = "1b25d617940f14a844a43ee34aa705f7d11fbaf9" diff --git a/trino-storage-connector/versions.py b/trino-storage-connector/versions.py index 6c1ae45f1..0c010b786 100644 --- a/trino-storage-connector/versions.py +++ b/trino-storage-connector/versions.py @@ -11,4 +11,8 @@ "product": "470", "java-devel": "23", }, + { + "product": "474", + "java-devel": "23", + }, ] diff --git a/trino/Dockerfile b/trino/Dockerfile index 888070d61..aa5cc9829 100644 --- a/trino/Dockerfile +++ b/trino/Dockerfile @@ -6,6 +6,7 @@ FROM stackable/image/trino-storage-connector AS trino-storage-connector-image FROM stackable/image/java-devel AS trino-builder ARG PRODUCT +ARG TRINO_STORAGE_CONNECTOR ARG STACKABLE_USER_UID ARG JMX_EXPORTER @@ -26,8 +27,8 @@ RUN curl "https://repo.stackable.tech/repository/packages/trino-server/trino-ser COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/patches/apply_patches.sh /stackable/trino-server-${PRODUCT}-src/patches/apply_patches.sh COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/patches/${PRODUCT} /stackable/trino-server-${PRODUCT}-src/patches/${PRODUCT} -COPY --chown=${STACKABLE_USER_UID}:0 --from=trino-storage-connector-image /stackable/trino-storage-${PRODUCT}-src/target/trino-storage-${PRODUCT} \ - /stackable/trino-server-${PRODUCT}/plugin/trino-storage-${PRODUCT}/ +COPY --chown=${STACKABLE_USER_UID}:0 --from=trino-storage-connector-image /stackable/trino-storage-${TRINO_STORAGE_CONNECTOR}-src/target/trino-storage-${TRINO_STORAGE_CONNECTOR} \ + /stackable/trino-server-${PRODUCT}/plugin/trino-storage-${TRINO_STORAGE_CONNECTOR}/ COPY --chown=${STACKABLE_USER_UID}:0 trino/stackable/jmx /stackable/jmx # adding a hadolint ignore for SC2215, due to https://github.com/hadolint/hadolint/issues/980 @@ -49,7 +50,12 @@ git commit --allow-empty --message "Fake commit, so that we can create a tag" git tag ${PRODUCT} # We need to use ./mvnw instead of mvn to get a recent maven version (which is required to build Trino) +# trino-server-rpm was removed at some point of time +if [[ "$PRODUCT" == "451" || "$PRODUCT" == "455" || "$PRODUCT" == "470" ]]; then ./mvnw --batch-mode --no-transfer-progress package -DskipTests --projects="!docs,!core/trino-server-rpm" +else +./mvnw --batch-mode --no-transfer-progress package -DskipTests --projects="!docs" +fi # Delete intermediate build products to free some space and keep runners happy rm -r /stackable/trino-server-${PRODUCT}-src/plugin/*/target /stackable/trino-server-${PRODUCT}-src/core/trino-server/target/trino-server-${PRODUCT} diff --git a/trino/stackable/patches/475/0001-Add-CycloneDX-plugin.patch b/trino/stackable/patches/475/0001-Add-CycloneDX-plugin.patch new file mode 100644 index 000000000..cfce1af20 --- /dev/null +++ b/trino/stackable/patches/475/0001-Add-CycloneDX-plugin.patch @@ -0,0 +1,38 @@ +From 88bcb8d5ff689504f112b8b149a282a01e6b4212 Mon Sep 17 00:00:00 2001 +From: Lukas Voetmand +Date: Fri, 6 Sep 2024 17:53:52 +0200 +Subject: Add CycloneDX plugin + +--- + pom.xml | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/pom.xml b/pom.xml +index a1604d5ebec..3f9f7945046 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -2814,6 +2814,24 @@ + + + ++ ++ org.cyclonedx ++ cyclonedx-maven-plugin ++ 2.9.1 ++ ++ application ++ 1.6 ++ false ++ ++ ++ ++ ++ makeBom ++ ++ package ++ ++ ++ + + + diff --git a/trino/stackable/patches/475/patchable.toml b/trino/stackable/patches/475/patchable.toml new file mode 100644 index 000000000..42b04bed4 --- /dev/null +++ b/trino/stackable/patches/475/patchable.toml @@ -0,0 +1,2 @@ +upstream = "https://github.com/trinodb/trino.git" +base = "05bc059cf0c9263e4ee8be2c1ad69753d0dd4faf" diff --git a/trino/versions.py b/trino/versions.py index 9205bd2dd..9f06c918d 100644 --- a/trino/versions.py +++ b/trino/versions.py @@ -5,6 +5,7 @@ "java-devel": "22", "jmx_exporter": "1.1.0", "trino-storage-connector": "451", + "trino_storage_connector": "451", }, { "product": "455", @@ -12,6 +13,7 @@ "java-devel": "22", "jmx_exporter": "1.1.0", "trino-storage-connector": "455", + "trino_storage_connector": "455", }, { "product": "470", @@ -19,5 +21,14 @@ "java-devel": "23", "jmx_exporter": "1.1.0", "trino-storage-connector": "470", + "trino_storage_connector": "470", + }, + { + "product": "475", + "java-base": "23", + "java-devel": "23", + "jmx_exporter": "1.1.0", + "trino-storage-connector": "474", + "trino_storage_connector": "474", }, ] From a8ac794792e2261fdd01dede96b87686f53e0ee6 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 24 Apr 2025 15:32:38 +0200 Subject: [PATCH 2/4] Add note --- trino/versions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trino/versions.py b/trino/versions.py index 9f06c918d..df255eda6 100644 --- a/trino/versions.py +++ b/trino/versions.py @@ -28,6 +28,8 @@ "java-base": "23", "java-devel": "23", "jmx_exporter": "1.1.0", + # FIXME: 475 has not been release yet. Very likely everything will work fine, but it's not + # ideal "trino-storage-connector": "474", "trino_storage_connector": "474", }, From 596a396f25651052139041b2bfa2c971f91e2d29 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 24 Apr 2025 15:36:02 +0200 Subject: [PATCH 3/4] Bump trino-storage to 475, which was released minutes ago :) --- .../474/0001-Add-CycloneDX-plugin.patch | 37 ------------------- .../stackable/patches/474/patchable.toml | 2 - trino-storage-connector/versions.py | 2 +- trino/stackable/patches/475/patchable.toml | 2 +- trino/versions.py | 6 +-- 5 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch delete mode 100644 trino-storage-connector/stackable/patches/474/patchable.toml diff --git a/trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch b/trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch deleted file mode 100644 index 938a026bf..000000000 --- a/trino-storage-connector/stackable/patches/474/0001-Add-CycloneDX-plugin.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 1f5f2f18056f650b89f0399c188e3446975e1764 Mon Sep 17 00:00:00 2001 -From: Lukas Voetmand -Date: Fri, 6 Sep 2024 17:53:52 +0200 -Subject: Add CycloneDX plugin - ---- - pom.xml | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/pom.xml b/pom.xml -index ddd620e..bbfcb96 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -545,6 +545,23 @@ - - - -+ -+ org.cyclonedx -+ cyclonedx-maven-plugin -+ 2.9.1 -+ -+ application -+ 1.6 -+ -+ -+ -+ -+ makeBom -+ -+ package -+ -+ -+ - - - diff --git a/trino-storage-connector/stackable/patches/474/patchable.toml b/trino-storage-connector/stackable/patches/474/patchable.toml deleted file mode 100644 index d5ec973f5..000000000 --- a/trino-storage-connector/stackable/patches/474/patchable.toml +++ /dev/null @@ -1,2 +0,0 @@ -upstream = "https://github.com/snowlift/trino-storage.git" -base = "1b25d617940f14a844a43ee34aa705f7d11fbaf9" diff --git a/trino-storage-connector/versions.py b/trino-storage-connector/versions.py index 0c010b786..14502024e 100644 --- a/trino-storage-connector/versions.py +++ b/trino-storage-connector/versions.py @@ -12,7 +12,7 @@ "java-devel": "23", }, { - "product": "474", + "product": "475", "java-devel": "23", }, ] diff --git a/trino/stackable/patches/475/patchable.toml b/trino/stackable/patches/475/patchable.toml index 42b04bed4..5af06fcb0 100644 --- a/trino/stackable/patches/475/patchable.toml +++ b/trino/stackable/patches/475/patchable.toml @@ -1,2 +1,2 @@ upstream = "https://github.com/trinodb/trino.git" -base = "05bc059cf0c9263e4ee8be2c1ad69753d0dd4faf" +base = "fd2b81e86ba1c288684746d0842c0ffc3a709598" diff --git a/trino/versions.py b/trino/versions.py index df255eda6..a43784a65 100644 --- a/trino/versions.py +++ b/trino/versions.py @@ -28,9 +28,7 @@ "java-base": "23", "java-devel": "23", "jmx_exporter": "1.1.0", - # FIXME: 475 has not been release yet. Very likely everything will work fine, but it's not - # ideal - "trino-storage-connector": "474", - "trino_storage_connector": "474", + "trino-storage-connector": "475", + "trino_storage_connector": "475", }, ] From baa38c4a639ea5734823d3d9fd1dde20825fbc59 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 24 Apr 2025 15:38:02 +0200 Subject: [PATCH 4/4] Add files --- .../475/0001-Add-CycloneDX-plugin.patch | 37 +++++++++++++++++++ .../stackable/patches/475/patchable.toml | 2 + 2 files changed, 39 insertions(+) create mode 100644 trino-storage-connector/stackable/patches/475/0001-Add-CycloneDX-plugin.patch create mode 100644 trino-storage-connector/stackable/patches/475/patchable.toml diff --git a/trino-storage-connector/stackable/patches/475/0001-Add-CycloneDX-plugin.patch b/trino-storage-connector/stackable/patches/475/0001-Add-CycloneDX-plugin.patch new file mode 100644 index 000000000..938a026bf --- /dev/null +++ b/trino-storage-connector/stackable/patches/475/0001-Add-CycloneDX-plugin.patch @@ -0,0 +1,37 @@ +From 1f5f2f18056f650b89f0399c188e3446975e1764 Mon Sep 17 00:00:00 2001 +From: Lukas Voetmand +Date: Fri, 6 Sep 2024 17:53:52 +0200 +Subject: Add CycloneDX plugin + +--- + pom.xml | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/pom.xml b/pom.xml +index ddd620e..bbfcb96 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -545,6 +545,23 @@ + + + ++ ++ org.cyclonedx ++ cyclonedx-maven-plugin ++ 2.9.1 ++ ++ application ++ 1.6 ++ ++ ++ ++ ++ makeBom ++ ++ package ++ ++ ++ + + + diff --git a/trino-storage-connector/stackable/patches/475/patchable.toml b/trino-storage-connector/stackable/patches/475/patchable.toml new file mode 100644 index 000000000..e236dd56d --- /dev/null +++ b/trino-storage-connector/stackable/patches/475/patchable.toml @@ -0,0 +1,2 @@ +upstream = "https://github.com/snowlift/trino-storage.git" +base = "976514ad62ed5e147fbc63a31803a268a1d240c4"