You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by dg...@apache.org on 2018/11/21 14:48:00 UTC

[trafficcontrol] branch master updated (6c4c742 -> d86e711)

This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git.


    from 6c4c742  removed JDNSSEC from Traffic Router
     new 1d67bc1  Quiet installation for tomcat SysV test
     new 311e0d4  Changing `openjdk` to `java` - This allows either JDK to be used
     new 86ed6ca  Change in configuration in pom.xml file - There is 2 systemd unit installed - confusing
     new 939d823  Changed JAVA_HOME to /usr/lib/jvm/jre - Fixes #3012
     new 5cde100  Changed JAVA_HOME to /usr/lib/jvm/jre
     new 0dd9d88  Move %pre to %pretrans to prevent installation failures
     new ecbb897  Handle /opt/tomcat directories removal
     new 75615bd  Removed broken conditional
     new d86e711  Moving stopping services to pretrans - This will avoid having traffic_router.service warning

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 traffic_router/build/pom.xml                       | 15 +++++++------
 .../main/lib/systemd/system/traffic_router.service |  2 +-
 traffic_router/core/src/main/scripts/preinstall.sh | 11 +---------
 .../main/scripts/{preinstall.sh => pretrans.sh}    | 22 +++++++------------
 traffic_router/tomcat-rpm/tomcat.service           |  2 +-
 traffic_router/tomcat-rpm/tomcat.spec              | 25 ++++++++++------------
 6 files changed, 30 insertions(+), 47 deletions(-)
 copy traffic_router/core/src/main/scripts/{preinstall.sh => pretrans.sh} (58%)


[trafficcontrol] 02/09: Changing `openjdk` to `java` - This allows either JDK to be used

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 311e0d4b0f29e573681bb469ec9ba8e256b8cb8c
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Mon Nov 12 09:33:26 2018 -0500

    Changing `openjdk` to `java`
    - This allows either JDK to be used
---
 traffic_router/build/pom.xml          | 3 +--
 traffic_router/tomcat-rpm/tomcat.spec | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index b2de384..0644c42 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -219,8 +219,7 @@
 								</mapping>
 							</mappings>
 							<requires>
-								<require>java-1.8.0-openjdk &gt;= 1.8</require>
-								<require>java-1.8.0-openjdk-devel &gt;= 1.8</require>
+								<require>java &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/tomcat-rpm/tomcat.spec b/traffic_router/tomcat-rpm/tomcat.spec
index f19364a..e1b1910 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:   java-1.8.0-openjdk >= 1.8, java-1.8.0-openjdk-devel >= 1.8
+Requires:   java >= 1.8
 
 %define startup_script %{_sysconfdir}/systemd/system/tomcat.service
 %define tomcat_home /opt/tomcat


[trafficcontrol] 04/09: Changed JAVA_HOME to /usr/lib/jvm/jre - Fixes #3012

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 939d8237ec8bc968d8b9475515258be8c8e7ef99
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Mon Nov 12 08:12:58 2018 -0500

    Changed JAVA_HOME to /usr/lib/jvm/jre
    - Fixes #3012
---
 traffic_router/tomcat-rpm/tomcat.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_router/tomcat-rpm/tomcat.service b/traffic_router/tomcat-rpm/tomcat.service
index 72de257..1487fc5 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/lib/jvm/java
+Environment=JAVA_HOME=/usr/lib/jvm/jre
 Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
 Environment=CATALINA_HOME=/opt/tomcat
 Environment=CATALINA_BASE=/opt/tomcat


[trafficcontrol] 03/09: Change in configuration in pom.xml file - There is 2 systemd unit installed - confusing

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 86ed6cae9cb07ae07e08e3636a88e771ff980cbb
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Mon Nov 12 11:12:13 2018 -0500

    Change in configuration in pom.xml file
    - There is 2 systemd unit installed - confusing
---
 traffic_router/build/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index 0644c42..1b48818 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -194,10 +194,9 @@
 								<mapping>
 									<directory>${env.STARTUP_SCRIPT_DIR}</directory>
 									<directoryIncluded>false</directoryIncluded>
-									<filemode>755</filemode>
+									<filemode>644</filemode>
 									<username>root</username>
 									<groupname>root</groupname>
-									<configuration>noreplace</configuration>
 									<sources>
 										<source>
 											<location>${env.STARTUP_SCRIPT_LOC}</location>


[trafficcontrol] 06/09: Move %pre to %pretrans to prevent installation failures

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 0dd9d88dc88ac4f241a73e21b8ce9fe5bafcd680
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Tue Nov 13 10:56:41 2018 -0500

    Move %pre to %pretrans to prevent installation failures
---
 traffic_router/tomcat-rpm/tomcat.spec | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/traffic_router/tomcat-rpm/tomcat.spec b/traffic_router/tomcat-rpm/tomcat.spec
index e1b1910..3988140 100644
--- a/traffic_router/tomcat-rpm/tomcat.spec
+++ b/traffic_router/tomcat-rpm/tomcat.spec
@@ -21,7 +21,6 @@ URL:        https://github.com/apache/incubator-trafficcontrol/
 Source:     %{_sourcedir}/apache-tomcat-%{version}.tar.gz
 Requires:   java >= 1.8
 
-%define startup_script %{_sysconfdir}/systemd/system/tomcat.service
 %define tomcat_home /opt/tomcat
 
 %description
@@ -49,39 +48,37 @@ rm -rf ${RPM_BUILD_ROOT}/%{tomcat_home}/webapps/*
 # Remove *.bat
 rm -f ${RPM_BUILD_ROOT}/%{tomcat_home}/bin/*.bat
 
-# install sysd script
-install -d -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/systemd/system
-install    -m 755 %_sourcedir/tomcat.service ${RPM_BUILD_ROOT}%{startup_script}
-
 %clean
 rm -rf ${RPM_BUILD_ROOT}
 
-%pre
+# This here takes care of stopping and removing tomcat before installing new files
+%pretrans
 if [[ -e "/etc/init.d/tomcat" ]]; then
-  echo "Disabling tomcat service..."
+  echo "Disabling and stopping SysV tomcat service..."
   chkconfig tomcat off
+  service stop tomcat
 fi
 
 if [ -d /opt/apache-tomcat-* ]; then
   echo "Deleting unmanaged Tomcat install from < 2.3 version of Traffic Router"
   rm -rf /opt/apache-tomcat-*
-  rm -rf /opt/tomcat
+  rm -r /opt/tomcat
 fi
 
+%pre
+
 %files
 %defattr(-,root,root)
 %{tomcat_home}
-%{startup_script}
 
 %post
-systemctl daemon-reload
-
-echo "Tomcat for Traffic Router installed successfully."
-echo ""
-echo "Start with 'systemctl start traffic_router'"
 
 %preun
 
 %postun
 
 %changelog
+* Tue Nov 13 2018 Steve Malenfant <sm...@apache.org>
+- Remove old installation of tomcat
+- Removed systemd service for tomcat
+- Requires now leaves java choice to operator


[trafficcontrol] 05/09: Changed JAVA_HOME to /usr/lib/jvm/jre

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 5cde100edc35cad23a81615f7a37847e5be86257
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Mon Nov 12 10:32:25 2018 -0500

    Changed JAVA_HOME to /usr/lib/jvm/jre
---
 traffic_router/core/src/main/lib/systemd/system/traffic_router.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 45e898f..ffe4dee 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/lib/jvm/java
+Environment=JAVA_HOME=/usr/lib/jvm/jre
 Environment=CATALINA_PID=/opt/traffic_router/temp/tomcat.pid
 Environment=CATALINA_HOME=/opt/tomcat
 Environment=CATALINA_BASE=/opt/traffic_router


[trafficcontrol] 07/09: Handle /opt/tomcat directories removal

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit ecbb89765d45115428286f1d3baeef704e5cad03
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Tue Nov 13 11:01:05 2018 -0500

    Handle /opt/tomcat directories removal
---
 traffic_router/tomcat-rpm/tomcat.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_router/tomcat-rpm/tomcat.spec b/traffic_router/tomcat-rpm/tomcat.spec
index 3988140..f3cc426 100644
--- a/traffic_router/tomcat-rpm/tomcat.spec
+++ b/traffic_router/tomcat-rpm/tomcat.spec
@@ -62,7 +62,7 @@ fi
 if [ -d /opt/apache-tomcat-* ]; then
   echo "Deleting unmanaged Tomcat install from < 2.3 version of Traffic Router"
   rm -rf /opt/apache-tomcat-*
-  rm -r /opt/tomcat
+  rm -rf /opt/tomcat
 fi
 
 %pre


[trafficcontrol] 01/09: Quiet installation for tomcat SysV test

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 1d67bc1722d512dbee01f54623c582d73dcbb53c
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Mon Nov 12 10:24:32 2018 -0500

    Quiet installation for tomcat SysV test
---
 traffic_router/core/src/main/scripts/preinstall.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/traffic_router/core/src/main/scripts/preinstall.sh b/traffic_router/core/src/main/scripts/preinstall.sh
index 3723539..5d42a0a 100644
--- a/traffic_router/core/src/main/scripts/preinstall.sh
+++ b/traffic_router/core/src/main/scripts/preinstall.sh
@@ -14,15 +14,17 @@
 #
 
 # figure out which version of traffic_router is currently running
-# and then shut it down
+# and then shut it down. Running both test just in case.
 set +e
-chkconfig --list tomcat >/dev/null
 
-if [ $? -eq 0 ]; then
+if [[ -e "/etc/init.d/tomcat" ]]; then
+  echo "Stopping tomcat service..."
   /sbin/service tomcat stop
-else
-  /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
+  chkconfig tomcat off
+fi
 
+if
+  /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
   [ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router
 fi
 


[trafficcontrol] 08/09: Removed broken conditional

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 75615bdf6f7639eafd02ee961c53570a8b0330e3
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Tue Nov 13 12:48:29 2018 -0500

    Removed broken conditional
---
 traffic_router/core/src/main/scripts/preinstall.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/traffic_router/core/src/main/scripts/preinstall.sh b/traffic_router/core/src/main/scripts/preinstall.sh
index 5d42a0a..272c4f8 100644
--- a/traffic_router/core/src/main/scripts/preinstall.sh
+++ b/traffic_router/core/src/main/scripts/preinstall.sh
@@ -23,10 +23,8 @@ if [[ -e "/etc/init.d/tomcat" ]]; then
   chkconfig tomcat off
 fi
 
-if
-  /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
-  [ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router
-fi
+/usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
+[ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router
 
 # delete the expanded war files from the previous version
 if [[ -e /opt/traffic_router/webapps/core ]]; then


[trafficcontrol] 09/09: Moving stopping services to pretrans - This will avoid having traffic_router.service warning

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit d86e711bd501314345c82ba5ca52637a7b7aab26
Author: Steve Malenfant <st...@cox.com>
AuthorDate: Tue Nov 13 13:33:40 2018 -0500

    Moving stopping services to pretrans
    - This will avoid having traffic_router.service warning
---
 traffic_router/build/pom.xml                                   |  9 ++++++---
 traffic_router/core/src/main/scripts/preinstall.sh             |  9 ---------
 .../core/src/main/scripts/{preinstall.sh => pretrans.sh}       | 10 ++--------
 3 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index 1b48818..a3f1a38 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -227,9 +227,12 @@
 								<obsolete>traffic_router &lt; 3.0.0</obsolete>
 							</obsoletes>
 
-							<preinstallScriptlet>
-								<scriptFile>../core/src/main/scripts/preinstall.sh</scriptFile>
-							</preinstallScriptlet>
+							<pretransScriptlet>
+								 <scriptFile>../core/src/main/scripts/pretrans.sh</scriptFile>
+							</pretransScriptlet>
+							<preScriptlet>
+								 <scriptFile>../core/src/main/scripts/preinstall.sh</scriptFile>
+							</preScriptlet>
 							<postinstallScriptlet>
 								<scriptFile>../core/src/main/scripts/postinstall.sh</scriptFile>
 							</postinstallScriptlet>
diff --git a/traffic_router/core/src/main/scripts/preinstall.sh b/traffic_router/core/src/main/scripts/preinstall.sh
index 272c4f8..89b540d 100644
--- a/traffic_router/core/src/main/scripts/preinstall.sh
+++ b/traffic_router/core/src/main/scripts/preinstall.sh
@@ -17,15 +17,6 @@
 # and then shut it down. Running both test just in case.
 set +e
 
-if [[ -e "/etc/init.d/tomcat" ]]; then
-  echo "Stopping tomcat service..."
-  /sbin/service tomcat stop
-  chkconfig tomcat off
-fi
-
-/usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
-[ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router
-
 # delete the expanded war files from the previous version
 if [[ -e /opt/traffic_router/webapps/core ]]; then
   echo "Deleting previous version of Traffic Router webapp"
diff --git a/traffic_router/core/src/main/scripts/preinstall.sh b/traffic_router/core/src/main/scripts/pretrans.sh
similarity index 78%
copy from traffic_router/core/src/main/scripts/preinstall.sh
copy to traffic_router/core/src/main/scripts/pretrans.sh
index 272c4f8..7365c08 100644
--- a/traffic_router/core/src/main/scripts/preinstall.sh
+++ b/traffic_router/core/src/main/scripts/pretrans.sh
@@ -23,14 +23,8 @@ if [[ -e "/etc/init.d/tomcat" ]]; then
   chkconfig tomcat off
 fi
 
+echo "Stopping traffic_router services"
 /usr/bin/systemctl list-unit-files traffic_router.service > /dev/null
 [ $? -eq 0 ] && /usr/bin/systemctl stop traffic_router
-
-# delete the expanded war files from the previous version
-if [[ -e /opt/traffic_router/webapps/core ]]; then
-  echo "Deleting previous version of Traffic Router webapp"
-  rm -rf /opt/traffic_router/webapps/core
-fi
-
-rm -rf /opt/traffic_router/webapps/*
+echo "Done stopping traffic_router services"