public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rear] f45: Fix lftp command to pass options prior to opening the URL
Date: Thu, 01 Oct 2026 08:55:24 GMT [thread overview]
Message-ID: <179084492433.1.9304864382344311575.rpms-rear-8ff4afe16ce7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rear
Branch : f45
Commit : 8ff4afe16ce7e9265d22c0d6fc1103c8e8edd33e
Author : Lukáš Zaoral <lzaoral@redhat.com>
Date : 2026-10-01T10:45:05+02:00
Stats : +87/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rear/c/8ff4afe16ce7e9265d22c0d6fc1103c8e8edd33e?branch=f45
Log:
Fix lftp command to pass options prior to opening the URL
Resolves: RHEL-178087
---
diff --git a/rear-fix-lftp-options-pass-RHEL-178087.patch b/rear-fix-lftp-options-pass-RHEL-178087.patch
new file mode 100644
index 0000000..0d2327a
--- /dev/null
+++ b/rear-fix-lftp-options-pass-RHEL-178087.patch
@@ -0,0 +1,81 @@
+eFrom da9200db491c37662f0c6dc734dcb31e1efc0275 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
+Date: Wed, 20 May 2026 10:18:50 +0200
+Subject: [PATCH 1/2] Fix lftp command to pass options prior to opening the URL
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The lftp command needs to apply the user specified options prior to
+opening the URL, otherwise the options won't apply for the opening
+itself.
+This is problematic when users use a custom program to connect, e.g.
+OUTPUT_LFTP_OPTIONS=( "set sftp:connect-program ..." )
+
+The issue was introduced by commit c4ddb00f1f9eba7b036a6a54788080f2197badde.
+
+Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
+---
+ usr/share/rear/output/default/950_copy_result_files.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/usr/share/rear/output/default/950_copy_result_files.sh b/usr/share/rear/output/default/950_copy_result_files.sh
+index 20724e632d..174952028f 100644
+--- a/usr/share/rear/output/default/950_copy_result_files.sh
++++ b/usr/share/rear/output/default/950_copy_result_files.sh
+@@ -139,25 +139,25 @@ case "$scheme" in
+ local lftp_user_opts lftp_cmds_heredoc
+ local lftp_cmds=("${OUTPUT_LFTP_OPTIONS[@]}")
+ lftp_cmds+=(
++ "open $OUTPUT_URL"
+ "mkdir -fp ${path}"
+ "mput ${RESULT_FILES[*]}"
+ )
+
+- lftp_cmds_heredoc=$(IFS=$'\n'; echo "${lftp_cmds[*]}")
++ lftp_cmds_heredoc=$(IFS=$'\n'; echo "${lftp_cmds[*]}")
+
+ if contains_visible_char "$OUTPUT_LFTP_USERNAME" ; then
+ { lftp_user_opts="-u $OUTPUT_LFTP_USERNAME,$OUTPUT_LFTP_PASSWORD" ; } 2>>/dev/$SECRET_OUTPUT_DEV
+- Log "lftp -u $OUTPUT_LFTP_USERNAME,******* $OUTPUT_URL"
++ Log "lftp -u $OUTPUT_LFTP_USERNAME,******* <<< '$lftp_cmds_heredoc'"
+ else
+- Log "lftp $lftp_user_opts $OUTPUT_URL"
++ Log "lftp $lftp_user_opts <<< '$lftp_cmds_heredoc'"
+ fi
+
+- Log "$lftp_cmds_heredoc"
+ # Make sure that destination directory exists, otherwise lftp would copy
+ # RESULT_FILES into last available directory in the path.
+ # e.g. OUTPUT_URL=sftp://<host_name>/iso/server1 and have "/iso/server1"
+ # directory missing, would upload RESULT_FILES into sftp://<host_name>/iso/
+- { lftp $lftp_user_opts "$OUTPUT_URL" <<< "$lftp_cmds_heredoc"
++ { lftp $lftp_user_opts <<< "$lftp_cmds_heredoc"
+ } 2>/dev/null \
+ || Error "lftp failed to transfer '${RESULT_FILES[*]}' to '$OUTPUT_URL' (lftp exit code: $?)"
+ ;;
+
+From 958231f8a4fdba028ba396e1147f8ad7ee654307 Mon Sep 17 00:00:00 2001
+From: Gratien D'haese <gratien.dhaese@gmail.com>
+Date: Tue, 9 Jun 2026 14:32:05 +0200
+Subject: [PATCH 2/2] Potential fix for pull request finding
+
+Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
+---
+ usr/share/rear/output/default/950_copy_result_files.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/share/rear/output/default/950_copy_result_files.sh b/usr/share/rear/output/default/950_copy_result_files.sh
+index 174952028f..f8ab79ecf5 100644
+--- a/usr/share/rear/output/default/950_copy_result_files.sh
++++ b/usr/share/rear/output/default/950_copy_result_files.sh
+@@ -139,7 +139,7 @@ case "$scheme" in
+ local lftp_user_opts lftp_cmds_heredoc
+ local lftp_cmds=("${OUTPUT_LFTP_OPTIONS[@]}")
+ lftp_cmds+=(
+- "open $OUTPUT_URL"
++ "open \"$OUTPUT_URL\""
+ "mkdir -fp ${path}"
+ "mput ${RESULT_FILES[*]}"
+ )
+t
diff --git a/rear.spec b/rear.spec
index ef3ae7f..124c0fe 100644
--- a/rear.spec
+++ b/rear.spec
@@ -85,6 +85,11 @@ Patch137: rear-respect-EXCLUDE_COMPONENTS-in-extract_partitions-RHEL-235767.patc
# https://github.com/rear/rear/commit/014a7653b56f9ab8471af591ddf3698d08f0f290
Patch138: rear-mark-ISO-labels-write-protected-RHEL-143987.patch
+# fix lftp command to pass options prior to opening the URL
+# https://github.com/rear/rear/commit/da9200db491c37662f0c6dc734dcb31e1efc0275
+# https://github.com/rear/rear/commit/958231f8a4fdba028ba396e1147f8ad7ee654307
+Patch139: rear-fix-lftp-options-pass-RHEL-178087.patch
+
######################
# downstream patches #
######################
@@ -154,6 +159,7 @@ Requires: gawk
Requires: gzip
Requires: iproute
Requires: iputils
+Requires: lftp
Requires: openssl
Requires: parted
Requires: tar
reply other threads:[~2026-10-01 8:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179084492433.1.9304864382344311575.rpms-rear-8ff4afe16ce7@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox