aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile.vm
Commit message (Collapse)AuthorAgeFilesLines
* pass UNAME_r to fix building 14.x ports on 13.xGlen Barber2021-02-181-1/+1
| | | | | MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
* release: Add an image for CIEmmanuel Vadot2020-11-021-1/+5
| | | | | | | | | | | | | | | | | | | | A lot of projects CI can't do FreeBSD tests currently. The main reason is that the project CI infrastructure is runned on Linux and that our images aren't modifiable from a Linux hosts. Add a basic image specific for this case (called BASIC-CI for a lack of a better name). The image have no package pre-installed. It only have a few modification to have dhcp client runned on the default interface and sshd started with option to be able to log on without a password as root. Sponsored by: The FreeBSD Foundation Reviewed by: re (gjb@) Differential Revision: https://reviews.freebsd.org/D25598 Notes: svn path=/head/; revision=367284
* Ensure the TYPE, BRANCH, and REVISION variables are set inGlen Barber2020-01-131-0/+6
| | | | | | | | | | | | cloudware targets when OSRELEASE is overridden. Submitted by: Trond Endrestol PR: 243287 MFC after: 3 days Sponsored by: Rubicon Communications, LLC (netgate.com) Notes: svn path=/head/; revision=356685
* Increase the default VMSIZE for raw, qcow2, vhd, and vmdk virtualGlen Barber2019-10-111-1/+1
| | | | | | | | | machine images due to 'filesystem full' failures. Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/head/; revision=353440
* Reduce the default image size for virtual machine disk images fromGlen Barber2019-04-301-1/+1
| | | | | | | | | | | | | | | | | 30GB to 3GB. The raw images can be resized using truncate(1), and other formats can be resized with tools included with other tools included with other hypervisors. Enable the growfs(8) rc(8) at firstboot if the disk was resized prior to booting the virtual machine for the first time. Discussed with: several PR: 232313 (requested in other context) MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=346959
* Add support for cross-building cloudware images.Colin Percival2019-04-031-1/+20
| | | | | | | | | | | | | | If MACHINE_ARCH doesn't match TARGET_ARCH, and we're not in the special case of building i386 images on an amd64 host, we need to pull in the qemu-user-static package; this allows us to run some commands inside the VM disk image chroot, most notably to install packages. Reviewed by: gjb MFC after: 2 weeks Sponsored by: FreeBSD/EC2 patreon (https://www.patreon.com/cperciva) Notes: svn path=/head/; revision=345858
* Bump the size of virtual machine disk images from 20G to 30G,Glen Barber2018-02-261-1/+1
| | | | | | | | | | | | | providing more space for a local buildworld to succeed without attaching separate disks for /usr/src and /usr/obj. Reported by: mckusick MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=330033
* Ensure ${_CW} is uppercase when passing '-c' to mk-vmimage.sh,Glen Barber2017-06-061-1/+1
| | | | | | | | | | | otherwise with 'CLOUDWARE=vagrant-virtualbox', the path to the configuration file may be incorrect. MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=319621
* Force a few variables to be upper case when they are evaulated.Brad Davis2017-01-311-2/+2
| | | | | | | | | This allows specifying, for example: CLOUDWARE=vagrant-vmware Approved by: re (gjb) Notes: svn path=/head/; revision=313021
* Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for theGlen Barber2016-11-171-1/+1
| | | | | | | | | vm-image target, missed in r308737. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=308779
* Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwiseGlen Barber2016-11-161-1/+1
| | | | | | | | | mkimg(1) does not create the second partition after r307008. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=308737
* Add the ability to override the size of the swap partition when buildingNavdeep Parhar2016-10-101-0/+1
| | | | | | | | | | VM images. The default continues to be 1G. Reviewed by: gjb@ Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=307008
* Remove vestigial cloudware-install bits missed in r300767.Glen Barber2016-05-261-6/+0
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300776
* Remove the cw*-install target.Glen Barber2016-05-261-9/+0
| | | | | | | | | | | All operations are performed on the original output file, and nothing is ever done with the copied file (as in, no modifications and/or publication from the copied file). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300767
* Disconnect the OPENSTACK target from the CLOUDWARE list.Glen Barber2016-05-261-1/+0
| | | | | | | | | | | | | | | This was reported to not work as expected, and feedback following the report was never received. In addition, we do not publish these anywhere publicly. The configuration file is not (yet) removed, in hopes that the remaining details on the original issues can be resolved, and we can publish the resulting images in the future. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300762
* Disconnect the AZURE target from the CLOUDWARE list.Glen Barber2016-05-261-2/+1
| | | | | | | | | | | | | | | | Microsoft has graciously overtaken publication of FreeBSD on Azure since 10.3-RELEASE. Many thanks to Microsoft for their support of FreeBSD on Azure. The configuration file and Makefile.azure are not (yet) planned to be removed, as they may be useful in the future. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300761
* Deprecate MD5 checksum generation in favor of SHA512.Glen Barber2015-10-141-4/+4
| | | | | | | | | | | | | This was discussed during the 10.2-RELEASE cycle, however since we were nearing the end of the cycle, we decided to defer this change until after 10.2-RELEASE. Reminded by: so (delphij), jmg MFC after: 5 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289337
* Add support for building VirtualBox Vagrant images.Brad Davis2015-07-201-4/+8
| | | | | | | | | Abstract the build, package and upload to handle building either type. Approved by: re (gjb) Notes: svn path=/head/; revision=285722
* Add initial support for building Vagrant images for VMWare. Next steps will ↵Brad Davis2015-06-271-1/+6
| | | | | | | | | be adding Virtualbox support and uploading to Hashicorp Atlas for others to consume. Approved by: re (gjb) Notes: svn path=/head/; revision=284893
* Add initial support for automatically uploading GCE virtualGlen Barber2015-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | machine images to the Google Compute Engine platform. By default, gcutil/gsutil requires an Oauth2 login generated from a URL that must be opened in a browser, a verification code copied back to the terminal from which it was invoked, etc., etc., making it near impossible for automation. I've hacked together an evil solution to work around this, so unless GCE_LOGIN_SKIP is set to a non-empty value, this Makefile will not do anything useful. As a result of this commit, remove the gce-package.sh script that was never, nor will ever be, used. MFC after: 3 days X-MFC-Note: (hopefully) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=284882
* Add Makefile.azure, used to upload VHD images to theGlen Barber2015-06-181-0/+1
| | | | | | | | | | | Microsoft Azure environment, similar to the EC2 AMIs. MFC after: 3 days Tested with: stable/10@r284517 (patched) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=284567
* Add code for creating an EC2 AMI.Colin Percival2015-04-011-0/+2
| | | | Notes: svn path=/head/; revision=280928
* Add bits for building EC2 disk images. Make logic for uploading theseColin Percival2015-03-311-0/+4
| | | | | | | to create EC2 AMIs will come in a later commit. Notes: svn path=/head/; revision=280879
* Add a CLOUDPACKAGE variable to contain a list of targets forGlen Barber2015-02-241-1/+13
| | | | | | | | | | | | | | | | | | post-install packaging cloud provider images. Add a 'gce-package.sh' script to generate the final output image ready for upload to the GCE platform. Right now, this is the only image that has a specific output format (GNU-tar), and this implementation is expected to be temporary. This is not directly connected to the other release targets. MFC after: 1 week X-MFC-with: r279249, r279250 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279257
* Remove a stale comment.Glen Barber2015-02-241-2/+0
| | | | | | | | | MFC after: 1 week X-MFC-with: r279249 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279250
* Add 'cloudware-install' target to handle copying cloudGlen Barber2015-02-241-3/+22
| | | | | | | | | | | | | | | | | | | | disk images to a directory within DESTDIR. Add CLOUDINSTALL variable to automatically generate the actual list of install targets. While here, rename the cloud-specific names from 'vm-' to 'cw-' to avoid naming collisions. Add AZURE_DISK, GCE_DISK, and OPENSTACK_DISK output file variables. Add 'cloudware-install' to the 'install' target. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=279249
* release: use xz via pipe when compressing the tarballs.Rui Paulo2015-02-171-1/+1
| | | | | | | | | | | | | | | | | libarchive(3) doesn't support the new liblzma API yet, but this change allows us to enable multi-threaded xz compression. ``make release'' should now finish in half the time on a machine with several cores and fast disks (our typical build server). This behaviour only applies when building a release and it doesn't affect buildworld/installworld. To disable threaded xz compression, set XZ_THREADS=1. Reviewed by: gjb Tested by: gjb Notes: svn path=/head/; revision=278926
* Enable multi-threaded xz(1) compression, after r278433.Glen Barber2015-02-091-1/+1
| | | | | | | | | | | | | Allow multi-threaded xz(1) to be turned off by specifying NO_XZTHREADS, and allow number of threads to be overridden by specifying XZ_THREADS=N. MFC after: 1 week X-MFC-needs: r278433 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=278449
* When iterating through VMFORMATS, the VMBASE file isGlen Barber2015-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | not removed or truncated to a zero-size file, which if used to create more than one disk image format, can result in accidental pollution of the target formatted disk image. Instead of using a single VMBASE image (vm.img, by default), use a single base file for each format, named as VMFORMAT.img, which produces VMBASE.VMFORMAT as the final formatted image. Reported by: cperciva MFC after: 1 month X-MFC-with: r277458, r277536 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=277609
* Rename the 'release' target to 'real-release', andGlen Barber2015-01-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | add two targets, 'vm-release' and 'cloudware-release', that are invoked if WITH_VMIMAGES and WITH_CLOUDWARE are not empty. This fixes an issue where 'make release' would not build the cloud provider targets because CLOUDWARE was not yet set. [1] Move the WITH_VMIMAGES and WITH_CLOUDWARE targets to Makefile.vm. Note: There is no 'cloudware-install' target yet, since some of the disk image names may need to be specific to the provider, so this is probably best handled by the build scripts. Reported by: cperciva [1] MFC after: 1 month X-MFC-with: r277458 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=277536
* Merge the following revisions from ^/projects/release-vmimage:Glen Barber2015-01-201-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r273823-r273826, r273833, r273836, r273944, r274069-r274071, r274134, r274211, r274280-r274285, r274287-r274288, r274292, r274296-r274297, r274356, r274533, r274725, r274726, r274729, r274734, r274771, r274945-r274946, r277180, r277183-r277184, r277186-r277187, r277250-r277253, r277263-r277264, r277383-r277384, r277393-r277395, r277438-r277439, r277447, r277455: r273823: Move virtual machine / cloud provider targets and options from release/Makefile to their own Makefile. r273824: Add glue to allow enabling building cloud provider VM images by default. When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the release/Makefile 'release' target. r273825: Avoid hard-coding the Azure image file format. While here, avoid using OSRELEASE for the output file name. r273826: Remove a few vestiges of passing an exit code to panic(). r273833: Initial commit providing a mechanism to create openstack images as part of the release build. r273836: Fix output file name for openstack images. No further conversion is necessary for this VM file target, so there is no need to append the '.raw' suffix here. r273944: Uncomment the cloudinit rc.conf(5) line. r274069: Add line continuation so OPENSTACKCONF is actually included in the env(1). r274070: Add a 'vm-cloudware' target, used to drive all targets in CLOUDTARGETS. r274071: Add examples for WITH_CLOUDWARE to release.conf.sample. Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS. r274134: Initial rewrite to consolidate VM image build scripts into one. r274211: Add write_partition_layout() used to populate the 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. r274280: Return if vm_create_disk() is unsuccessful. r274281: Add CLEANFILES entry for VM targets r274282: Add vm_extra_pre_umount() prototype to vmimage.subr. r274283: Fix DESTDIR for installworld, and make sure it is created before use. r274284: Move usage() from vmimage.subr to mk-vmimage.sh, in case vmimage.subr has not been sourced. r274285: Spell 'OPTARG' correctly. Actually call vm_create_base(). r274287: Fix line continuation in write_partition_layout(). Remove variable test that is no longer needed. r274288: Fix scheme flag to mkimg(1). r274292: mount(8) and umount(8) devfs(5) as needed. r274296: Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that it is consolidated into one file. Fix paths for the base image and output disk image files. r274297: Call cleanup() after everything is done. r274356: Remove a stray directory from CLEANFILES. r274533: Set the boot partition type to 'apple-boot' for powerpc. r274725: In vm_install_base(), copy the host resolv.conf into 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). r274726 (cperciva): Silence errors when umounting the chroot's /dev, since it probably doesn't exist when we're running this. Unmount filesystems before attempting to destroy the md which holds them. r274729 (cperciva): Unmount filesystem and destroy md before we read the vnode from disk and package it into a disk image. Otherwise we end up packaging an unclean filesystem. r274734 (cperciva): Merge duplicative vm-CLOUDTYPE targets before additional duplication gets added by the impending arrival of ec2 and gcloud. r274771 (cperciva): Add NOSWAP option which can be set by a vmimage.conf file to specify that 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. r274945: In vm_extra_install_packages(), only bootstrap pkg(8) if VM_EXTRA_PACKAGES is empty. In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was bootstrapped earlier. r274946: Fix indentation nit. r277180: In vm_extra_install_base(), do not install waagent in the openstack image, because it is not used. This appears to be a copy mistake. Remove vm_extra_install_base() from the openstack.conf entirely, since it does not need to be overridden. r277183: Enable the textmode console by default for VM images, since there is no way to tell if the environment will be able to use the graphics-mode console. r277184: Enable password-less sudo for openstack images. r277186: Update the VM_EXTRA_PACKAGES list for the openstack images. The documentation suggests doing a "just fetch this and run it"-style bootstrap, from which the list of dependencies was obtained (in github, at: pellaeon/bsd-cloudinit-installer) There is one Python dependency unmet, oslo.config, which is not in the Ports Collection. r277187: Add a comment to note that setting hw.vga.textmode=1 is temporary. r277250: Remove vm_extra_install_base() for the Azure image, now that the waagent exists in the ports tree. Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list. In vm_extra_pre_umount(), remove the explicit pkg(8) install list, as dependencies are resolved by sysutils/azure-agent. r277251: Add a 'list-cloudware' target to print the list of supported CLOUDWARE values and a description. Add the AZURE_DESC and OPENSTACK_DESC descriptions. r277252: Update release(7) r277253: Add 'list-vmtargets' target, which produces a list of all supported VM and cloud provider images. Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions. Format the output to make a bit more readable. Update release(7) to document the list-vmtargets target. r277263: Add initial support for the GCE (Google Compute Engine) cloud hosting provider image. r277264: Style and line length cleanup. r277383: Remove the console setting from rc.conf(5), which is not used there. While here, set console to include vidconsole in the loader.conf(5). r277384: Fix an indentation nit. No functional changes. r277393: Remove the pkg-clean(8) call from vm_extra_pre_umount() since the function is often overridden. Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid duplicated code. r277394: Move resolv.conf(5) removal back to vm_extra_pre_umount() where it belongs. The GCE image needs resolv.conf(5) to exist (created as part of the image setup), so it cannot be removed. r277395: Comment the line that configures ttys(5) to 'off', which makes it impossible to test that the image boots. Add a note explaining why the line is commented, and not (yet) removed entirely. r277438: Move the 'install' bits that are specific to virtual machine images from the Makefile to Makefile.vm. Rename the 'install' target to 'release-install', and add a new 'vm-install' target. Add a new 'install' target that invokes the new targets. r277439: Add WITH_CLOUDWARE to the list of make(1) variables for the release build. r277447: Remove hw.vga.textmode=1 from the VM image loader.conf, which was included during test builds and not intended to be included when merging this project branch back to head. r277455: Remove mk-azure.sh, which is no longer needed. MFC after: 1 month X-MFC-To: stable/10 (requires mkimg(1)) Help from: cperciva, swills Relnotes: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=277458
* Add initial support for the GCE (Google Compute Engine)Glen Barber2015-01-161-0/+3
| | | | | | | | | | | | | cloud hosting provider image. Many thanks to swills@ for his work on getting this to this point. Submitted by: swills Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=277263
* Add 'list-vmtargets' target, which produces a list ofGlen Barber2015-01-161-1/+15
| | | | | | | | | | | | | | | | all supported VM and cloud provider images. Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions. Format the output to make a bit more readable. Update release(7) to document the list-vmtargets target. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=277253
* Add a 'list-cloudware' target to print the list ofGlen Barber2015-01-161-0/+9
| | | | | | | | | | | supported CLOUDWARE values and a description. Add the AZURE_DESC and OPENSTACK_DESC descriptions. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=277251
* 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
* 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
* 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
* 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 CLEANFILES entry for VM targetsGlen Barber2014-11-081-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=274281
* Initial rewrite to consolidate VM image build scripts into one.Glen Barber2014-11-051-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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
* Initial commit providing a mechanism to createGlen Barber2014-10-291-1/+13
| | | | | | | | | | | | | | 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
* Avoid hard-coding the Azure image file format.Glen Barber2014-10-291-2/+4
| | | | | | | | | | 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-291-8/+16
| | | | | | | | | | | | | | | | 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-291-0/+57
options from release/Makefile to their own Makefile. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-vmimage/; revision=273823