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:55:02 +0000
commit03abf6cd13bdd97c865f5731688cf72931078729 (patch)
tree85a52bcdf7199426b8909cb2a60932fdd55cf783
parent51485f81b01a03752ffaf530abfb570ae4593fae (diff)
downloadsrc-03abf6cd13bdd97c865f5731688cf72931078729.tar.gz
src-03abf6cd13bdd97c865f5731688cf72931078729.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 b9cc740af645..9830bc5bed5c 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