From d58f252e70548942c91ec1088afd82dc590186ec Mon Sep 17 00:00:00 2001 From: Stack Date: Mon, 21 Nov 2022 15:10:16 -0600 Subject: [PATCH 1/3] Readability improvements --- func/common/imports.sh | 2 +- func/core/pkg_archive/20-gzip-bin-test.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/func/common/imports.sh b/func/common/imports.sh index c61ccf7..a1a12a7 100644 --- a/func/common/imports.sh +++ b/func/common/imports.sh @@ -36,7 +36,7 @@ function r_processor() { if [[ "$(basename ${file})" =~ README|^\.|^_ ]]; then continue fi - [ -x "${file}" ] && "${file}" + [ -x "${file}" ] && echo "Begin processing script: ${file}" && "${file}" done return 0 } diff --git a/func/core/pkg_archive/20-gzip-bin-test.sh b/func/core/pkg_archive/20-gzip-bin-test.sh index 507387b..00ce3d8 100755 --- a/func/core/pkg_archive/20-gzip-bin-test.sh +++ b/func/core/pkg_archive/20-gzip-bin-test.sh @@ -1,8 +1,9 @@ #!/bin/bash r_log "archive" "Verifying gzip binaries" +echo -n "Processing; " for bin in gunzip gzexe gzip zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew; do - echo -n "$bin" + echo -n "$bin " r_log "archive" "$bin" $bin --version &> /dev/null || r_checkExitStatus 1 done From 3c3e3d2096bdee401ae04aa2bbc375d68e4aeedc Mon Sep 17 00:00:00 2001 From: Stack Date: Mon, 21 Nov 2022 15:11:26 -0600 Subject: [PATCH 2/3] Fix error when /tmp is empty; ls is not always a good way to pipe into cpio because cpio does not know how to deal with things like symlinks and empty directories very well so switched to find. --- func/core/pkg_cpio/10-cpio.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/func/core/pkg_cpio/10-cpio.sh b/func/core/pkg_cpio/10-cpio.sh index 77382a9..685eaf3 100755 --- a/func/core/pkg_cpio/10-cpio.sh +++ b/func/core/pkg_cpio/10-cpio.sh @@ -11,8 +11,10 @@ PASSER=/var/tmp/cpio/pass r_log "cpio" "Test basic copy out" mkdir -p "$OUTTER" "$INNER" "$PASSER" +# Ensure at least one file exists in /tmp to prevent errors. +echo 1 > $(mktemp) # shellcheck disable=2012 -ls /tmp | cpio -o > "$OUTTER"/cpio.out +find /tmp -type f | cpio -o > "$OUTTER"/cpio.out 2> /dev/null r_checkExitStatus $? r_log "cpio" "Test basic copy in" From 29659918d423f3b019bb6907c36033eba85144b6 Mon Sep 17 00:00:00 2001 From: Stack Date: Mon, 21 Nov 2022 19:44:30 -0600 Subject: [PATCH 3/3] Warning others not to make the same mistake I did. :-) --- func/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/func/README.md b/func/README.md index 52b0062..db7e929 100644 --- a/func/README.md +++ b/func/README.md @@ -150,6 +150,10 @@ security is important, actually work and function correctly. With that said, There is no reason to disable integral security layers on your system. +### Should EPEL be enabled? +No. The point is to test Rocky packages, not EPEL. There are also package +differences that will break (eg: nc -> nmap-ncat vs netcat). + Current Tree ------------ ```