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-01 22:46:46 +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-27 03:05:24 +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)
|
2013-11-07 18:53:55 +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)
|
2015-01-22 19:43:05 +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
|
Merge the following revisions from ^/projects/release-vmimage:
r273823-r273826, r273833, r273836, r273944, r274069-r274071,
r274134, r274211, r274280-r274285, r274287-r274288, r274292,
r274296-r274297, r274356, r274533, r274725, r274726, r274729,
r274734, r274771, r274945-r274946, r277180, r277183-r277184,
r277186-r277187, r277250-r277253, r277263-r277264, r277383-r277384,
r277393-r277395, r277438-r277439, r277447, r277455:
r273823:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
r273824:
Add glue to allow enabling building cloud provider VM images
by default.
When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the
release/Makefile 'release' target.
r273825:
Avoid hard-coding the Azure image file format. While here,
avoid using OSRELEASE for the output file name.
r273826:
Remove a few vestiges of passing an exit code to panic().
r273833:
Initial commit providing a mechanism to create openstack images
as part of the release build.
r273836:
Fix output file name for openstack images. No further conversion
is necessary for this VM file target, so there is no need to append
the '.raw' suffix here.
r273944:
Uncomment the cloudinit rc.conf(5) line.
r274069:
Add line continuation so OPENSTACKCONF is actually included in the env(1).
r274070:
Add a 'vm-cloudware' target, used to drive all targets in CLOUDTARGETS.
r274071:
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
r274134:
Initial rewrite to consolidate VM image build scripts into one.
r274211:
Add write_partition_layout() used to populate the final image.
Fix duplicated mkimg(1) call in vm_create_disk().
Add primitive (untested) PowerPC/PowerPC64 VM image support.
Note: As it is currently written, the /boot/pmbr and
/boot/{gptboot,boot1.hfs} use the build host and not the target
build. Fixing this is likely going to be a hack in itself.
r274280:
Return if vm_create_disk() is unsuccessful.
r274281:
Add CLEANFILES entry for VM targets
r274282:
Add vm_extra_pre_umount() prototype to vmimage.subr.
r274283:
Fix DESTDIR for installworld, and make sure it is created before use.
r274284:
Move usage() from vmimage.subr to mk-vmimage.sh, in case vmimage.subr
has not been sourced.
r274285:
Spell 'OPTARG' correctly. Actually call vm_create_base().
r274287:
Fix line continuation in write_partition_layout().
Remove variable test that is no longer needed.
r274288:
Fix scheme flag to mkimg(1).
r274292:
mount(8) and umount(8) devfs(5) as needed.
r274296:
Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that
it is consolidated into one file.
Fix paths for the base image and output disk image files.
r274297:
Call cleanup() after everything is done.
r274356:
Remove a stray directory from CLEANFILES.
r274533:
Set the boot partition type to 'apple-boot' for powerpc.
r274725:
In vm_install_base(), copy the host resolv.conf into
the build chroot before attempting to do anything that
requires working DNS (i.e., pkg bootstrap).
In vm_extra_pre_umount(), remove the resolv.conf before
the disk image is unmounted from the backing md(4).
r274726 (cperciva):
Silence errors when umounting the chroot's /dev, since it
probably doesn't exist when we're running this.
Unmount filesystems before attempting to destroy the md which
holds them.
r274729 (cperciva):
Unmount filesystem and destroy md before we read the vnode from
disk and package it into a disk image. Otherwise we end up
packaging an unclean filesystem.
r274734 (cperciva):
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
r274771 (cperciva):
Add NOSWAP option which can be set by a vmimage.conf file to specify
that no swap space should be created in the image. This will be used
by EC2 builds, since FreeBSD/EC2 allocates swap space on "ephemeral"
disks which are physically attached to the Xen host node.
r274945:
In vm_extra_install_packages(), only bootstrap pkg(8) if
VM_EXTRA_PACKAGES is empty.
In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was
bootstrapped earlier.
r274946:
Fix indentation nit.
r277180:
In vm_extra_install_base(), do not install waagent in the openstack
image, because it is not used. This appears to be a copy mistake.
Remove vm_extra_install_base() from the openstack.conf entirely,
since it does not need to be overridden.
r277183:
Enable the textmode console by default for VM images, since there is
no way to tell if the environment will be able to use the
graphics-mode console.
r277184:
Enable password-less sudo for openstack images.
r277186:
Update the VM_EXTRA_PACKAGES list for the openstack images.
The documentation suggests doing a "just fetch this and run it"-style
bootstrap, from which the list of dependencies was obtained (in
github, at: pellaeon/bsd-cloudinit-installer)
There is one Python dependency unmet, oslo.config, which is not in
the Ports Collection.
r277187:
Add a comment to note that setting hw.vga.textmode=1 is temporary.
r277250:
Remove vm_extra_install_base() for the Azure image, now that the
waagent exists in the ports tree.
Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list.
In vm_extra_pre_umount(), remove the explicit pkg(8) install
list, as dependencies are resolved by sysutils/azure-agent.
r277251:
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
r277252:
Update release(7)
r277253:
Add 'list-vmtargets' target, which produces a list of all supported
VM and cloud provider images.
Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions.
Format the output to make a bit more readable.
Update release(7) to document the list-vmtargets target.
r277263:
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
r277264:
Style and line length cleanup.
r277383:
Remove the console setting from rc.conf(5), which is not used there.
While here, set console to include vidconsole in the loader.conf(5).
r277384:
Fix an indentation nit.
No functional changes.
r277393:
Remove the pkg-clean(8) call from vm_extra_pre_umount() since the
function is often overridden.
Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid duplicated
code.
r277394:
Move resolv.conf(5) removal back to vm_extra_pre_umount() where it
belongs.
The GCE image needs resolv.conf(5) to exist (created as part of the
image setup), so it cannot be removed.
r277395:
Comment the line that configures ttys(5) to 'off', which makes it
impossible to test that the image boots.
Add a note explaining why the line is commented, and not (yet) removed
entirely.
r277438:
Move the 'install' bits that are specific to virtual machine images
from the Makefile to Makefile.vm.
Rename the 'install' target to 'release-install', and add a new
'vm-install' target.
Add a new 'install' target that invokes the new targets.
r277439:
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
r277447:
Remove hw.vga.textmode=1 from the VM image loader.conf, which was
included during test builds and not intended to be included when
merging this project branch back to head.
r277455:
Remove mk-azure.sh, which is no longer needed.
MFC after: 1 month
X-MFC-To: stable/10 (requires mkimg(1))
Help from: cperciva, swills
Relnotes: yes
Sponsored by: The FreeBSD Foundation
2015-01-20 23:56:04 +00:00
|
|
|
# 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-01 22:46:46 +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)
|
2015-09-11 22:42:26 +00:00
|
|
|
# XTRADIR: xtra-bits-dir argument for <arch>/mkisoimages.sh
|
2013-11-30 17:07:53 +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
|
2013-12-02 18:47:57 +00:00
|
|
|
# WITH_DVD: if set, generate dvd1.iso
|
2014-04-02 16:53:07 +00:00
|
|
|
# WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1)
|
2014-04-01 22:41:26 +00:00
|
|
|
# (uncompressed images are not removed)
|
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.
Sponsored by: The FreeBSD Foundation
2014-09-28 01:45:20 +00:00
|
|
|
# WITH_VMIMAGES: if set, build virtual machine images with the release
|
2014-10-02 00:34:03 +00:00
|
|
|
# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images
|
|
|
|
# with xz(1) (extremely time consuming)
|
Merge the following revisions from ^/projects/release-vmimage:
r273823-r273826, r273833, r273836, r273944, r274069-r274071,
r274134, r274211, r274280-r274285, r274287-r274288, r274292,
r274296-r274297, r274356, r274533, r274725, r274726, r274729,
r274734, r274771, r274945-r274946, r277180, r277183-r277184,
r277186-r277187, r277250-r277253, r277263-r277264, r277383-r277384,
r277393-r277395, r277438-r277439, r277447, r277455:
r273823:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
r273824:
Add glue to allow enabling building cloud provider VM images
by default.
When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the
release/Makefile 'release' target.
r273825:
Avoid hard-coding the Azure image file format. While here,
avoid using OSRELEASE for the output file name.
r273826:
Remove a few vestiges of passing an exit code to panic().
r273833:
Initial commit providing a mechanism to create openstack images
as part of the release build.
r273836:
Fix output file name for openstack images. No further conversion
is necessary for this VM file target, so there is no need to append
the '.raw' suffix here.
r273944:
Uncomment the cloudinit rc.conf(5) line.
r274069:
Add line continuation so OPENSTACKCONF is actually included in the env(1).
r274070:
Add a 'vm-cloudware' target, used to drive all targets in CLOUDTARGETS.
r274071:
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
r274134:
Initial rewrite to consolidate VM image build scripts into one.
r274211:
Add write_partition_layout() used to populate the final image.
Fix duplicated mkimg(1) call in vm_create_disk().
Add primitive (untested) PowerPC/PowerPC64 VM image support.
Note: As it is currently written, the /boot/pmbr and
/boot/{gptboot,boot1.hfs} use the build host and not the target
build. Fixing this is likely going to be a hack in itself.
r274280:
Return if vm_create_disk() is unsuccessful.
r274281:
Add CLEANFILES entry for VM targets
r274282:
Add vm_extra_pre_umount() prototype to vmimage.subr.
r274283:
Fix DESTDIR for installworld, and make sure it is created before use.
r274284:
Move usage() from vmimage.subr to mk-vmimage.sh, in case vmimage.subr
has not been sourced.
r274285:
Spell 'OPTARG' correctly. Actually call vm_create_base().
r274287:
Fix line continuation in write_partition_layout().
Remove variable test that is no longer needed.
r274288:
Fix scheme flag to mkimg(1).
r274292:
mount(8) and umount(8) devfs(5) as needed.
r274296:
Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that
it is consolidated into one file.
Fix paths for the base image and output disk image files.
r274297:
Call cleanup() after everything is done.
r274356:
Remove a stray directory from CLEANFILES.
r274533:
Set the boot partition type to 'apple-boot' for powerpc.
r274725:
In vm_install_base(), copy the host resolv.conf into
the build chroot before attempting to do anything that
requires working DNS (i.e., pkg bootstrap).
In vm_extra_pre_umount(), remove the resolv.conf before
the disk image is unmounted from the backing md(4).
r274726 (cperciva):
Silence errors when umounting the chroot's /dev, since it
probably doesn't exist when we're running this.
Unmount filesystems before attempting to destroy the md which
holds them.
r274729 (cperciva):
Unmount filesystem and destroy md before we read the vnode from
disk and package it into a disk image. Otherwise we end up
packaging an unclean filesystem.
r274734 (cperciva):
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
r274771 (cperciva):
Add NOSWAP option which can be set by a vmimage.conf file to specify
that no swap space should be created in the image. This will be used
by EC2 builds, since FreeBSD/EC2 allocates swap space on "ephemeral"
disks which are physically attached to the Xen host node.
r274945:
In vm_extra_install_packages(), only bootstrap pkg(8) if
VM_EXTRA_PACKAGES is empty.
In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was
bootstrapped earlier.
r274946:
Fix indentation nit.
r277180:
In vm_extra_install_base(), do not install waagent in the openstack
image, because it is not used. This appears to be a copy mistake.
Remove vm_extra_install_base() from the openstack.conf entirely,
since it does not need to be overridden.
r277183:
Enable the textmode console by default for VM images, since there is
no way to tell if the environment will be able to use the
graphics-mode console.
r277184:
Enable password-less sudo for openstack images.
r277186:
Update the VM_EXTRA_PACKAGES list for the openstack images.
The documentation suggests doing a "just fetch this and run it"-style
bootstrap, from which the list of dependencies was obtained (in
github, at: pellaeon/bsd-cloudinit-installer)
There is one Python dependency unmet, oslo.config, which is not in
the Ports Collection.
r277187:
Add a comment to note that setting hw.vga.textmode=1 is temporary.
r277250:
Remove vm_extra_install_base() for the Azure image, now that the
waagent exists in the ports tree.
Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list.
In vm_extra_pre_umount(), remove the explicit pkg(8) install
list, as dependencies are resolved by sysutils/azure-agent.
r277251:
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
r277252:
Update release(7)
r277253:
Add 'list-vmtargets' target, which produces a list of all supported
VM and cloud provider images.
Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions.
Format the output to make a bit more readable.
Update release(7) to document the list-vmtargets target.
r277263:
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
r277264:
Style and line length cleanup.
r277383:
Remove the console setting from rc.conf(5), which is not used there.
While here, set console to include vidconsole in the loader.conf(5).
r277384:
Fix an indentation nit.
No functional changes.
r277393:
Remove the pkg-clean(8) call from vm_extra_pre_umount() since the
function is often overridden.
Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid duplicated
code.
r277394:
Move resolv.conf(5) removal back to vm_extra_pre_umount() where it
belongs.
The GCE image needs resolv.conf(5) to exist (created as part of the
image setup), so it cannot be removed.
r277395:
Comment the line that configures ttys(5) to 'off', which makes it
impossible to test that the image boots.
Add a note explaining why the line is commented, and not (yet) removed
entirely.
r277438:
Move the 'install' bits that are specific to virtual machine images
from the Makefile to Makefile.vm.
Rename the 'install' target to 'release-install', and add a new
'vm-install' target.
Add a new 'install' target that invokes the new targets.
r277439:
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
r277447:
Remove hw.vga.textmode=1 from the VM image loader.conf, which was
included during test builds and not intended to be included when
merging this project branch back to head.
r277455:
Remove mk-azure.sh, which is no longer needed.
MFC after: 1 month
X-MFC-To: stable/10 (requires mkimg(1))
Help from: cperciva, swills
Relnotes: yes
Sponsored by: The FreeBSD Foundation
2015-01-20 23:56:04 +00:00
|
|
|
# WITH_CLOUDWARE: if set, build cloud hosting disk images with the release
|
2014-04-01 22:46:46 +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
|
2000-07-20 03:07:29 +00:00
|
|
|
|
2013-12-01 15:06:30 +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-01 15:06:30 +00:00
|
|
|
TARGET_ARCH= ${MACHINE_ARCH}
|
2002-02-03 07:00:37 +00:00
|
|
|
.else
|
2013-12-01 15:06:30 +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
|
|
|
|
2020-01-13 16:31:58 +00:00
|
|
|
# Define OSRELEASE by using newvers.sh
|
2013-02-03 10:26:24 +00:00
|
|
|
.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 17:24:13 +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 17:24:13 +00:00
|
|
|
VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH}
|
2013-02-03 10:26:24 +00:00
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
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.
MFC after: 3 days
X-MFC-10.1: yes, asap
Sponsored by: The FreeBSD Foundation
2014-10-26 01:41:54 +00:00
|
|
|
.if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL)
|
|
|
|
VOLUME_LABEL= FreeBSD_Install
|
|
|
|
.endif
|
2014-10-17 03:55:33 +00:00
|
|
|
|
2011-03-14 13:47:17 +00:00
|
|
|
.if !exists(${PORTSDIR})
|
|
|
|
NOPORTS= true
|
2010-07-13 21:19:59 +00:00
|
|
|
.endif
|
|
|
|
|
2014-04-01 22:46:46 +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
|
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:56:03 +00:00
|
|
|
. if defined(WITH_DVD) && !empty(WITH_DVD)
|
2013-11-18 16:25:56 +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
|
2013-11-07 18:53:55 +00:00
|
|
|
RELEASE_TARGETS+= mini-memstick.img
|
2013-07-21 05:23:34 +00:00
|
|
|
IMAGES+= memstick.img
|
2013-11-07 18:53:55 +00:00
|
|
|
IMAGES+= mini-memstick.img
|
2002-11-01 20:53:50 +00:00
|
|
|
.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
|
|
|
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
CLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES}
|
2014-04-01 22:54:54 +00:00
|
|
|
.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
|
|
|
|
. for I in ${IMAGES}
|
2014-04-02 16:53:07 +00:00
|
|
|
CLEANFILES+= ${I}.xz
|
2014-04-01 22:54:54 +00:00
|
|
|
. endfor
|
|
|
|
.endif
|
2014-06-10 15:20:41 +00:00
|
|
|
.if defined(WITH_DVD) && !empty(WITH_DVD)
|
2014-06-10 15:19:28 +00:00
|
|
|
CLEANFILES+= pkg-stage
|
2014-06-10 15:20:41 +00:00
|
|
|
.endif
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
CLEANDIRS= dist ftp disc1 bootonly dvd
|
2013-12-01 15:24:35 +00:00
|
|
|
beforeclean:
|
|
|
|
chflags -R noschg .
|
2011-03-14 13:47:17 +00:00
|
|
|
.include <bsd.obj.mk>
|
2013-12-01 15:24:35 +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}
|
2022-08-09 21:58:01 +00:00
|
|
|
# TODO: Add NO_ROOT mode to mm-tree.sh
|
2022-02-28 22:37:03 +00:00
|
|
|
.if !defined(NO_ROOT)
|
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 \
|
2017-10-31 00:03:29 +00:00
|
|
|
"TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} ${.MAKE.JOBS:D-j${.MAKE.JOBS}}" \
|
|
|
|
-D "${.OBJDIR}/${DISTDIR}/base"
|
2022-08-09 21:58:01 +00:00
|
|
|
.endif
|
2022-08-09 21:52:47 +00:00
|
|
|
sh ${WORLDDIR}/usr.sbin/etcupdate/etcupdate.sh extract -B \
|
2022-08-09 21:57:01 +00:00
|
|
|
-m "${MAKE}" -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \
|
2022-08-09 21:58:01 +00:00
|
|
|
-s ${WORLDDIR} -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" \
|
|
|
|
${NO_ROOT:D-N}
|
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./var/db/etcupdate type=dir uname=root gname=wheel mode=0755" >> ${.OBJDIR}/${DISTDIR}/base.meta
|
|
|
|
sed -n 's,^\.,./var/db/etcupdate/current,p' ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG \
|
|
|
|
>> ${.OBJDIR}/${DISTDIR}/base.meta
|
|
|
|
rm ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG
|
2022-02-28 22:37:03 +00:00
|
|
|
.endif
|
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
|
2022-07-15 22:04:34 +00:00
|
|
|
cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \
|
2015-02-17 23:13:45 +00:00
|
|
|
--exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \
|
|
|
|
${XZ_CMD} > ${.OBJDIR}/src.txz
|
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
|
2022-07-15 22:04:34 +00:00
|
|
|
cd ${DISTDIR} && ${TAR_CMD} cLvf - \
|
2014-02-26 00:52:01 +00:00
|
|
|
--exclude .git --exclude .svn \
|
2011-03-14 13:47:17 +00:00
|
|
|
--exclude usr/ports/distfiles --exclude usr/ports/packages \
|
2015-02-17 23:13:45 +00:00
|
|
|
--exclude 'usr/ports/INDEX*' --exclude work usr/ports | \
|
|
|
|
${XZ_CMD} > ${.OBJDIR}/ports.txz
|
2011-03-14 13:47:17 +00:00
|
|
|
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
disc1: packagesystem
|
2011-03-14 13:47:17 +00:00
|
|
|
# Install system
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
mkdir -p ${.TARGET}
|
2021-04-05 17:16:01 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
|
2020-03-09 20:46:43 +00:00
|
|
|
DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \
|
2016-07-13 02:07:36 +00:00
|
|
|
MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \
|
2018-12-20 15:53:27 +00:00
|
|
|
MK_TOOLCHAIN=no MK_PROFILE=no \
|
2016-07-13 02:07:36 +00:00
|
|
|
MK_RESCUE=no MK_DICT=no \
|
2018-08-17 07:27:15 +00:00
|
|
|
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \
|
|
|
|
-DDB_FROM_SRC
|
2011-03-14 13:47:17 +00:00
|
|
|
# Copy distfiles
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
mkdir -p ${.TARGET}/usr/freebsd-dist
|
2016-01-05 21:05:17 +00:00
|
|
|
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
|
Merge ^/projects/release-debugdist into ^/head:
r262491, r262493, r262516, r267345, r267397:
r262491:
Add DEBUG_DISTRIBUTIONS, and set it to include base and
EXTRA_DISTRIBUTIONS, excluding 'doc', since the documentation
distribution does not have corresponding debug information.
Use DEBUG_DISTRIBUTIONS in the 'distributeworld installworld'
and 'packageworld' targets, to reduce the number of occurances
of excluding distributions that do not have .debug files.
r262493:
In release/Makefile, explicitly set WITHOUT_DEBUG_FILES=1
for dvdrom and cdrom targets. (Later reverted.)
Exclude the *.debug.txz distributions from dvdrom and
cdrom images, but include them for ftp distribution.
r262516:
Rename ${dist}.debug.txz to ${dist}-dbg.txz to prevent the
following output:
eval: ${base....}: Bad substitution
eval: ${doc....}: Bad substitution
eval: ${games....}: Bad substitution
eval: ${lib32....}: Bad substitution
This also follows other naming conventions seen in the
wild.
r267345:
Explicitly set MK_DEBUG_FILES=no, which overrides the
WITH_DEBUG_FILES=1 and WITHOUT_DEBUG_FILES=1 collisions
previously experienced.
This change allows us to create the {base,kernel}_debug.txz
distributions without accidentally installing the *.debug
files on the medium itself.
r267397:
Remove evaluations of MK_DEBUG_FILES where not needed.
If DEBUG_DISTRIBUTIONS is empty, which is true if
MK_DEBUG_FILES evaluates to 'no' above, the loop does
nothing.
MFC after: 1 month
Tested on: head@r267801
Reviewed by: brooks [1], emaste, imp [1]
[1] earlier version
Sponsored by: The FreeBSD Foundation
2014-07-01 19:04:04 +00:00
|
|
|
done
|
2022-02-28 22:37:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
|
|
|
|
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
|
|
|
|
do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
|
|
|
|
done
|
|
|
|
.endif
|
2011-03-14 13:47:17 +00:00
|
|
|
# Set up installation environment
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +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
|
2018-10-23 14:38:08 +00:00
|
|
|
echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
|
2018-10-11 17:18:49 +00:00
|
|
|
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
|
2022-09-02 19:30:50 +00:00
|
|
|
echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
cp ${.CURDIR}/rc.local ${.TARGET}/etc
|
2022-02-28 22:37:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
.endif
|
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
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
mkdir -p ${.TARGET}
|
2021-04-05 17:16:01 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
|
2020-03-09 20:46:43 +00:00
|
|
|
DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \
|
2017-06-07 23:00:34 +00:00
|
|
|
MK_GAMES=no \
|
2014-06-14 01:03:24 +00:00
|
|
|
MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \
|
2018-12-20 15:53:27 +00:00
|
|
|
MK_TOOLCHAIN=no MK_PROFILE=no \
|
2016-04-13 20:43:02 +00:00
|
|
|
MK_RESCUE=no MK_DICT=no \
|
2018-08-17 07:27:15 +00:00
|
|
|
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \
|
|
|
|
-DDB_FROM_SRC
|
2011-03-27 23:46:12 +00:00
|
|
|
# Copy manifest only (no distfiles) to get checksums
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
mkdir -p ${.TARGET}/usr/freebsd-dist
|
|
|
|
cp MANIFEST ${.TARGET}/usr/freebsd-dist
|
2022-02-28 22:37:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
|
|
|
|
echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
.endif
|
2011-03-27 23:46:12 +00:00
|
|
|
# Set up installation environment
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +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
|
2018-10-23 14:38:08 +00:00
|
|
|
echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
|
2018-10-11 17:18:49 +00:00
|
|
|
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
|
2022-09-02 19:30:50 +00:00
|
|
|
echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
cp ${.CURDIR}/rc.local ${.TARGET}/etc
|
2022-02-28 22:37:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
.endif
|
2011-03-27 23:46:12 +00:00
|
|
|
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
dvd: packagesystem
|
2013-11-18 16:25:56 +00:00
|
|
|
# Install system
|
|
|
|
mkdir -p ${.TARGET}
|
2021-04-05 17:16:01 +00:00
|
|
|
cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
|
2014-06-14 01:03:24 +00:00
|
|
|
DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \
|
2018-08-17 07:27:15 +00:00
|
|
|
MK_TESTS=no MK_DEBUG_FILES=no \
|
|
|
|
-DDB_FROM_SRC
|
2013-11-18 16:25:56 +00:00
|
|
|
# Copy distfiles
|
|
|
|
mkdir -p ${.TARGET}/usr/freebsd-dist
|
2016-01-05 21:05:17 +00:00
|
|
|
for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \
|
Merge ^/projects/release-debugdist into ^/head:
r262491, r262493, r262516, r267345, r267397:
r262491:
Add DEBUG_DISTRIBUTIONS, and set it to include base and
EXTRA_DISTRIBUTIONS, excluding 'doc', since the documentation
distribution does not have corresponding debug information.
Use DEBUG_DISTRIBUTIONS in the 'distributeworld installworld'
and 'packageworld' targets, to reduce the number of occurances
of excluding distributions that do not have .debug files.
r262493:
In release/Makefile, explicitly set WITHOUT_DEBUG_FILES=1
for dvdrom and cdrom targets. (Later reverted.)
Exclude the *.debug.txz distributions from dvdrom and
cdrom images, but include them for ftp distribution.
r262516:
Rename ${dist}.debug.txz to ${dist}-dbg.txz to prevent the
following output:
eval: ${base....}: Bad substitution
eval: ${doc....}: Bad substitution
eval: ${games....}: Bad substitution
eval: ${lib32....}: Bad substitution
This also follows other naming conventions seen in the
wild.
r267345:
Explicitly set MK_DEBUG_FILES=no, which overrides the
WITH_DEBUG_FILES=1 and WITHOUT_DEBUG_FILES=1 collisions
previously experienced.
This change allows us to create the {base,kernel}_debug.txz
distributions without accidentally installing the *.debug
files on the medium itself.
r267397:
Remove evaluations of MK_DEBUG_FILES where not needed.
If DEBUG_DISTRIBUTIONS is empty, which is true if
MK_DEBUG_FILES evaluates to 'no' above, the loop does
nothing.
MFC after: 1 month
Tested on: head@r267801
Reviewed by: brooks [1], emaste, imp [1]
[1] earlier version
Sponsored by: The FreeBSD Foundation
2014-07-01 19:04:04 +00:00
|
|
|
do cp $${dist} ${.TARGET}/usr/freebsd-dist; \
|
|
|
|
done
|
2022-02-28 22:37:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
|
|
|
|
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \
|
|
|
|
do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \
|
|
|
|
done
|
|
|
|
.endif
|
2013-11-18 16:25:56 +00:00
|
|
|
# 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
|
2018-10-23 14:38:08 +00:00
|
|
|
echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf
|
2014-12-30 03:35:26 +00:00
|
|
|
echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf
|
2018-10-11 17:18:49 +00:00
|
|
|
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
|
2022-09-02 19:30:50 +00:00
|
|
|
echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf
|
2013-11-18 16:25:56 +00:00
|
|
|
cp ${.CURDIR}/rc.local ${.TARGET}/etc
|
2022-02-28 22:37:03 +00:00
|
|
|
.if defined(NO_ROOT)
|
|
|
|
echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
|
|
|
|
.endif
|
2013-11-18 16:25:56 +00:00
|
|
|
touch ${.TARGET}
|
|
|
|
|
2013-07-22 12:07:57 +00:00
|
|
|
release.iso: disc1.iso
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
disc1.iso: disc1
|
2022-02-28 22:37:03 +00:00
|
|
|
cd disc1 && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
|
1997-06-22 17:21:59 +00:00
|
|
|
|
2013-11-18 16:25:56 +00:00
|
|
|
dvd1.iso: dvd pkg-stage
|
2022-02-28 22:37:03 +00:00
|
|
|
cd dvd && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
|
2013-11-18 16:25:56 +00:00
|
|
|
|
2011-03-27 23:46:12 +00:00
|
|
|
bootonly.iso: bootonly
|
2022-02-28 22:37:03 +00:00
|
|
|
cd bootonly && sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ../${.TARGET} .${NO_ROOT:D/METALOG} ${XTRADIR}
|
2011-03-27 23:46:12 +00:00
|
|
|
|
2013-11-07 18:59:06 +00:00
|
|
|
memstick: memstick.img
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
memstick.img: disc1
|
2022-02-28 22:37:03 +00:00
|
|
|
cd disc1 && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET}
|
2001-04-27 21:28:02 +00:00
|
|
|
|
2013-11-07 18:53:55 +00:00
|
|
|
mini-memstick: mini-memstick.img
|
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.
Tested with: head@r277834
MFC after: 3 weeks
X-MFC-with: r277458, r277536, r277606, r277609
Sponsored by: The FreeBSD Foundation
2015-01-28 17:32:45 +00:00
|
|
|
mini-memstick.img: bootonly
|
2022-02-28 22:37:03 +00:00
|
|
|
cd bootonly && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET}
|
2013-11-07 18:53:55 +00:00
|
|
|
|
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
|
|
|
|
2013-11-18 16:25:56 +00:00
|
|
|
pkg-stage:
|
2022-02-28 22:37:03 +00:00
|
|
|
# TODO: Support for -DNO_ROOT
|
2017-07-06 17:54:03 +00:00
|
|
|
.if !defined(NOPKG) || empty(NOPKG)
|
2017-05-22 14:21:45 +00:00
|
|
|
env PORTSDIR=${PORTSDIR} REPOS_DIR=${.CURDIR}/pkg_repos/ \
|
2014-01-16 16:12:09 +00:00
|
|
|
sh ${.CURDIR}/scripts/pkg-stage.sh
|
2013-12-15 20:38:07 +00:00
|
|
|
mkdir -p ${.OBJDIR}/dvd/packages/repos/
|
|
|
|
cp ${.CURDIR}/scripts/FreeBSD_install_cdrom.conf \
|
|
|
|
${.OBJDIR}/dvd/packages/repos/
|
2013-11-18 16:25:56 +00:00
|
|
|
.endif
|
2013-12-15 20:38:07 +00:00
|
|
|
touch ${.TARGET}
|
2013-11-18 16:25:56 +00:00
|
|
|
|
2013-07-22 12:07:57 +00:00
|
|
|
cdrom: disc1.iso bootonly.iso
|
2013-11-18 16:25:56 +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
|
|
|
|
2015-01-22 19:43:05 +00:00
|
|
|
release: real-release vm-release cloudware-release
|
2016-01-06 05:23:25 +00:00
|
|
|
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done
|
|
|
|
true
|
|
|
|
|
|
|
|
release-done:
|
|
|
|
touch release
|
2015-01-22 19:43:05 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2016-05-26 21:08:44 +00:00
|
|
|
install: release-install vm-install
|
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
|
|
|
|
Merge the following revisions from ^/projects/release-vmimage:
r273823-r273826, r273833, r273836, r273944, r274069-r274071,
r274134, r274211, r274280-r274285, r274287-r274288, r274292,
r274296-r274297, r274356, r274533, r274725, r274726, r274729,
r274734, r274771, r274945-r274946, r277180, r277183-r277184,
r277186-r277187, r277250-r277253, r277263-r277264, r277383-r277384,
r277393-r277395, r277438-r277439, r277447, r277455:
r273823:
Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.
r273824:
Add glue to allow enabling building cloud provider VM images
by default.
When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the
release/Makefile 'release' target.
r273825:
Avoid hard-coding the Azure image file format. While here,
avoid using OSRELEASE for the output file name.
r273826:
Remove a few vestiges of passing an exit code to panic().
r273833:
Initial commit providing a mechanism to create openstack images
as part of the release build.
r273836:
Fix output file name for openstack images. No further conversion
is necessary for this VM file target, so there is no need to append
the '.raw' suffix here.
r273944:
Uncomment the cloudinit rc.conf(5) line.
r274069:
Add line continuation so OPENSTACKCONF is actually included in the env(1).
r274070:
Add a 'vm-cloudware' target, used to drive all targets in CLOUDTARGETS.
r274071:
Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.
r274134:
Initial rewrite to consolidate VM image build scripts into one.
r274211:
Add write_partition_layout() used to populate the final image.
Fix duplicated mkimg(1) call in vm_create_disk().
Add primitive (untested) PowerPC/PowerPC64 VM image support.
Note: As it is currently written, the /boot/pmbr and
/boot/{gptboot,boot1.hfs} use the build host and not the target
build. Fixing this is likely going to be a hack in itself.
r274280:
Return if vm_create_disk() is unsuccessful.
r274281:
Add CLEANFILES entry for VM targets
r274282:
Add vm_extra_pre_umount() prototype to vmimage.subr.
r274283:
Fix DESTDIR for installworld, and make sure it is created before use.
r274284:
Move usage() from vmimage.subr to mk-vmimage.sh, in case vmimage.subr
has not been sourced.
r274285:
Spell 'OPTARG' correctly. Actually call vm_create_base().
r274287:
Fix line continuation in write_partition_layout().
Remove variable test that is no longer needed.
r274288:
Fix scheme flag to mkimg(1).
r274292:
mount(8) and umount(8) devfs(5) as needed.
r274296:
Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that
it is consolidated into one file.
Fix paths for the base image and output disk image files.
r274297:
Call cleanup() after everything is done.
r274356:
Remove a stray directory from CLEANFILES.
r274533:
Set the boot partition type to 'apple-boot' for powerpc.
r274725:
In vm_install_base(), copy the host resolv.conf into
the build chroot before attempting to do anything that
requires working DNS (i.e., pkg bootstrap).
In vm_extra_pre_umount(), remove the resolv.conf before
the disk image is unmounted from the backing md(4).
r274726 (cperciva):
Silence errors when umounting the chroot's /dev, since it
probably doesn't exist when we're running this.
Unmount filesystems before attempting to destroy the md which
holds them.
r274729 (cperciva):
Unmount filesystem and destroy md before we read the vnode from
disk and package it into a disk image. Otherwise we end up
packaging an unclean filesystem.
r274734 (cperciva):
Merge duplicative vm-CLOUDTYPE targets before additional duplication
gets added by the impending arrival of ec2 and gcloud.
r274771 (cperciva):
Add NOSWAP option which can be set by a vmimage.conf file to specify
that no swap space should be created in the image. This will be used
by EC2 builds, since FreeBSD/EC2 allocates swap space on "ephemeral"
disks which are physically attached to the Xen host node.
r274945:
In vm_extra_install_packages(), only bootstrap pkg(8) if
VM_EXTRA_PACKAGES is empty.
In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was
bootstrapped earlier.
r274946:
Fix indentation nit.
r277180:
In vm_extra_install_base(), do not install waagent in the openstack
image, because it is not used. This appears to be a copy mistake.
Remove vm_extra_install_base() from the openstack.conf entirely,
since it does not need to be overridden.
r277183:
Enable the textmode console by default for VM images, since there is
no way to tell if the environment will be able to use the
graphics-mode console.
r277184:
Enable password-less sudo for openstack images.
r277186:
Update the VM_EXTRA_PACKAGES list for the openstack images.
The documentation suggests doing a "just fetch this and run it"-style
bootstrap, from which the list of dependencies was obtained (in
github, at: pellaeon/bsd-cloudinit-installer)
There is one Python dependency unmet, oslo.config, which is not in
the Ports Collection.
r277187:
Add a comment to note that setting hw.vga.textmode=1 is temporary.
r277250:
Remove vm_extra_install_base() for the Azure image, now that the
waagent exists in the ports tree.
Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list.
In vm_extra_pre_umount(), remove the explicit pkg(8) install
list, as dependencies are resolved by sysutils/azure-agent.
r277251:
Add a 'list-cloudware' target to print the list of supported CLOUDWARE
values and a description.
Add the AZURE_DESC and OPENSTACK_DESC descriptions.
r277252:
Update release(7)
r277253:
Add 'list-vmtargets' target, which produces a list of all supported
VM and cloud provider images.
Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions.
Format the output to make a bit more readable.
Update release(7) to document the list-vmtargets target.
r277263:
Add initial support for the GCE (Google Compute Engine) cloud hosting
provider image.
r277264:
Style and line length cleanup.
r277383:
Remove the console setting from rc.conf(5), which is not used there.
While here, set console to include vidconsole in the loader.conf(5).
r277384:
Fix an indentation nit.
No functional changes.
r277393:
Remove the pkg-clean(8) call from vm_extra_pre_umount() since the
function is often overridden.
Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid duplicated
code.
r277394:
Move resolv.conf(5) removal back to vm_extra_pre_umount() where it
belongs.
The GCE image needs resolv.conf(5) to exist (created as part of the
image setup), so it cannot be removed.
r277395:
Comment the line that configures ttys(5) to 'off', which makes it
impossible to test that the image boots.
Add a note explaining why the line is commented, and not (yet) removed
entirely.
r277438:
Move the 'install' bits that are specific to virtual machine images
from the Makefile to Makefile.vm.
Rename the 'install' target to 'release-install', and add a new
'vm-install' target.
Add a new 'install' target that invokes the new targets.
r277439:
Add WITH_CLOUDWARE to the list of make(1) variables for the release
build.
r277447:
Remove hw.vga.textmode=1 from the VM image loader.conf, which was
included during test builds and not intended to be included when
merging this project branch back to head.
r277455:
Remove mk-azure.sh, which is no longer needed.
MFC after: 1 month
X-MFC-To: stable/10 (requires mkimg(1))
Help from: cperciva, swills
Relnotes: yes
Sponsored by: The FreeBSD Foundation
2015-01-20 23:56:04 +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}/
|
2020-12-08 00:48:50 +00:00
|
|
|
.if !empty(IMAGES)
|
2013-02-03 10:26:24 +00:00
|
|
|
.for I in ${IMAGES}
|
|
|
|
cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
|
2014-04-01 22:52:27 +00:00
|
|
|
. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
|
2015-02-17 23:13:45 +00:00
|
|
|
${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I}
|
2014-04-01 22:41:26 +00:00
|
|
|
. endif
|
2013-02-03 10:26:24 +00:00
|
|
|
.endfor
|
2015-10-14 22:33:11 +00:00
|
|
|
cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512
|
2013-02-03 10:26:24 +00:00
|
|
|
cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
|
2020-12-08 00:48:50 +00:00
|
|
|
.endif
|
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.
Sponsored by: The FreeBSD Foundation
2014-09-28 01:45:20 +00:00
|
|
|
|
Makefile.inc1:
- New file. Adds logic to search for the git binary, as well
as determining the branch and revision, used in various
places.
Makefile:
- Remove searching for the svn{,lite} binary.
Makefile.ec2:
- Reduce duplicated code, removing searching for the svn{,lite}
binary, in addition to EC2_SVN{BRANCH,REV}.
- Rename EC2_SVN* with GIT* for consistency.
Makefile.mirrors:
- Remove the SRCBRANCH declaration, replaced with the exported
GITBRANCH variable.
- Update _SNAP_SUFFIX from SVNREVISION to GITREV, and remove
the leading 'r' from it, since it will break git hashes.
- Remove yet another instance of duplicated code to search for
the svn{,version}lite binary.
Sponsored by: Rubicon Communications, LLC (netgate.com)
2020-07-16 20:34:26 +00:00
|
|
|
.include "${.CURDIR}/Makefile.inc1"
|
2014-10-29 14:57:30 +00:00
|
|
|
.include "${.CURDIR}/Makefile.vm"
|