From 998d0640036eca4ef8c1354a640d9ea97a42878f Mon Sep 17 00:00:00 2001 From: Sriram Date: Mon, 17 Jun 2024 18:31:22 +0530 Subject: [PATCH 1/2] use centos 8 on amazon linux 2023 --- bin/wkhtmltopdf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/wkhtmltopdf b/bin/wkhtmltopdf index 66ed804..c9208bc 100755 --- a/bin/wkhtmltopdf +++ b/bin/wkhtmltopdf @@ -45,7 +45,7 @@ suffix = case RbConfig::CONFIG['host_os'] os = 'ubuntu_22.04' if os.start_with?('ubuntu_22.') || os.start_with?('tuxedo_22.') - os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2') || + os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2' && !os.start_with?('amzn_20')) || (os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6')) os = 'centos_7' if (os.start_with?('amzn_2') && !os.start_with?('amzn_20')) || @@ -53,7 +53,8 @@ suffix = case RbConfig::CONFIG['host_os'] os = 'centos_8' if os.start_with?('rocky_8') || os.start_with?('rhel_8.') || - os.start_with?('ol_8.') + os.start_with?('ol_8.') || + os.start_with?('amzn_20') os_based_on_debian_9 = os.start_with?('debian_9') || os.start_with?('deepin') From 7bc52b8e73745de8f4f8d826e7830ad932853bbc Mon Sep 17 00:00:00 2001 From: Sriram Date: Mon, 17 Jun 2024 18:35:31 +0530 Subject: [PATCH 2/2] Fix bug on startswith on AL 1 and instead use version 2023 fully --- bin/wkhtmltopdf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/wkhtmltopdf b/bin/wkhtmltopdf index c9208bc..a654a49 100755 --- a/bin/wkhtmltopdf +++ b/bin/wkhtmltopdf @@ -45,7 +45,7 @@ suffix = case RbConfig::CONFIG['host_os'] os = 'ubuntu_22.04' if os.start_with?('ubuntu_22.') || os.start_with?('tuxedo_22.') - os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2' && !os.start_with?('amzn_20')) || + os = 'centos_6' if (os.start_with?('amzn_') && os != 'amzn_2' && os != 'amzn_2023') || (os.empty? && File.read('/etc/centos-release').start_with?('CentOS release 6')) os = 'centos_7' if (os.start_with?('amzn_2') && !os.start_with?('amzn_20')) || @@ -54,7 +54,7 @@ suffix = case RbConfig::CONFIG['host_os'] os = 'centos_8' if os.start_with?('rocky_8') || os.start_with?('rhel_8.') || os.start_with?('ol_8.') || - os.start_with?('amzn_20') + os == 'amzn_2023' os_based_on_debian_9 = os.start_with?('debian_9') || os.start_with?('deepin')