Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Make tar extraction flags depend on our usa...



details:   https://anonhg.NetBSD.org/src/rev/9f92e6c7def6
branches:  trunk
changeset: 461055:9f92e6c7def6
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Nov 14 13:58:22 2019 +0000

description:
Make tar extraction flags depend on our usage of pax-as-tar or bsdtar.

diffstat:

 usr.sbin/sysinst/Makefile.inc |  6 +++++-
 usr.sbin/sysinst/defs.h       |  8 +++++++-
 usr.sbin/sysinst/util.c       |  5 +++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 635eb787eff6 -r 9f92e6c7def6 usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc     Thu Nov 14 13:16:35 2019 +0000
+++ b/usr.sbin/sysinst/Makefile.inc     Thu Nov 14 13:58:22 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.29 2019/11/13 18:57:26 martin Exp $
+#      $NetBSD: Makefile.inc,v 1.30 2019/11/14 13:58:22 martin Exp $
 #
 # Makefile for sysinst
 
@@ -68,6 +68,10 @@
 
 SETS_TAR_SUFF=${"${USE_XZ_SETS:Uno}"!="no":?"tar.xz":"tgz"}
 
+.if ${MKBSDTAR:Uno} == "no"
+CPPFLAGS+=     -DUSING_PAXASTAR
+.endif
+
 CATALOGDIR=    /usr/share/sysinst/catalog
 CPPFLAGS+=     -I. -I${.CURDIR}/../.. -I${.CURDIR} \
                -I${.CURDIR}/../../../../sbin/fsck \
diff -r 635eb787eff6 -r 9f92e6c7def6 usr.sbin/sysinst/defs.h
--- a/usr.sbin/sysinst/defs.h   Thu Nov 14 13:16:35 2019 +0000
+++ b/usr.sbin/sysinst/defs.h   Thu Nov 14 13:58:22 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: defs.h,v 1.47 2019/11/13 18:57:26 martin Exp $ */
+/*     $NetBSD: defs.h,v 1.48 2019/11/14 13:58:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -508,6 +508,12 @@
 #define        SETS_TAR_SUFF    "tgz"
 #endif
 
+#ifdef USING_PAXASTAR
+#define        TAR_EXTRACT_FLAGS       "-xhepf"
+#else
+#define        TAR_EXTRACT_FLAGS       "-xpPf"
+#endif
+
 /* Abs. path we extract binary sets from */
 char ext_dir_bin[STRSIZE];
 
diff -r 635eb787eff6 -r 9f92e6c7def6 usr.sbin/sysinst/util.c
--- a/usr.sbin/sysinst/util.c   Thu Nov 14 13:16:35 2019 +0000
+++ b/usr.sbin/sysinst/util.c   Thu Nov 14 13:58:22 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.37 2019/11/13 18:57:26 martin Exp $ */
+/*     $NetBSD: util.c,v 1.38 2019/11/14 13:58:22 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -975,7 +975,8 @@
 
        /* now extract set files into "./". */
        rval = run_program(RUN_DISPLAY | RUN_PROGRESS,
-                       "progress -zf %s tar --chroot -xpPf -", path);
+                       "progress -zf %s tar --chroot "
+                       TAR_EXTRACT_FLAGS " -", path);
 
        chdir(owd);
        free(owd);



Home | Main Index | Thread Index | Old Index