Skip to content

Commit

Permalink
fix: resolve configuration and tests for Ubuntu 18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Feb 18, 2021
1 parent 833e72c commit ec35e9b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 17 deletions.
3 changes: 1 addition & 2 deletions test/integration/default/controls/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
conf_dir = '/etc/tomcat8'
server_xml_user_and_group = 'tomcat8'
case platform_finger
when 'debian-10', 'ubuntu-20'
when 'debian-10', 'ubuntu-20', 'ubuntu-18'
main_config_file = '/etc/default/tomcat9'
catalina_tmpdir = '/var/cache/tomcat9/temp'
catalina_tmpdir_user_and_group = 'tomcat'
Expand All @@ -35,7 +35,6 @@
catalina_tmpdir_user_and_group = 'tomcat7'
conf_dir = '/etc/tomcat7'
server_xml_user_and_group = 'tomcat7'
when 'ubuntu-18'
when 'ubuntu-16'
end
when 'redhat'
Expand Down
4 changes: 2 additions & 2 deletions test/integration/default/controls/packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
case platform[:family]
when 'debian'
case platform_finger
when 'debian-10', 'ubuntu-20'
when 'debian-10', 'ubuntu-20', 'ubuntu-18'
%w[tomcat9 haveged]
when 'debian-9', 'ubuntu-18', 'ubuntu-16'
when 'debian-9', 'ubuntu-16'
%w[tomcat8 haveged]
when 'debian-8'
%w[tomcat7 haveged]
Expand Down
4 changes: 2 additions & 2 deletions test/integration/default/controls/services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
case platform[:family]
when 'debian'
case platform_finger
when 'debian-10', 'ubuntu-20'
when 'debian-10', 'ubuntu-20', 'ubuntu-18'
%w[tomcat9 haveged]
when 'debian-9', 'ubuntu-18', 'ubuntu-16'
when 'debian-9', 'ubuntu-16'
%w[tomcat8 haveged]
when 'debian-8'
%w[tomcat7 haveged]
Expand Down
4 changes: 2 additions & 2 deletions test/integration/default/files/_mapdata/ubuntu-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ values:
authbind: 'no'
catalina_base: /var/lib/tomcat9
catalina_home: /usr/share/tomcat9
catalina_pid: /var/run/tomcat.pid
catalina_tmpdir: /var/cache/tomcat/temp
catalina_pid: /var/run/tomcat9.pid
catalina_tmpdir: /var/cache/tomcat9/temp
cluster:
simple: true
common_pkg: tomcat9-common
Expand Down
14 changes: 7 additions & 7 deletions test/integration/default/files/main_config/ubuntu-18
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
# default of tomcat8.
TOMCAT8_USER=tomcat8
TOMCAT9_USER=tomcat

# Run Tomcat as this group ID. Not setting this or leaving it blank will use
# the default of tomcat8.
TOMCAT8_GROUP=tomcat8
TOMCAT9_GROUP=tomcat

# The home directory of the Java development kit (JDK). You need at least
# JDK version 7. If JAVA_HOME is not set, some common directories for
# OpenJDK and the Oracle JDK are tried.
JAVA_HOME=/usr/lib/jvm/default-java

CATALINA_BASE="/var/lib/tomcat8"
CATALINA_HOME="/usr/share/tomcat8"
CATALINA_TMPDIR="/var/cache/tomcat8/temp"
CATALINA_PID="/var/run/tomcat8.pid"
CATALINA_BASE="/var/lib/tomcat9"
CATALINA_HOME="/usr/share/tomcat9"
CATALINA_TMPDIR="/var/cache/tomcat9/temp"
CATALINA_PID="/var/run/tomcat9.pid"


# You may pass JVM startup parameters to Java here. If unset, the default
Expand All @@ -39,7 +39,7 @@ JSP_COMPILER=javac


# Use the Java security manager? (yes/no, default: no)
TOMCAT8_SECURITY=no
TOMCAT9_SECURITY=no


# Number of days to keep logfiles in /var/log/tomcat8. Default is 14 days.
Expand Down
28 changes: 26 additions & 2 deletions tomcat/osfingermap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,32 @@ Ubuntu-20.04:
catalina_home: /usr/share/tomcat9
catalina_pid: /var/run/tomcat9.pid
catalina_tmpdir: /var/cache/tomcat9/temp
Ubuntu-18.04: {}
Ubuntu-16.04: {}
Ubuntu-18.04:
ver: 9
pkg: tomcat9
manager_pkg: tomcat9-admin
conf_dir: /etc/tomcat9
main_config: /etc/default/tomcat9
service: tomcat9
user: tomcat
group: tomcat
catalina_base: /var/lib/tomcat9
catalina_home: /usr/share/tomcat9
catalina_pid: /var/run/tomcat9.pid
catalina_tmpdir: /var/cache/tomcat9/temp
Ubuntu-16.04:
ver: 8
pkg: tomcat8
manager_pkg: tomcat8-admin
conf_dir: /etc/tomcat8
main_config: /etc/default/tomcat8
service: tomcat8
user: tomcat
group: tomcat
catalina_base: /var/lib/tomcat8
catalina_home: /usr/share/tomcat8
catalina_pid: /var/run/tomcat8.pid
catalina_tmpdir: /var/cache/tomcat8/temp
Ubuntu-14.04:
ver: 7
pkg: tomcat7
Expand Down

0 comments on commit ec35e9b

Please sign in to comment.