From 66be1cf0b285c094b77b3e17beeeabafc9ddfaa2 Mon Sep 17 00:00:00 2001 From: Mark Bean Date: Mon, 21 Nov 2022 18:22:14 +0000 Subject: [PATCH] NIFI-10852 Allow commons-compress to use large OS groupid values This closes #6694 Signed-off-by: David Handermann --- c2/c2-client-bundle/c2-client-service/pom.xml | 2 +- .../client/service/operation/TransferDebugOperationHandler.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/c2/c2-client-bundle/c2-client-service/pom.xml b/c2/c2-client-bundle/c2-client-service/pom.xml index 10e4cd4c20..1e6dba0083 100644 --- a/c2/c2-client-bundle/c2-client-service/pom.xml +++ b/c2/c2-client-bundle/c2-client-service/pom.xml @@ -46,7 +46,7 @@ limitations under the License. org.apache.commons commons-compress - 1.21 + 1.22 \ No newline at end of file diff --git a/c2/c2-client-bundle/c2-client-service/src/main/java/org/apache/nifi/c2/client/service/operation/TransferDebugOperationHandler.java b/c2/c2-client-bundle/c2-client-service/src/main/java/org/apache/nifi/c2/client/service/operation/TransferDebugOperationHandler.java index ef73bbc8d7..f9437b16e3 100644 --- a/c2/c2-client-bundle/c2-client-service/src/main/java/org/apache/nifi/c2/client/service/operation/TransferDebugOperationHandler.java +++ b/c2/c2-client-bundle/c2-client-service/src/main/java/org/apache/nifi/c2/client/service/operation/TransferDebugOperationHandler.java @@ -178,6 +178,7 @@ public class TransferDebugOperationHandler implements C2OperationHandler { try (GzipCompressorOutputStream gzipCompressorOutputStream = new GzipCompressorOutputStream(byteOutputStream); TarArchiveOutputStream tarOutputStream = new TarArchiveOutputStream(gzipCompressorOutputStream)) { for (Path filePath : filePaths) { + tarOutputStream.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX); TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(filePath.toFile(), filePath.getFileName().toString()); tarOutputStream.putArchiveEntry(tarArchiveEntry); copy(filePath, tarOutputStream);