You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/11/08 16:19:02 UTC

[GitHub] mitchell852 closed pull request #2961: Replace the Oracle JDK with OpenJDK. This resolves #2960.

mitchell852 closed pull request #2961: Replace the Oracle JDK with OpenJDK. This resolves #2960.
URL: https://github.com/apache/trafficcontrol/pull/2961
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build/README.md b/build/README.md
index c9c79c2bb..a0fe1888e 100644
--- a/build/README.md
+++ b/build/README.md
@@ -77,8 +77,7 @@ At the conclusion of the build,  all rpms are copied into the __$WORKSPACE/dist_
 * go 1.7 or higher
 
 #### traffic_monitor and traffic_router:
-* jdk 8.0 or higher
-  * CentOS 6 (java-1.8.0-openjdk, java-1.8.0-openjdk-devel)
+* java-1.8.0-openjdk and java-1.8.0-openjdk-devel
 * apache-maven 3.3.1 or higher
 
 #### traffic_monitor_golang:
diff --git a/docs/source/admin/traffic_router/migrationto2-3.rst b/docs/source/admin/traffic_router/migrationto2-3.rst
index a4d5f7a98..8d10c54d1 100644
--- a/docs/source/admin/traffic_router/migrationto2-3.rst
+++ b/docs/source/admin/traffic_router/migrationto2-3.rst
@@ -52,8 +52,8 @@ It is preferable that you add it to your Yum repository because then it will be
 
 Update the traffic_router Package
 ---------------------------------
-If openssl, apr, tomcat-native, jdk and tomcat_tr packages are all in an available repository then you just need to run: ``yum update traffic_router``.
-This will first cause the apr, tomcat-native, jdk and tomcat packages to be installed. When the 'tomcat' package runs, it will cause any older versions of traffic_router or tomcat to be uninstalled. This is because the previous versions of the traffic_router package included an untracked installation of tomcat.
+If openssl, apr, tomcat-native, java-1.8.0-openjdk, java-1.8.0-openjdk-devel and tomcat_tr packages are all in an available repository then you just need to run: ``yum update traffic_router``.
+This will first cause the apr, tomcat-native, java-1.8.0-openjdk, java-1.8.0-openjdk-devel and tomcat packages to be installed. When the 'tomcat' package runs, it will cause any older versions of traffic_router or tomcat to be uninstalled. This is because the previous versions of the traffic_router package included an untracked installation of tomcat.
 
 
 Restore Property Files
diff --git a/docs/source/admin/traffic_vault.rst b/docs/source/admin/traffic_vault.rst
index 5c0b05d36..0bd8785c1 100644
--- a/docs/source/admin/traffic_vault.rst
+++ b/docs/source/admin/traffic_vault.rst
@@ -137,7 +137,7 @@ On Each Riak Server:
 
 1. If Java (JDKv1.8+) is not already installed on your Riak server, install Java
 	* To see if Java is already installed: ``java -version``
-	* To install Java: ``yum install -y jdk`` (CentOS/RedHat/Fedora), ``apt-get install -y java`` (Ubuntu/Debian/Linux Mint), ``pacman -Sy java`` (Arch/Manjaro)
+	* To install Java: ``yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel`` (CentOS/RedHat/Fedora), ``apt-get install -y openjdk-8-jdk`` (Ubuntu/Debian/Linux Mint), ``pacman -Sy jdk8-openjdk`` (Arch/Manjaro)
 
 2. Enable search in riak.conf
 	* ``$EDITOR /etc/riak/riak.conf``
diff --git a/infrastructure/docker/build/Dockerfile-traffic_router b/infrastructure/docker/build/Dockerfile-traffic_router
index 72a5422ef..3b168e6fb 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_router
+++ b/infrastructure/docker/build/Dockerfile-traffic_router
@@ -32,22 +32,15 @@ RUN	yum -y install \
 ### traffic_router specific requirements
 RUN	yum -y install \
 		which  \
-                curl && \
+                curl \
+                java-1.8.0-openjdk \
+                java-1.8.0-openjdk-devel && \
 	yum -y clean all
 
-
+ENV JAVA_HOME=/usr/lib/jvm/java
 WORKDIR /opt
-RUN curl -L -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz | tar xzf - && \
-    curl -L https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.tar.gz | tar xzf -
-RUN ln -s jdk* java && ln -s apache-maven* maven
-
-RUN alternatives --install /usr/bin/java java /opt/java/bin/java 2 && \
-    alternatives --install /usr/bin/jar jar /opt/java/bin/jar 2 && \
-    alternatives --install /usr/bin/javac javac /opt/java/bin/javac 2 && \
-    alternatives --set java /opt/java/bin/java && \
-    alternatives --set jar /opt/java/bin/jar && \
-    alternatives --set javac /opt/java/bin/javac && \
-    alternatives --install /usr/bin/mvn mvn /opt/maven/bin/mvn 1
+RUN curl -L https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.tar.gz | tar xzf - && \
+    alternatives --install /usr/bin/mvn mvn /opt/apache-maven*/bin/mvn 1
 
 ###
 
diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index 7c808577c..b2de3848d 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -219,7 +219,8 @@
 								</mapping>
 							</mappings>
 							<requires>
-								<require>jdk &gt;= 1.8</require>
+								<require>java-1.8.0-openjdk &gt;= 1.8</require>
+								<require>java-1.8.0-openjdk-devel &gt;= 1.8</require>
 								<require>tomcat = ${env.TOMCAT_VERSION}.${env.TOMCAT_RELEASE}-${env.BUILD_LOCK}</require>
 								<require>apr &gt;= 1.4.8</require>
 								<require>tomcat-native &gt;= 1.2.16</require>
diff --git a/traffic_router/core/src/main/lib/systemd/system/traffic_router.service b/traffic_router/core/src/main/lib/systemd/system/traffic_router.service
index 97252edc2..45e898fe7 100755
--- a/traffic_router/core/src/main/lib/systemd/system/traffic_router.service
+++ b/traffic_router/core/src/main/lib/systemd/system/traffic_router.service
@@ -19,7 +19,7 @@ After=syslog.target network.target
 [Service]
 Type=forking
 
-Environment=JAVA_HOME=/usr/java/default
+Environment=JAVA_HOME=/usr/lib/jvm/java
 Environment=CATALINA_PID=/opt/traffic_router/temp/tomcat.pid
 Environment=CATALINA_HOME=/opt/tomcat
 Environment=CATALINA_BASE=/opt/traffic_router
diff --git a/traffic_router/tomcat-rpm/tomcat.service b/traffic_router/tomcat-rpm/tomcat.service
index 29c6f99b4..72de257bc 100644
--- a/traffic_router/tomcat-rpm/tomcat.service
+++ b/traffic_router/tomcat-rpm/tomcat.service
@@ -22,7 +22,7 @@ After=syslog.target network.target
 [Service]
 Type=forking
 
-Environment=JAVA_HOME=/usr/java/default
+Environment=JAVA_HOME=/usr/lib/jvm/java
 Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
 Environment=CATALINA_HOME=/opt/tomcat
 Environment=CATALINA_BASE=/opt/tomcat
diff --git a/traffic_router/tomcat-rpm/tomcat.spec b/traffic_router/tomcat-rpm/tomcat.spec
index 63f8e8115..f19364a1a 100644
--- a/traffic_router/tomcat-rpm/tomcat.spec
+++ b/traffic_router/tomcat-rpm/tomcat.spec
@@ -19,7 +19,7 @@ Summary:    Apache Tomcat Servlet/JSP Engine 8.5+, RI for Servlet 3.1/JSP 2.3 AP
 License:    Apache Software License
 URL:        https://github.com/apache/incubator-trafficcontrol/
 Source:     %{_sourcedir}/apache-tomcat-%{version}.tar.gz
-Requires:   jdk >= 1.8
+Requires:   java-1.8.0-openjdk >= 1.8, java-1.8.0-openjdk-devel >= 1.8
 
 %define startup_script %{_sysconfdir}/systemd/system/tomcat.service
 %define tomcat_home /opt/tomcat


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services