NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

install/57593: xz is missing from the rescue set



>Number:         57593
>Category:       install
>Synopsis:       xz should be a rescue tool at least where USE_XZ_SETS is set
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 26 04:25:00 +0000 2023
>Originator:     Pierre Pronchery <khorben%defora.org@localhost>
>Release:        NetBSD 9.3_STABLE
>Organization:
>Environment:
System: NetBSD reapr.station.defora 9.3_STABLE NetBSD 9.3_STABLE (GENERIC) #0: Sun Mar 26 02:04:14 UTC 2023 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
On platforms where sets are distributed as xz files (amd64, sparc64, and
aarch64 AFAICT) there is no way to uncompress the sets from the tools
available in /rescue. I think this is quite inconvenient, especially
since gz is available there (as expected).
>How-To-Repeat:
Break the system on a NetBSD/amd64 host (eg by downgrading a -10
userland to a -9 userland) such that lib*.so point to the wrong place.
Try to uncompress a .tar.xz set with /rescue and fail.
>Fix:
I am not very familiar with that part of the system, but the following
patch did the trick for me:

From 7fd62cccefbf25c2fd0d860cc45b4a04dde57573 Mon Sep 17 00:00:00 2001
From: Pierre Pronchery <khorben%EdgeBSD.org@localhost>
Date: Sat, 26 Aug 2023 00:16:23 +0200
Subject: [PATCH] distrib: add xz to the rescue set

This is useful on platforms where sets are distributed as xz files, when
something goes wrong (eg on amd64).
---
 distrib/sets/lists/rescue/mi | 1 +
 rescue/list                  | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/distrib/sets/lists/rescue/mi b/distrib/sets/lists/rescue/mi
index 41f16b7e080f..8cc28eb0cf08 100644
--- a/distrib/sets/lists/rescue/mi
+++ b/distrib/sets/lists/rescue/mi
@@ -163,6 +163,7 @@
 ./rescue/vndconfig				base-rescue-root
 ./rescue/wdogctl				base-rescue-root
 ./rescue/wsconsctl				base-rescue-root
+./rescue/xz					base-rescue-root
 ./rescue/zcat					base-rescue-root
 ./rescue/zegrep					base-rescue-root
 ./rescue/zfgrep					base-rescue-root
diff --git a/rescue/list b/rescue/list
index a2160f7d811e..5f9f892074e4 100644
--- a/rescue/list
+++ b/rescue/list
@@ -154,3 +154,9 @@ PROG	lfs_cleanerd
 
 LIBS	liboverride.o
 LIBS	-lbz2 -llzma -lcrypt -ledit -lipsec -lkvm -ll -lm -lrmt -lcurses -lterminfo -lutil -lz -levent -lprop
+
+SRCDIRS	external/public-domain/xz/bin
+
+PROG	xz
+
+LIBS	-llzma -lintl -lpthread
-- 
2.41.0



Home | Main Index | Thread Index | Old Index