From f1b529e356bd35460ebafaf9b9f2299dec9d4bdf Mon Sep 17 00:00:00 2001 From: xeniape Date: Wed, 15 May 2024 12:11:55 +0200 Subject: [PATCH 1/5] bump omid and jruby versions for CVE-2022-1471 fix --- hbase/Dockerfile | 14 +++++---- hbase/stackable/patches/apply_patches.sh | 17 +++++++---- .../2.4.12/001-HBASE-27292-2.4.12.patch | 0 .../2.4.12/002-HBASE-27860-2.4.12.patch | 0 .../2.4.12/003-HBASE-25292-2.4.12.patch | 0 .../2.4.12/004-HBASE-25336-2.4.12.patch | 0 .../2.4.12/005-HBASE-27027-2.4.12.patch | 0 .../2.4.12/006-HBASE-28242-2.4.12.patch | 0 .../2.4.17/001-HBASE-27860-2.4.17.patch | 0 .../2.4.17/002-HBASE-25292-2.4.17.patch | 0 .../2.4.17/003-HBASE-25336-2.4.17.patch | 0 .../2.4.17/004-HBASE-27103-2.4.17.patch | 0 .../2.4.17/005-HBASE-28242-2.4.17.patch | 0 .../2.4.17/006-HBASE-jruby-version-bump.patch | 11 +++++++ .../001-PHOENIX-omid-deps-version-bump.patch | 29 +++++++++++++++++++ 15 files changed, 61 insertions(+), 10 deletions(-) rename hbase/stackable/patches/{ => hbase}/2.4.12/001-HBASE-27292-2.4.12.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.12/002-HBASE-27860-2.4.12.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.12/003-HBASE-25292-2.4.12.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.12/004-HBASE-25336-2.4.12.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.12/005-HBASE-27027-2.4.12.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.12/006-HBASE-28242-2.4.12.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.17/001-HBASE-27860-2.4.17.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.17/002-HBASE-25292-2.4.17.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.17/003-HBASE-25336-2.4.17.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.17/004-HBASE-27103-2.4.17.patch (100%) rename hbase/stackable/patches/{ => hbase}/2.4.17/005-HBASE-28242-2.4.17.patch (100%) create mode 100644 hbase/stackable/patches/hbase/2.4.17/006-HBASE-jruby-version-bump.patch create mode 100644 hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch diff --git a/hbase/Dockerfile b/hbase/Dockerfile index bfcabfaf9..60dc98174 100644 --- a/hbase/Dockerfile +++ b/hbase/Dockerfile @@ -25,13 +25,16 @@ COPY hbase/licenses /licenses USER stackable WORKDIR /stackable +## copy patches +COPY --chown=stackable:stackable hbase/stackable/patches /stackable/patches + + # The release scripts of HBase also run the build twice (three times in fact, once again to build the site which we skip here). # I chose to replicate that exact behavior for consistency so please don't merge the two mvn runs into one unless you really know what you're doing! RUN curl --fail -L "https://repo.stackable.tech/repository/packages/hbase/hbase-${PRODUCT}-src.tar.gz" | tar -xzC . RUN mv hbase-${PRODUCT} hbase-${PRODUCT}-src -COPY --chown=stackable:stackable hbase/stackable/patches /stackable/patches RUN chmod +x patches/apply_patches.sh -RUN patches/apply_patches.sh ${PRODUCT} +RUN patches/apply_patches.sh hbase ${PRODUCT} RUN cd /stackable/hbase-${PRODUCT}-src/ && \ mvn -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} clean install -DskipTests && \ mvn -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} install assembly:single -DskipTests -Dcheckstyle.skip=true -Prelease && \ @@ -47,8 +50,9 @@ RUN ln -s "/stackable/hbase-${PRODUCT}" /stackable/hbase && \ # Build phoenix RUN curl --fail -L "https://repo.stackable.tech/repository/packages/phoenix/phoenix-${PHOENIX}-src.tar.gz" | tar -xzC . && \ - mv phoenix-${PHOENIX} phoenix-${PHOENIX}-src && \ - mvn \ + mv phoenix-${PHOENIX} phoenix-${PHOENIX}-src +RUN patches/apply_patches.sh phoenix ${PHOENIX} +RUN mvn \ -Dhbase.version=${PRODUCT} \ -Dhbase.profile=${HBASE_PROFILE} \ -DskipTests \ @@ -164,7 +168,7 @@ RUN ln -s /stackable/hbase-${PRODUCT} /stackable/hbase && \ USER stackable ENV HBASE_CONF_DIR=/stackable/hbase/conf ENV HOME=/stackable -ENV PATH="${PATH}":/stackable/bin:/stackable/hbase/bin +ENV PATH="${PATH}:/stackable/bin:/stackable/hbase/bin" ENV ASYNC_PROFILER_HOME=/stackable/async-profiler # Mitigation for CVE-2021-44228 (Log4Shell) diff --git a/hbase/stackable/patches/apply_patches.sh b/hbase/stackable/patches/apply_patches.sh index 09ae9f12c..38ebf17b7 100644 --- a/hbase/stackable/patches/apply_patches.sh +++ b/hbase/stackable/patches/apply_patches.sh @@ -4,14 +4,21 @@ set -eu set -o pipefail -# Check if $1 (VERSION) is provided +# Check if $1 (PRODUCT) is provided if [ -z "${1-}" ]; then - echo "Please provide a value for VERSION as the first argument." + echo "Please provide a value for PRODUCT as the first argument." exit 1 fi -VERSION="$1" -PATCH_DIR="patches/$VERSION" +# Check if $2 (VERSION) is provided +if [ -z "${2-}" ]; then + echo "Please provide a value for VERSION as the second argument." + exit 1 +fi + +PRODUCT="$1" +VERSION="$2" +PATCH_DIR="patches/$PRODUCT/$VERSION" # Check if version-specific patches directory exists if [ ! -d "$PATCH_DIR" ]; then @@ -34,7 +41,7 @@ echo "Found ${#patch_files[@]} patches, applying now" # Iterate through sorted patch files for patch_file in "${patch_files[@]}"; do echo "Applying $patch_file" - git apply --directory "hbase-${VERSION}-src" "$patch_file" || { + git apply --directory "${PRODUCT}-${VERSION}-src" "$patch_file" || { echo "Failed to apply $patch_file" exit 1 } diff --git a/hbase/stackable/patches/2.4.12/001-HBASE-27292-2.4.12.patch b/hbase/stackable/patches/hbase/2.4.12/001-HBASE-27292-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/2.4.12/001-HBASE-27292-2.4.12.patch rename to hbase/stackable/patches/hbase/2.4.12/001-HBASE-27292-2.4.12.patch diff --git a/hbase/stackable/patches/2.4.12/002-HBASE-27860-2.4.12.patch b/hbase/stackable/patches/hbase/2.4.12/002-HBASE-27860-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/2.4.12/002-HBASE-27860-2.4.12.patch rename to hbase/stackable/patches/hbase/2.4.12/002-HBASE-27860-2.4.12.patch diff --git a/hbase/stackable/patches/2.4.12/003-HBASE-25292-2.4.12.patch b/hbase/stackable/patches/hbase/2.4.12/003-HBASE-25292-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/2.4.12/003-HBASE-25292-2.4.12.patch rename to hbase/stackable/patches/hbase/2.4.12/003-HBASE-25292-2.4.12.patch diff --git a/hbase/stackable/patches/2.4.12/004-HBASE-25336-2.4.12.patch b/hbase/stackable/patches/hbase/2.4.12/004-HBASE-25336-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/2.4.12/004-HBASE-25336-2.4.12.patch rename to hbase/stackable/patches/hbase/2.4.12/004-HBASE-25336-2.4.12.patch diff --git a/hbase/stackable/patches/2.4.12/005-HBASE-27027-2.4.12.patch b/hbase/stackable/patches/hbase/2.4.12/005-HBASE-27027-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/2.4.12/005-HBASE-27027-2.4.12.patch rename to hbase/stackable/patches/hbase/2.4.12/005-HBASE-27027-2.4.12.patch diff --git a/hbase/stackable/patches/2.4.12/006-HBASE-28242-2.4.12.patch b/hbase/stackable/patches/hbase/2.4.12/006-HBASE-28242-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/2.4.12/006-HBASE-28242-2.4.12.patch rename to hbase/stackable/patches/hbase/2.4.12/006-HBASE-28242-2.4.12.patch diff --git a/hbase/stackable/patches/2.4.17/001-HBASE-27860-2.4.17.patch b/hbase/stackable/patches/hbase/2.4.17/001-HBASE-27860-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/2.4.17/001-HBASE-27860-2.4.17.patch rename to hbase/stackable/patches/hbase/2.4.17/001-HBASE-27860-2.4.17.patch diff --git a/hbase/stackable/patches/2.4.17/002-HBASE-25292-2.4.17.patch b/hbase/stackable/patches/hbase/2.4.17/002-HBASE-25292-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/2.4.17/002-HBASE-25292-2.4.17.patch rename to hbase/stackable/patches/hbase/2.4.17/002-HBASE-25292-2.4.17.patch diff --git a/hbase/stackable/patches/2.4.17/003-HBASE-25336-2.4.17.patch b/hbase/stackable/patches/hbase/2.4.17/003-HBASE-25336-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/2.4.17/003-HBASE-25336-2.4.17.patch rename to hbase/stackable/patches/hbase/2.4.17/003-HBASE-25336-2.4.17.patch diff --git a/hbase/stackable/patches/2.4.17/004-HBASE-27103-2.4.17.patch b/hbase/stackable/patches/hbase/2.4.17/004-HBASE-27103-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/2.4.17/004-HBASE-27103-2.4.17.patch rename to hbase/stackable/patches/hbase/2.4.17/004-HBASE-27103-2.4.17.patch diff --git a/hbase/stackable/patches/2.4.17/005-HBASE-28242-2.4.17.patch b/hbase/stackable/patches/hbase/2.4.17/005-HBASE-28242-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/2.4.17/005-HBASE-28242-2.4.17.patch rename to hbase/stackable/patches/hbase/2.4.17/005-HBASE-28242-2.4.17.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/006-HBASE-jruby-version-bump.patch b/hbase/stackable/patches/hbase/2.4.17/006-HBASE-jruby-version-bump.patch new file mode 100644 index 000000000..1a57b8774 --- /dev/null +++ b/hbase/stackable/patches/hbase/2.4.17/006-HBASE-jruby-version-bump.patch @@ -0,0 +1,11 @@ +--- a/pom.xml 2023-03-31 20:03:27.000000000 +0200 ++++ b/pom.xml 2024-05-14 15:52:58.901324926 +0200 +@@ -576,7 +576,7 @@ + 2.1.1 + 2.3.2 + 3.0.1-b08 +- 9.2.13.0 ++ 9.4.7.0 + 4.13.2 + 1.3 + 4.2.0-incubating diff --git a/hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch b/hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch new file mode 100644 index 000000000..777922ef6 --- /dev/null +++ b/hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch @@ -0,0 +1,29 @@ +--- a/pom.xml 2024-05-14 13:20:33.185420698 +0200 ++++ b/pom.xml 2024-05-15 11:16:29.036294238 +0200 +@@ -1304,7 +1304,7 @@ + + org.apache.omid + omid-transaction-client +- ${omid.version} ++ 1.1.2 + + + org.testng +@@ -1315,7 +1315,7 @@ + + org.apache.omid + omid-commit-table +- ${omid.version} ++ 1.1.2 + + + org.testng +@@ -1326,7 +1326,7 @@ + + org.apache.omid + omid-common +- ${omid.version} ++ 1.1.2 + + + commons-beanutils From d974a96d9b9ce9f1ec9d2bcc8b70305536f5a260 Mon Sep 17 00:00:00 2001 From: xeniape Date: Wed, 15 May 2024 12:22:54 +0200 Subject: [PATCH 2/5] linting fixes --- hbase/Dockerfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hbase/Dockerfile b/hbase/Dockerfile index 60dc98174..785e12231 100644 --- a/hbase/Dockerfile +++ b/hbase/Dockerfile @@ -28,14 +28,13 @@ WORKDIR /stackable ## copy patches COPY --chown=stackable:stackable hbase/stackable/patches /stackable/patches - # The release scripts of HBase also run the build twice (three times in fact, once again to build the site which we skip here). # I chose to replicate that exact behavior for consistency so please don't merge the two mvn runs into one unless you really know what you're doing! -RUN curl --fail -L "https://repo.stackable.tech/repository/packages/hbase/hbase-${PRODUCT}-src.tar.gz" | tar -xzC . -RUN mv hbase-${PRODUCT} hbase-${PRODUCT}-src -RUN chmod +x patches/apply_patches.sh -RUN patches/apply_patches.sh hbase ${PRODUCT} -RUN cd /stackable/hbase-${PRODUCT}-src/ && \ +RUN curl --fail -L "https://repo.stackable.tech/repository/packages/hbase/hbase-${PRODUCT}-src.tar.gz" | tar -xzC . && \ + mv hbase-${PRODUCT} hbase-${PRODUCT}-src && \ + chmod +x patches/apply_patches.sh && \ + patches/apply_patches.sh hbase ${PRODUCT} && \ + cd /stackable/hbase-${PRODUCT}-src/ && \ mvn -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} clean install -DskipTests && \ mvn -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} install assembly:single -DskipTests -Dcheckstyle.skip=true -Prelease && \ tar -xzf hbase-assembly/target/hbase-${PRODUCT}-bin.tar.gz -C /stackable/ && \ @@ -50,9 +49,9 @@ RUN ln -s "/stackable/hbase-${PRODUCT}" /stackable/hbase && \ # Build phoenix RUN curl --fail -L "https://repo.stackable.tech/repository/packages/phoenix/phoenix-${PHOENIX}-src.tar.gz" | tar -xzC . && \ - mv phoenix-${PHOENIX} phoenix-${PHOENIX}-src -RUN patches/apply_patches.sh phoenix ${PHOENIX} -RUN mvn \ + mv phoenix-${PHOENIX} phoenix-${PHOENIX}-src && \ + patches/apply_patches.sh phoenix ${PHOENIX} && \ + mvn \ -Dhbase.version=${PRODUCT} \ -Dhbase.profile=${HBASE_PROFILE} \ -DskipTests \ From b2781d3e89e8bd4eeff905a5224bd46bfb095f59 Mon Sep 17 00:00:00 2001 From: xeniape Date: Tue, 21 May 2024 13:42:10 +0200 Subject: [PATCH 3/5] bump phoenix version, revert patch changes --- conf.py | 2 +- hbase/Dockerfile | 11 +++---- .../2.4.12/001-HBASE-27292-2.4.12.patch | 0 .../2.4.12/002-HBASE-27860-2.4.12.patch | 0 .../2.4.12/003-HBASE-25292-2.4.12.patch | 0 .../2.4.12/004-HBASE-25336-2.4.12.patch | 0 .../2.4.12/005-HBASE-27027-2.4.12.patch | 0 .../2.4.12/006-HBASE-28242-2.4.12.patch | 0 .../2.4.17/001-HBASE-27860-2.4.17.patch | 0 .../2.4.17/002-HBASE-25292-2.4.17.patch | 0 .../2.4.17/003-HBASE-25336-2.4.17.patch | 0 .../2.4.17/004-HBASE-27103-2.4.17.patch | 0 .../2.4.17/005-HBASE-28242-2.4.17.patch | 0 .../2.4.17/006-HBASE-jruby-version-bump.patch | 0 hbase/stackable/patches/apply_patches.sh | 15 +++------- .../001-PHOENIX-omid-deps-version-bump.patch | 29 ------------------- 16 files changed, 9 insertions(+), 48 deletions(-) rename hbase/stackable/patches/{hbase => }/2.4.12/001-HBASE-27292-2.4.12.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.12/002-HBASE-27860-2.4.12.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.12/003-HBASE-25292-2.4.12.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.12/004-HBASE-25336-2.4.12.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.12/005-HBASE-27027-2.4.12.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.12/006-HBASE-28242-2.4.12.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.17/001-HBASE-27860-2.4.17.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.17/002-HBASE-25292-2.4.17.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.17/003-HBASE-25336-2.4.17.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.17/004-HBASE-27103-2.4.17.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.17/005-HBASE-28242-2.4.17.patch (100%) rename hbase/stackable/patches/{hbase => }/2.4.17/006-HBASE-jruby-version-bump.patch (100%) delete mode 100644 hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch diff --git a/conf.py b/conf.py index 694e379db..cbcb324a7 100644 --- a/conf.py +++ b/conf.py @@ -120,7 +120,7 @@ "java-base": "11", "java-devel": "11", "async_profiler": "2.9", - "phoenix": "5.1.3", + "phoenix": "5.2.0", "hbase_profile": "2.4", "hadoop": "3.3.6", "jmx_exporter": "0.20.0", diff --git a/hbase/Dockerfile b/hbase/Dockerfile index 785e12231..f013efdfd 100644 --- a/hbase/Dockerfile +++ b/hbase/Dockerfile @@ -25,15 +25,13 @@ COPY hbase/licenses /licenses USER stackable WORKDIR /stackable -## copy patches -COPY --chown=stackable:stackable hbase/stackable/patches /stackable/patches - # The release scripts of HBase also run the build twice (three times in fact, once again to build the site which we skip here). # I chose to replicate that exact behavior for consistency so please don't merge the two mvn runs into one unless you really know what you're doing! RUN curl --fail -L "https://repo.stackable.tech/repository/packages/hbase/hbase-${PRODUCT}-src.tar.gz" | tar -xzC . && \ - mv hbase-${PRODUCT} hbase-${PRODUCT}-src && \ - chmod +x patches/apply_patches.sh && \ - patches/apply_patches.sh hbase ${PRODUCT} && \ + mv hbase-${PRODUCT} hbase-${PRODUCT}-src +COPY --chown=stackable:stackable hbase/stackable/patches /stackable/patches +RUN chmod +x patches/apply_patches.sh && \ + patches/apply_patches.sh ${PRODUCT} && \ cd /stackable/hbase-${PRODUCT}-src/ && \ mvn -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} clean install -DskipTests && \ mvn -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} install assembly:single -DskipTests -Dcheckstyle.skip=true -Prelease && \ @@ -50,7 +48,6 @@ RUN ln -s "/stackable/hbase-${PRODUCT}" /stackable/hbase && \ # Build phoenix RUN curl --fail -L "https://repo.stackable.tech/repository/packages/phoenix/phoenix-${PHOENIX}-src.tar.gz" | tar -xzC . && \ mv phoenix-${PHOENIX} phoenix-${PHOENIX}-src && \ - patches/apply_patches.sh phoenix ${PHOENIX} && \ mvn \ -Dhbase.version=${PRODUCT} \ -Dhbase.profile=${HBASE_PROFILE} \ diff --git a/hbase/stackable/patches/hbase/2.4.12/001-HBASE-27292-2.4.12.patch b/hbase/stackable/patches/2.4.12/001-HBASE-27292-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.12/001-HBASE-27292-2.4.12.patch rename to hbase/stackable/patches/2.4.12/001-HBASE-27292-2.4.12.patch diff --git a/hbase/stackable/patches/hbase/2.4.12/002-HBASE-27860-2.4.12.patch b/hbase/stackable/patches/2.4.12/002-HBASE-27860-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.12/002-HBASE-27860-2.4.12.patch rename to hbase/stackable/patches/2.4.12/002-HBASE-27860-2.4.12.patch diff --git a/hbase/stackable/patches/hbase/2.4.12/003-HBASE-25292-2.4.12.patch b/hbase/stackable/patches/2.4.12/003-HBASE-25292-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.12/003-HBASE-25292-2.4.12.patch rename to hbase/stackable/patches/2.4.12/003-HBASE-25292-2.4.12.patch diff --git a/hbase/stackable/patches/hbase/2.4.12/004-HBASE-25336-2.4.12.patch b/hbase/stackable/patches/2.4.12/004-HBASE-25336-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.12/004-HBASE-25336-2.4.12.patch rename to hbase/stackable/patches/2.4.12/004-HBASE-25336-2.4.12.patch diff --git a/hbase/stackable/patches/hbase/2.4.12/005-HBASE-27027-2.4.12.patch b/hbase/stackable/patches/2.4.12/005-HBASE-27027-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.12/005-HBASE-27027-2.4.12.patch rename to hbase/stackable/patches/2.4.12/005-HBASE-27027-2.4.12.patch diff --git a/hbase/stackable/patches/hbase/2.4.12/006-HBASE-28242-2.4.12.patch b/hbase/stackable/patches/2.4.12/006-HBASE-28242-2.4.12.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.12/006-HBASE-28242-2.4.12.patch rename to hbase/stackable/patches/2.4.12/006-HBASE-28242-2.4.12.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/001-HBASE-27860-2.4.17.patch b/hbase/stackable/patches/2.4.17/001-HBASE-27860-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.17/001-HBASE-27860-2.4.17.patch rename to hbase/stackable/patches/2.4.17/001-HBASE-27860-2.4.17.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/002-HBASE-25292-2.4.17.patch b/hbase/stackable/patches/2.4.17/002-HBASE-25292-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.17/002-HBASE-25292-2.4.17.patch rename to hbase/stackable/patches/2.4.17/002-HBASE-25292-2.4.17.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/003-HBASE-25336-2.4.17.patch b/hbase/stackable/patches/2.4.17/003-HBASE-25336-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.17/003-HBASE-25336-2.4.17.patch rename to hbase/stackable/patches/2.4.17/003-HBASE-25336-2.4.17.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/004-HBASE-27103-2.4.17.patch b/hbase/stackable/patches/2.4.17/004-HBASE-27103-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.17/004-HBASE-27103-2.4.17.patch rename to hbase/stackable/patches/2.4.17/004-HBASE-27103-2.4.17.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/005-HBASE-28242-2.4.17.patch b/hbase/stackable/patches/2.4.17/005-HBASE-28242-2.4.17.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.17/005-HBASE-28242-2.4.17.patch rename to hbase/stackable/patches/2.4.17/005-HBASE-28242-2.4.17.patch diff --git a/hbase/stackable/patches/hbase/2.4.17/006-HBASE-jruby-version-bump.patch b/hbase/stackable/patches/2.4.17/006-HBASE-jruby-version-bump.patch similarity index 100% rename from hbase/stackable/patches/hbase/2.4.17/006-HBASE-jruby-version-bump.patch rename to hbase/stackable/patches/2.4.17/006-HBASE-jruby-version-bump.patch diff --git a/hbase/stackable/patches/apply_patches.sh b/hbase/stackable/patches/apply_patches.sh index 38ebf17b7..85b41a730 100644 --- a/hbase/stackable/patches/apply_patches.sh +++ b/hbase/stackable/patches/apply_patches.sh @@ -4,21 +4,14 @@ set -eu set -o pipefail -# Check if $1 (PRODUCT) is provided +# Check if $1 (VERSION) is provided if [ -z "${1-}" ]; then - echo "Please provide a value for PRODUCT as the first argument." - exit 1 -fi - -# Check if $2 (VERSION) is provided -if [ -z "${2-}" ]; then echo "Please provide a value for VERSION as the second argument." exit 1 fi -PRODUCT="$1" -VERSION="$2" -PATCH_DIR="patches/$PRODUCT/$VERSION" +VERSION="$1" +PATCH_DIR="patches/$VERSION" # Check if version-specific patches directory exists if [ ! -d "$PATCH_DIR" ]; then @@ -41,7 +34,7 @@ echo "Found ${#patch_files[@]} patches, applying now" # Iterate through sorted patch files for patch_file in "${patch_files[@]}"; do echo "Applying $patch_file" - git apply --directory "${PRODUCT}-${VERSION}-src" "$patch_file" || { + git apply --directory "hbase-${VERSION}-src" "$patch_file" || { echo "Failed to apply $patch_file" exit 1 } diff --git a/hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch b/hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch deleted file mode 100644 index 777922ef6..000000000 --- a/hbase/stackable/patches/phoenix/5.1.3/001-PHOENIX-omid-deps-version-bump.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/pom.xml 2024-05-14 13:20:33.185420698 +0200 -+++ b/pom.xml 2024-05-15 11:16:29.036294238 +0200 -@@ -1304,7 +1304,7 @@ - - org.apache.omid - omid-transaction-client -- ${omid.version} -+ 1.1.2 - - - org.testng -@@ -1315,7 +1315,7 @@ - - org.apache.omid - omid-commit-table -- ${omid.version} -+ 1.1.2 - - - org.testng -@@ -1326,7 +1326,7 @@ - - org.apache.omid - omid-common -- ${omid.version} -+ 1.1.2 - - - commons-beanutils From 393874e62a8726dbb92b854d3c4373a8b00e25b6 Mon Sep 17 00:00:00 2001 From: xeniape Date: Tue, 21 May 2024 13:44:10 +0200 Subject: [PATCH 4/5] typo fix --- hbase/stackable/patches/apply_patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase/stackable/patches/apply_patches.sh b/hbase/stackable/patches/apply_patches.sh index 85b41a730..09ae9f12c 100644 --- a/hbase/stackable/patches/apply_patches.sh +++ b/hbase/stackable/patches/apply_patches.sh @@ -6,7 +6,7 @@ set -o pipefail # Check if $1 (VERSION) is provided if [ -z "${1-}" ]; then - echo "Please provide a value for VERSION as the second argument." + echo "Please provide a value for VERSION as the first argument." exit 1 fi From 521fd19ab067b461a96ae2e5544e814c7ee2399f Mon Sep 17 00:00:00 2001 From: xeniape Date: Tue, 21 May 2024 17:17:05 +0200 Subject: [PATCH 5/5] remove jruby version bump --- .../patches/2.4.17/006-HBASE-jruby-version-bump.patch | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 hbase/stackable/patches/2.4.17/006-HBASE-jruby-version-bump.patch diff --git a/hbase/stackable/patches/2.4.17/006-HBASE-jruby-version-bump.patch b/hbase/stackable/patches/2.4.17/006-HBASE-jruby-version-bump.patch deleted file mode 100644 index 1a57b8774..000000000 --- a/hbase/stackable/patches/2.4.17/006-HBASE-jruby-version-bump.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pom.xml 2023-03-31 20:03:27.000000000 +0200 -+++ b/pom.xml 2024-05-14 15:52:58.901324926 +0200 -@@ -576,7 +576,7 @@ - 2.1.1 - 2.3.2 - 3.0.1-b08 -- 9.2.13.0 -+ 9.4.7.0 - 4.13.2 - 1.3 - 4.2.0-incubating