From 022c857c0b3c53dbb208d0562eb10e4e7607a4ea Mon Sep 17 00:00:00 2001 From: Tero Pihlaja Date: Fri, 20 Nov 2020 14:47:21 +0200 Subject: [PATCH] Release 1.2.5 (#118) Release 1.2.5 --- .rubocop.yml | 4 ++++ CHANGELOG.md | 7 +++++++ libraries/asadmin.rb | 6 +++--- metadata.rb | 3 +-- providers/iiop_listener.rb | 2 +- recipes/default.rb | 11 +++++------ resources/domain.rb | 7 +------ 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7026dbb..10b3b8f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,3 +3,7 @@ Layout/LineLength: Layout/EndOfLine: EnforcedStyle: lf + +ChefCorrectness/PropertyWithoutType: + Exclude: + - "resources/*.rb" diff --git a/CHANGELOG.md b/CHANGELOG.md index 404f00b..2427b77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v.1.2.5: +* Fix : Revert Azul JDK specific JVM options from 1.2.2 +* Enhance : Improve JVM option parsing + +## v.1.2.3 - v.1.2.4 +* Unreleased + ## v.1.2.2: * Enhance : Better support for Payara 5.194+. diff --git a/libraries/asadmin.rb b/libraries/asadmin.rb index d6a00e3..68477af 100644 --- a/libraries/asadmin.rb +++ b/libraries/asadmin.rb @@ -44,17 +44,17 @@ def transform_jvm_options(options, withoutversions = false) min = '' max = '' unless withoutversions - capture = line.match(/min\(([\d\.]+)\)/) + capture = line.match(/min\(([\w\-\d\.]+)\)/) min = capture.captures.first unless capture.nil? - capture = line.match(/max\(([\d\.]+)\)/) + capture = line.match(/max\(([\w\-\d\.]+)\)/) max = capture.captures.first unless capture.nil? min = min.gsub(/(\d+)\.(\d+)\.(\d+)\.(\d+)/, '\1.\2.\3u\4') max = max.gsub(/(\d+)\.(\d+)\.(\d+)\.(\d+)/, '\1.\2.\3u\4') end - base = line.gsub(/ --> JDK versions: [A-Za-z\(\d\.\), ]+/, '') + base = line.gsub(/ --> JDK versions: [A-Za-z\-\(\d\.\), ]+/, '') if min != '' || max != '' "[#{min}|#{max}]#{base}" diff --git a/metadata.rb b/metadata.rb index 53b8cb3..fbfcc61 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,8 +3,7 @@ maintainer_email 'peter@realityforge.org' license 'Apache-2.0' description 'Installs/Configures GlassFish Application Server' -version '1.2.2' - +version '1.2.5' chef_version '>= 13.0' issues_url 'https://github.com/realityforge/chef-glassfish' diff --git a/providers/iiop_listener.rb b/providers/iiop_listener.rb index cd7c455..4d3fe1f 100644 --- a/providers/iiop_listener.rb +++ b/providers/iiop_listener.rb @@ -38,7 +38,7 @@ end properties = new_resource.properties.dup.merge( - 'address' => new_resource.listeneraddress ? new_resource.listeneraddress : '0.0.0.0', + 'address' => (new_resource.listeneraddress || '0.0.0.0'), 'enabled' => new_resource.enabled, 'port' => new_resource.iiopport, 'security-enabled' => new_resource.securityenabled diff --git a/recipes/default.rb b/recipes/default.rb index 87ff907..974cbdf 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -24,12 +24,11 @@ def gf_scan_existing_binary_endorsed_jars(install_dir) jar_extensions = ['.jar'] gf_binary_endorsed_dir = install_dir + '/glassfish/lib/endorsed' - existing_binary_endorsed_jars = if Dir.exist?(gf_binary_endorsed_dir) - Dir.entries(gf_binary_endorsed_dir).reject { |f| File.directory?(f) || !jar_extensions.include?(File.extname(f)) } - else - [] - end - existing_binary_endorsed_jars + if Dir.exist?(gf_binary_endorsed_dir) + Dir.entries(gf_binary_endorsed_dir).reject { |f| File.directory?(f) || !jar_extensions.include?(File.extname(f)) } + else + [] + end end include_recipe 'glassfish::derive_version' diff --git a/resources/domain.rb b/resources/domain.rb index 308c927..2d54f2a 100644 --- a/resources/domain.rb +++ b/resources/domain.rb @@ -162,7 +162,7 @@ def osgi_jvm_options end def security_jvm_options - opts = [ + [ '-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as', "-Djavax.net.ssl.keyStore=#{domain_dir_path}/config/keystore.jks", "-Djava.security.policy=#{domain_dir_path}/config/server.policy", @@ -170,11 +170,6 @@ def security_jvm_options '-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as', "-Djava.security.auth.login.config=#{domain_dir_path}/config/login.conf", ] - - if node['glassfish']['variant'] == 'payara' && node['glassfish']['version'].split('.')[0].to_i >= 5 && node['glassfish']['version'].split('.')[1].to_i >= 194 - opts << '[Azul-1.8.0u222|1.8.0u260]-XX:+UseOpenJSSE' - end - opts end def grizzly_options