From 1e4ae488bd07ee4440fddd770fc8ad013f5e0ffa Mon Sep 17 00:00:00 2001 From: Saurabh Pandit Date: Fri, 20 Oct 2023 15:48:07 +0530 Subject: [PATCH 1/2] (VANAGON-231) : Added amazon linux 2023 platform for intel & arm --- lib/vanagon/platform/defaults/amazon-2023-aarch64.rb | 10 ++++++++++ lib/vanagon/platform/defaults/amazon-2023-x86_64.rb | 10 ++++++++++ lib/vanagon/platform/dsl.rb | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lib/vanagon/platform/defaults/amazon-2023-aarch64.rb create mode 100644 lib/vanagon/platform/defaults/amazon-2023-x86_64.rb diff --git a/lib/vanagon/platform/defaults/amazon-2023-aarch64.rb b/lib/vanagon/platform/defaults/amazon-2023-aarch64.rb new file mode 100644 index 00000000..aa87443e --- /dev/null +++ b/lib/vanagon/platform/defaults/amazon-2023-aarch64.rb @@ -0,0 +1,10 @@ +platform "amazon-2023-aarch64" do |plat| + plat.servicedir "/usr/lib/systemd/system" + plat.defaultdir "/etc/sysconfig" + plat.servicetype "systemd" + + packages = %w(autoconf automake createrepo gcc gcc-c++ rsync cmake make rpm-libs rpm-build libarchive) + plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}" + plat.install_build_dependencies_with "dnf install -y --allowerasing " + plat.vmpooler_template "amazon-2023-arm64" +end diff --git a/lib/vanagon/platform/defaults/amazon-2023-x86_64.rb b/lib/vanagon/platform/defaults/amazon-2023-x86_64.rb new file mode 100644 index 00000000..99ee5c9b --- /dev/null +++ b/lib/vanagon/platform/defaults/amazon-2023-x86_64.rb @@ -0,0 +1,10 @@ +platform "amazon-2023-x86_64" do |plat| + plat.servicedir "/usr/lib/systemd/system" + plat.defaultdir "/etc/sysconfig" + plat.servicetype "systemd" + + packages = %w(gcc gcc-c++ autoconf automake createrepo rsync cmake make rpm-libs rpm-build rpm-sign libtool libarchive) + plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}" + plat.install_build_dependencies_with "dnf install -y --allowerasing " + plat.vmpooler_template "amazon-2023-x86_64" +end diff --git a/lib/vanagon/platform/dsl.rb b/lib/vanagon/platform/dsl.rb index 34b3cb64..4b60d557 100644 --- a/lib/vanagon/platform/dsl.rb +++ b/lib/vanagon/platform/dsl.rb @@ -38,7 +38,7 @@ def platform(platform_name, override_name: false, &block) @platform = case platform_name when /^aix-/ Vanagon::Platform::RPM::AIX.new(@name) - when /^(cisco-wrlinux|el|fedora|redhat|redhatfips)-/ + when /^(cisco-wrlinux|el|fedora|redhat|redhatfips|amazon)-/ Vanagon::Platform::RPM.new(@name) when /^sles-/ Vanagon::Platform::RPM::SLES.new(@name) From 5f563ccdd4ef617d7798e20db49e607367d04ac2 Mon Sep 17 00:00:00 2001 From: Saurabh Pandit <139841984+span786@users.noreply.github.com> Date: Wed, 25 Oct 2023 13:31:10 +0530 Subject: [PATCH 2/2] Update lib/vanagon/platform/dsl.rb Co-authored-by: Jake Spain --- lib/vanagon/platform/dsl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vanagon/platform/dsl.rb b/lib/vanagon/platform/dsl.rb index 4b60d557..b580fd62 100644 --- a/lib/vanagon/platform/dsl.rb +++ b/lib/vanagon/platform/dsl.rb @@ -38,7 +38,7 @@ def platform(platform_name, override_name: false, &block) @platform = case platform_name when /^aix-/ Vanagon::Platform::RPM::AIX.new(@name) - when /^(cisco-wrlinux|el|fedora|redhat|redhatfips|amazon)-/ + when /^(amazon|cisco-wrlinux|el|fedora|redhat|redhatfips)-/ Vanagon::Platform::RPM.new(@name) when /^sles-/ Vanagon::Platform::RPM::SLES.new(@name)