aboutsummaryrefslogtreecommitdiff
path: root/release
Commit message (Collapse)AuthorAgeFilesLines
* Fix indentation nit.Glen Barber2014-11-241-2/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274946
* In vm_extra_install_packages(), only bootstrap pkg(8)Glen Barber2014-11-241-2/+7
| | | | | | | | | | | | | if VM_EXTRA_PACKAGES is empty. In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was bootstrapped earlier. Inspired by: cperciva Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274945
* Revert r274773, after I *specifically* objected to this changeGlen Barber2014-11-213-12/+19
| | | | | | | | | numerous times. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274775
* Change how packages are installed into VM images: Rather than chrootingColin Percival2014-11-213-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | into the image and running 'pkg install' from there, use 'pkg fetch' to download packages into a temporary location and then 'pkg add' to install them into the image. This simplifies the code by avoiding the need to copy /etc/resolv.conf into the image and then delete it later, and makes it possible to cross build (e.g., to create an amd64 image when running on i386 hardware; or in the future for building disk images for embedded platforms). Because pkg was implicitly installed when VM_EXTRA_PACKAGES was non-empty, add it to VM_EXTRA_PACKAGES in azure.conf and openstack.conf to maintain the current behaviour. By default repo-FreeBSD.sqlite is copied into the image, (a) to match previous behaviour, where the file would be downloaded by the chrooted pkg invocation; and (b) because it may be useful for testing purposes, e.g., to see why a package didn't get installed. Because this file is large (46 MB) and not likely to be useful in -RELEASE images which are being launched into Clouds several months later, it can be disabled by setting NOREPOSQLITE. As far as I know this commit does not change the disk images produced in any filesystem-visible way. Notes: svn path=/projects/release-vmimage/; revision=274773
* Add NOSWAP option which can be set by a vmimage.conf file to specify thatColin Percival2014-11-211-4/+9
| | | | | | | | | no swap space should be created in the image. This will be used by EC2 builds, since FreeBSD/EC2 allocates swap space on "ephemeral" disks which are physically attached to the Xen host node. Notes: svn path=/projects/release-vmimage/; revision=274771
* Merge duplicative vm-CLOUDTYPE targets before additional duplication getsColin Percival2014-11-201-18/+9
| | | | | | | added by the impending arrival of ec2 and gcloud. Notes: svn path=/projects/release-vmimage/; revision=274734
* Unmount filesystem and destroy md before we read the vnode from disk andColin Percival2014-11-201-1/+1
| | | | | | | | package it into a disk image. Otherwise we end up packaging an unclean filesystem. Notes: svn path=/projects/release-vmimage/; revision=274729
* Silence errors when umounting the chroot's /dev, since it probably doesn'tColin Percival2014-11-191-2/+2
| | | | | | | | | exist when we're running this. Unmount filesystems before attempting to destroy the md which holds them. Notes: svn path=/projects/release-vmimage/; revision=274726
* In vm_install_base(), copy the host resolv.conf intoGlen Barber2014-11-193-0/+8
| | | | | | | | | | | | | | the build chroot before attempting to do anything that requires working DNS (i.e., pkg bootstrap). In vm_extra_pre_umount(), remove the resolv.conf before the disk image is unmounted from the backing md(4). Reported by: cperciva Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274725
* Set the boot partition type to 'apple-boot' for powerpc.Glen Barber2014-11-141-1/+1
| | | | | | | | Submitted by: jhibbits Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274533
* Remove a stray directory from CLEANFILES.Glen Barber2014-11-101-1/+0
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274356
* Call cleanup() after everything is done.Glen Barber2014-11-081-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274297
* Change path for mk-vmimage.sh from ${TARGET}/ toGlen Barber2014-11-081-17/+11
| | | | | | | | | | | | scripts/ now that it is consolidated into one file. Fix paths for the base image and output disk image files. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274296
* mount(8) and umount(8) devfs(5) as needed.Glen Barber2014-11-081-0/+6
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274292
* Fix scheme flag to mkimg(1).Glen Barber2014-11-081-2/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274288
* Fix line continuation in write_partition_layout().Glen Barber2014-11-081-6/+2
| | | | | | | | | Remove variable test that is no longer needed. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274287
* Spell 'OPTARG' correctly.Glen Barber2014-11-081-1/+2
| | | | | | | | | Actually call vm_create_base(). Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274285
* Move usage() from vmimage.subr to mk-vmimage.sh,Glen Barber2014-11-082-6/+6
| | | | | | | | | in case vmimage.subr has not been sourced. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274284
* Fix DESTDIR for installworld, and make sure it is createdGlen Barber2014-11-081-3/+6
| | | | | | | | | before use. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274283
* Add vm_extra_pre_umount() prototype to vmimage.subr.Glen Barber2014-11-081-0/+7
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274282
* Add CLEANFILES entry for VM targetsGlen Barber2014-11-081-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274281
* Return if vm_create_disk() is unsuccessful.Glen Barber2014-11-081-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274280
* Add write_partition_layout() used to populate theGlen Barber2014-11-071-13/+27
| | | | | | | | | | | | | | | | | | | final image. Fix duplicated mkimg(1) call in vm_create_disk(). Add primitive (untested) PowerPC/PowerPC64 VM image support. Note: As it is currently written, the /boot/pmbr and /boot/{gptboot,boot1.hfs} use the build host and not the target build. Fixing this is likely going to be a hack in itself. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274211
* Initial rewrite to consolidate VM image build scripts into one.Glen Barber2014-11-0510-896/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There may be some very sharp edges here while refactoring. - Move amd64/mk-vmimage.sh -> scripts/mk-vmimage.sh. - Remove vm-base target from Makefile.vm. - In vm-image target, use getopts flags for argument passing. - Create tools/vmimage.subr, containing default and prototype for the following functions that are used to drive the build, run in this order: vm_install_base() vm_extra_install_base() vm_extra_install_packages() vm_extra_install_ports() vm_extra_enable_services() vm_extra_pre_umount() vm_create_disk() vm_extra_create_disk() - In tools/azure.conf, override: vm_extra_install_base() vm_extra_pre_umount() vm_extra_create_disk() - In tools/openstack.conf, override: vm_extra_install_base() vm_extra_pre_umount() Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274134
* Add examples for WITH_CLOUDWARE to release.conf.sample.Glen Barber2014-11-042-1/+14
| | | | | | | | | Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274071
* Add a 'vm-cloudware' target, used to drive allGlen Barber2014-11-031-0/+2
| | | | | | | | | targets in CLOUDTARGETS. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274070
* Add line continuation so OPENSTACKCONF is actually includedGlen Barber2014-11-031-1/+1
| | | | | | | | | in the env(1). Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274069
* Uncomment the cloudinit rc.conf(5) line.Glen Barber2014-11-011-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273944
* Fix output file name for openstack images.Glen Barber2014-10-292-2/+2
| | | | | | | | | | | No further conversion is necessary for this VM file target, so there is no need to append the '.raw' suffix here. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273836
* Initial commit providing a mechanism to createGlen Barber2014-10-294-1/+329
| | | | | | | | | | | | | | openstack images as part of the release build. This mimics the way Microsoft Azure images are built, with the addition of installing the net/cloud-init package and adding a (commented) rc.conf(5) entry for cloudinit. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273833
* Remove a few vestiges of passing an exit code toGlen Barber2014-10-292-4/+4
| | | | | | | | | panic(). Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273826
* Avoid hard-coding the Azure image file format.Glen Barber2014-10-293-4/+6
| | | | | | | | | | While here, avoid using OSRELEASE for the output file name. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273825
* Add glue to allow enabling building cloud providerGlen Barber2014-10-292-8/+19
| | | | | | | | | | | | | | | | VM images by default. When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the release/Makefile 'release' target. CLOUDTARGETS is generated from the contents of CLOUDWARE, which should be a list of all supported target providers. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273824
* Move virtual machine / cloud provider targets andGlen Barber2014-10-292-50/+58
| | | | | | | | | options from release/Makefile to their own Makefile. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273823
* Reintegrate head@r273095Glen Barber2014-10-141-0/+2
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273097
| * Merge the following from ^/projects/release-vmimage:Glen Barber2014-10-142-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r272436, r272437, r272792: r272436: Remove the first argument to panic(), which was initially intended to be the exit code, however when a non-zero exit code was returned to release/Makefile, this would prevent any remaining (and possibly successful) stages from being attempted. r272437: If the vm-base target fails, prevent the vm-image target from being run since it cannot possibly succeed. r272792: Add /usr/local/bin and /usr/local/sbin to PATH, needed if third-party software needs to use utilities outside of the base system during post-install stages (indexinfo is one culprit). MFC after: 3 days X-MFC-10.1: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=273093
| * Include urndis(4) in list of devices for which we generate hardware notes.Gavin Atkinson2014-10-041-0/+2
| | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=272544
| * Merge the following revisions from ^/projects/release-vmimage:Glen Barber2014-10-025-2/+466
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r272234, r272236, r272262, r272264, r272269, r272271, r272272, r272277, r272279, r272376, r272380, r272381, r272392, r272234, r272412: r272234: Initial commit to include virtual machine images as part of the FreeBSD release builds. This adds a make(1) environment variable requirement, WITH_VMIMAGES, which triggers the virtual machine image targets when not defined to an empty value. Relevant user-driven variables include: o VMFORMATS: The virtual machine image formats to create. Valid formats are provided by running 'mkimg --formats' o VMSIZE: The size of the resulting virtual machine image. Typical compression is roughly 140Mb, regardless of the target size (10GB, 15GB, 20GB, 40GB sizes have been tested with the same result). o VMBASE: The prefix of the virtual machine disk images. The VMBASE make(1) environment variable is suffixed with each format in VMFORMATS for each individual disk image, as well as '.img' for the source UFS filesystem passed to mkimg(1). This also includes a new script, mk-vmimage.sh, based on how the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE were created (mk-vmimage.sh in ^/user/gjb/thermite/). With the order in which the stages need to occur, as well as sanity-checking error cases, it makes much more sense to execute a shell script called from make(1), using env(1) to set specific parameters for the target image than it does to do this in make(1) directly. r272236: Use VMBASE in place of a hard-coded filename in the CLEANFILES list. r272262: Remove a 'set -x' that snuck in during testing. r272264: release/Makefile: Connect the virtual machine image build to the release target if WITH_VMIMAGES is set to a non-empty value. release/release.sh: Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS. release/release.conf.sample: Add commented entries for tuning the release build if the WITH_VMIMAGES make(1) environment variable is set to a non-empty value. r272269: release/Makefile: Include .OBJDIR in DESTDIR in the vm-base target. release/release.sh: Provide the full path to mddev. r272271: Fix UFS label for the root filesystem. r272272: Remove comments left in accidentally while testing, so the VM /etc/fstab is actually created. r272277: Remove the UFS label from the root filesystem since it is added by mkimg(1) as a gpt label, consistent with the fstab(5) entry. r272279: Comment cleanup in panic() message when mkimg(1) does not support the requested disk image format. r272376: Separate release/scripts/mk-vmimage.sh to machine-specific scripts, making it possible to mimic the functionality for non-x86 targets. Move echo output if MAKEFLAGS is empty outside of usage(). Remove TARGET/TARGET_ARCH evaluation. r272380: Avoid using env(1) to set values passed to mk-vmimage.sh, and instead pass the values as arguments to the script, making it easier to run this by hand, without 'make release'. Add usage_vm_base() and usage_vm_image() usage helpers. r272381: After evaluating WITH_VMIMAGES is non-empty, ensure the mk-vmimage.sh script exists before running it. r272392: Add WITH_COMPRESSED_VMIMAGES variable, which when set enables xz(1) compression of the virtual machine images. This is intentionally separate to allow more fine-grained tuning over which images are compressed, especially in cases where compressing 20GB sparse images can take hours. r272412: Document the new 'vm-image' target, and associated release.conf variables. r272413: Remove two stray comments added during the initial iterations of testing, no longer needed. MFC after: 5 days X-MFC-10.1: yes Tested on: r272269, r272272, r272279, r272380, r272392 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=272414
* | | Output an informational message when mkimg(1) runs, so itGlen Barber2014-10-142-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | does not appear that the process has stopped while waiting for a 'y/n' response when waagent is deprovisioned. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273095
* | | Fix signal list to trigger umount(8).Glen Barber2014-10-142-2/+2
| | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273079
* | | Clear VM_RC_LIST.Glen Barber2014-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273077
* | | Add a separate make(1) target to release/Makefile toGlen Barber2014-10-144-0/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build FreeBSD virtual machine disk images for use on the Microsoft Azure service. For now, this target is not directly connected to the build, however can be manually invoked. The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh, which does the heavy lifting to produce proper VHDs. mk-azure.sh uses a configuration file, defaulting to tools/azure.conf if otherwise unset. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273076
* | | Revert r272793, r272794, r272795:Glen Barber2014-10-142-80/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/projects/release-vmimage/; revision=273074
* | | Reference vm_prebuild_setup(), vm_setup(), andGlen Barber2014-10-092-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | vm_postbuild_setup() functions. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272795
* | | Allow mk-vmimage.sh to accept a configuration file asGlen Barber2014-10-092-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | an argument to '-c'. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272794
* | | Add prototypes for build-specific tuning:Glen Barber2014-10-092-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - vm_prebuild_setup(): Steps to run prior to creating the file-backed disk image. - vm_setup(): Steps to run while the file-backed disk image is mounted. - vm_postbuild_setup(): Steps to run after the file-backed disk image is dismounted. The intention is to override as necessary via build configuration files, as needed. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272793
* | | Add /usr/local/bin and /usr/local/sbin to PATH, neededGlen Barber2014-10-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if third-party software needs to use utilities outside of the base system during post-install stages (indexinfo is one culprit). Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272792
* | | If the vm-base target fails, prevent the vm-image targetGlen Barber2014-10-022-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | from being run since it cannot possibly succeed. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272437
* | | Remove the first argument to panic(), which was initiallyGlen Barber2014-10-022-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intended to be the exit code, however when a non-zero exit code was returned to release/Makefile, this would prevent any remaining (and possibly successful) stages from being attempted. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272436
* | | Remove two stray comments added during the initial iterationsGlen Barber2014-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | of testing, no longer needed. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=272413