Module Name: src
Committed By: martin
Date: Tue Jul 13 09:13:00 UTC 2021
Modified Files:
src/usr.sbin/sysinst: Makefile.inc defs.h
Log Message:
PR install/56303: when using xz files enable swap during set extraction
if the machine does not have more than 256MB of RAM.
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/Makefile.inc
cvs rdiff -u -r1.70 -r1.71 src/usr.sbin/sysinst/defs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/Makefile.inc
diff -u src/usr.sbin/sysinst/Makefile.inc:1.40 src/usr.sbin/sysinst/Makefile.inc:1.41
--- src/usr.sbin/sysinst/Makefile.inc:1.40 Tue Apr 13 07:53:19 2021
+++ src/usr.sbin/sysinst/Makefile.inc Tue Jul 13 09:13:00 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.40 2021/04/13 07:53:19 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.41 2021/07/13 09:13:00 martin Exp $
#
# Makefile for sysinst
@@ -94,6 +94,10 @@ CPPFLAGS+= -I. -I${.CURDIR}/../.. -I${.C
${NODISKLABEL:D-DNO_DISKLABEL} \
${NOPARTMAN:D-DNO_PARTMAN}
+.if ${USE_XZ_SETS:Uno} != "no"
+CPPFLAGS+= -DEXTRACT_NEEDS_BIG_RAM
+.endif
+
.if ${RELEASEMACHINEDIR} != ${MACHINE}
CPPFLAGS+= -DARCH_SUBDIR="\"${RELEASEMACHINEDIR}\""
CPPFLAGS+= -DPKG_ARCH_SUBDIR="\"${MACHINE_ARCH}\""
Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.70 src/usr.sbin/sysinst/defs.h:1.71
--- src/usr.sbin/sysinst/defs.h:1.70 Sun Jan 31 22:45:46 2021
+++ src/usr.sbin/sysinst/defs.h Tue Jul 13 09:13:00 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.70 2021/01/31 22:45:46 rillig Exp $ */
+/* $NetBSD: defs.h,v 1.71 2021/07/13 09:13:00 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -68,7 +68,12 @@ const char *getfslabelname(uint, uint);
* if a system does not have more ram (in MB) than this, swap will be enabled
* very early (as soon as the swap partition has been created)
*/
+#ifdef EXTRACT_NEEDS_BIG_RAM /* we use an expensive decompressor */
+#define TINY_RAM_SIZE 256
+#else
#define TINY_RAM_SIZE 32
+#endif
+
/*
* if a system has less ram (in MB) than this, we will not create a
* tmpfs /tmp by default (to workaround PR misc/54886)