1999-08-28 01:35:59 +00:00
|
|
|
# $FreeBSD$
|
1994-09-23 08:28:25 +00:00
|
|
|
#
|
2011-03-14 13:47:17 +00:00
|
|
|
# Makefile for building releases and release media.
|
2014-04-08 00:53:31 +00:00
|
|
|
#
|
2011-03-14 13:47:17 +00:00
|
|
|
# User-driven targets:
|
2013-07-22 12:07:57 +00:00
|
|
|
# cdrom: Builds release CD-ROM media (disc1.iso)
|
2013-11-30 03:31:40 +00:00
|
|
|
# dvdrom: Builds release DVD-ROM media (dvd1.iso)
|
2013-07-21 05:23:34 +00:00
|
|
|
# memstick: Builds memory stick image (memstick.img)
|
MFC r257805, r257806, r257807, r257942:
r257805:
Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.
This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted). In addition, it is possible
to do bootonly-style installation, where the base.txz, kernel.txz,
etc. are fetched from a remote source.
Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.
r257806:
Remove extra target from 'memstick' that I forgot to remove before
previous commit.
r257807:
Update release(7) to include 'mini-memstick'.
r257942:
Fix a few style nits.
Sponsored by: The FreeBSD Foundation
2013-12-11 19:26:56 +00:00
|
|
|
# mini-memstick: Builds minimal memory stick image (mini-memstick.img)
|
2011-03-14 13:47:17 +00:00
|
|
|
# ftp: Sets up FTP distribution area (ftp)
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
# release: Invokes real-release, vm-release, and cloudware-release targets
|
|
|
|
# real-release: Build all media and FTP distribution area
|
|
|
|
# vm-release: Build all virtual machine image targets
|
|
|
|
# cloudware-release: Build all cloud hosting provider targets
|
|
|
|
# install: Invokes the release-install and vm-install targets
|
|
|
|
# release-install: Copies all release installation media into ${DESTDIR}
|
|
|
|
# vm-install: Copies all virtual machine images into ${DESTDIR}
|
2011-03-14 13:47:17 +00:00
|
|
|
#
|
|
|
|
# Variables affecting the build process:
|
|
|
|
# WORLDDIR: location of src tree -- must have built world and default kernel
|
2014-04-08 00:53:31 +00:00
|
|
|
# (by default, the directory above this one)
|
2011-03-14 13:47:17 +00:00
|
|
|
# PORTSDIR: location of ports tree to distribute (default: /usr/ports)
|
|
|
|
# DOCDIR: location of doc tree (default: /usr/doc)
|
2013-12-17 04:16:20 +00:00
|
|
|
# NOPKG: if set, do not distribute third-party packages
|
2011-03-14 13:47:17 +00:00
|
|
|
# NOPORTS: if set, do not distribute ports tree
|
|
|
|
# NOSRC: if set, do not distribute source tree
|
|
|
|
# NODOC: if set, do not generate release documentation
|
2013-12-05 00:59:29 +00:00
|
|
|
# WITH_DVD: if set, generate dvd1.iso
|
2014-04-08 00:53:31 +00:00
|
|
|
# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1)
|
|
|
|
# (uncompressed images are not removed)
|
MFC r272414:
Merge the following revisions from ^/projects/release-vmimage:
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.
Sponsored by: The FreeBSD Foundation
2014-10-14 12:23:44 +00:00
|
|
|
# WITH_VMIMAGES: if set, build virtual machine images with the release
|
|
|
|
# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images
|
|
|
|
# with xz(1) (extremely time consuming)
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
# WITH_CLOUDWARE: if set, build cloud hosting disk images with the release
|
2014-04-08 00:53:31 +00:00
|
|
|
# TARGET/TARGET_ARCH: architecture of built release
|
2001-02-19 14:23:49 +00:00
|
|
|
#
|
2009-08-14 20:35:42 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
WORLDDIR?= ${.CURDIR}/..
|
|
|
|
PORTSDIR?= /usr/ports
|
|
|
|
DOCDIR?= /usr/doc
|
|
|
|
RELNOTES_LANG?= en_US.ISO8859-1
|
2014-04-08 00:53:31 +00:00
|
|
|
XZCMD?= /usr/bin/xz
|
2000-07-20 03:07:29 +00:00
|
|
|
|
2013-12-05 00:59:29 +00:00
|
|
|
.if !defined(TARGET) || empty(TARGET)
|
|
|
|
TARGET= ${MACHINE}
|
|
|
|
.endif
|
|
|
|
.if !defined(TARGET_ARCH) || empty(TARGET_ARCH)
|
2011-05-18 17:39:28 +00:00
|
|
|
.if ${TARGET} == ${MACHINE}
|
2013-12-05 00:59:29 +00:00
|
|
|
TARGET_ARCH= ${MACHINE_ARCH}
|
2002-02-03 07:00:37 +00:00
|
|
|
.else
|
2013-12-05 00:59:29 +00:00
|
|
|
TARGET_ARCH= ${TARGET}
|
|
|
|
.endif
|
2002-02-03 07:00:37 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
|
2012-03-08 01:47:12 +00:00
|
|
|
DISTDIR= dist
|
2000-06-04 04:41:41 +00:00
|
|
|
|
2013-02-03 10:26:24 +00:00
|
|
|
# Define OSRELEASE by using newvars.sh
|
|
|
|
.if !defined(OSRELEASE) || empty(OSRELEASE)
|
|
|
|
.for _V in TYPE BRANCH REVISION
|
|
|
|
${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V}
|
|
|
|
.endfor
|
|
|
|
.for _V in ${TARGET_ARCH}
|
|
|
|
.if !empty(TARGET:M${_V})
|
|
|
|
OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}
|
2014-11-04 23:02:16 +00:00
|
|
|
VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET}
|
2013-02-03 10:26:24 +00:00
|
|
|
.else
|
|
|
|
OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH}
|
2014-11-04 23:02:16 +00:00
|
|
|
VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH}
|
2013-02-03 10:26:24 +00:00
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
MFC r273653:
Fix a few issues with creating VOLUME_LABEL for the
installation ISOs:
- TYPE, BRANCH, and REVISION are only defined if
OSRELEASE is not defined, so in situations where
one might set OSRELEASE for an in-house ISO build,
VOLUME_LABEL would be empty.
- makefs(8) limits the volume label to 32 characters,
which for the powerpc64 case, OSRELEASE expands to
FreeBSD-11.0-CURRENT-powerpc-powerpc64. Even with
removing the prefixing 'FreeBSD-', the string is 30
characters long, leaving zero room for suffixing the
type of ISO media (BO for bootonly, CD for cdrom, and
DVD for dvdrom).
Resolve these by defining VOLUME_LABEL when defining
OSRELEASE if unset. If OSRELEASE is defined by the
builder, use the OSRELEASE from that definition as the
VOLUME_LABEL.
In addition, for cases where both TARGET and TARGET_ARCH
are used for the VOLUME_LABEL, use TARGET_ARCH if it
differs from TARGET.
There are probably a few sharp edges here yet, but these
problems are going to affect the powerpc/powerpc64 builds
for 10.1-RELEASE, so the immediate concern is fixing the
underlying problem at hand quickly, and less so about the
elegance of the fix.
Insta-MFC ok: re (kib)
Sponsored by: The FreeBSD Foundation
2014-10-26 17:14:57 +00:00
|
|
|
.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL)
|
|
|
|
VOLUME_LABEL= FreeBSD_Install
|
|
|
|
.endif
|
2014-10-21 00:06:03 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
.if !exists(${DOCDIR})
|
|
|
|
NODOC= true
|
2005-06-16 18:16:14 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
.if !exists(${PORTSDIR})
|
|
|
|
NOPORTS= true
|
2010-07-13 21:19:59 +00:00
|
|
|
.endif
|
|
|
|
|
2014-04-08 00:53:31 +00:00
|
|
|
EXTRA_PACKAGES=
|
2003-08-02 18:21:02 +00:00
|
|
|
.if !defined(NOPORTS)
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES+= ports.txz
|
2003-08-02 18:21:02 +00:00
|
|
|
.endif
|
1997-06-24 23:08:18 +00:00
|
|
|
.if !defined(NOSRC)
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES+= src.txz
|
1997-06-24 23:08:18 +00:00
|
|
|
.endif
|
2001-05-30 17:05:15 +00:00
|
|
|
.if !defined(NODOC)
|
2011-03-14 13:47:17 +00:00
|
|
|
EXTRA_PACKAGES+= reldoc
|
2002-11-04 00:50:01 +00:00
|
|
|
.endif
|
2003-07-25 08:54:41 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
RELEASE_TARGETS= ftp
|
2012-03-08 01:47:12 +00:00
|
|
|
IMAGES=
|
2011-03-14 13:47:17 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
|
|
|
|
RELEASE_TARGETS+= cdrom
|
2013-07-22 12:07:57 +00:00
|
|
|
IMAGES+= disc1.iso bootonly.iso
|
2013-12-05 00:59:29 +00:00
|
|
|
. if defined(WITH_DVD) && !empty(WITH_DVD)
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
RELEASE_TARGETS+= dvdrom
|
|
|
|
IMAGES+= dvd1.iso
|
|
|
|
. endif
|
2002-10-21 14:21:08 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
|
2013-07-21 05:23:34 +00:00
|
|
|
RELEASE_TARGETS+= memstick.img
|
MFC r257805, r257806, r257807, r257942:
r257805:
Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.
This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted). In addition, it is possible
to do bootonly-style installation, where the base.txz, kernel.txz,
etc. are fetched from a remote source.
Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.
r257806:
Remove extra target from 'memstick' that I forgot to remove before
previous commit.
r257807:
Update release(7) to include 'mini-memstick'.
r257942:
Fix a few style nits.
Sponsored by: The FreeBSD Foundation
2013-12-11 19:26:56 +00:00
|
|
|
RELEASE_TARGETS+= mini-memstick.img
|
2013-07-21 05:23:34 +00:00
|
|
|
IMAGES+= memstick.img
|
MFC r257805, r257806, r257807, r257942:
r257805:
Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.
This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted). In addition, it is possible
to do bootonly-style installation, where the base.txz, kernel.txz,
etc. are fetched from a remote source.
Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.
r257806:
Remove extra target from 'memstick' that I forgot to remove before
previous commit.
r257807:
Update release(7) to include 'mini-memstick'.
r257942:
Fix a few style nits.
Sponsored by: The FreeBSD Foundation
2013-12-11 19:26:56 +00:00
|
|
|
IMAGES+= mini-memstick.img
|
2002-11-01 20:53:50 +00:00
|
|
|
.endif
|
2014-09-09 21:07:21 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh)
|
|
|
|
RELEASE_TARGETS+=uefi-memstick.img
|
2014-09-12 19:32:18 +00:00
|
|
|
RELEASE_TARGETS+=uefi-mini-memstick.img
|
2014-09-09 21:07:21 +00:00
|
|
|
IMAGES+= uefi-memstick.img
|
2014-09-12 19:32:18 +00:00
|
|
|
IMAGES+= uefi-mini-memstick.img
|
2014-09-09 21:07:21 +00:00
|
|
|
.endif
|
2014-09-12 18:23:22 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh)
|
|
|
|
RELEASE_TARGETS+=uefi-disc1.iso
|
|
|
|
RELEASE_TARGETS+=uefi-bootonly.iso
|
|
|
|
IMAGES+= uefi-disc1.iso
|
|
|
|
IMAGES+= uefi-bootonly.iso
|
|
|
|
. if defined(WITH_DVD) && !empty(WITH_DVD)
|
|
|
|
RELEASE_TARGETS+=uefi-dvd1.iso
|
|
|
|
IMAGES+= uefi-dvd1.iso
|
|
|
|
. endif
|
|
|
|
.endif
|
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
2004-01-26 19:58:38 +00:00
|
|
|
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
CLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES}
|
2014-04-08 00:53:31 +00:00
|
|
|
.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
|
|
|
|
. for I in ${IMAGES}
|
|
|
|
CLEANFILES+= ${I}.xz
|
|
|
|
. endfor
|
|
|
|
.endif
|
2014-06-12 17:13:35 +00:00
|
|
|
.if defined(WITH_DVD) && !empty(WITH_DVD)
|
|
|
|
CLEANFILES+= pkg-stage
|
|
|
|
.endif
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
CLEANDIRS= dist ftp disc1 bootonly dvd
|
2013-12-05 00:59:29 +00:00
|
|
|
beforeclean:
|
|
|
|
chflags -R noschg .
|
2011-03-14 13:47:17 +00:00
|
|
|
.include <bsd.obj.mk>
|
2013-12-05 00:59:29 +00:00
|
|
|
clean: beforeclean
|
2005-03-02 22:46:07 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
base.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}
|
|
|
|
cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
|
2011-03-14 13:47:17 +00:00
|
|
|
# Set up mergemaster root database
|
2011-08-18 16:54:04 +00:00
|
|
|
sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \
|
2012-03-08 01:47:12 +00:00
|
|
|
"TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base"
|
2013-12-25 06:09:07 +00:00
|
|
|
etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
|
2014-03-11 12:04:58 +00:00
|
|
|
-s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate"
|
2011-07-09 23:01:54 +00:00
|
|
|
# Package all components
|
2012-03-08 01:47:12 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
|
|
|
|
mv ${DISTDIR}/*.txz .
|
2011-03-14 13:47:17 +00:00
|
|
|
|
|
|
|
kernel.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}
|
|
|
|
cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR}
|
|
|
|
mv ${DISTDIR}/kernel*.txz .
|
2011-03-14 13:47:17 +00:00
|
|
|
|
|
|
|
src.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}/usr
|
2011-03-14 13:47:17 +00:00
|
|
|
ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
|
2012-11-11 21:52:18 +00:00
|
|
|
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn --exclude .zfs \
|
MFC r262499, r262505, r262507, r262509:
r262499:
release.sh:
- Add a VCSCMD variable that defaults to 'svn checkout',
and update places 'svn co' is used directly.
- After sourcing a configuration file, prefix SRCBRANCH,
PORTBRANCH, and DOCBRANCH with the SVNROOT.
- Properly capitalize 'FreeBSD.org' in the default SVNROOT.
- Update Copyright.
release.conf.sample:
- Add an example to use git instead of svn, by nullifying
SVNROOT, and setting SRCBRANCH, DOCBRANCH, and PORTBRANCH
to the URL fo a git repository.
release.7:
- Document VCSCMD.
r262505:
In release/Makefile, remove exclusion of CVS directories in the
src/ and ports/ distributions.
While I am thinking about it, exclude .git directories for src/
and ports/, as somewhat of a followup to r262499.
r262507:
Chase r262505, and remove CVS exclusion from picobsd builds.
r262509:
Rework how WORLD_FLAGS and KERNEL_FLAGS are set, to remove an
unnecessary expr(1) call.
Sponsored by: The FreeBSD Foundation
2014-03-05 00:45:28 +00:00
|
|
|
--exclude .git --exclude @ --exclude usr/src/release/dist usr/src
|
2011-03-14 13:47:17 +00:00
|
|
|
|
|
|
|
ports.txz:
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ${DISTDIR}/usr
|
2011-03-14 13:47:17 +00:00
|
|
|
ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
|
|
|
|
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \
|
MFC r262499, r262505, r262507, r262509:
r262499:
release.sh:
- Add a VCSCMD variable that defaults to 'svn checkout',
and update places 'svn co' is used directly.
- After sourcing a configuration file, prefix SRCBRANCH,
PORTBRANCH, and DOCBRANCH with the SVNROOT.
- Properly capitalize 'FreeBSD.org' in the default SVNROOT.
- Update Copyright.
release.conf.sample:
- Add an example to use git instead of svn, by nullifying
SVNROOT, and setting SRCBRANCH, DOCBRANCH, and PORTBRANCH
to the URL fo a git repository.
release.7:
- Document VCSCMD.
r262505:
In release/Makefile, remove exclusion of CVS directories in the
src/ and ports/ distributions.
While I am thinking about it, exclude .git directories for src/
and ports/, as somewhat of a followup to r262499.
r262507:
Chase r262505, and remove CVS exclusion from picobsd builds.
r262509:
Rework how WORLD_FLAGS and KERNEL_FLAGS are set, to remove an
unnecessary expr(1) call.
Sponsored by: The FreeBSD Foundation
2014-03-05 00:45:28 +00:00
|
|
|
--exclude .git --exclude .svn \
|
2011-03-14 13:47:17 +00:00
|
|
|
--exclude usr/ports/distfiles --exclude usr/ports/packages \
|
|
|
|
--exclude 'usr/ports/INDEX*' --exclude work usr/ports
|
|
|
|
|
|
|
|
reldoc:
|
|
|
|
cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \
|
|
|
|
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p reldoc
|
2011-03-14 13:47:17 +00:00
|
|
|
.for i in hardware readme relnotes errata
|
2013-06-02 11:44:23 +00:00
|
|
|
ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:tu}.TXT
|
|
|
|
ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:tu}.HTM
|
2011-03-14 13:47:17 +00:00
|
|
|
.endfor
|
2012-03-08 01:47:12 +00:00
|
|
|
cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc
|
2011-03-14 13:47:17 +00:00
|
|
|
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
disc1: packagesystem
|
2011-03-14 13:47:17 +00:00
|
|
|
# Install system
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
mkdir -p ${.TARGET}
|
2011-06-15 23:38:15 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 \
|
2013-12-14 22:43:30 +00:00
|
|
|
WITHOUT_PROFILE=1 WITHOUT_SENDMAIL=1 WITHOUT_ATF=1 WITHOUT_LIB32=1
|
2011-03-14 13:47:17 +00:00
|
|
|
# Copy distfiles
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
mkdir -p ${.TARGET}/usr/freebsd-dist
|
|
|
|
cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist
|
2011-03-14 13:47:17 +00:00
|
|
|
# Copy documentation, if generated
|
2006-11-16 23:09:35 +00:00
|
|
|
.if !defined(NODOC)
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
cp reldoc/* ${.TARGET}
|
2003-03-17 05:46:10 +00:00
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
# Set up installation environment
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
|
|
|
|
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
|
|
|
|
echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
|
2015-07-09 15:56:51 +00:00
|
|
|
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
cp ${.CURDIR}/rc.local ${.TARGET}/etc
|
2012-03-08 01:47:12 +00:00
|
|
|
touch ${.TARGET}
|
2001-07-23 09:01:46 +00:00
|
|
|
|
2011-03-27 23:46:12 +00:00
|
|
|
bootonly: packagesystem
|
|
|
|
# Install system
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
mkdir -p ${.TARGET}
|
2011-03-27 23:46:12 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_AMD=1 WITHOUT_AT=1 \
|
2013-09-30 17:23:45 +00:00
|
|
|
WITHOUT_GAMES=1 WITHOUT_GROFF=1 \
|
2011-03-27 23:46:12 +00:00
|
|
|
WITHOUT_INSTALLLIB=1 WITHOUT_LIB32=1 WITHOUT_MAIL=1 \
|
2011-06-15 23:56:40 +00:00
|
|
|
WITHOUT_NCP=1 WITHOUT_TOOLCHAIN=1 WITHOUT_PROFILE=1 \
|
|
|
|
WITHOUT_INSTALLIB=1 WITHOUT_RESCUE=1 WITHOUT_DICT=1 \
|
|
|
|
WITHOUT_KERNEL_SYMBOLS=1
|
2011-03-27 23:46:12 +00:00
|
|
|
# Copy manifest only (no distfiles) to get checksums
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
mkdir -p ${.TARGET}/usr/freebsd-dist
|
|
|
|
cp MANIFEST ${.TARGET}/usr/freebsd-dist
|
2011-03-27 23:46:12 +00:00
|
|
|
# Copy documentation, if generated
|
|
|
|
.if !defined(NODOC)
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
cp reldoc/* ${.TARGET}
|
2011-03-27 23:46:12 +00:00
|
|
|
.endif
|
|
|
|
# Set up installation environment
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
|
|
|
|
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
|
|
|
|
echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
|
2015-07-09 15:56:51 +00:00
|
|
|
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
cp ${.CURDIR}/rc.local ${.TARGET}/etc
|
2011-03-27 23:46:12 +00:00
|
|
|
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
dvd: packagesystem
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
# Install system
|
|
|
|
mkdir -p ${.TARGET}
|
|
|
|
cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
|
|
|
|
DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1
|
|
|
|
# Copy distfiles
|
|
|
|
mkdir -p ${.TARGET}/usr/freebsd-dist
|
|
|
|
cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist
|
|
|
|
# Copy documentation, if generated
|
|
|
|
.if !defined(NODOC)
|
|
|
|
cp reldoc/* ${.TARGET}
|
|
|
|
.endif
|
|
|
|
# Set up installation environment
|
|
|
|
ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
|
|
|
|
echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
|
|
|
|
echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
|
2015-07-09 15:56:51 +00:00
|
|
|
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
cp ${.CURDIR}/rc.local ${.TARGET}/etc
|
|
|
|
touch ${.TARGET}
|
|
|
|
|
2013-07-22 12:07:57 +00:00
|
|
|
release.iso: disc1.iso
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
disc1.iso: disc1
|
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1
|
1997-06-22 17:21:59 +00:00
|
|
|
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
uefi-disc1.iso: disc1
|
2014-09-12 18:23:22 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh)
|
2014-10-21 00:06:03 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages-uefi.sh -b ${VOLUME_LABEL}_UEFICD \
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
${.TARGET} disc1
|
2014-09-12 18:23:22 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
uefi-bootonly.iso: bootonly
|
|
|
|
.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh)
|
2014-10-21 00:07:37 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages-uefi.sh -b ${VOLUME_LABEL}_UEFIBO \
|
2014-10-21 00:06:03 +00:00
|
|
|
${.TARGET} bootonly
|
2014-09-12 18:23:22 +00:00
|
|
|
.endif
|
|
|
|
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
dvd1.iso: dvd pkg-stage
|
2014-10-21 00:06:03 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
|
2014-09-12 18:23:22 +00:00
|
|
|
uefi-dvd1.iso: dvd pkg-stage
|
|
|
|
.if exists(${.CURDIR}/${TARGET}/mkisoimages-uefi.sh)
|
2014-10-21 00:06:03 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages-uefi.sh -b ${VOLUME_LABEL}_UEFIDVD \
|
|
|
|
${.TARGET} dvd
|
2014-09-12 18:23:22 +00:00
|
|
|
.endif
|
|
|
|
|
2011-03-27 23:46:12 +00:00
|
|
|
bootonly.iso: bootonly
|
2014-10-21 00:06:03 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly
|
2011-03-27 23:46:12 +00:00
|
|
|
|
2013-07-21 05:23:34 +00:00
|
|
|
memstick: memstick.img
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
memstick.img: disc1
|
|
|
|
sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET}
|
2001-04-27 21:28:02 +00:00
|
|
|
|
MFC r257805, r257806, r257807, r257942:
r257805:
Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.
This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted). In addition, it is possible
to do bootonly-style installation, where the base.txz, kernel.txz,
etc. are fetched from a remote source.
Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.
r257806:
Remove extra target from 'memstick' that I forgot to remove before
previous commit.
r257807:
Update release(7) to include 'mini-memstick'.
r257942:
Fix a few style nits.
Sponsored by: The FreeBSD Foundation
2013-12-11 19:26:56 +00:00
|
|
|
mini-memstick: mini-memstick.img
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
mini-memstick.img: bootonly
|
MFC r257805, r257806, r257807, r257942:
r257805:
Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.
This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted). In addition, it is possible
to do bootonly-style installation, where the base.txz, kernel.txz,
etc. are fetched from a remote source.
Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.
r257806:
Remove extra target from 'memstick' that I forgot to remove before
previous commit.
r257807:
Update release(7) to include 'mini-memstick'.
r257942:
Fix a few style nits.
Sponsored by: The FreeBSD Foundation
2013-12-11 19:26:56 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET}
|
|
|
|
|
2014-09-09 21:07:21 +00:00
|
|
|
uefi-memstick: uefi-memstick.img
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
uefi-memstick.img: disc1
|
2014-09-09 21:07:21 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh)
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
sh ${.CURDIR}/${TARGET}/make-uefi-memstick.sh disc1 ${.TARGET}
|
2014-09-09 21:07:21 +00:00
|
|
|
.endif
|
|
|
|
|
2014-09-12 19:32:18 +00:00
|
|
|
uefi-mini-memstick: uefi-mini-memstick.img
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
uefi-mini-memstick.img: bootonly
|
2014-09-12 19:32:18 +00:00
|
|
|
.if exists(${.CURDIR}/${TARGET}/make-uefi-memstick.sh)
|
|
|
|
sh ${.CURDIR}/${TARGET}/make-uefi-memstick.sh bootonly ${.TARGET}
|
|
|
|
.endif
|
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
|
2012-03-08 01:47:12 +00:00
|
|
|
sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
|
2011-04-11 14:30:45 +00:00
|
|
|
touch ${.TARGET}
|
1995-02-26 01:35:32 +00:00
|
|
|
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
pkg-stage:
|
2014-01-16 16:44:23 +00:00
|
|
|
.if !defined(NOPKG)
|
|
|
|
env REPOS_DIR=${.CURDIR}/pkg_repos/ \
|
|
|
|
sh ${.CURDIR}/scripts/pkg-stage.sh
|
2013-12-18 01:14:25 +00:00
|
|
|
mkdir -p ${.OBJDIR}/dvd/packages/repos/
|
|
|
|
cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \
|
|
|
|
${.OBJDIR}/dvd/packages/repos/
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
.endif
|
2013-12-18 01:14:25 +00:00
|
|
|
touch ${.TARGET}
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
|
2013-07-22 12:07:57 +00:00
|
|
|
cdrom: disc1.iso bootonly.iso
|
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:
r258305:
Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.
r258307:
Add a script and configuration files to fetch pre-built packages
from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
r258308:
Unconditionally copy the build host /etc/resolv.conf into
the chroot directory, since hostname resolution may be
needed in the case of building a dvd image (with packages)
and also setting 'NOPORTS=1'.
r258309:
Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
in preparation of adding a 'dvd1.iso' target.
r258310:
Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.
The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).
Allow dvd1.iso to be skipped if NODVD=1.
r258314:
Fix how ABI is evaluated so it matches more than a dot-zero
case.
r258317:
Document the 'dvdrom' target.
r258319:
Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
r258320:
Simplify PKG_ABI for pkg-stage.sh.
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation
2013-11-21 02:45:36 +00:00
|
|
|
dvdrom: dvd1.iso
|
2011-03-14 13:47:17 +00:00
|
|
|
ftp: packagesystem
|
2011-04-11 14:30:45 +00:00
|
|
|
rm -rf ftp
|
2012-03-08 01:47:12 +00:00
|
|
|
mkdir -p ftp
|
2011-04-11 14:30:45 +00:00
|
|
|
cp *.txz MANIFEST ftp
|
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
2004-01-26 19:58:38 +00:00
|
|
|
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
release: real-release vm-release cloudware-release
|
|
|
|
touch ${.TARGET}
|
|
|
|
|
|
|
|
real-release:
|
2011-05-18 17:39:28 +00:00
|
|
|
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
|
|
|
|
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
|
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
2004-01-26 19:58:38 +00:00
|
|
|
|
2015-03-03 02:46:59 +00:00
|
|
|
install: release-install vm-install cloudware-install
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
|
|
|
|
release-install:
|
2012-03-08 01:47:12 +00:00
|
|
|
.if defined(DESTDIR) && !empty(DESTDIR)
|
|
|
|
mkdir -p ${DESTDIR}
|
|
|
|
.endif
|
2013-02-03 10:26:24 +00:00
|
|
|
cp -a ftp ${DESTDIR}/
|
|
|
|
.for I in ${IMAGES}
|
|
|
|
cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
|
2014-04-08 00:53:31 +00:00
|
|
|
. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
|
|
|
|
${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I}
|
|
|
|
. endif
|
2013-02-03 10:26:24 +00:00
|
|
|
.endfor
|
|
|
|
cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
|
|
|
|
cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5
|
MFC r272414:
Merge the following revisions from ^/projects/release-vmimage:
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.
Sponsored by: The FreeBSD Foundation
2014-10-14 12:23:44 +00:00
|
|
|
|
MFC r277458, r277536, r277606, r277609, r277836, r277839,
r278118, r278119, r278206, r278502:
r277458:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
Add glue to allow enabling building cloud provider VM images
by default.
Add a 'vm-cloudware' target, used to drive all targets in
CLOUDTARGETS.
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
Rewrite to consolidate VM image build scripts into one.
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.
mount(8) and umount(8) devfs(5) as needed.
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.
Set the boot partition type to 'apple-boot' for powerpc.
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).
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.
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.
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
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.
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.
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.
Enable password-less sudo for openstack images.
Update the VM_EXTRA_PACKAGES list for the openstack images.
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.
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
Update release(7)
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.
Update release(7) to document the list-vmtargets target.
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
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).
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.
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.
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.
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.
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
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.
Remove mk-azure.sh, which is no longer needed.
r277536:
Rename the 'release' target to 'real-release', and 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.
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.
r277606:
Provide a recipe of "true" for building the "release" target once
its prerequisites are satisfied, in order to avoid having an implicit
rule triggered by the presence of release.sh.
r277609:
When iterating through VMFORMATS, the VMBASE file is 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.
r277836:
Rename the 'system' target to 'disc1', which is specific to the
disc1.iso installer image.
Replace 'system' with 'release' in CLEANFILES, and add 'disc1'
to CLEANDIRS.
Ensure the 'dvd' target depends on 'packagesystem'.
Fix 'mini-memstick.img' prerequisite, which should be the 'bootonly'
target, not 'disc1' (previously 'system').
Use .TARGET as the target installation directory for the disc1.iso
and bootonly.iso images, which now expand to 'disc1' and 'bootonly'
respectively, mimicking the behavior of the 'dvd' target.
Remove '@true' from the 'release' target, and instead use
'touch ${.TARGET}' to prevent multiple iterations of
'make release' from clobbering previously-built installer
medium.
r277839:
Update release(7) to reflect renaming the 'system' target to 'disc1'.
r278118:
Move service_enable="YES" rc.conf(5) additions to VM_RC_LIST and
deduplicate.
Evaluate if firstboot_freebsd_update should be enabled based on
UNAME_r, because it is not supported for the -CURRENT or -STABLE
branches.
r278119:
Use ifconfig_DEFAULT="" instead of hard-coding vtnet(4)
r278206:
Bump copyright after r277458.
r278502:
In scripts/mk-vmimage.sh, prevent incorrect usage() by defaulting
VMCONFIG to /dev/null, and additionally ensuring VMCONFIG is not
a character device before it is sourced.
While here, be sure to exit if usage() is called.
This should effectively be no-op, but the usage() output was
discovered while investigating a larger issue.
* Several changes local to stable/10 were needed in order to handle
UEFI images that are specific to this branch.
Tested with: stable/10@r278906
Sponsored by: The FreeBSD Foundation
2015-02-19 03:57:47 +00:00
|
|
|
.include "${.CURDIR}/Makefile.vm"
|