diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 346ee8e6b..66e72b835 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -299,7 +299,7 @@ sub subvars { my $writerepo; my $c = 0; foreach my $pkgdir (@pkgdirs) { - if ($platform =~ /^(rh|SL|centos|ol|fedora)$/) { + if ($platform =~ /^(rh|SL|centos|ol|fedora|rocky)$/) { if ($c == 0) { # After some tests, if we put the repo in pre scripts in the kickstart like for rhels6.x # the rhels5.9 will not be installed successfully. So put in kickstart directly. diff --git a/xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist b/xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist deleted file mode 100644 index 13eb3c39b..000000000 --- a/xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist +++ /dev/null @@ -1,12 +0,0 @@ -@^minimal-environment -chrony -net-tools -nfs-utils -openssh-server -rsync -util-linux -wget -python3 -tar -bzip2 -perl-interpreter diff --git a/xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist b/xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist new file mode 120000 index 000000000..ccb1fe4ef --- /dev/null +++ b/xCAT-server/share/xcat/install/rocky/compute.rocky8.pkglist @@ -0,0 +1 @@ +../rh/compute.rhels8.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/rocky/compute.rocky8.tmpl b/xCAT-server/share/xcat/install/rocky/compute.rocky8.tmpl index 3719fd0c6..ba3baa532 100644 --- a/xCAT-server/share/xcat/install/rocky/compute.rocky8.tmpl +++ b/xCAT-server/share/xcat/install/rocky/compute.rocky8.tmpl @@ -1,4 +1,4 @@ -#version=CentOS8 +#version=Rocky8 # Use text install text # Use network installation diff --git a/xCAT-server/share/xcat/install/rocky/service.rocky8.pkglist b/xCAT-server/share/xcat/install/rocky/service.rocky8.pkglist new file mode 120000 index 000000000..818f670ec --- /dev/null +++ b/xCAT-server/share/xcat/install/rocky/service.rocky8.pkglist @@ -0,0 +1 @@ +../rh/service.rhels8.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/rocky/service.rocky8.tmpl b/xCAT-server/share/xcat/install/rocky/service.rocky8.tmpl new file mode 120000 index 000000000..373e2f6eb --- /dev/null +++ b/xCAT-server/share/xcat/install/rocky/service.rocky8.tmpl @@ -0,0 +1 @@ +../rh/service.rhels8.tmpl \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/rocky/service.rocky8.x86_64.otherpkgs.pkglist b/xCAT-server/share/xcat/install/rocky/service.rocky8.x86_64.otherpkgs.pkglist new file mode 120000 index 000000000..03999f75f --- /dev/null +++ b/xCAT-server/share/xcat/install/rocky/service.rocky8.x86_64.otherpkgs.pkglist @@ -0,0 +1 @@ +../rh/service.rhels8.x86_64.otherpkgs.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.exlist b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.exlist new file mode 120000 index 000000000..9d1e45244 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.exlist @@ -0,0 +1 @@ +../rh/service.rhels8.x86_64.exlist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.otherpkgs.pkglist b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.otherpkgs.pkglist new file mode 120000 index 000000000..03999f75f --- /dev/null +++ b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.otherpkgs.pkglist @@ -0,0 +1 @@ +../rh/service.rhels8.x86_64.otherpkgs.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.pkglist b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.pkglist new file mode 120000 index 000000000..cba1edc0e --- /dev/null +++ b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.pkglist @@ -0,0 +1 @@ +../rh/service.rhels8.x86_64.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.postinstall b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.postinstall new file mode 120000 index 000000000..cd4cbff17 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/rocky/service.rocky8.x86_64.postinstall @@ -0,0 +1 @@ +../rh/service.rhels8.x86_64.postinstall \ No newline at end of file diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 8c66bc919..e6d384ce1 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.49 +# Version 1.0.50 # # Copyright (C) 2016 - 2021 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -38,6 +38,8 @@ # - Add support for Oracle Linux # 2021-07-08 Peter Wong # - Provide correct versions of packages to be installed +# 2021-07-27 Mark Gurevich +# - Add support for Rocky Linux # @@ -1589,6 +1591,7 @@ function add_xcat_dep_repo_yum_or_zypper() case "${distro}" in "centos"*) distro="rh${distro#centos}" ;; "ol"*) distro="rh${distro#ol}" ;; + "rocky"*) distro="rh${distro#rocky}" ;; "fedora10"|"fedora11") distro="fedora9" ;; "fedora1"[678]) distro="rh6" ;; "fedora19"|"fedora2"?) distro="rh7" ;; @@ -2288,7 +2291,7 @@ Version: ${GO_XCAT_LINUX_VERSION} EOF case "${GO_XCAT_LINUX_DISTRO}" in -"centos"|"fedora"|"rhel"|"sles"|"ubuntu"|"ol") +"centos"|"fedora"|"rhel"|"sles"|"ubuntu"|"ol"|"rocky") ;; *) warn_if_bad 1 "${GO_XCAT_LINUX_DISTRO}: unsupported Linux distro" diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 3d5628ef8..5af708407 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -46,13 +46,13 @@ check:rc==0 cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo . check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";path2="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";path2="rh";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path2$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";path2="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";path2="rh";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path2$ver/__GETNODEATTR($$SN,arch)__ && createrepo .; check:rc==0 cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__ check:rc==0 -cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; +cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";elif [[ " __GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; check:rc==0 #add support python in sn @@ -106,7 +106,7 @@ check:rc==0 cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep python2-greenlet"; else echo "there is no xCAT-openbmc-py installed in MN, skip check python2-greenlet installation in SN"; exit 0;fi check:rc==0 cmd:xdsh $$SN "cat /var/log/xcat/xcat.log" -cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" || "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi +cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" || "__GETNODEATTR($$SN,os)__" =~ "ol" || "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi check:rc==0 cmd:makentp -a check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 6f483fbfd..1d0c719a0 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -156,8 +156,8 @@ cmd:lsdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netb cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 -#Make sure squashfs-tools rpm is installed on RHEL and OL -cmd:if [[ "$$OS" =~ "rhel" || "$$OS" =~ "ol" ]]; then yum install -y squashfs-tools; fi +#Make sure squashfs-tools rpm is installed on RHEL, OL and Rocky +cmd:if [[ "$$OS" =~ "rhel" || "$$OS" =~ "ol" || "$$OS" =~ "rocky" ]]; then yum install -y squashfs-tools; fi #Make sure squashfs-tools rpm is installed on Ubuntu cmd:if [[ "$$OS" =~ "ubuntu" ]]; then apt-get install -y squashfs-tools; fi