From 12bb69379b17995afa640b236fa7de6034ec2f1c Mon Sep 17 00:00:00 2001 From: nazunalika Date: Tue, 21 Jun 2022 18:03:43 -0700 Subject: [PATCH] attempted func corrections --- func/common/exports.sh | 2 +- func/core/pkg_archive/00-install-formats.sh | 2 +- func/core/pkg_archive/21-gzip-test.sh | 8 ++++++-- func/core/pkg_lsb/00-install-lsb.sh | 5 +++++ func/core/pkg_lsb/10-test-branding.sh | 5 +++++ func/core/pkg_network/00-install-packages.sh | 6 +++++- func/skip.list | 3 +++ 7 files changed, 26 insertions(+), 5 deletions(-) diff --git a/func/common/exports.sh b/func/common/exports.sh index 4ed75bc..2bb991f 100644 --- a/func/common/exports.sh +++ b/func/common/exports.sh @@ -11,5 +11,5 @@ export readonly RELEASE_NAME=rocky # A 0 means it was successful. It can be changed to 1 on failure. export IPAINSTALLED=0 -LOGFILE="./log/$(date +'%m-%d-%Y')-tests.log" +LOGFILE="$(pwd)/log/$(date +'%m-%d-%Y')-tests.log" export LOGFILE diff --git a/func/core/pkg_archive/00-install-formats.sh b/func/core/pkg_archive/00-install-formats.sh index 6525314..f7c8d77 100755 --- a/func/core/pkg_archive/00-install-formats.sh +++ b/func/core/pkg_archive/00-install-formats.sh @@ -2,4 +2,4 @@ r_log "archive" "Installing appropriate archive formats" # We might need expect for zmore - does anyone actually use zmore? -p_installPackageNormal bzip2 diffutils gzip less ncompress tar unzip util-linux-ng zip lzop +p_installPackageNormal bzip2 diffutils gzip less tar unzip util-linux-ng zip lzop diff --git a/func/core/pkg_archive/21-gzip-test.sh b/func/core/pkg_archive/21-gzip-test.sh index ce4a440..a19c96d 100755 --- a/func/core/pkg_archive/21-gzip-test.sh +++ b/func/core/pkg_archive/21-gzip-test.sh @@ -89,8 +89,12 @@ gzip $FILE $FILE.1 || r_checkExitStatus 1 r_log "archive" "Verify that .Z files can be handled" gunzip $FILE.gz ls -l /var/tmp >> $FILE -compress $FILE || r_checkExitStatus 1 -gunzip $FILE.Z || r_checkExitStatus 1 +if [ "$RL_VER" -eq 8 ]; then + compress $FILE || r_checkExitStatus 1 + gunzip $FILE.Z || r_checkExitStatus 1 +else + r_log "archive" "Skipping for 9" +fi # handle some zip files r_log "archive" "Verify that .zip files can be handled" diff --git a/func/core/pkg_lsb/00-install-lsb.sh b/func/core/pkg_lsb/00-install-lsb.sh index 452dd70..3733c79 100755 --- a/func/core/pkg_lsb/00-install-lsb.sh +++ b/func/core/pkg_lsb/00-install-lsb.sh @@ -1,3 +1,8 @@ #!/bin/bash r_log "lsb" "Install LSB package" +if [ "$RL_VER" -ge 8 ]; then + r_log "lsb" "redhat-lsb is not in EL9" + exit $PASS +fi + p_installPackageNormal redhat-lsb diff --git a/func/core/pkg_lsb/10-test-branding.sh b/func/core/pkg_lsb/10-test-branding.sh index 9be22cb..229fbcb 100755 --- a/func/core/pkg_lsb/10-test-branding.sh +++ b/func/core/pkg_lsb/10-test-branding.sh @@ -1,5 +1,10 @@ #!/bin/bash r_log "lsb" "Test LSB branding" +if [ "$RL_VER" -ge 8 ]; then + r_log "lsb" "redhat-lsb is not in EL9" + exit $PASS +fi + lsb_release -i | grep -q "Rocky" r_checkExitStatus $? lsb_release -d | grep -q "Rocky" diff --git a/func/core/pkg_network/00-install-packages.sh b/func/core/pkg_network/00-install-packages.sh index 964c071..df109be 100755 --- a/func/core/pkg_network/00-install-packages.sh +++ b/func/core/pkg_network/00-install-packages.sh @@ -1,3 +1,7 @@ #!/bin/bash r_log "network" "Install necessary network packages and utilities" -p_installPackageNormal traceroute iputils iproute mtr arpwatch psmisc net-tools which iptraf +pkgs=(traceroute iputils iproute mtr psmisc net-tools which iptraf) +if [ "$RL_VER" -eq 8 ]; then + pkgs+=( arpwatch ) +fi +p_installPackageNormal "${pkgs[@]}" diff --git a/func/skip.list b/func/skip.list index ccddc50..2ebe6ab 100644 --- a/func/skip.list +++ b/func/skip.list @@ -10,9 +10,12 @@ # -> Must be a URL to bugs.rl.o, a github issue number, or a code, such as: # * NEEDINFO # * NOTREADY +# * NOPKG 8|./core/pkg_archive/26-zmore.sh|nazunalika|NEEDINFO 8|./core/pkg_nfs/12-prepare-autofs.sh|nazunalika|NEEDINFO 8|./core/pkg_diffutils/00-install-diff.sh|nazunalika|NOTREADY 8|./core/pkg_snmp/12-test-snmp-3.sh|nazunalika|NOTWORKING 8|./core/pkg_samba/00-install-samba.sh|nazunalika|NOTWORKING 8|./core/pkg_samba/10-test-samba.sh|nazunalika|NOTWORKING +9|./core/pkg_archive/27-znew.sh|nazunalika|NOPKG +9|./core/pkg_network/30-test-arpwatch.sh|nazunalika|NOPKG