aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Grafton <john.grafton@runbox.com>2023-01-29 23:05:15 +0000
committerXin LI <delphij@FreeBSD.org>2023-02-12 07:58:55 +0000
commitffb598d0953a328b30744ac56e8f1fd0344fd733 (patch)
treec79a6bad9c8594fc099e76a86e56782814568725
parent316cf82382e06b7abf8724e9b7804bf6dc2aa576 (diff)
downloadsrc-ffb598d0953a328b30744ac56e8f1fd0344fd733.tar.gz
src-ffb598d0953a328b30744ac56e8f1fd0344fd733.zip
rescue: Add fetch(1) to the rescue tool.
After a failed upgrade, having fetch(1) on a system that is physically unnreachable would be very useful to download files required to get the OS back up and functional. On my system this adds 589,824 bytes (3.8%) to the binary size. PR: 266224 Reported by: Dan Mahoney Differential Revision: https://reviews.freebsd.org/D38193 (cherry picked from commit ea34aa4780e5a581732520ea579342af94684882) rescue: Fix link order of SSL libraries and fetch. ld.bfd requires libraries to be linked in order. libssl requires libcrypto. libfetch requires libssl. To fix the latter, move fetch up above tar rather than listing the ssl libraries twice. Reviewed by: delphij Fixes: ea34aa4780e5 rescue: Add fetch(1) to the rescue tool. Differential Revision: https://reviews.freebsd.org/D38304 (cherry picked from commit 0f031350f32b8760e0843a6476d67aa21116103b)
-rw-r--r--rescue/rescue/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index 6a1f7d9c768e..8faf4d29877b 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -198,10 +198,13 @@ CRUNCH_PROGS_usr.bin+= zstd
CRUNCH_ALIAS_zstd= unzstd zstdcat zstdmt
CRUNCH_LIBS+= ${LDADD_zstd}
+CRUNCH_PROGS_usr.bin+= fetch
+CRUNCH_LIBS+= -lfetch
+
CRUNCH_PROGS_usr.bin+= tar
CRUNCH_LIBS+= -larchive
.if ${MK_OPENSSL} != "no"
-CRUNCH_LIBS+= -lcrypto
+CRUNCH_LIBS+= -lssl -lcrypto
.endif
CRUNCH_LIBS+= -lmd