From owner-svn-src-projects@FreeBSD.ORG Tue Oct 14 11:20:09 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A796CF7; Tue, 14 Oct 2014 11:20:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7722FC85; Tue, 14 Oct 2014 11:20:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9EBK9ZA070914; Tue, 14 Oct 2014 11:20:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9EBK9mc070912; Tue, 14 Oct 2014 11:20:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410141120.s9EBK9mc070912@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 14 Oct 2014 11:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r273074 - in projects/release-vmimage/release: amd64 i386 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 11:20:09 -0000 Author: gjb Date: Tue Oct 14 11:20:08 2014 New Revision: 273074 URL: https://svnweb.freebsd.org/changeset/base/273074 Log: Revert r272793, r272794, r272795: Remove implementation of vm_prebuild_setup(), vm_setup(), and vm_postbuild_setup(). It does not scale well, and I am not happy with their implementation. Sponsored by: The FreeBSD Foundation Modified: projects/release-vmimage/release/amd64/mk-vmimage.sh projects/release-vmimage/release/i386/mk-vmimage.sh Modified: projects/release-vmimage/release/amd64/mk-vmimage.sh ============================================================================== --- projects/release-vmimage/release/amd64/mk-vmimage.sh Tue Oct 14 10:14:14 2014 (r273073) +++ projects/release-vmimage/release/amd64/mk-vmimage.sh Tue Oct 14 11:20:08 2014 (r273074) @@ -35,18 +35,6 @@ PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" export PATH -vm_prebuild_setup() { - return 0 -} - -vm_setup() { - return 0 -} - -vm_postbuild_setup() { - return 0 -} - usage_vm_base() { echo -n "$(basename ${0}) vm-base " echo " " @@ -92,9 +80,6 @@ panic() { } vm_create_baseimage() { - # Run anything that is needed before the virtual machine disk image - # is created. - vm_prebuild_setup # Creates the UFS root filesystem for the virtual machine disk, # written to the formatted disk image with mkimg(1). # @@ -128,9 +113,6 @@ vm_create_baseimage() { >> ${DESTDIR}/etc/fstab echo '/dev/gpt/swapfs none swap sw 0 0' \ >> ${DESTDIR}/etc/fstab - # Run anything that is needed while the virtual machine disk image - # userland filesystem is still mounted as a md(4) device. - vm_setup sync while ! umount ${DESTDIR}; do i=$(( $i + 1 )) @@ -190,35 +172,13 @@ vm_create_vmdisk() { -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} - # Run anything that is needed for the virtual machine disk image - # after it has been created. - vm_postbuild_setup return 0 } main() { - vm_config= - while getopts "c:" arg; do - case ${arg} in - c) - vm_config="${OPTARG}" - ;; - *) - ;; - esac - done - shift $(( ${OPTIND} - 1 )) - cmd="${1}" shift 1 - if [ ! -z "${vm_config}" ]; then - if [ ! -e "${vm_config}" ]; then - panic "Configuration file ${vm_config} not found." - fi - . ${vm_config} - fi - case ${cmd} in vm-base) eval vm_create_baseimage "$@" || return 0 Modified: projects/release-vmimage/release/i386/mk-vmimage.sh ============================================================================== --- projects/release-vmimage/release/i386/mk-vmimage.sh Tue Oct 14 10:14:14 2014 (r273073) +++ projects/release-vmimage/release/i386/mk-vmimage.sh Tue Oct 14 11:20:08 2014 (r273074) @@ -35,18 +35,6 @@ PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" export PATH -vm_prebuild_setup() { - return 0 -} - -vm_setup() { - return 0 -} - -vm_postbuild_setup() { - return 0 -} - usage_vm_base() { echo -n "$(basename ${0}) vm-base " echo " " @@ -92,9 +80,6 @@ panic() { } vm_create_baseimage() { - # Run anything that is needed before the virtual machine disk image - # is created. - vm_prebuild_setup # Creates the UFS root filesystem for the virtual machine disk, # written to the formatted disk image with mkimg(1). # @@ -128,9 +113,6 @@ vm_create_baseimage() { >> ${DESTDIR}/etc/fstab echo '/dev/gpt/swapfs none swap sw 0 0' \ >> ${DESTDIR}/etc/fstab - # Run anything that is needed while the virtual machine disk image - # userland filesystem is still mounted as a md(4) device. - vm_setup sync while ! umount ${DESTDIR}; do i=$(( $i + 1 )) @@ -190,35 +172,13 @@ vm_create_vmdisk() { -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} - # Run anything that is needed for the virtual machine disk image - # after it has been created. - vm_postbuild_setup return 0 } main() { - vm_config= - while getopts "c:" arg; do - case ${arg} in - c) - vm_config="${OPTARG}" - ;; - *) - ;; - esac - done - shift $(( ${OPTIND} - 1 )) - cmd="${1}" shift 1 - if [ ! -z "${vm_config}" ]; then - if [ ! -e "${vm_config}" ]; then - panic "Configuration file ${vm_config} not found." - fi - . ${vm_config} - fi - case ${cmd} in vm-base) eval vm_create_baseimage "$@" || return 0