From 59d7c20f3c50b24221c4327c47bf6709e980dff7 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 17 Aug 2023 15:08:47 -0700 Subject: [PATCH] The patch for the zlib is not needed after 1.2.13 version --- installers/linux/alpine/tar/build.gradle | 17 +- .../linux/alpine/tar/patches/zlib.patch | 149 ------------------ installers/linux/universal/tar/build.gradle | 17 +- .../linux/universal/tar/patches/zlib.patch | 149 ------------------ 4 files changed, 2 insertions(+), 330 deletions(-) delete mode 100644 installers/linux/alpine/tar/patches/zlib.patch delete mode 100644 installers/linux/universal/tar/patches/zlib.patch diff --git a/installers/linux/alpine/tar/build.gradle b/installers/linux/alpine/tar/build.gradle index 882816349d7..4cfddc9aca0 100644 --- a/installers/linux/alpine/tar/build.gradle +++ b/installers/linux/alpine/tar/build.gradle @@ -65,25 +65,10 @@ task copySource(type: Exec) { "${project.rootDir}/", buildRoot } -/** - * Scan the patches folder for any .patch that needs - * to be applied before start building. - */ -task applyPatches() { - dependsOn copySource - doLast { - fileTree('patches').matching { - include '*.patch' - }.each { f -> - ant.patch(patchfile: f, dir: "$buildRoot", strip: 0) - } - } -} - task configureBuild(type: Exec) { dependsOn project.configurations.compile - dependsOn applyPatches + dependsOn copySource workingDir "$buildRoot" // Platform specific flags diff --git a/installers/linux/alpine/tar/patches/zlib.patch b/installers/linux/alpine/tar/patches/zlib.patch deleted file mode 100644 index 98136dab4dd..00000000000 --- a/installers/linux/alpine/tar/patches/zlib.patch +++ /dev/null @@ -1,149 +0,0 @@ -This patch is applied to disable implicit-fallthrough warnings on gcc7 or -higher when building the bundled version of zlib. - -diff --git src/java.base/share/native/libzip/zlib/infback.c src/java.base/share/native/libzip/zlib/infback.c -index 4c8283909..1a9cc6b60 100644 ---- src/java.base/share/native/libzip/zlib/infback.c -+++ src/java.base/share/native/libzip/zlib/infback.c -@@ -501,7 +501,7 @@ void FAR *out_desc; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN; -- -+ /* FALLTHROUGH */ - case LEN: - /* use inflate_fast() if we have enough input and output */ - if (have >= 6 && left >= 258) { -diff --git src/java.base/share/native/libzip/zlib/inflate.c src/java.base/share/native/libzip/zlib/inflate.c -index ca904e744..4abfe84a5 100644 ---- src/java.base/share/native/libzip/zlib/inflate.c -+++ src/java.base/share/native/libzip/zlib/inflate.c -@@ -764,6 +764,7 @@ int flush; - CRC2(state->check, hold); - INITBITS(); - state->mode = EXLEN; -+ /* FALLTHROUGH */ - case EXLEN: - if (state->flags & 0x0400) { - NEEDBITS(16); -@@ -777,6 +778,7 @@ int flush; - else if (state->head != Z_NULL) - state->head->extra = Z_NULL; - state->mode = EXTRA; -+ /* FALLTHROUGH */ - case EXTRA: - if (state->flags & 0x0400) { - copy = state->length; -@@ -799,6 +801,7 @@ int flush; - } - state->length = 0; - state->mode = NAME; -+ /* FALLTHROUGH */ - case NAME: - if (state->flags & 0x0800) { - if (have == 0) goto inf_leave; -@@ -820,6 +823,7 @@ int flush; - state->head->name = Z_NULL; - state->length = 0; - state->mode = COMMENT; -+ /* FALLTHROUGH */ - case COMMENT: - if (state->flags & 0x1000) { - if (have == 0) goto inf_leave; -@@ -840,6 +844,7 @@ int flush; - else if (state->head != Z_NULL) - state->head->comment = Z_NULL; - state->mode = HCRC; -+ /* FALLTHROUGH */ - case HCRC: - if (state->flags & 0x0200) { - NEEDBITS(16); -@@ -863,6 +868,7 @@ int flush; - strm->adler = state->check = ZSWAP32(hold); - INITBITS(); - state->mode = DICT; -+ /* FALLTHROUGH */ - case DICT: - if (state->havedict == 0) { - RESTORE(); -@@ -870,8 +876,10 @@ int flush; - } - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = TYPE; -+ /* FALLTHROUGH */ - case TYPE: - if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; -+ /* FALLTHROUGH */ - case TYPEDO: - if (state->last) { - BYTEBITS(); -@@ -922,8 +930,10 @@ int flush; - INITBITS(); - state->mode = COPY_; - if (flush == Z_TREES) goto inf_leave; -+ /* FALLTHROUGH */ - case COPY_: - state->mode = COPY; -+ /* FALLTHROUGH */ - case COPY: - copy = state->length; - if (copy) { -@@ -1063,8 +1073,10 @@ int flush; - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN_; - if (flush == Z_TREES) goto inf_leave; -+ /* FALLTHROUGH */ - case LEN_: - state->mode = LEN; -+ /* FALLTHROUGH */ - case LEN: - if (have >= 6 && left >= 258) { - RESTORE(); -@@ -1114,6 +1126,7 @@ int flush; - } - state->extra = (unsigned)(here.op) & 15; - state->mode = LENEXT; -+ /* FALLTHROUGH */ - case LENEXT: - if (state->extra) { - NEEDBITS(state->extra); -@@ -1124,6 +1137,7 @@ int flush; - Tracevv((stderr, "inflate: length %u\n", state->length)); - state->was = state->length; - state->mode = DIST; -+ /* FALLTHROUGH */ - case DIST: - for (;;) { - here = state->distcode[BITS(state->distbits)]; -@@ -1151,6 +1165,7 @@ int flush; - state->offset = (unsigned)here.val; - state->extra = (unsigned)(here.op) & 15; - state->mode = DISTEXT; -+ /* FALLTHROUGH */ - case DISTEXT: - if (state->extra) { - NEEDBITS(state->extra); -@@ -1167,6 +1182,7 @@ int flush; - #endif - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - state->mode = MATCH; -+ /* FALLTHROUGH */ - case MATCH: - if (left == 0) goto inf_leave; - copy = out - left; -@@ -1242,6 +1258,7 @@ int flush; - } - #ifdef GUNZIP - state->mode = LENGTH; -+ /* FALLTHROUGH */ - case LENGTH: - if (state->wrap && state->flags) { - NEEDBITS(32); -@@ -1255,6 +1272,7 @@ int flush; - } - #endif - state->mode = DONE; -+ /* FALLTHROUGH */ - case DONE: - ret = Z_STREAM_END; - goto inf_leave; diff --git a/installers/linux/universal/tar/build.gradle b/installers/linux/universal/tar/build.gradle index ae7c549f3dd..adeb1360732 100644 --- a/installers/linux/universal/tar/build.gradle +++ b/installers/linux/universal/tar/build.gradle @@ -54,24 +54,9 @@ task copySource(type: Exec) { "${project.rootDir}/", buildRoot } -/** - * Scan the patches folder for any .patch that needs - * to be applied before start building. - */ -task applyPatches() { - dependsOn copySource - doLast { - fileTree('patches').matching { - include '*.patch' - }.each { f -> - ant.patch(patchfile: f, dir: "$buildRoot", strip: 0) - } - } -} - task configureBuild(type: Exec) { dependsOn project.configurations.compile - dependsOn applyPatches + dependsOn copySource workingDir "$buildRoot" // Platform specific flags diff --git a/installers/linux/universal/tar/patches/zlib.patch b/installers/linux/universal/tar/patches/zlib.patch deleted file mode 100644 index 98136dab4dd..00000000000 --- a/installers/linux/universal/tar/patches/zlib.patch +++ /dev/null @@ -1,149 +0,0 @@ -This patch is applied to disable implicit-fallthrough warnings on gcc7 or -higher when building the bundled version of zlib. - -diff --git src/java.base/share/native/libzip/zlib/infback.c src/java.base/share/native/libzip/zlib/infback.c -index 4c8283909..1a9cc6b60 100644 ---- src/java.base/share/native/libzip/zlib/infback.c -+++ src/java.base/share/native/libzip/zlib/infback.c -@@ -501,7 +501,7 @@ void FAR *out_desc; - } - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN; -- -+ /* FALLTHROUGH */ - case LEN: - /* use inflate_fast() if we have enough input and output */ - if (have >= 6 && left >= 258) { -diff --git src/java.base/share/native/libzip/zlib/inflate.c src/java.base/share/native/libzip/zlib/inflate.c -index ca904e744..4abfe84a5 100644 ---- src/java.base/share/native/libzip/zlib/inflate.c -+++ src/java.base/share/native/libzip/zlib/inflate.c -@@ -764,6 +764,7 @@ int flush; - CRC2(state->check, hold); - INITBITS(); - state->mode = EXLEN; -+ /* FALLTHROUGH */ - case EXLEN: - if (state->flags & 0x0400) { - NEEDBITS(16); -@@ -777,6 +778,7 @@ int flush; - else if (state->head != Z_NULL) - state->head->extra = Z_NULL; - state->mode = EXTRA; -+ /* FALLTHROUGH */ - case EXTRA: - if (state->flags & 0x0400) { - copy = state->length; -@@ -799,6 +801,7 @@ int flush; - } - state->length = 0; - state->mode = NAME; -+ /* FALLTHROUGH */ - case NAME: - if (state->flags & 0x0800) { - if (have == 0) goto inf_leave; -@@ -820,6 +823,7 @@ int flush; - state->head->name = Z_NULL; - state->length = 0; - state->mode = COMMENT; -+ /* FALLTHROUGH */ - case COMMENT: - if (state->flags & 0x1000) { - if (have == 0) goto inf_leave; -@@ -840,6 +844,7 @@ int flush; - else if (state->head != Z_NULL) - state->head->comment = Z_NULL; - state->mode = HCRC; -+ /* FALLTHROUGH */ - case HCRC: - if (state->flags & 0x0200) { - NEEDBITS(16); -@@ -863,6 +868,7 @@ int flush; - strm->adler = state->check = ZSWAP32(hold); - INITBITS(); - state->mode = DICT; -+ /* FALLTHROUGH */ - case DICT: - if (state->havedict == 0) { - RESTORE(); -@@ -870,8 +876,10 @@ int flush; - } - strm->adler = state->check = adler32(0L, Z_NULL, 0); - state->mode = TYPE; -+ /* FALLTHROUGH */ - case TYPE: - if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; -+ /* FALLTHROUGH */ - case TYPEDO: - if (state->last) { - BYTEBITS(); -@@ -922,8 +930,10 @@ int flush; - INITBITS(); - state->mode = COPY_; - if (flush == Z_TREES) goto inf_leave; -+ /* FALLTHROUGH */ - case COPY_: - state->mode = COPY; -+ /* FALLTHROUGH */ - case COPY: - copy = state->length; - if (copy) { -@@ -1063,8 +1073,10 @@ int flush; - Tracev((stderr, "inflate: codes ok\n")); - state->mode = LEN_; - if (flush == Z_TREES) goto inf_leave; -+ /* FALLTHROUGH */ - case LEN_: - state->mode = LEN; -+ /* FALLTHROUGH */ - case LEN: - if (have >= 6 && left >= 258) { - RESTORE(); -@@ -1114,6 +1126,7 @@ int flush; - } - state->extra = (unsigned)(here.op) & 15; - state->mode = LENEXT; -+ /* FALLTHROUGH */ - case LENEXT: - if (state->extra) { - NEEDBITS(state->extra); -@@ -1124,6 +1137,7 @@ int flush; - Tracevv((stderr, "inflate: length %u\n", state->length)); - state->was = state->length; - state->mode = DIST; -+ /* FALLTHROUGH */ - case DIST: - for (;;) { - here = state->distcode[BITS(state->distbits)]; -@@ -1151,6 +1165,7 @@ int flush; - state->offset = (unsigned)here.val; - state->extra = (unsigned)(here.op) & 15; - state->mode = DISTEXT; -+ /* FALLTHROUGH */ - case DISTEXT: - if (state->extra) { - NEEDBITS(state->extra); -@@ -1167,6 +1182,7 @@ int flush; - #endif - Tracevv((stderr, "inflate: distance %u\n", state->offset)); - state->mode = MATCH; -+ /* FALLTHROUGH */ - case MATCH: - if (left == 0) goto inf_leave; - copy = out - left; -@@ -1242,6 +1258,7 @@ int flush; - } - #ifdef GUNZIP - state->mode = LENGTH; -+ /* FALLTHROUGH */ - case LENGTH: - if (state->wrap && state->flags) { - NEEDBITS(32); -@@ -1255,6 +1272,7 @@ int flush; - } - #endif - state->mode = DONE; -+ /* FALLTHROUGH */ - case DONE: - ret = Z_STREAM_END; - goto inf_leave;