From 12c453c5579b66d8d9d1af40681cdd51f91636ad Mon Sep 17 00:00:00 2001 From: Amit Srivastava Date: Thu, 18 Oct 2018 19:20:39 +0530 Subject: [PATCH 1/4] ZCS-6173: To build aspell for ubuntu 18 have to updated the version. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853320 Bug refference http://aspell.net/aspell-0.60.7-rc1.txt detail having the bug fix information. --- thirdparty/aspell/Makefile | 2 +- versions.def | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/aspell/Makefile b/thirdparty/aspell/Makefile index 9170ee6d1..43f7154d2 100644 --- a/thirdparty/aspell/Makefile +++ b/thirdparty/aspell/Makefile @@ -6,7 +6,7 @@ pvers := $(ASPELL_VERSION) pname := aspell pfile := $(pname)-$(pvers).tar.gz psrc_file := $(SRC_DIR)/$(pfile) -purl := ftp://ftp.gnu.org/gnu/aspell/$(pfile) +purl := ftp://alpha.gnu.org/gnu/aspell/$(pfile) zname := zimbra-$(pname) zspec := $(pname).spec diff --git a/versions.def b/versions.def index 8a14466eb..6e9ea5711 100644 --- a/versions.def +++ b/versions.def @@ -6,7 +6,7 @@ APR_VERSION := 1.5.2 APR_UTIL_VERSION := 1.5.4 -ASPELL_VERSION := 0.60.6.1 +ASPELL_VERSION := 0.60.7-rc1 ASPELL-AR_VERSION := 1.2-0 ASPELL-AR_NORM := 1.2.0 ASPELL-DA_VERSION := 1.4.42-1 From 47af86e2db6aba2bab9fe26e8c42ade6761b5797 Mon Sep 17 00:00:00 2001 From: Prashant Surana Date: Mon, 12 Nov 2018 09:27:25 +0000 Subject: [PATCH 2/4] ZCS-6172: Building zimbra-openjdk from openjdk 11 tag 28 All the changes made was for the Ubuntu 18 specifically. Ref: http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html https://packages.debian.org/source/sid/openjdk-11 https://bugs.openjdk.java.net/browse/JDK-8205201 JDK-8144695 JDK-821204 --- thirdparty/openjdk/Makefile | 19 +- thirdparty/openjdk/UBUNTU.def | 24 ++ .../openjdk/patches/fix-JDK-8144695.patch | 11 + .../openjdk/patches/fix-JDK-8212041.patch | 228 ++++++++++++++++++ thirdparty/openjdk/patches/series | 2 + .../openjdk/zimbra-openjdk/debian/control | 12 +- .../zimbra-openjdk/debian/patches/series | 2 + .../openjdk/zimbra-openjdk/debian/rules | 9 +- versions.def | 10 +- 9 files changed, 286 insertions(+), 31 deletions(-) create mode 100644 thirdparty/openjdk/patches/fix-JDK-8144695.patch create mode 100644 thirdparty/openjdk/patches/fix-JDK-8212041.patch create mode 100644 thirdparty/openjdk/patches/series create mode 100644 thirdparty/openjdk/zimbra-openjdk/debian/patches/series diff --git a/thirdparty/openjdk/Makefile b/thirdparty/openjdk/Makefile index 5a5250864..5c5c0010f 100644 --- a/thirdparty/openjdk/Makefile +++ b/thirdparty/openjdk/Makefile @@ -25,23 +25,9 @@ all: clean getsrc build pkgrm1 getsrc: export HGFOREST_REDIRECT=getsource.out getsrc: mkdir -p $(SRC_DIR) - (echo "Obtaining source for openjdk. This may take some time." && \ + (echo "Copying the already created tar to src dir." && \ cd $(SRC_DIR) && \ - mkdir tmp && \ - cd tmp && \ - hg clone -r $(JDK_TAG) http://hg.openjdk.java.net/jdk8u/jdk$(JDK_SUB_TREE) && \ - cd jdk$(JDK_SUB_TREE) && chmod a+rx get_source.sh && \ - chmod a+rx configure && \ - patch -p1 < $(PKG_ROOT)/patches/fix-source.patch && \ - echo "Obtaining source for sub modules. This make take a very long time." && \ - ./get_source.sh -r $(JDK_TAG) || true && \ - cd .. && \ - mv jdk$(JDK_SUB_TREE) $(pname)-$(pvers) && \ - ( cd $(pname)-$(pvers) && find . -name ".hg*" | xargs rm -rf ) && \ - tar cfz $(pfile) $(pname)-$(pvers) && \ - mv $(pfile) .. && \ - cd .. && \ - rm -rf tmp \ + cp -vf $(PKG_ROOT)/$(pfile) . \ ) pkgadd: @@ -75,6 +61,7 @@ build_deb: perl -pi -e 's/DEB_BUILD_OPTIONS=nocheck/DEB_BUILD_OPTIONS=nocheck $(UB_REPLACE)/' debian/rules && \ $(replace-pathinfo) debian/rules && \ $(CP) $(psrc_file) ../$(z_tgz) && \ + $(CP) $(PKG_ROOT)/patches/*.patch debian/patches/ && \ $(TAR) xfz ../$(z_tgz) --strip-components=1 && \ $(PKG_BUILD) diff --git a/thirdparty/openjdk/UBUNTU.def b/thirdparty/openjdk/UBUNTU.def index 3e08ad46a..39ec59e46 100644 --- a/thirdparty/openjdk/UBUNTU.def +++ b/thirdparty/openjdk/UBUNTU.def @@ -3,11 +3,35 @@ openjdk.UBUNTU := libx11-dev x11proto-xext-dev libxext-dev \ x11proto-fixes-dev x11proto-record-dev libxtst-dev libxt-dev \ openjdk-7-jdk libcups2-dev libfreetype6-dev libasound2-dev \ ccache +openjdk.UBUNTU18_64 := openjdk-11-jdk at-spi2-core ca-certificates-java \ + libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni \ + libatspi2.0-0 libfontenc1 libgtk-3-0 libgtk-3-bin libice-dev \ + libice6 libpthread-stubs0-dev libsm-dev libsm6 libx11-dev \ + libx11-doc libxau-dev libxaw7 libxcb1-dev libxdmcp-dev libxmu6 \ + libxmuu1 libxpm4 libxt-dev libxt6 libxv1 libxxf86dga1 \ + openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless \ + x11-utils x11proto-core-dev x11proto-dev xorg-sgml-doctools \ + xtrans-dev libxext-dev libxrender-dev libxtst-dev libxaw7-dev \ + libxinerama-dev libgtk-3-dev libfontconfig1-dev xvfb xauth \ + xfonts-base twm x11-xkb-utils graphviz libcups2-dev \ + libfreetype6-dev libasound2-dev ccache jtreg ant ant-optional openjdk.UBUNTU16_64 := $(openjdk.UBUNTU) openjdk.UBUNTU14_64 := $(openjdk.UBUNTU) openjdk.UBUNTU12_64 := $(openjdk.UBUNTU) openjdk-purge.UBUNTU := libxt-dev libxtst-dev libxrender-dev libxext-dev libx11-dev \ libcups2-dev libfreetype6-dev libasound2-dev openjdk-7-jdk ccache +openjdk-purge.UBUNTU18_64 := openjdk-11-jdk at-spi2-core ca-certificates-java \ + libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni \ + libatspi2.0-0 libfontenc1 libgtk-3-0 libgtk-3-bin libice-dev \ + libice6 libpthread-stubs0-dev libsm-dev libsm6 libx11-dev \ + libx11-doc libxau-dev libxaw7 libxcb1-dev libxdmcp-dev libxmu6 \ + libxmuu1 libxpm4 libxt-dev libxt6 libxv1 libxxf86dga1 \ + openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless \ + x11-utils x11proto-core-dev x11proto-dev xorg-sgml-doctools \ + xtrans-dev libxext-dev libxrender-dev libxtst-dev libxaw7-dev \ + libxinerama-dev libgtk-3-dev libfontconfig1-dev xvfb xauth \ + xfonts-base twm x11-xkb-utils graphviz libcups2-dev \ + libfreetype6-dev libasound2-dev ccache jtreg ant ant-optional openjdk-purge.UBUNTU16_64 := $(openjdk-purge.UBUNTU) libsctp1 openjdk-7-jre-headless \ x11proto-fixes-dev x11proto-record-dev x11proto-render-dev x11proto-xext-dev \ x11proto-core-dev x11proto-input-dev xorg-sgml-doctools at-spi2-core \ diff --git a/thirdparty/openjdk/patches/fix-JDK-8144695.patch b/thirdparty/openjdk/patches/fix-JDK-8144695.patch new file mode 100644 index 000000000..e2fcffc48 --- /dev/null +++ b/thirdparty/openjdk/patches/fix-JDK-8144695.patch @@ -0,0 +1,11 @@ +--- a/src/hotspot/make/linux/makefiles/gcc.make ++++ b/src/hotspot/make/linux/makefiles/gcc.make +@@ -203,7 +203,7 @@ else + endif + + # Compiler warnings are treated as errors +-WARNINGS_ARE_ERRORS ?= -Werror -Wno-error=format ++WARNINGS_ARE_ERRORS ?= + + ifeq ($(USE_CLANG), true) + # However we need to clean the code up before we can unrestrictedly enable this option with Clang diff --git a/thirdparty/openjdk/patches/fix-JDK-8212041.patch b/thirdparty/openjdk/patches/fix-JDK-8212041.patch new file mode 100644 index 000000000..73c398c9d --- /dev/null +++ b/thirdparty/openjdk/patches/fix-JDK-8212041.patch @@ -0,0 +1,228 @@ +--- a/src/hotspot/os/linux/os_linux.cpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/os/linux/os_linux.cpp Tue Jul 17 15:59:47 2018 -0400 +@@ -5375,8 +5375,7 @@ + + // Scan the directory + bool result = true; +- char buf[sizeof(struct dirent) + MAX_PATH]; +- while (result && (ptr = ::readdir(dir)) != NULL) { ++ while (result && (ptr = readdir(dir)) != NULL) { + if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) { + result = false; + } +--- a/src/hotspot/os/linux/os_linux.inline.hpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/os/linux/os_linux.inline.hpp Tue Jul 17 15:59:47 2018 -0400 +@@ -69,17 +69,6 @@ + + inline const int os::default_file_open_flags() { return 0;} + +-inline DIR* os::opendir(const char* dirname) +-{ +- assert(dirname != NULL, "just checking"); +- return ::opendir(dirname); +-} +- +-inline int os::readdir_buf_size(const char *path) +-{ +- return NAME_MAX + sizeof(dirent) + 1; +-} +- + inline jlong os::lseek(int fd, jlong offset, int whence) { + return (jlong) ::lseek64(fd, offset, whence); + } +@@ -92,17 +81,6 @@ + return ::ftruncate64(fd, length); + } + +-inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) +-{ +- assert(dirp != NULL, "just checking"); +- return ::readdir(dirp); +-} +- +-inline int os::closedir(DIR *dirp) { +- assert(dirp != NULL, "argument is NULL"); +- return ::closedir(dirp); +-} +- + // macros for restartable system calls + + #define RESTARTABLE(_cmd, _result) do { \ +--- a/src/hotspot/os/linux/os_perf_linux.cpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/os/linux/os_perf_linux.cpp Tue Jul 17 15:59:47 2018 -0400 +@@ -895,21 +895,14 @@ + } + + int SystemProcessInterface::SystemProcesses::ProcessIterator::next_process() { +- struct dirent* entry; +- + if (!is_valid()) { + return OS_ERR; + } + + do { +- entry = os::readdir(_dir, _entry); +- if (entry == NULL) { +- // error +- _valid = false; +- return OS_ERR; +- } ++ _entry = os::readdir(_dir); + if (_entry == NULL) { +- // reached end ++ // Error or reached end. Could use errno to distinguish those cases. + _valid = false; + return OS_ERR; + } +@@ -926,11 +919,8 @@ + } + + bool SystemProcessInterface::SystemProcesses::ProcessIterator::initialize() { +- _dir = opendir("/proc"); +- _entry = (struct dirent*)NEW_C_HEAP_ARRAY(char, sizeof(struct dirent) + NAME_MAX + 1, mtInternal); +- if (NULL == _entry) { +- return false; +- } ++ _dir = os::opendir("/proc"); ++ _entry = NULL; + _valid = true; + next_process(); + +@@ -938,11 +928,8 @@ + } + + SystemProcessInterface::SystemProcesses::ProcessIterator::~ProcessIterator() { +- if (_entry != NULL) { +- FREE_C_HEAP_ARRAY(char, _entry); +- } + if (_dir != NULL) { +- closedir(_dir); ++ os::closedir(_dir); + } + } + +--- a/src/hotspot/os/linux/perfMemory_linux.cpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/os/linux/perfMemory_linux.cpp Tue Jul 17 15:59:47 2018 -0400 +@@ -561,9 +561,8 @@ + // to determine the user name for the process id. + // + struct dirent* dentry; +- char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname), mtInternal); + errno = 0; +- while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { ++ while ((dentry = os::readdir(tmpdirp)) != NULL) { + + // check if the directory entry is a hsperfdata file + if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { +@@ -597,9 +596,8 @@ + } + + struct dirent* udentry; +- char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name), mtInternal); + errno = 0; +- while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { ++ while ((udentry = os::readdir(subdirp)) != NULL) { + + if (filename_to_pid(udentry->d_name) == searchpid) { + struct stat statbuf; +@@ -643,11 +641,9 @@ + } + } + os::closedir(subdirp); +- FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); + } + os::closedir(tmpdirp); +- FREE_C_HEAP_ARRAY(char, tdbuf); + + return(oldest_user); + } +@@ -769,10 +765,8 @@ + // opendir/readdir. + // + struct dirent* entry; +- char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname), mtInternal); +- + errno = 0; +- while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { ++ while ((entry = os::readdir(dirp)) != NULL) { + + pid_t pid = filename_to_pid(entry->d_name); + +@@ -809,8 +803,6 @@ + + // close the directory and reset the current working directory + close_directory_secure_cwd(dirp, saved_cwd_fd); +- +- FREE_C_HEAP_ARRAY(char, dbuf); + } + + // make the user specific temporary directory. Returns true if + +--- a/src/hotspot/os/posix/os_posix.cpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/os/posix/os_posix.cpp Tue Jul 17 15:59:47 2018 -0400 +@@ -35,6 +35,7 @@ + #include "utilities/macros.hpp" + #include "utilities/vmError.hpp" + ++#include + #include + #include + #include +@@ -527,6 +528,21 @@ + ::funlockfile(fp); + } + ++DIR* os::opendir(const char* dirname) { ++ assert(dirname != NULL, "just checking"); ++ return ::opendir(dirname); ++} ++ ++struct dirent* os::readdir(DIR* dirp) { ++ assert(dirp != NULL, "just checking"); ++ return ::readdir(dirp); ++} ++ ++int os::closedir(DIR *dirp) { ++ assert(dirp != NULL, "just checking"); ++ return ::closedir(dirp); ++} ++ + // Builds a platform dependent Agent_OnLoad_ function name + // which is used to find statically linked in agents. + // Parameters: + +--- a/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp Tue Jul 17 15:59:47 2018 -0400 +@@ -241,11 +241,7 @@ + return; + } + struct dirent* dentry; +- char* dir_buffer = NEW_RESOURCE_ARRAY_RETURN_NULL(char, os::readdir_buf_size(_repo)); +- if (dir_buffer == NULL) { +- return; +- } +- while ((dentry = os::readdir(dirp, (struct dirent*)dir_buffer)) != NULL) { ++ while ((dentry = os::readdir(dirp)) != NULL) { + const char* const entry_path = filter(dentry->d_name); + if (NULL != entry_path) { + _files->append(entry_path); +--- a/src/hotspot/share/runtime/os.hpp Tue Jul 17 12:03:10 2018 -0700 ++++ b/src/hotspot/share/runtime/os.hpp Tue Jul 17 15:59:47 2018 -0400 +@@ -580,8 +580,7 @@ + + // Reading directories. + static DIR* opendir(const char* dirname); +- static int readdir_buf_size(const char *path); +- static struct dirent* readdir(DIR* dirp, dirent* dbuf); ++ static struct dirent* readdir(DIR* dirp); + static int closedir(DIR* dirp); + + // Dynamic library extension +--- a/test/jdk/ProblemList.txt Tue Jul 17 12:03:10 2018 -0700 ++++ b/test/jdk/ProblemList.txt Tue Jul 17 15:59:47 2018 -0400 +@@ -873,4 +873,3 @@ + + jdk/jfr/event/io/TestInstrumentation.java 8202142 generic-all + jdk/jfr/event/sampling/TestNative.java 8202142 generic-all +-jdk/jfr/event/os/TestSystemProcess.java 8202835 linux-all diff --git a/thirdparty/openjdk/patches/series b/thirdparty/openjdk/patches/series new file mode 100644 index 000000000..a708dc8e0 --- /dev/null +++ b/thirdparty/openjdk/patches/series @@ -0,0 +1,2 @@ +fix-JDK-8144695.patch +fix-JDK-8212041.patch diff --git a/thirdparty/openjdk/zimbra-openjdk/debian/control b/thirdparty/openjdk/zimbra-openjdk/debian/control index a3048a979..8bab44a84 100644 --- a/thirdparty/openjdk/zimbra-openjdk/debian/control +++ b/thirdparty/openjdk/zimbra-openjdk/debian/control @@ -1,7 +1,13 @@ Source: zimbra-openjdk -Build-Depends: debhelper (>= 9), m4, dpkg-dev (>= 1.15.7), libx11-dev, - libxext-dev, libxrender-dev, libxtst-dev, libxt-dev, openjdk-7-jdk, - libcups2-dev, libfreetype6-dev, libasound2-dev, ccache, zip +Build-Depends: debhelper (>= 9.20141010), dpkg-dev (>= 1.17.14), m4, lsb-release, zip, + unzip, sharutils, gawk, cpio, pkg-config, procps, wdiff, fastjar (>=2:0.96-0ubuntu2), + autoconf, automake, autotools-dev, ant, ant-optional, g++-8, + libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, + libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libxinerama-dev, + libkrb5-dev, xsltproc, libpcsclite-dev, libgtk-3-dev, libelf-dev, libfontconfig1-dev, + libffi-dev, zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, libnss3-dev, + jtreg (>=4.2-b10-1~), xvfb, xauth, xfonts-base, libgl1-mesa-dri, twm, x11-xkb-utils, + testng, time, openjdk-11-jdk-headless, graphviz, pandoc Section: utils Priority: optional Maintainer: Zimbra Packaging Services diff --git a/thirdparty/openjdk/zimbra-openjdk/debian/patches/series b/thirdparty/openjdk/zimbra-openjdk/debian/patches/series new file mode 100644 index 000000000..a708dc8e0 --- /dev/null +++ b/thirdparty/openjdk/zimbra-openjdk/debian/patches/series @@ -0,0 +1,2 @@ +fix-JDK-8144695.patch +fix-JDK-8212041.patch diff --git a/thirdparty/openjdk/zimbra-openjdk/debian/rules b/thirdparty/openjdk/zimbra-openjdk/debian/rules index b6fb856c4..9ed5ae397 100755 --- a/thirdparty/openjdk/zimbra-openjdk/debian/rules +++ b/thirdparty/openjdk/zimbra-openjdk/debian/rules @@ -9,9 +9,8 @@ override_dh_auto_clean: override_dh_auto_configure: ./configure --prefix=OZC \ --enable-unlimited-crypto \ - --with-update-version=JDK_UPDATE \ - --with-build-number=JDK_BUILD \ - --with-milestone=zimbra + --disable-warnings-as-errors \ + --enable-debug override_dh_strip: dh_strip -pzimbra-openjdk --dbg-package=zimbra-openjdk-dbg @@ -26,14 +25,10 @@ override_dh_auto_install: cd $(CURDIR)/debian/tmpOZCL/jvm && ln -s openjdk* java rm -rf $(CURDIR)/debian/tmp/OZCL/jvm/java/demo rm -rf $(CURDIR)/debian/tmp/OZCL/jvm/java/sample - rm -f $(CURDIR)/debian/tmp/OZCL/jvm/java/jre/lib/security/cacerts - cd $(CURDIR)/debian/tmp/OZCL/jvm/java/jre/lib/security && \ - ln -s OZCE/java/cacerts cacerts cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jar cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/java cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/javac cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/javap - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jhat cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jmap cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jps cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jstack diff --git a/versions.def b/versions.def index 6e9ea5711..85056f991 100644 --- a/versions.def +++ b/versions.def @@ -69,11 +69,11 @@ HTTPD_VERSION := 2.4.20 IMGK_VERSION := 6.7.7-2 -JDK_SUB_TREE := 8u -JDK_UPDATE := 172 -JDK_BUILD := b01 -JDK_TAG := jdk8u$(JDK_UPDATE)-$(JDK_BUILD) -JDK_VERSION := 1.8.0u$(JDK_UPDATE)$(JDK_BUILD) +JDK_SUB_TREE := 11 +JDK_UPDATE := 11 +JDK_BUILD := 28 +JDK_TAG := jdk-$(JDK_SUB_TREE)+$(JDK_BUILD) +JDK_VERSION := $(JDK_UPDATE).$(JDK_BUILD) JETTY_DISTRIBUTION_VERSION := 9.3.5.v20151012 From 2281374a357970c164ea19227afbaa393dfb20c2 Mon Sep 17 00:00:00 2001 From: Prashant Surana Date: Mon, 12 Nov 2018 11:22:56 +0000 Subject: [PATCH 3/4] ZCS-6172: Remove openjdk-11.28.tgz from the commit as this is the file larger then 100 mb --- thirdparty/openjdk/.gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 thirdparty/openjdk/.gitattributes diff --git a/thirdparty/openjdk/.gitattributes b/thirdparty/openjdk/.gitattributes new file mode 100644 index 000000000..4c7f77287 --- /dev/null +++ b/thirdparty/openjdk/.gitattributes @@ -0,0 +1 @@ +openjdk-11.28.tgz filter=lfs diff=lfs merge=lfs -text From 09c1999476f08c1632b940c28cb1e61598097fae Mon Sep 17 00:00:00 2001 From: Amit Srivastava Date: Tue, 12 Nov 2019 05:35:30 -0600 Subject: [PATCH 4/4] upgrade jdk --- thirdparty/openjdk/Makefile | 16 +++--- thirdparty/openjdk/RHEL.def | 3 +- thirdparty/openjdk/UBUNTU.def | 3 +- .../openjdk/zimbra-openjdk/debian/changelog | 29 ++--------- .../openjdk/zimbra-openjdk/debian/control | 10 +--- .../openjdk/zimbra-openjdk/debian/rules | 48 ++++++++--------- .../zimbra-openjdk/rpm/SPECS/openjdk.spec | 51 ++++++------------- versions.def | 6 +-- 8 files changed, 53 insertions(+), 113 deletions(-) diff --git a/thirdparty/openjdk/Makefile b/thirdparty/openjdk/Makefile index 5c5c0010f..7eadacfb3 100644 --- a/thirdparty/openjdk/Makefile +++ b/thirdparty/openjdk/Makefile @@ -4,7 +4,7 @@ include $(PKG_ROOT)/../../package.def pvers := $(JDK_VERSION) pname := openjdk -pfile := $(pname)-$(pvers).tgz +pfile := $(pname)-$(pvers)_linux-x64_bin.tar.gz psrc_file := $(SRC_DIR)/$(pfile) zname := zimbra-$(pname) zspec := $(pname).spec @@ -25,11 +25,12 @@ all: clean getsrc build pkgrm1 getsrc: export HGFOREST_REDIRECT=getsource.out getsrc: mkdir -p $(SRC_DIR) - (echo "Copying the already created tar to src dir." && \ + (echo "Downloading openjdk binaries. This may take some time." && \ cd $(SRC_DIR) && \ - cp -vf $(PKG_ROOT)/$(pfile) . \ - ) - + wget https://download.java.net/java/GA/jdk$(JDK_SUB_TREE)/9/GPL/$(pfile) && \ + tar xvzf $(pfile) && \ + mv jdk-$(pvers) openjdk-$(pvers)-zimbra && \ + tar -czf ../openjdk-$(pvers)-zimbra.tgz openjdk-$(pvers)-zimbra ) pkgadd: $(PKG_EXTRACT) $(openjdk) @@ -61,9 +62,8 @@ build_deb: perl -pi -e 's/DEB_BUILD_OPTIONS=nocheck/DEB_BUILD_OPTIONS=nocheck $(UB_REPLACE)/' debian/rules && \ $(replace-pathinfo) debian/rules && \ $(CP) $(psrc_file) ../$(z_tgz) && \ - $(CP) $(PKG_ROOT)/patches/*.patch debian/patches/ && \ - $(TAR) xfz ../$(z_tgz) --strip-components=1 && \ - $(PKG_BUILD) + $(TAR) xfz ../$(z_tgz) && \ + ($(PKG_BUILD) -b) clean: pkgrm $(generic-clean) diff --git a/thirdparty/openjdk/RHEL.def b/thirdparty/openjdk/RHEL.def index 51babc4a6..d194189c3 100644 --- a/thirdparty/openjdk/RHEL.def +++ b/thirdparty/openjdk/RHEL.def @@ -3,8 +3,7 @@ openjdk.RHEL := libX11-devel libXau-devel libXext-devel \ xorg-x11-proto-devel libICE-devel libSM-devel libXt \ libXt-devel libXrender-devel keyutils-libs-devel \ krb5-devel libcom_err-devel libselinux-devel \ - libsepol-devel openssl-devel cups-devel freetype-devel \ - alsa-lib-devel java-1.7.0-openjdk-devel + libsepol-devel openssl-devel cups-devel freetype-devel openjdk.RHEL7_64 := $(openjdk.RHEL) openjdk.RHEL6_64 := $(openjdk.RHEL) openjdk-purge.RHEL := alsa-lib-devel freetype-devel cups-devel openssl-devel \ diff --git a/thirdparty/openjdk/UBUNTU.def b/thirdparty/openjdk/UBUNTU.def index 39ec59e46..bcc6178e9 100644 --- a/thirdparty/openjdk/UBUNTU.def +++ b/thirdparty/openjdk/UBUNTU.def @@ -1,8 +1,7 @@ openjdk.UBUNTU := libx11-dev x11proto-xext-dev libxext-dev \ x11proto-render-dev libxrender-dev libxfixes-dev libxi-dev \ x11proto-fixes-dev x11proto-record-dev libxtst-dev libxt-dev \ - openjdk-7-jdk libcups2-dev libfreetype6-dev libasound2-dev \ - ccache + libcups2-dev libfreetype6-dev libasound2-dev ccache openjdk.UBUNTU18_64 := openjdk-11-jdk at-spi2-core ca-certificates-java \ libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni \ libatspi2.0-0 libfontenc1 libgtk-3-0 libgtk-3-bin libice-dev \ diff --git a/thirdparty/openjdk/zimbra-openjdk/debian/changelog b/thirdparty/openjdk/zimbra-openjdk/debian/changelog index 3c7503c26..5d9b8e9d2 100644 --- a/thirdparty/openjdk/zimbra-openjdk/debian/changelog +++ b/thirdparty/openjdk/zimbra-openjdk/debian/changelog @@ -1,28 +1,5 @@ -zimbra-openjdk (VERSION-1zimbra8.7b5ZAPPEND) unstable; urgency=medium +zimbra-openjdk (VERSION-1zimbra8.8b1ZAPPEND) unstable; urgency=medium - * Update version to 1.8 update 172 build 01 + * Update version to 11 update 2 build 01 - -- Zimbra Packaging Services Fri, 18 May 2018 00:00:00 +0000 -zimbra-openjdk (VERSION-1zimbra8.7b4ZAPPEND) unstable; urgency=medium - - * Update version to 1.8 update 144 build 01 - - -- Zimbra Packaging Services Fri, 28 Jul 2017 00:00:00 +0000 - -zimbra-openjdk (VERSION-1zimbra8.7b3ZAPPEND) unstable; urgency=medium - - * Update version to 1.8 update 77 build 03 - - -- Zimbra Packaging Services Mon, 28 Mar 2015 22:26:24 +0000 - -zimbra-openjdk (VERSION-1zimbra8.7b2ZAPPEND) unstable; urgency=medium - - * Fix cacerts handling to avoid conflicts - - -- Zimbra Packaging Services Thu, 11 Feb 2016 22:26:24 +0000 - -zimbra-openjdk (VERSION-ITERATIONZAPPEND) unstable; urgency=medium - - * Initial Release. - - -- Zimbra Packaging Services Fri, 1 May 2015 22:26:24 +0000 + -- Zimbra Packaging Services Tue, 19 Mar 2019 00:00:00 +0000 diff --git a/thirdparty/openjdk/zimbra-openjdk/debian/control b/thirdparty/openjdk/zimbra-openjdk/debian/control index 8bab44a84..6fdd9c306 100644 --- a/thirdparty/openjdk/zimbra-openjdk/debian/control +++ b/thirdparty/openjdk/zimbra-openjdk/debian/control @@ -1,13 +1,5 @@ Source: zimbra-openjdk -Build-Depends: debhelper (>= 9.20141010), dpkg-dev (>= 1.17.14), m4, lsb-release, zip, - unzip, sharutils, gawk, cpio, pkg-config, procps, wdiff, fastjar (>=2:0.96-0ubuntu2), - autoconf, automake, autotools-dev, ant, ant-optional, g++-8, - libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, - libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libxinerama-dev, - libkrb5-dev, xsltproc, libpcsclite-dev, libgtk-3-dev, libelf-dev, libfontconfig1-dev, - libffi-dev, zlib1g-dev, libattr1-dev, libpng-dev, libjpeg-dev, libgif-dev, libnss3-dev, - jtreg (>=4.2-b10-1~), xvfb, xauth, xfonts-base, libgl1-mesa-dri, twm, x11-xkb-utils, - testng, time, openjdk-11-jdk-headless, graphviz, pandoc +Build-Depends: m4, lsb-release, zip, unzip Section: utils Priority: optional Maintainer: Zimbra Packaging Services diff --git a/thirdparty/openjdk/zimbra-openjdk/debian/rules b/thirdparty/openjdk/zimbra-openjdk/debian/rules index 9ed5ae397..1d0abf29e 100755 --- a/thirdparty/openjdk/zimbra-openjdk/debian/rules +++ b/thirdparty/openjdk/zimbra-openjdk/debian/rules @@ -1,36 +1,30 @@ #!/usr/bin/make -f -export DEB_BUILD_OPTIONS=nocheck +export DEB_BUILD_OPTIONS=nocheck %: dh $@ override_dh_auto_clean: -override_dh_auto_configure: - ./configure --prefix=OZC \ - --enable-unlimited-crypto \ - --disable-warnings-as-errors \ - --enable-debug - -override_dh_strip: - dh_strip -pzimbra-openjdk --dbg-package=zimbra-openjdk-dbg - dh_strip -Nzimbra-openjdk - override_dh_auto_install: - $(MAKE) INSTALL_PREFIX=$(CURDIR)/debian/tmp install + mkdir -p $(CURDIR)/debian/tmp/jvm + tar -xvzf $(CURDIR)/../openjdk*.tgz -C $(CURDIR)/debian/tmp/jvm rm -rf $(CURDIR)/debian/tmp/bin - mkdir -p $(CURDIR)/debian/tmp/OZCB - mkdir -p $(CURDIR)/debian/tmp/OZCL - mv $(CURDIR)/debian/tmp/jvm $(CURDIR)/debian/tmpOZCL - cd $(CURDIR)/debian/tmpOZCL/jvm && ln -s openjdk* java - rm -rf $(CURDIR)/debian/tmp/OZCL/jvm/java/demo - rm -rf $(CURDIR)/debian/tmp/OZCL/jvm/java/sample - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jar - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/java - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/javac - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/javap - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jmap - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jps - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jstack - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/jstat - cd $(CURDIR)/debian/tmpOZCB && ln -s ../lib/jvm/java/bin/keytool + mkdir -p $(CURDIR)/debian/tmp//opt/zimbra/common/bin + mkdir -p $(CURDIR)/debian/tmp//opt/zimbra/common/lib + mv $(CURDIR)/debian/tmp/jvm $(CURDIR)/debian/tmp/opt/zimbra/common/lib + cd $(CURDIR)/debian/tmp/opt/zimbra/common/lib/jvm && ln -s openjdk* java + rm -rf $(CURDIR)/debian/tmp//opt/zimbra/common/lib/jvm/java/demo + rm -rf $(CURDIR)/debian/tmp//opt/zimbra/common/lib/jvm/java/sample + rm -f $(CURDIR)/debian/tmp//opt/zimbra/common/lib/jvm/java/lib/security/cacerts + cd $(CURDIR)/debian/tmp//opt/zimbra/common/lib/jvm/java/lib/security && \ + ln -s /opt/zimbra/common/etc/java/cacerts cacerts + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/jar + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/java + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/javac + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/javap + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/jmap + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/jps + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/jstack + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/jstat + cd $(CURDIR)/debian/tmp/opt/zimbra/common/bin && ln -s ../lib/jvm/java/bin/keytool diff --git a/thirdparty/openjdk/zimbra-openjdk/rpm/SPECS/openjdk.spec b/thirdparty/openjdk/zimbra-openjdk/rpm/SPECS/openjdk.spec index 46795b71b..9575e30d8 100644 --- a/thirdparty/openjdk/zimbra-openjdk/rpm/SPECS/openjdk.spec +++ b/thirdparty/openjdk/zimbra-openjdk/rpm/SPECS/openjdk.spec @@ -1,17 +1,10 @@ Summary: Zimbra's OpenJDK build Name: zimbra-openjdk Version: VERSION -Release: 1zimbra8.7b5ZAPPEND +Release: 1zimbra8.8b1ZAPPEND License: GPL-2 Source: %{name}-%{version}.tgz BuildRequires: zip, libX11-devel, libXau-devel, libXext-devel, libXfixes-devel -BuildRequires: libXtst-devel, libXi-devel, libxcb-devel, xorg-x11-proto-devel -BuildRequires: libICE-devel, libSM-devel, libXt, libXt-devel, libXrender-devel -BuildRequires: keyutils-libs-devel, krb5-devel, libcom_err-devel, libselinux-devel -BuildRequires: libsepol-devel, openssl-devel, cups-devel, freetype-devel -BuildRequires: alsa-lib-devel, java-1.7.0-openjdk-devel -Requires: libX11, libXext, libXi, libXrender, libXtst, alsa-lib, freetype -Requires: zimbra-base AutoReqProv: no URL: http://openjdk.java.net/ @@ -19,42 +12,28 @@ URL: http://openjdk.java.net/ The Zimbra OpenJDK build %changelog -* Fri May 18 2018 Zimbra Packaging Services - VERSION-1zimbra8.7b5ZAPPEND -- Update version to 1.8 update 172 build 01 -* Fri Jul 28 2016 Zimbra Packaging Services - VERSION-1zimbra8.7b4ZAPPEND -- Update version to 1.8 update 144 build 01 -* Mon Mar 28 2016 Zimbra Packaging Services - VERSION-1zimbra8.7b3ZAPPEND -- Update version to 1.8 update 77 build 03 -* Thu Feb 11 2016 Zimbra Packaging Services - VERSION-1zimbra8.7b2ZAPPEND -- Fix cacerts handling to avoid conflicts - +* Tue Mar 19 2019 Zimbra Packaging Services - VERSION-1zimbra8.8b1ZAPPEND +-- Update version to 11 update 2 build 01 %prep -%setup -n openjdk-%{version} %build -CFLAGS="-O2 -g"; export CFLAGS; \ -./configure --prefix=OZC \ ---enable-unlimited-crypto \ ---with-update-version=JDK_UPDATE \ ---with-build-number=JDK_BUILD \ ---with-milestone=zimbra -make %install -make install INSTALL_PREFIX=${RPM_BUILD_ROOT} +mkdir -p ${RPM_BUILD_ROOT}/jvm +tar -xvzf ${RPM_BUILD_ROOT}/../../../../openjdk*.tgz -C ${RPM_BUILD_ROOT}/jvm rm -rf ${RPM_BUILD_ROOT}/bin -mkdir -p ${RPM_BUILD_ROOT}OZCB -mkdir -p ${RPM_BUILD_ROOT}OZCL -mv ${RPM_BUILD_ROOT}/jvm ${RPM_BUILD_ROOT}OZCL/ -cd ${RPM_BUILD_ROOT}OZCL/jvm +mkdir -p ${RPM_BUILD_ROOT}/opt/zimbra/common/bin +mkdir -p ${RPM_BUILD_ROOT}/opt/zimbra/common/lib +mv ${RPM_BUILD_ROOT}/jvm ${RPM_BUILD_ROOT}/opt/zimbra/common/lib/ +cd ${RPM_BUILD_ROOT}/opt/zimbra/common/lib/jvm ln -s openjdk* java rm -rf java/demo rm -rf java/sample -rm -f java/jre/lib/security/cacerts +rm -f java/lib/security/cacerts chmod 644 java/lib/ct.sym -cd java/jre/lib/security -ln -s OZCE/java/cacerts cacerts -cd ${RPM_BUILD_ROOT}OZCB +cd java/lib/security +ln -s /opt/zimbra/common/etc/java/cacerts cacerts +cd ${RPM_BUILD_ROOT}/opt/zimbra/common/bin ln -s ../lib/jvm/java/bin/jar ln -s ../lib/jvm/java/bin/java ln -s ../lib/jvm/java/bin/javac @@ -68,5 +47,5 @@ ln -s ../lib/jvm/java/bin/keytool %files %defattr(-,root,root) -OZCB -OZCL +/opt/zimbra/common/bin +/opt/zimbra/common/lib diff --git a/versions.def b/versions.def index 85056f991..0759349a4 100644 --- a/versions.def +++ b/versions.def @@ -70,9 +70,9 @@ HTTPD_VERSION := 2.4.20 IMGK_VERSION := 6.7.7-2 JDK_SUB_TREE := 11 -JDK_UPDATE := 11 -JDK_BUILD := 28 -JDK_TAG := jdk-$(JDK_SUB_TREE)+$(JDK_BUILD) +JDK_UPDATE := 11.0 +JDK_BUILD := 2 +JDK_TAG := openjdk-$(JDK_UPDATE).$(JDK_BUILD) JDK_VERSION := $(JDK_UPDATE).$(JDK_BUILD) JETTY_DISTRIBUTION_VERSION := 9.3.5.v20151012