From aeb0ffa2ff8706c973220f417d3624797353a972 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 6 May 2024 13:49:39 +0200 Subject: [PATCH] Fixes #37406 - drop upload functionality from foreman-debug --- config/foreman-debug.conf | 29 ---------------------------- script/foreman-debug | 40 --------------------------------------- 2 files changed, 69 deletions(-) diff --git a/config/foreman-debug.conf b/config/foreman-debug.conf index f34b2996fbc..991d7600469 100644 --- a/config/foreman-debug.conf +++ b/config/foreman-debug.conf @@ -27,34 +27,5 @@ # Debug mode (0 or 1) #DEBUG=0 -# Upload tarball after each run (0 or 1) -#UPLOAD=0 - -# Permanently disable upload feature (0 or 1) -#UPLOAD_DISABLED=0 - -# URL of the upload location (string) -#UPLOAD_URL='rsync://rsync.theforeman.org/debug-incoming' - -# The full upload command in strict quotes (string) -#UPLOAD_CMD='rsync "${TARBALL}" "${UPLOAD_URL}"' - -# Additional help message for when uploads are not disabled (UPLOAD_DISABLED=0) (multi line string) -#UPLOAD_USAGE_MSG="\ -#Add your custom message here." - -# Message displayed at the end if neither UPLOAD nor UPLOAD_DISABLED is set (multi line string) -#UPLOAD_UNSET_MSG="\ -#Add your custom message here." - -# Message when an upload was successfull (multi line string) -# note: will be appended with "$(basename ${TARBALL})\n" -#UPLOAD_SUCCESS_MSG="\ -#Add your custom message here." - -# Message when an upload was not successfull (multi line string) -#UPLOAD_FAIL_MSG="\ -#Add your custom message here." - # Tokens that are fileted out (shell array) #FILTER_WORDS=(pass password token key) diff --git a/script/foreman-debug b/script/foreman-debug index ca7f575e796..132ccf7a748 100755 --- a/script/foreman-debug +++ b/script/foreman-debug @@ -4,7 +4,6 @@ export SCLNAME=tfm usage() { -[[ $UPLOAD_DISABLED -ne 0 ]] && UPLOAD_INFO=" (feature disabled by configuration)" cat </dev/null; then COMPRESS="xz -1" @@ -211,9 +189,6 @@ while getopts "d:gam:s:j:uqpvhx" opt; do MAXSIZE="$OPTARG" MAXSIZE=$((MAXSIZE*1024*1024)) ;; - u) - UPLOAD=1 - ;; x) # this option is not docummented - use for extra output, # skip slow items and to disable root check @@ -233,8 +208,6 @@ done [ $DEBUG -eq 0 -a $EUID -ne 0 ] && error "This script must be run as root" && exit 1 -[ $UPLOAD -eq 1 -a $NOTAR -eq 1 ] && error "Options -u and -a cannot be used together" && exit 2 - # some tasks take long time, print a banner (unless quiet mode was selected) qprintf "Processing... (takes a while)\n" @@ -425,19 +398,6 @@ else qprintf "%s: %s\n\n" "A debug directory has been created" "$DIR" fi -# upload if -u was passed in -if [ $UPLOAD_DISABLED -eq 0 -a $UPLOAD -eq 1 ]; then - qprintf "Uploading...\n" - if eval ${UPLOAD_CMD} ; then - qprintf "%s%s\n" "${UPLOAD_SUCCESS_MSG}" "$(basename ${TARBALL})" - else - error "${UPLOAD_FAIL_MSG}" - exit 3 - fi -else - [[ $UPLOAD_DISABLED -eq 0 ]] && qprintf "%s\n" "${UPLOAD_UNSET_MSG}" -fi - printv "Finished in $SECONDS seconds" exit 0