From 4f215daa7d7fcf4cbbed94566cb0bf9da961957a Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 10:49:28 +0100 Subject: [PATCH 1/8] add support for nifi 2.0.0 --- CHANGELOG.md | 3 + nifi/Dockerfile | 96 +++++++------------ .../001-NIFI-no-zip-assembly-2.0.0.patch} | 2 +- ...002-NIFI-no-host-header-check-2.0.0.patch} | 2 +- .../003-patch-cyclonedx-plugin.patch | 4 +- nifi/upload_new_nifi_version.sh | 14 +-- nifi/versions.py | 2 +- 7 files changed, 44 insertions(+), 79 deletions(-) rename nifi/stackable/patches/{2.0.0-M4/001-NIFI-no-zip-assembly-2.0.0-M4.patch => 2.0.0/001-NIFI-no-zip-assembly-2.0.0.patch} (93%) rename nifi/stackable/patches/{2.0.0-M4/002-NIFI-no-host-header-check-2.0.0-M4.patch => 2.0.0/002-NIFI-no-host-header-check-2.0.0.patch} (98%) rename nifi/stackable/patches/{2.0.0-M4 => 2.0.0}/003-patch-cyclonedx-plugin.patch (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93a278f7f..33995bcbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. - spark: Add HBase connector ([#878], [#882]). - hbase: hbase-entrypoint.sh script to start and gracefully stop services ([#898]). - tools: install yq command line tool for YAML manipulation ([#912]). +- nifi: Add version 2.0.0 ([#xxx]). ### Changed @@ -55,6 +56,7 @@ All notable changes to this project will be documented in this file. - zookeeper: Remove `3.8.4` ([#851]). - nifi: Remove `1.21.0` and `1.25.0` ([#868]). - druid: Remove `28.0.1` ([#880]). +- nifi: Remmoved binaries from upload nifi script ([#xxx]). ### Fixed @@ -101,6 +103,7 @@ All notable changes to this project will be documented in this file. [#912]: https://github.com/stackabletech/docker-images/pull/912 [#913]: https://github.com/stackabletech/docker-images/pull/913 [#914]: https://github.com/stackabletech/docker-images/pull/914 +[#xxx]: https://github.com/stackabletech/docker-images/pull/xxx ## [24.7.0] - 2024-07-24 diff --git a/nifi/Dockerfile b/nifi/Dockerfile index 4fd145c65..fb94a9554 100644 --- a/nifi/Dockerfile +++ b/nifi/Dockerfile @@ -19,8 +19,8 @@ RUN microdnf update && \ # WORKDIR /tmp RUN if [[ "${PRODUCT}" == 2.* ]] ; then \ - curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC . && \ - ln -sf /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn ; \ + curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC . && \ + ln -sf /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn ; \ fi USER ${STACKABLE_USER_UID} @@ -28,60 +28,32 @@ WORKDIR /stackable COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/patches /stackable/patches -# NOTE: NiFi 1.21.0 source build does not work with the current arm64 git runners due to java heap issues: -# -# [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.5.0:single (make shared resource) on project nifi-registry-assembly: -# Failed to create assembly: Error creating assembly archive bin: Problem creating zip: Execution exception: Java heap space -# -# Since this will be deprecated in the release 24.7 and then removed we copy the NiFi 1.21.0 binaries instead -# of building from source. The if condition can be removed once 1.21.0 is no longer supported and only the -# else branch is required to build from source. -# -RUN if [[ "${PRODUCT}" == "1.21.0" ]] ; then \ - curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bcrypt/1.0-SNAPSHOT/stackable-bcrypt-1.0-20240508.153334-1-jar-with-dependencies.jar' \ - # This used to be located in /bin/stackable-bcrypt.jar. We create a softlink for /bin/stackable-bcrypt.jar in the main container for backwards compatibility. - -o /stackable/stackable-bcrypt.jar && \ - # zip is different than tar and cannot be just piped, therefore the intermediate save and remove step to unzip - curl https://repo.stackable.tech/repository/packages/nifi/nifi-${PRODUCT}-bin.zip -o /stackable/nifi-${PRODUCT}-bin.zip && \ - unzip /stackable/nifi-${PRODUCT}-bin.zip && \ - rm /stackable/nifi-${PRODUCT}-bin.zip && \ - # Remove generated docs in binary - rm -rf /stackable/nifi-${PRODUCT}/docs && \ - # Add Iceberg extensions as they are not included by default and are important enough - # They need to be build from source, as https://mvnrepository.com/artifact/org.apache.nifi/nifi-iceberg-processors-nar does not ship the org.apache.hadoop.fs.s3a.S3AFileSystem (see https://github.com/apache/nifi/pull/6368#issuecomment-1502175258) - # See https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/README.md for details on how to build them - cd /stackable/nifi-${PRODUCT}/lib/ && \ - curl -O "https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/nifi-iceberg-processors-nar-${PRODUCT}-with-aws.nar" && \ - curl -O "https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/nifi-iceberg-services-nar-${PRODUCT}-with-aws.nar" && \ - curl -O "https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/nifi-iceberg-services-api-nar-${PRODUCT}-with-aws.nar" ; \ - else \ - curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bcrypt/1.0-SNAPSHOT/stackable-bcrypt-1.0-20240508.153334-1-jar-with-dependencies.jar' \ - # This used to be located in /bin/stackable-bcrypt.jar. We create a softlink for /bin/stackable-bcrypt.jar in the main container for backwards compatibility. - -o /stackable/stackable-bcrypt.jar && \ - # Get the source release from nexus - curl "https://repo.stackable.tech/repository/packages/nifi/nifi-${PRODUCT}-source-release.zip" -o "/stackable/nifi-${PRODUCT}-source-release.zip" && \ - unzip "nifi-${PRODUCT}-source-release.zip" && \ - # Clean up downloaded source after unzipping - rm -rf "nifi-${PRODUCT}-source-release.zip" && \ - # The NiFi "binary" ends up in a folder named "nifi-${PRODUCT}" which should be copied to /stackable - # from /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} (see later steps) - # Therefore we add the suffix "-src" to be able to copy the binary and remove the unzipped sources afterwards. - mv nifi-${PRODUCT} nifi-${PRODUCT}-src && \ - # Apply patches - chmod +x patches/apply_patches.sh && \ - patches/apply_patches.sh ${PRODUCT} && \ - # Build NiFi - cd /stackable/nifi-${PRODUCT}-src/ && \ - mvn clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws && \ - # Copy the binaries to the /stackable folder - mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT} && \ - # Copy the SBOM as well - mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json && \ - # Remove the unzipped sources - rm -rf /stackable/nifi-${PRODUCT}-src && \ - # Remove generated docs in binary - rm -rf /stackable/nifi-${PRODUCT}/docs ; \ - fi +RUN curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bcrypt/1.0-SNAPSHOT/stackable-bcrypt-1.0-20240508.153334-1-jar-with-dependencies.jar' \ + # This used to be located in /bin/stackable-bcrypt.jar. We create a softlink for /bin/stackable-bcrypt.jar in the main container for backwards compatibility. + -o /stackable/stackable-bcrypt.jar && \ + # Get the source release from nexus + curl "https://repo.stackable.tech/repository/packages/nifi/nifi-${PRODUCT}-source-release.zip" -o "/stackable/nifi-${PRODUCT}-source-release.zip" && \ + unzip "nifi-${PRODUCT}-source-release.zip" && \ + # Clean up downloaded source after unzipping + rm -rf "nifi-${PRODUCT}-source-release.zip" && \ + # The NiFi "binary" ends up in a folder named "nifi-${PRODUCT}" which should be copied to /stackable + # from /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} (see later steps) + # Therefore we add the suffix "-src" to be able to copy the binary and remove the unzipped sources afterwards. + mv nifi-${PRODUCT} nifi-${PRODUCT}-src && \ + # Apply patches + chmod +x patches/apply_patches.sh && \ + patches/apply_patches.sh ${PRODUCT} && \ + # Build NiFi + cd /stackable/nifi-${PRODUCT}-src/ && \ + mvn clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws && \ + # Copy the binaries to the /stackable folder + mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT} && \ + # Copy the SBOM as well + mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json && \ + # Remove the unzipped sources + rm -rf /stackable/nifi-${PRODUCT}-src && \ + # Remove generated docs in binary + rm -rf /stackable/nifi-${PRODUCT}/docs FROM stackable/image/java-base AS final @@ -90,12 +62,12 @@ ARG RELEASE ARG STACKABLE_USER_UID LABEL name="Apache NiFi" \ - maintainer="info@stackable.tech" \ - vendor="Stackable GmbH" \ - version="${PRODUCT}" \ - release="${RELEASE}" \ - summary="The Stackable image for Apache NiFi." \ - description="This image is deployed by the Stackable Operator for Apache NiFi." + maintainer="info@stackable.tech" \ + vendor="Stackable GmbH" \ + version="${PRODUCT}" \ + release="${RELEASE}" \ + summary="The Stackable image for Apache NiFi." \ + description="This image is deployed by the Stackable Operator for Apache NiFi." COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar diff --git a/nifi/stackable/patches/2.0.0-M4/001-NIFI-no-zip-assembly-2.0.0-M4.patch b/nifi/stackable/patches/2.0.0/001-NIFI-no-zip-assembly-2.0.0.patch similarity index 93% rename from nifi/stackable/patches/2.0.0-M4/001-NIFI-no-zip-assembly-2.0.0-M4.patch rename to nifi/stackable/patches/2.0.0/001-NIFI-no-zip-assembly-2.0.0.patch index 8a71fe868..f3e059e4e 100644 --- a/nifi/stackable/patches/2.0.0-M4/001-NIFI-no-zip-assembly-2.0.0-M4.patch +++ b/nifi/stackable/patches/2.0.0/001-NIFI-no-zip-assembly-2.0.0.patch @@ -1,5 +1,5 @@ diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml -index 83eb8214f9..0764b3716d 100644 +index e980e507c6..cb19c89367 100644 --- a/nifi-assembly/pom.xml +++ b/nifi-assembly/pom.xml @@ -66,7 +66,6 @@ language governing permissions and limitations under the License. --> diff --git a/nifi/stackable/patches/2.0.0-M4/002-NIFI-no-host-header-check-2.0.0-M4.patch b/nifi/stackable/patches/2.0.0/002-NIFI-no-host-header-check-2.0.0.patch similarity index 98% rename from nifi/stackable/patches/2.0.0-M4/002-NIFI-no-host-header-check-2.0.0-M4.patch rename to nifi/stackable/patches/2.0.0/002-NIFI-no-host-header-check-2.0.0.patch index 9d1344c0d..e41ec137c 100644 --- a/nifi/stackable/patches/2.0.0-M4/002-NIFI-no-host-header-check-2.0.0-M4.patch +++ b/nifi/stackable/patches/2.0.0/002-NIFI-no-host-header-check-2.0.0.patch @@ -26,7 +26,7 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java -index 97337d63e2..0f7a272de7 100644 +index 97337d63e2..12ce1d8646 100644 --- a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java +++ b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java @@ -47,6 +47,7 @@ public class HostHeaderHandler extends Handler.Abstract { diff --git a/nifi/stackable/patches/2.0.0-M4/003-patch-cyclonedx-plugin.patch b/nifi/stackable/patches/2.0.0/003-patch-cyclonedx-plugin.patch similarity index 93% rename from nifi/stackable/patches/2.0.0-M4/003-patch-cyclonedx-plugin.patch rename to nifi/stackable/patches/2.0.0/003-patch-cyclonedx-plugin.patch index 6cfd9e15d..244cf94b2 100644 --- a/nifi/stackable/patches/2.0.0-M4/003-patch-cyclonedx-plugin.patch +++ b/nifi/stackable/patches/2.0.0/003-patch-cyclonedx-plugin.patch @@ -1,8 +1,8 @@ diff --git a/pom.xml b/pom.xml -index 6af359c..0be2176 100644 +index 3190206e88..7e754f691d 100644 --- a/pom.xml +++ b/pom.xml -@@ -954,6 +954,24 @@ +@@ -974,6 +974,24 @@ diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh index fa631d4a7..23d986ec3 100755 --- a/nifi/upload_new_nifi_version.sh +++ b/nifi/upload_new_nifi_version.sh @@ -32,7 +32,6 @@ trap cleanup EXIT cd "$WORK_DIR" || exit src_file="nifi-$VERSION-source-release.zip" -bin_file="nifi-$VERSION-bin.zip" download_url="https://archive.apache.org/dist/nifi/${VERSION}" echo "Downloading NiFi source (this can take a while, it is intentionally downloading from a slow mirror that contains all old versions)" @@ -40,14 +39,9 @@ curl --fail -LOs "${download_url}/${src_file}" curl --fail -LOs "${download_url}/${src_file}.asc" curl --fail -LOs "${download_url}/${src_file}.sha512" -echo "Downloading NiFi binary (this can take a while, it is intentionally downloading from a slow mirror that contains all old versions)" -curl --fail -LOs "${download_url}/${bin_file}" -curl --fail -LOs "${download_url}/${bin_file}.asc" -curl --fail -LOs "${download_url}/${bin_file}.sha512" - # It is probably redundant to check both the checksum and the signature but it's cheap and why not echo "Validating SHA512 Checksums" -if ! (sha512sum "$bin_file" | cut -d ' ' -f 1 | diff - "$bin_file.sha512" && sha512sum "$src_file" | cut -d ' ' -f 1 | diff - "$src_file.sha512"); then +if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | tr -d '\n' | diff - "$src_file.sha512"); then echo "ERROR: One of the SHA512 sums does not match" exit 1 fi @@ -55,7 +49,7 @@ fi echo "Validating signatures" echo '--> NOTE: Make sure you have downloaded and added the KEYS file (https://archive.apache.org/dist/nifi/KEYS) to GPG: https://www.apache.org/info/verification.html (e.g. by using "curl https://archive.apache.org/dist/nifi/KEYS | gpg --import")' -if ! (gpg --verify "$bin_file.asc" "$bin_file" 2> /dev/null && gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then +if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then echo "ERROR: One of the signatures could not be verified" exit 1 fi @@ -66,10 +60,6 @@ curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https: curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.asc" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}.sha512" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? -curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${bin_file}" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? -curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${bin_file}.asc" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? -curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${bin_file}.sha512" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? - if [ $EXIT_STATUS -ne 0 ]; then echo "ERROR: Upload failed" exit 1 diff --git a/nifi/versions.py b/nifi/versions.py index df2a23414..1500ef3ed 100644 --- a/nifi/versions.py +++ b/nifi/versions.py @@ -5,7 +5,7 @@ "java-devel": "11", # There is an error when trying to use the jdk 21 (since nifi 1.26.0) }, { - "product": "2.0.0-M4", + "product": "2.0.0", "java-base": "21", "java-devel": "21", }, From 22dbf94cbf7c01d1e5f4f3b0ef5e6c37ea3e626e Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 11:02:29 +0100 Subject: [PATCH 2/8] adapt changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33995bcbf..c0aca80fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ All notable changes to this project will be documented in this file. - spark: Add HBase connector ([#878], [#882]). - hbase: hbase-entrypoint.sh script to start and gracefully stop services ([#898]). - tools: install yq command line tool for YAML manipulation ([#912]). -- nifi: Add version 2.0.0 ([#xxx]). +- nifi: Add version 2.0.0 ([#917]). ### Changed @@ -56,7 +56,7 @@ All notable changes to this project will be documented in this file. - zookeeper: Remove `3.8.4` ([#851]). - nifi: Remove `1.21.0` and `1.25.0` ([#868]). - druid: Remove `28.0.1` ([#880]). -- nifi: Remmoved binaries from upload nifi script ([#xxx]). +- nifi: Remmoved binaries from upload nifi script ([#917]). ### Fixed @@ -103,7 +103,7 @@ All notable changes to this project will be documented in this file. [#912]: https://github.com/stackabletech/docker-images/pull/912 [#913]: https://github.com/stackabletech/docker-images/pull/913 [#914]: https://github.com/stackabletech/docker-images/pull/914 -[#xxx]: https://github.com/stackabletech/docker-images/pull/xxx +[#917]: https://github.com/stackabletech/docker-images/pull/917 ## [24.7.0] - 2024-07-24 From 1ed59d5f4931406f23fcfd4c09216cd014356d6f Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 14:24:37 +0100 Subject: [PATCH 3/8] improve upload --- nifi/upload_new_nifi_version.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh index 23d986ec3..02c963aee 100755 --- a/nifi/upload_new_nifi_version.sh +++ b/nifi/upload_new_nifi_version.sh @@ -41,7 +41,11 @@ curl --fail -LOs "${download_url}/${src_file}.sha512" # It is probably redundant to check both the checksum and the signature but it's cheap and why not echo "Validating SHA512 Checksums" -if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | tr -d '\n' | diff - "$src_file.sha512"); then +# The '<(echo -e $(<${src_file}.sha512))' part removes possible new lines in the provided .sha512 file. +# This is due to the NiFi sha512 files sometimes ending on newline and sometimes dont. +# See https://archive.apache.org/dist/nifi/2.0.0/nifi-2.0.0-source-release.zip.sha512 vs +# https://archive.apache.org/dist/nifi/1.27.0/nifi-1.27.0-source-release.zip.sha512 +if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | diff - <(echo -e $(<${src_file}.sha512))); then echo "ERROR: One of the SHA512 sums does not match" exit 1 fi @@ -54,6 +58,8 @@ if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then exit 1 fi +exit 0 + echo "Uploading everything to Nexus" EXIT_STATUS=0 curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? From c78a4c7fc5240475021848ac28bb25420e51a0ea Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 16:20:11 +0100 Subject: [PATCH 4/8] remove test artefact --- nifi/upload_new_nifi_version.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh index 02c963aee..6cfcc7c8d 100755 --- a/nifi/upload_new_nifi_version.sh +++ b/nifi/upload_new_nifi_version.sh @@ -58,8 +58,6 @@ if ! (gpg --verify "$src_file.asc" "$src_file" 2> /dev/null); then exit 1 fi -exit 0 - echo "Uploading everything to Nexus" EXIT_STATUS=0 curl --fail -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "${src_file}" 'https://repo.stackable.tech/repository/packages/nifi/' || EXIT_STATUS=$? From 5786c6556fc8b37d676624c9ce6da9cd9aeeda3f Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 16:58:22 +0100 Subject: [PATCH 5/8] attempt to fix precommit --- nifi/upload_new_nifi_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh index 6cfcc7c8d..213e31ff3 100755 --- a/nifi/upload_new_nifi_version.sh +++ b/nifi/upload_new_nifi_version.sh @@ -45,7 +45,7 @@ echo "Validating SHA512 Checksums" # This is due to the NiFi sha512 files sometimes ending on newline and sometimes dont. # See https://archive.apache.org/dist/nifi/2.0.0/nifi-2.0.0-source-release.zip.sha512 vs # https://archive.apache.org/dist/nifi/1.27.0/nifi-1.27.0-source-release.zip.sha512 -if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | diff - <(echo -e $(<${src_file}.sha512))); then +if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | diff - <(echo -e "$(<${src_file}.sha512)")); then echo "ERROR: One of the SHA512 sums does not match" exit 1 fi From 69212e3fd807c91a82fa4170f436194ce0c28088 Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 17:05:25 +0100 Subject: [PATCH 6/8] attempt fix 2 --- nifi/upload_new_nifi_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh index 213e31ff3..3fe5051ce 100755 --- a/nifi/upload_new_nifi_version.sh +++ b/nifi/upload_new_nifi_version.sh @@ -45,7 +45,7 @@ echo "Validating SHA512 Checksums" # This is due to the NiFi sha512 files sometimes ending on newline and sometimes dont. # See https://archive.apache.org/dist/nifi/2.0.0/nifi-2.0.0-source-release.zip.sha512 vs # https://archive.apache.org/dist/nifi/1.27.0/nifi-1.27.0-source-release.zip.sha512 -if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | diff - <(echo -e "$(<${src_file}.sha512)")); then +if ! (sha512sum "$src_file" | cut -d ' ' -f 1 | diff - <(echo -e "$(<"${src_file}".sha512)")); then echo "ERROR: One of the SHA512 sums does not match" exit 1 fi From d95e2bca498b1c15bbf5285047259feb2e0077d6 Mon Sep 17 00:00:00 2001 From: maltesander Date: Wed, 6 Nov 2024 17:14:00 +0100 Subject: [PATCH 7/8] adapt comment --- nifi/upload_new_nifi_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi/upload_new_nifi_version.sh b/nifi/upload_new_nifi_version.sh index 3fe5051ce..1b053253e 100755 --- a/nifi/upload_new_nifi_version.sh +++ b/nifi/upload_new_nifi_version.sh @@ -41,7 +41,7 @@ curl --fail -LOs "${download_url}/${src_file}.sha512" # It is probably redundant to check both the checksum and the signature but it's cheap and why not echo "Validating SHA512 Checksums" -# The '<(echo -e $(<${src_file}.sha512))' part removes possible new lines in the provided .sha512 file. +# The 'echo -e "$(<"${src_file}".sha512)")' part removes possible new lines in the provided .sha512 file. # This is due to the NiFi sha512 files sometimes ending on newline and sometimes dont. # See https://archive.apache.org/dist/nifi/2.0.0/nifi-2.0.0-source-release.zip.sha512 vs # https://archive.apache.org/dist/nifi/1.27.0/nifi-1.27.0-source-release.zip.sha512 From 42de492b4ac6c14a304a57ccbcd77e644ce00d2b Mon Sep 17 00:00:00 2001 From: maltesander Date: Thu, 7 Nov 2024 10:12:40 +0100 Subject: [PATCH 8/8] fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0aca80fe..330671916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,7 +56,7 @@ All notable changes to this project will be documented in this file. - zookeeper: Remove `3.8.4` ([#851]). - nifi: Remove `1.21.0` and `1.25.0` ([#868]). - druid: Remove `28.0.1` ([#880]). -- nifi: Remmoved binaries from upload nifi script ([#917]). +- nifi: Removed binaries from upload nifi script ([#917]). ### Fixed