Commit Graph

6992 Commits

Author SHA1 Message Date
Glen Barber
58fa9ad54e Document r273515, virtio_console(4) addition.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:38 +00:00
Glen Barber
7460f2acae Document r273331, vxlan(4) addition.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:35 +00:00
Glen Barber
ce14ffaba6 Document r273264, SD card detection instability fix for RPI.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:32 +00:00
Glen Barber
c6bdc8b34b Document r273178, kern.vt.spclkeys replaced with individual
kern.vt.kbd_* variants.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:30 +00:00
Glen Barber
acf4ff5e1a Document r273146, OpenSSL updated to 1.0.1j.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:27 +00:00
Glen Barber
b9d65b50b1 Document r272842, r272848, dl_iterate_pthr(3) always
returns the path of the dlpi_name ELF object.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:24 +00:00
Glen Barber
d062c1e063 Document r272730, support for AR816x/AR817x in alc(4).
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:21 +00:00
Glen Barber
9168e3f2db Document r272720, PLPMTUD blackhole detection (RFC 4821).
Add Limelight Networks to sponsors.ent.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:18 +00:00
Glen Barber
3b729d632a Document r272488, userland CTF support in DTrace.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:15 +00:00
Glen Barber
aa453cf359 Document r272350, MK_ARM_EABI removal.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:12 +00:00
Glen Barber
19643abed9 Document r272274, canmount=off set on /var when installing on
ZFS.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:10 +00:00
Glen Barber
30f10e4265 Document r272273, '%U' and '%W' support added to strptime(3).
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:07 +00:00
Glen Barber
064dddfa3e Document r272198, mkimg(1) longopts to obtain information about
the utility itself.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:04 +00:00
Glen Barber
a87b482dad Document r272166, primes(6) fix for incorrectly-returned values.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:04:01 +00:00
Glen Barber
5267cb7e63 Document r272089, ipfw(4) fix when using dummynet(4) at layer 2
leading to possible kernel panic.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:58 +00:00
Glen Barber
9ba3a7e77c Add an 'abi-compat' subsection to the 'userland' section.
Document r271982, compat.linux.osrelease updated after
support for CentOS 6 ports has been added.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:56 +00:00
Glen Barber
06f5651b4a Bump copyright year, following past few commits.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:53 +00:00
Glen Barber
bef579a478 Document r271705, hardware context support added to drm/i915.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:50 +00:00
Glen Barber
001399bd24 Document r271697, dtrace fixes for FreeBSD/powerpc.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:47 +00:00
Glen Barber
9d48fcafbc Document r271482, mkimg(1) support for empty partition
entries.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:44 +00:00
Glen Barber
43efa528e3 Add a 'periodic-scripts' subsection to the 'userland'
section.

Document r271321, don't cross mount boundaries when
cleaning tmp files.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:42 +00:00
Glen Barber
9daecb1292 Document r270745, ps(1) 'tracer' keyword addition.
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:39 +00:00
Glen Barber
0a62a7853a Document r270676, support for ${LOCALBASE}/etc/rc.conf.d in
rc(8).

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:36 +00:00
Glen Barber
f3c3d71f4f Document r270675, mailwrapper(8) supports mailer.conf(5) in
LOCALBASE.

Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:33 +00:00
Glen Barber
45e1e3eaad Document r270096, autofs(5).
Sponsored by:	The FreeBSD Foundation
2015-01-10 22:03:30 +00:00
Glen Barber
2303632301 Switch to x11/gnome3 now that x11/gnome2 no
longer exists in the ports tree.

MFC after:	3 days
X-MFC-With:	r276820, r276822, r276827
Sponsored by:	The FreeBSD Foundation
2015-01-08 15:50:10 +00:00
Glen Barber
0669938973 Ensure the ports directories exist for the list of
packages intended to be included on the DVD, and
remove any nonexistent ports from the final list.

Print the list of missing paths, and ensure that
DVD_PACKAGES is non-zero length (which should never
happen).

MFC after:	3 days
X-MFC-With:	r276820, r276822
Sponsored by:	The FreeBSD Foundation
2015-01-08 15:42:10 +00:00
Glen Barber
6b7ca552c3 Ensure /var/run/ld-elf.so.hints exists before building
pkg(8).

MFC after:	3 days
X-MFC-With:	r276820
Sponsored by:	The FreeBSD Foundation
2015-01-08 14:39:53 +00:00
Glen Barber
ef6db57978 Print informational output when NOPORTS is set,
which would otherwise cause pkg-stage.sh to
silently exit.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-01-08 14:29:03 +00:00
Glen Barber
83373daa35 Properly change directories before creating the
PKG_ALTABI -> PKG_ABI symlink.

MFC after:	3 days
X-MFC-With:	r276765
Sponsored by:	The FreeBSD Foundation
2015-01-06 20:46:29 +00:00
Glen Barber
8f85f8e66e Update pkg-stage.sh to be compatible with pkg-1.4.x.
In 1.3.x and earlier, ABI format is, for example,
freebsd:11:x86:64.

In 1.4.x, ABI format is FreeBSD:11:amd64, and a new
configuration entry, ALTABI, is: freebsd:11:x86:64.

Export PKG_ABI and PKG_ALTABI accordingly, and if
PKG_ALTABI is set, create a symlink within the dvd
PKG_CACHEDIR so both new and old ABI directories
exist.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-01-06 20:42:50 +00:00
Xin LI
17dfd895ce Document file update. 2015-01-02 23:10:28 +00:00
Glen Barber
bcc34ba8e9 Document asr(4) removal in r276526.
Sponsored by:	The FreeBSD Foundation
2015-01-02 21:52:01 +00:00
Glen Barber
fbe9579863 Bump copyright year.
Sponsored by:	The FreeBSD Foundation
2015-01-02 21:46:57 +00:00
Glen Barber
cebbaa4691 Update the 'Submitting Problem Reports' section to reflect
send-pr(1) deprecation, taking the text from the document
in stable/10.

Sponsored by:	The FreeBSD Foundation
2015-01-02 21:46:53 +00:00
Glen Barber
af80e5148c Remove hwlist.asr macro, asr(4) removed in r276526.
Sponsored by:	The FreeBSD Foundation
2015-01-02 21:09:54 +00:00
Glen Barber
7f10061425 Use the correct loader.conf(5) entry for deferring the
mountroot prompt.

Prodded by:	ian
Sponsored by:	The FreeBSD Foundation
2014-12-30 03:35:26 +00:00
Glen Barber
7bcc84a28c Delay dropping to the mountroot prompt for 10 seconds
in case the root device is not yet ready.

Sponsored by:	The FreeBSD Foundation
2014-12-29 22:32:39 +00:00
Ed Maste
04fef9c446 Build gperf before gcc
The ARM image builds build the in-tree gcc in order to build u-boot
and gperf is needed to build gcc, but is no longer installed on archs
that use clang.

Invoking the make targets as separate steps is done to work around
a build failure which is not yet fully understood.

Reviewed by:	gjb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1317
2014-12-24 18:51:25 +00:00
Glen Barber
4c16f1b111 Adjust the 'Relnotes:' search to look for any non-empty
string following the tag.

Sponsored by:	The FreeBSD Foundation
2014-12-08 15:45:07 +00:00
Baptiste Daroussin
65c31e445c Convert to LIBADD 2014-11-26 08:12:21 +00:00
Glen Barber
e5b4ea4d4e Fix indentation nit.
Sponsored by:	The FreeBSD Foundation
2014-11-24 02:36:43 +00:00
Glen Barber
a4900ff5a5 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.

Inspired by:	cperciva
Sponsored by:	The FreeBSD Foundation
2014-11-24 02:34:01 +00:00
Glen Barber
30a20c89bf Revert r274773, after I *specifically* objected to this change
numerous times.

Sponsored by:	The FreeBSD Foundation
2014-11-21 02:30:37 +00:00
Colin Percival
32dbc82982 Change how packages are installed into VM images: Rather than chrooting
into the image and running 'pkg install' from there, use 'pkg fetch' to
download packages into a temporary location and then 'pkg add' to install
them into the image.

This simplifies the code by avoiding the need to copy /etc/resolv.conf
into the image and then delete it later, and makes it possible to cross
build (e.g., to create an amd64 image when running on i386 hardware; or
in the future for building disk images for embedded platforms).

Because pkg was implicitly installed when VM_EXTRA_PACKAGES was non-empty,
add it to VM_EXTRA_PACKAGES in azure.conf and openstack.conf to maintain
the current behaviour.

By default repo-FreeBSD.sqlite is copied into the image, (a) to match
previous behaviour, where the file would be downloaded by the chrooted
pkg invocation; and (b) because it may be useful for testing purposes,
e.g., to see why a package didn't get installed.  Because this file is
large (46 MB) and not likely to be useful in -RELEASE images which are
being launched into Clouds several months later, it can be disabled by
setting NOREPOSQLITE.

As far as I know this commit does not change the disk images produced in
any filesystem-visible way.
2014-11-21 02:13:12 +00:00
Colin Percival
4e7bc9f0f7 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.
2014-11-21 01:53:40 +00:00
Colin Percival
48096f81ed Merge duplicative vm-CLOUDTYPE targets before additional duplication gets
added by the impending arrival of ec2 and gcloud.
2014-11-20 03:46:35 +00:00
Colin Percival
3b4252413d 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.
2014-11-20 00:16:55 +00:00
Colin Percival
7d97075f02 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.
2014-11-19 22:17:22 +00:00
Glen Barber
91333d6a2d 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).

Reported by:	cperciva
Sponsored by:	The FreeBSD Foundation
2014-11-19 20:19:53 +00:00
Glen Barber
9d3df3bdb7 Set the boot partition type to 'apple-boot' for powerpc.
Submitted by:	jhibbits
Sponsored by:	The FreeBSD Foundation
2014-11-14 22:29:33 +00:00
Glen Barber
f43c861f38 Remove a stray directory from CLEANFILES.
Sponsored by:	The FreeBSD Foundation
2014-11-10 21:10:50 +00:00
Alexander V. Chernikov
603eaf792b Renove faith(4) and faithd(8) from base. It looks like industry
have chosen different (and more traditional) stateless/statuful
NAT64 as translation mechanism. Last non-trivial commits to both
faith(4) and faithd(8) happened more than 12 years ago, so I assume
it is time to drop RFC3142 in FreeBSD.

No objections from:	net@
2014-11-09 21:33:01 +00:00
Glen Barber
742aade462 Call cleanup() after everything is done.
Sponsored by:	The FreeBSD Foundation
2014-11-08 16:52:07 +00:00
Glen Barber
26bb2a6066 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.

Sponsored by:	The FreeBSD Foundation
2014-11-08 16:44:45 +00:00
Glen Barber
e6f3489c36 mount(8) and umount(8) devfs(5) as needed.
Sponsored by:	The FreeBSD Foundation
2014-11-08 16:26:17 +00:00
Glen Barber
7d565d608f Fix scheme flag to mkimg(1).
Sponsored by:	The FreeBSD Foundation
2014-11-08 13:49:59 +00:00
Glen Barber
38d59ac708 Fix line continuation in write_partition_layout().
Remove variable test that is no longer needed.

Sponsored by:	The FreeBSD Foundation
2014-11-08 13:49:18 +00:00
Glen Barber
07fe767eb8 Spell 'OPTARG' correctly.
Actually call vm_create_base().

Sponsored by:	The FreeBSD Foundation
2014-11-08 12:59:32 +00:00
Glen Barber
144d107fcd Move usage() from vmimage.subr to mk-vmimage.sh,
in case vmimage.subr has not been sourced.

Sponsored by:	The FreeBSD Foundation
2014-11-08 12:47:21 +00:00
Glen Barber
1c34bf9552 Fix DESTDIR for installworld, and make sure it is created
before use.

Sponsored by:	The FreeBSD Foundation
2014-11-08 12:45:35 +00:00
Glen Barber
a02bfc8327 Add vm_extra_pre_umount() prototype to vmimage.subr.
Sponsored by:	The FreeBSD Foundation
2014-11-08 12:45:02 +00:00
Glen Barber
b6dd8a62c4 Add CLEANFILES entry for VM targets
Sponsored by:	The FreeBSD Foundation
2014-11-08 12:40:59 +00:00
Glen Barber
87f6c4ac27 Return if vm_create_disk() is unsuccessful.
Sponsored by:	The FreeBSD Foundation
2014-11-08 12:23:50 +00:00
Glen Barber
efeb11a772 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.

Sponsored by:	The FreeBSD Foundation
2014-11-07 01:48:12 +00:00
Glen Barber
1e7c1f1742 Initial rewrite to consolidate VM image build scripts into one.
There may be some very sharp edges here while refactoring.

 - Move amd64/mk-vmimage.sh -> scripts/mk-vmimage.sh.
 - Remove vm-base target from Makefile.vm.
 - In vm-image target, use getopts flags for argument passing.
 - Create tools/vmimage.subr, containing default and prototype
   for the following functions that are used to drive the build,
   run in this order:

   vm_install_base()
   vm_extra_install_base()
   vm_extra_install_packages()
   vm_extra_install_ports()
   vm_extra_enable_services()
   vm_extra_pre_umount()
   vm_create_disk()
   vm_extra_create_disk()

 - In tools/azure.conf, override:

   vm_extra_install_base()
   vm_extra_pre_umount()
   vm_extra_create_disk()

 - In tools/openstack.conf, override:

   vm_extra_install_base()
   vm_extra_pre_umount()

Sponsored by:	The FreeBSD Foundation
2014-11-05 13:22:19 +00:00
Glen Barber
745ca08586 Fix VOLUME_LABEL when BRANCH contains non-alpha
characters, in particular '-' and '.'.

Submitted by:	des
Tested by:	des
MFC after:	3 days
X-MFC-10.1:	yes
Sponsored by:	The FreeBSD Foundation
2014-11-04 17:24:13 +00:00
Glen Barber
21f93ded5a Add examples for WITH_CLOUDWARE to release.conf.sample.
Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS.

Sponsored by:	The FreeBSD Foundation
2014-11-04 00:02:23 +00:00
Glen Barber
7d2ef96183 Add a 'vm-cloudware' target, used to drive all
targets in CLOUDTARGETS.

Sponsored by:	The FreeBSD Foundation
2014-11-03 23:59:53 +00:00
Glen Barber
f61371e0fe Add line continuation so OPENSTACKCONF is actually included
in the env(1).

Sponsored by:	The FreeBSD Foundation
2014-11-03 23:47:00 +00:00
Glen Barber
35d8a6aa42 Uncomment the cloudinit rc.conf(5) line.
Sponsored by:	The FreeBSD Foundation
2014-11-01 20:41:47 +00:00
Gavin Atkinson
22c056ce83 Updates to the list of CPUs supported by the amd64 platform
MFC after:	3 days
2014-11-01 20:07:32 +00:00
Glen Barber
6943fb9ff2 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.

Sponsored by:	The FreeBSD Foundation
2014-10-29 19:44:34 +00:00
Glen Barber
573e7cca4b Initial commit providing a mechanism to create
openstack images as part of the release build.

This mimics the way Microsoft Azure images are
built, with the addition of installing the
net/cloud-init package and adding a (commented)
rc.conf(5) entry for cloudinit.

Sponsored by:	The FreeBSD Foundation
2014-10-29 17:04:09 +00:00
Glen Barber
461f70f64a Remove a few vestiges of passing an exit code to
panic().

Sponsored by:	The FreeBSD Foundation
2014-10-29 16:20:49 +00:00
Glen Barber
f27438c752 Avoid hard-coding the Azure image file format.
While here, avoid using OSRELEASE for the output
file name.

Sponsored by:	The FreeBSD Foundation
2014-10-29 16:18:29 +00:00
Glen Barber
d08ce983a7 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.

CLOUDTARGETS is generated from the contents of
CLOUDWARE, which should be a list of all supported
target providers.

Sponsored by:	The FreeBSD Foundation
2014-10-29 15:52:17 +00:00
Glen Barber
6513e474ac Move virtual machine / cloud provider targets and
options from release/Makefile to their own Makefile.

Sponsored by:	The FreeBSD Foundation
2014-10-29 14:57:30 +00:00
Glen Barber
69c7d069af 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
Glen Barber
ac23f4607a Add more descriptive metadata to the ISO images.
PR: 		146079
Submitted by: 	Roman Bogorodskiy
MFC after: 	3 days
X-MFC-10.1: 	yes
Sponsored by:	The FreeBSD Foundation
2014-10-17 03:55:33 +00:00
Glen Barber
2a382033b5 Reintegrate head@r273095
Sponsored by:	The FreeBSD Foundation
2014-10-14 15:37:19 +00:00
Glen Barber
e4cd478e9f Merge the following from ^/projects/release-vmimage:
r273076, r273077, r273079, r273095:

r273076:
  Add a separate make(1) target to release/Makefile to
  build FreeBSD virtual machine disk images for use on
  the Microsoft Azure service.

  For now, this target is not directly connected to the
  build, however can be manually invoked.

  The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
  which does the heavy lifting to produce proper VHDs.
  mk-azure.sh uses a configuration file, defaulting to
  tools/azure.conf if otherwise unset.

r273077:
  Clear VM_RC_LIST.

r273079:
  Fix signal list to trigger umount(8).

r273095:
  Output an informational message when mkimg(1) runs, so it
  does not appear that the process has stopped while waiting
  for a 'y/n' response when waagent is deprovisioned.

Tested on:	releng/10.1@r272876
MFC after:	3 days
X-MFC-10.1:	yes
Sponsored by:	The FreeBSD Foundation
2014-10-14 15:22:46 +00:00
Glen Barber
f38d42ba63 Output an informational message when mkimg(1) runs, so it
does not appear that the process has stopped while waiting
for a 'y/n' response when waagent is deprovisioned.

Sponsored by:	The FreeBSD Foundation
2014-10-14 15:18:22 +00:00
Glen Barber
7cb62648d9 Merge the following from ^/projects/release-vmimage:
r272436, r272437, r272792:

r272436:
  Remove the first argument to panic(), which was initially
  intended to be the exit code, however when a non-zero exit
  code was returned to release/Makefile, this would prevent
  any remaining (and possibly successful) stages from being
  attempted.

r272437:

  If the vm-base target fails, prevent the vm-image target
  from being run since it cannot possibly succeed.

r272792:

  Add /usr/local/bin and /usr/local/sbin to PATH, needed
  if third-party software needs to use utilities outside
  of the base system during post-install stages (indexinfo
  is one culprit).

MFC after:	3 days
X-MFC-10.1:	yes
Sponsored by:	The FreeBSD Foundation
2014-10-14 15:03:06 +00:00
Glen Barber
60b7edb5a7 Fix signal list to trigger umount(8).
Sponsored by:	The FreeBSD Foundation
2014-10-14 12:13:43 +00:00
Glen Barber
f460f3b974 Clear VM_RC_LIST.
Sponsored by:	The FreeBSD Foundation
2014-10-14 12:04:50 +00:00
Glen Barber
3991f309ed Add a separate make(1) target to release/Makefile to
build FreeBSD virtual machine disk images for use on
the Microsoft Azure service.

For now, this target is not directly connected to the
build, however can be manually invoked.

The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
which does the heavy lifting to produce proper VHDs.
mk-azure.sh uses a configuration file, defaulting to
tools/azure.conf if otherwise unset.

Sponsored by:	The FreeBSD Foundation
2014-10-14 11:48:28 +00:00
Glen Barber
41a29c1ab2 Revert r272793, r272794, r272795:
Remove implementation of vm_prebuild_setup(),
  vm_setup(), and vm_postbuild_setup().

  It does not scale well, and I am not happy with
  their implementation.

Sponsored by:	The FreeBSD Foundation
2014-10-14 11:20:08 +00:00
Glen Barber
648326ad2d Reference vm_prebuild_setup(), vm_setup(), and
vm_postbuild_setup() functions.

Sponsored by:	The FreeBSD Foundation
2014-10-09 04:10:58 +00:00
Glen Barber
4ac2ee7f8c Allow mk-vmimage.sh to accept a configuration file as
an argument to '-c'.

Sponsored by:	The FreeBSD Foundation
2014-10-09 03:50:38 +00:00
Glen Barber
ed79fb4ea9 Add prototypes for build-specific tuning:
- vm_prebuild_setup():
	Steps to run prior to creating the file-backed
	disk image.

 - vm_setup():
	Steps to run while the file-backed disk image
	is mounted.

 - vm_postbuild_setup():
	Steps to run after the file-backed disk image
	is dismounted.

The intention is to override as necessary via build
configuration files, as needed.

Sponsored by:	The FreeBSD Foundation
2014-10-09 03:29:52 +00:00
Glen Barber
655f2eb770 Add /usr/local/bin and /usr/local/sbin to PATH, needed
if third-party software needs to use utilities outside
of the base system during post-install stages (indexinfo
is one culprit).

Sponsored by:	The FreeBSD Foundation
2014-10-09 03:20:28 +00:00
Gavin Atkinson
b328e7bf72 Include urndis(4) in list of devices for which we generate hardware notes.
MFC after:	3 days
2014-10-04 23:56:25 +00:00
Glen Barber
47480336de If the vm-base target fails, prevent the vm-image target
from being run since it cannot possibly succeed.

Sponsored by:	The FreeBSD Foundation
2014-10-02 18:23:53 +00:00
Glen Barber
d04dbaf828 Remove the first argument to panic(), which was initially
intended to be the exit code, however when a non-zero exit
code was returned to release/Makefile, this would prevent
any remaining (and possibly successful) stages from being
attempted.

Sponsored by:	The FreeBSD Foundation
2014-10-02 18:20:01 +00:00
Glen Barber
ee12fa01c6 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.

MFC after:	5 days
X-MFC-10.1:	yes
Tested on:	r272269, r272272, r272279, r272380, r272392
Sponsored by:	The FreeBSD Foundation
2014-10-02 16:13:12 +00:00
Glen Barber
cadb91b066 Remove two stray comments added during the initial iterations
of testing, no longer needed.

Sponsored by:	The FreeBSD Foundation
2014-10-02 16:05:01 +00:00
Glen Barber
a9278c16be 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.

Sponsored by:	The FreeBSD Foundation
2014-10-02 00:34:03 +00:00
Glen Barber
a2950cc4e3 After evaluating WITH_VMIMAGES is non-empty, ensure
the mk-vmimage.sh script exists before running it.

Sponsored by:	The FreeBSD Foundation
2014-10-01 19:25:02 +00:00
Glen Barber
0bc9be5e74 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.

Sponsored by:	The FreeBSD Foundation
2014-10-01 19:13:42 +00:00