Source-Changes-HG archive

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

[src/netbsd-6]: src Pull up following revision(s) (requested by tsutsui in ti...



details:   https://anonhg.NetBSD.org/src/rev/a922bb23f599
branches:  netbsd-6
changeset: 773859:a922bb23f599
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Mar 02 16:48:10 2012 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #68):
        doc/BUILDING.mdoc: revision 1.88
        BUILDING: revision 1.99
        build.sh: revision 1.254
Add a missing period.
Add sanity checks for live-image and install-image targets
(which require mtree spec files built with MKUNPRIVED=yes)
to avoid unexpected makefs(8) error during image builds:
 - if release op is specified with live-image or install-image
   at the same time, make sure -U is also specified for the image builds
 - before perform live-image and install-image ops check METALOG file
   in DESTDIR to see if the build have been performed with MKUNPRIVED
XXX: Probably toolchain should create consistent spec files in
XXX: DESTDIR/etc/mtree dir regardless of MKUNPRIVED settings.

diffstat:

 BUILDING          |   4 ++--
 build.sh          |  30 +++++++++++++++++++++---------
 doc/BUILDING.mdoc |   4 ++--
 3 files changed, 25 insertions(+), 13 deletions(-)

diffs (98 lines):

diff -r c7afd9916a60 -r a922bb23f599 BUILDING
--- a/BUILDING  Fri Mar 02 16:45:29 2012 +0000
+++ b/BUILDING  Fri Mar 02 16:48:10 2012 +0000
@@ -660,8 +660,8 @@
                    machine, without the need for installation.
 
                    Before ``make live-image'' is attempted, RELEASEDIR must be
-                   populated by ``make release'' or equivalent The build must
-                   have been performed with MKUNPRIVED=yes because ``make
+                   populated by ``make release'' or equivalent.  The build
+                   must have been performed with MKUNPRIVED=yes because ``make
                    install-image'' relies on information in DESTDIR/METALOG.
 
      regression-tests
diff -r c7afd9916a60 -r a922bb23f599 build.sh
--- a/build.sh  Fri Mar 02 16:45:29 2012 +0000
+++ b/build.sh  Fri Mar 02 16:48:10 2012 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#      $NetBSD: build.sh,v 1.253 2012/01/22 03:53:32 tsutsui Exp $
+#      $NetBSD: build.sh,v 1.253.2.1 2012/03/02 16:48:10 riz Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -503,6 +503,8 @@
        do_syspkgs=false
        do_iso_image=false
        do_iso_image_source=false
+       do_live_image=false
+       do_install_image=false
        do_params=false
        do_rump=false
 
@@ -1577,6 +1579,16 @@
                fi
                ;;
        esac
+
+       # live-image and install-image targets require binary sets
+       # (actually DESTDIR/etc/mtree/set.* files) built with MKUNPRIVED.
+       # If release operation is specified with live-image or install-image,
+       # the release op should be performed with -U for later image ops.
+       #
+       if ${do_release} && ( ${do_live_image} || ${do_install_image} ) && \
+           [ "${MKUNPRIVED}" = "no" ] ; then
+               bomb "-U must be specified on building release to create images later."
+       fi
 }
 
 
@@ -1644,7 +1656,7 @@
        eval cat <<EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.253 2012/01/22 03:53:32 tsutsui Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.253.2.1 2012/03/02 16:48:10 riz Exp $
 # with these arguments: ${_args}
 #
 
@@ -1972,13 +1984,13 @@
                        statusmsg "Successful make ${op}"
                        ;;
 
-               live-image)
-                       ${runcmd} "${makewrapper}" ${parallel} ${op} ||
-                           bomb "Failed to make ${op}"
-                       statusmsg "Successful make ${op}"
-                       ;;
-
-               install-image)
+               live-image|install-image)
+                       # install-image and live-image require mtree spec files
+                       # built with UNPRIVED.  Assume UNPRIVED build has been
+                       # performed if METALOG file is created in DESTDIR.
+                       if [ ! -e "${DESTDIR}/METALOG" ] ; then
+                               bomb "The release binaries must have been built with -U to create images."
+                       fi
                        ${runcmd} "${makewrapper}" ${parallel} ${op} ||
                            bomb "Failed to make ${op}"
                        statusmsg "Successful make ${op}"
diff -r c7afd9916a60 -r a922bb23f599 doc/BUILDING.mdoc
--- a/doc/BUILDING.mdoc Fri Mar 02 16:45:29 2012 +0000
+++ b/doc/BUILDING.mdoc Fri Mar 02 16:48:10 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: BUILDING.mdoc,v 1.87 2012/02/14 21:32:07 apb Exp $
+.\"    $NetBSD: BUILDING.mdoc,v 1.87.2.1 2012/03/02 16:48:10 riz Exp $
 .\"
 .\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -1216,7 +1216,7 @@
 .Dq make live-image
 is attempted, RELEASEDIR must be populated by
 .Dq make release
-or equivalent
+or equivalent.
 The build must have been performed with
 .Sy MKUNPRIVED=yes 
 because



Home | Main Index | Thread Index | Old Index