Commit graph

1080 commits

Author SHA1 Message Date
Glen Barber 7ffa77fa95 Enable multi-threaded xz(1) compression, after r278433.
Allow multi-threaded xz(1) to be turned off by specifying
NO_XZTHREADS, and allow number of threads to be overridden
by specifying XZ_THREADS=N.

MFC after:	1 week
X-MFC-needs:	r278433
Sponsored by:	The FreeBSD Foundation
2015-02-09 10:42:27 +00:00
Glen Barber 7bdb2409ca Define FREEBSD_VERSION in release/Makefile, derived
from sys/sys/param.h.

Sponsored by:	The FreeBSD Foundation
2015-02-09 09:56:21 +00:00
Glen Barber a55e34eb28 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
Colin Percival 81be95ceb4 Provide a recipe of "true" for building the "release" target once its
prerequisites are satisfied, in order to avoid having an implicit rule
triggered by the presence of release.sh.

Approved by:	gjb
2015-01-23 20:24:13 +00:00
Glen Barber 4afe7cf500 Rename the 'release' target to 'real-release', and
add two targets, 'vm-release' and 'cloudware-release',
that are invoked if WITH_VMIMAGES and WITH_CLOUDWARE
are not empty.

This fixes an issue where 'make release' would not
build the cloud provider targets because CLOUDWARE was
not yet set. [1]

Move the WITH_VMIMAGES and WITH_CLOUDWARE targets to
Makefile.vm.

Note: There is no 'cloudware-install' target yet, since
some of the disk image names may need to be specific to
the provider, so this is probably best handled by the
build scripts.

Reported by:	cperciva [1]
MFC after:	1 month
X-MFC-with:	r277458
Sponsored by:	The FreeBSD Foundation
2015-01-22 19:43:05 +00:00
Glen Barber 2d4ff62f00 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
Glen Barber 8f0ea33f2b Reintegrate head revisions r273096-r277147
Sponsored by:	The FreeBSD Foundation
2015-01-13 21:29:24 +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
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 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 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 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
Glen Barber fadf2a24fe 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.

Sponsored by:	The FreeBSD Foundation
2014-10-01 17:05:40 +00:00
Glen Barber f54137c331 release/Makefile:
Include .OBJDIR in DESTDIR in the vm-base target.

release/release.sh:
  Provide the full path to mddev.

Sponsored by:	The FreeBSD Foundation
2014-09-28 20:06:02 +00:00
Glen Barber 4e187d25fa 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.

Sponsored by:	The FreeBSD Foundation
2014-09-28 17:53:10 +00:00
Glen Barber c925095689 Use VMBASE in place of a hard-coded filename in the CLEANFILES list.
Sponsored by:	The FreeBSD Foundation
2014-09-28 01:53:02 +00:00
Glen Barber a68d274b86 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
Glen Barber ffc6fb79b6 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
Glen Barber ba7bd912bf Switch release/Makefile knobs from WITHOUT_FOO=1 to MK_FOO=no.
This allows greater granular control over the release
build, and avoids WITH_FOO=1 and WITHOUT_FOO=1 collision.

This change was verified to produce correct results
compared to an earlier build by diffing find(1) output
of the resulting bootonly/, dvd/, and release/ directories.

Tested on:	head@r267449
MFC after:	1 month
X-MFC-Note:	Requires commits not yet MFC'd, so likely
		longer than 1 month.
Sponsored by:	The FreeBSD Foundation
2014-06-14 01:03:24 +00:00
Julio Merino cb3ba77815 Strip out the test suite from the installation media.
This affects the disc1.iso, dvd1.iso and bootonly.iso files.

Obtained from:	gjb
2014-06-10 17:05:41 +00:00
Glen Barber fdbd636433 Fix indentation level.
MFC after:	3 days
X-MFC-With:	r267326
Sponsored by:	The FreeBSD Foundation
2014-06-10 15:20:41 +00:00
Glen Barber cd15d7f34e Add empty pkg-stage file to CLEANFILES if WITH_DVD=1.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2014-06-10 15:19:28 +00:00
Glen Barber 73e46dba11 Turn off the full witness trace on console output.
On head/, or more specifically, when WITNESS is in
the kernel config, the console is spammed excessively
with lock order reversal between isofs and devfs.

Set debug.witness.trace=0 in the installer sysctl.conf
to avoid printing the full KDB stack backtrace.  This
does not prevent printing the lock order reversal has
happened, only lessens the console spam.

Sponsored by:	The FreeBSD Foundation
2014-04-27 16:40:40 +00:00
Glen Barber 3b485e461d Allow overriding xz(1) path.
Requested by:	marck
MFC After:	5 days
X-MFC-With:	r264027,r264028,r264029,r264030,r264046
Sponsored by:	The FreeBSD Foundation
2014-04-03 12:04:05 +00:00
Glen Barber 55af5cf123 Use xz(1) instead of gzip(1) to compress release images
when WITH_COMPRESSED_IMAGES is used.

Requested by:	delphij, brooks, Nikolai Lifanov
MFC After:	1 week
X-MFC-With:	r264027,r264028,r264029,r264030
Sponsored by:	The FreeBSD Foundation
2014-04-02 16:53:07 +00:00
Glen Barber 0c5359919c If WITH_COMPRESSED_IMAGES is set, add the compressed images to
the CLEANFILES list.

MFC after:	1 week
X-MFC-With:	r264027,r264028,r264029
Sponsored by:	The FreeBSD Foundation
2014-04-01 22:54:54 +00:00
Glen Barber 510f330370 Fix logic error: s/||/&&/
Pointyhat:	gjb
MFC after:	1 week
X-MFC-With:	r264027,r264028
Sponsored by:	The FreeBSD Foundation
2014-04-01 22:52:27 +00:00
Glen Barber 86bb4323ab Clean up trailing whitespace in release/Makefile.
MFC after:	1 week
X-MFC-With:	r264027
Sponsored by:	The FreeBSD Foundation
2014-04-01 22:46:46 +00:00
Glen Barber cbc0e08a7b Add a new release build variable, WITH_COMPRESSED_IMAGES.
When set to a non-empty value, the installation medium is
compressed with gzip(1) as part of the 'install' target in
the release/ directory.

With gzip(1) compression, downloadable image are reduced in
size quite significantly.  Build test against head@263927
shows the following:

 bootonly.iso:		64% smaller
 disc1.iso:		44% smaller
 memstick.img:		47% smaller
 mini-memstick.img:	65% smaller
 dvd1.iso:		untested

This option is off by default, I would eventually like to
turn it on by default, and remove the '-k' flag to gzip(1)
so only compressed images are published on FTP.

Requested by:	wkoszek
MFC After:	1 week
Sponsored by:	The FreeBSD Foundation
2014-04-01 22:41:26 +00:00
Glen Barber 23659c9d9d In release/Makefile, remove exclusion of CVS directories in the
src/ and ports/ distributions.

While I am thinking about it, exclude .git directories for src/
and ports/, as somewhat of a followup to r262499.

Sponsored by:	The FreeBSD Foundation
2014-02-26 00:52:01 +00:00
John Hay d6d73d476b etcupdate should use the src tree from where the release is built, not
the default (/usr/src) tree.

MFC after:	2 weeks
2014-02-17 12:29:17 +00:00
Glen Barber 6f50c4ea71 Update the pkg-stage target to be more compatible with pkg-1.2:
- Add a release-dvd.conf pkg(8) configuration file to override
   the default FreeBSD.conf configuration.
 - Remove architecture-specific pkg-stage.conf files, consolidate,
   and move their contents to scripts/pkg-stage.sh.
 - Use 'pkg -vv' to determine the ABI, which is used as the
   cache directory.

Prior to these changes, it would be possible for pkg-stage to fetch
conflicting binary packages from multiple repositories.

Tested against:	head@r260522, stable/10@r260522

MFC after:	3 days
X-Insta-MFC:	possibly
Sponsored by:	The FreeBSD Foundation
2014-01-16 16:12:09 +00:00
Glen Barber e9120a2560 Bootstrap etcupdate(8) as part of the release build, similar
to what is done for mergemaster(8).  This allows etcupdate(8)
to work out-of-box after the first upgrade of a system.

Submitted by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2013-12-22 16:12:47 +00:00
Glen Barber 0d0e89b794 Add a pkg(8) repository configuration file for cdrom-based package
installation.

As part of the 'pkg-stage' target, copy the configuration file
to the 'packages/repos/' directory on the DVD filesystem.

MFC after:	3 days
X-MFC-Before:	-RC3
Sponsored by:	The FreeBSD Foundation
2013-12-15 20:38:07 +00:00
Glen Barber b1e3e96568 Reduce disc1.iso size by 74MB by removing lib32 libraries, sendmail,
and atf.

MFC after:	3 days
X-MFC-To-10:	immediate (-RC2 requirement)
Sponsored by:	The FreeBSD Foundation
2013-12-14 22:41:17 +00:00
Glen Barber d8824524b7 Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating
to true.

Submitted by:	hrs
MFC after:	3 days
X-MFC-to-10:	immediate
Sponsored by:	The FreeBSD Foundation
2013-12-05 00:56:03 +00:00
Glen Barber f7f650c76a Turn off the dvdrom target by default. dvd1.iso is now built by
specifying 'WITH_DVD=1' during 'make release'.

This caused some problems during the freebsd-update builds for
10.0-BETA4.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2013-12-02 18:47:57 +00:00
Hiroki Sato 46b13263cf Use standard CLEANFILES/CLEANDIRS and clean target in bsd.obj.mk. 2013-12-01 15:24:35 +00:00
Hiroki Sato 464485c8d0 - Prevent TARGET and TARGET_ARCH from being defined as empty when
TARGET="" and/or TARGET_ARCH="" is specified.
- Remove extra ().
2013-12-01 15:06:30 +00:00
Hiroki Sato 9d22cb2e69 Add NOPKG to disable pkg-stage. 2013-11-30 17:07:53 +00:00
Glen Barber 5d27274a06 Document the dvdrom target and NODVD variable, forgotten with r258310.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2013-11-27 03:05:24 +00:00
Glen Barber 2b471d3acb Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
Requested by:	hrs
MFC after:	3 days
X-MFC-With:	r258310
Sponsored by:	The FreeBSD Foundation
2013-11-18 19:57:11 +00:00
Glen Barber dc2445625a Add the 'dvd1.iso' target. This mimics the 'release.iso' target,
with the additional step of fetching packages for inclusion on the
dvd image.

The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
the '${TARGET}/pkg-stage.conf' configuration file exists (currently
only amd64 and i386).

Allow dvd1.iso to be skipped if NODVD=1.

MFC after:	3 days
X-MFC-With:	r258305, r258307, r258308, r258309
Sponsored by:	The FreeBSD Foundation
2013-11-18 16:25:56 +00:00
Glen Barber 849861d03f Use the IMAGES variable to determine which image files to remove
as part of 'make -C /usr/src/release clean'.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2013-11-18 15:11:13 +00:00
Glen Barber cb95a96bee Remove extra target from 'memstick' that I forgot to remove before
previous commit.

MFC after:	1 week
X-MFC-After:	10.0-RELEASE
X-MFC-With:	r257805
Sponsored by:	The FreeBSD Foundation
2013-11-07 18:59:06 +00:00
Glen Barber a9da1707e5 Add a 'mini-memstick.img' release target, which will use the
'bootonly.iso' components to create a smaller memory stick image.

This is useful for system recovery, where a full memstick.img image
is not necessarily needed (or wanted).  In addition, it is possible to
do bootonly-style installation, where the base.txz, kernel.txz, etc.
are fetched from a remote source.

Provide backwards-compatible target (mini-memstick), to keep in sync
with the targets documented in release/Makefile.

Prompted by:	wblock
MFC after:	1 week
X-MFC-after:	10.0-RELEASE
Sponsored by:	The FreeBSD Foundation
2013-11-07 18:53:55 +00:00
Glen Barber 58ddb0a684 Reduce disc1.iso image size by installing the userland with
the WITHOUT_PROFILE=1 option set, trimming 56MB from the image.

Approved by:	re (glebius)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2013-10-13 15:49:50 +00:00
Dag-Erling Smørgrav 56b72efe82 Remove BIND.
Approved by:	re (gjb)
2013-09-30 17:23:45 +00:00
Glen Barber 8cec99b682 For consistency with previous releases, name the cdrom install
cd 'disc1.iso'.

Discussed with:	re@ team
Approved by:	kib (mentor)
MFC after:	3 days
X-MFC-To:	stable/9 only
2013-07-22 12:07:57 +00:00
Glen Barber 3c334738ab Create memstick images with the '.img' filename extension.
Requested by:	many
Approved by:	kib (mentor)
MFC after:	3 days
X-MFC-To:	stable/9 only
2013-07-21 05:23:34 +00:00
Tijl Coosemans 53089271a1 Convert old make variable modifiers :U and :L to bmake :tu and :tl.
Reviewed by:	sjg
2013-06-02 11:44:23 +00:00
Hiroki Sato de17cbcc7e - Add CHECKSUM.* support in Makefile[1].
- Use ln -fs to create a symlink.
- Remove pkgadd for docports.
- Use WITHOUT_JADETEX=yes instead of WITH_JADETEX=no.
- Add {WORLD,KERNEL}_FLAGS to [BTWK]MAKE.
- Use makefs(8) and gpart(8) for sparc64 ISO image[2].
- Add publisher option to makefs(8)[2].

Based on work by:	gjb[1]
Discussed with:		marius, nwhitehorn[2]
2013-02-03 10:26:24 +00:00
Glen Barber 9f5907dbbe Prevent including .zfs snapshot directories in the src.txz
distribution.  This can happen if the src/ tree checkout is
within its own ZFS dataset, and the 'snapdir' ZFS property
is set to 'visible.'

Approved by:	hrs
MFC after:	3 days
X-MFC-To:	stable/9 only
2012-11-11 21:52:18 +00:00
Ed Maste c4acc58d1d Exclude potential circular symlink
This does not occur with normal release builds but can happen when reusing
these release parts for other purposes.
2012-10-15 17:19:47 +00:00
Ed Maste f0c51ba5c7 Exclude potential circular symlink when creating src tarball.
Normal release builds are not affected by this but it can happen if using
these release bits against a work tree.

Sponsored by: ADARA Networks
2012-10-11 18:41:32 +00:00
Nathan Whitehorn 6f4fc34468 Make sure not to tar up CVS directories if this ports tree is a CVS
checkout.

PR:		bin/165868
MFC after:	5 days
2012-03-09 02:23:03 +00:00
Hiroki Sato 876acefaaf - Clean up extra ${.OBJDIR}.
- Add ${IMAGE} for the supported image files.  This fixes the install target
  on FreeBSD/pc98.
- Use "mkdir -p" instead of "-mkdir" consistently.

Reviewed by:	nwhitehorn
2012-03-08 01:47:12 +00:00
Gleb Smirnoff d6ba7d93ba Restore functionality to pack several kernels into release. All
kernels specified by KERNCONF are built and packed into release.
The first one is packed into kernel.txz, all others to
kernel.CONFIG.txz.

The first one is installed on bootables in /boot.
2012-01-15 08:36:25 +00:00
Sean Bruno 672d7ddbcc Allow release generation from a WORLDDIR that is not /usr/src
PR:		misc/159666
Submitted by:	Test Rat <ttsestt@gmail.com>
Reviewed by:	Nathan Whitehorn <nwhitehorn@freebsd.org>
Approved by:	re (kib)
2011-08-18 16:54:04 +00:00
Nathan Whitehorn bfc3bab865 Per request of the docs team, install docs as packages, instead of via
the normal distfile mechanism. Thanks to Marc Fonvieille for the patch and
for putting up with me taking entirely too long to commit this!

Submitted by:	blackend
2011-07-09 23:01:54 +00:00
Nathan Whitehorn 01dae98e72 Make the bootonly CD smaller by discarding static libraries that are not
useful without a toolchain.
2011-06-15 23:56:40 +00:00
Nathan Whitehorn 6e352319b6 Do not install the rescue tools onto the install CD. Since it is read
only, they are very unlikely to be needed and take up a great deal of
space.
2011-06-15 23:38:15 +00:00
Nathan Whitehorn 0bd47e8362 As requested by many people, with final prodding from Jason Hall, fix this
so that running make release causes make obj to be run before doing
anything. This fixes a bug wherein, when run for the first time, and
without -DNOSRC, make release would attempt to recursively tar up the src
directory including its own output and enter an infinite loop.

While here, make the cross-building stuff work a little more the way it
should if only one of TARGET/TARGET_ARCH is specified.
2011-05-18 17:39:28 +00:00
Nathan Whitehorn 61741fd7b2 Mention the memstick target here. 2011-04-18 13:20:54 +00:00
Nathan Whitehorn 299a8b95ac Add an install target to release/Makefile instead of grubbing around
(and requesting that users grub around) in /usr/obj. Also make sure that
make clean removes the bootonly media and clean up that target a little.
2011-04-11 14:30:45 +00:00
Nathan Whitehorn 46c413fe06 Add infrastructure for generation of boot-only ISO images. These have a
reduced world, though still reasonably complete for fixit purposes.
2011-03-27 23:46:12 +00:00
Nathan Whitehorn 3a20439f1c Cause the release target to set up its object directory. It is designed
to be a meta-target, and having it do this avoids it spewing files all
over the source tree by default (and possible recursive tarring if
distributing a src tarball).
2011-03-26 13:58:44 +00:00
Nathan Whitehorn 0877c11eda Use labels to find release media instead of hard-coded device paths. This
makes booting more reliable (and working at all on USB sticks). While here,
move responsibility for setting up fstab into the various platform mk-*.sh
scripts.

Suggested by:	many
2011-03-22 01:14:53 +00:00
Nathan Whitehorn 12ad0bb143 Thanks to sysinstall for its 15 years of service. And now to sleep,
perchance to dream...
2011-03-14 13:47:17 +00:00
Nathan Whitehorn 99ad39c822 Improve the distributeworld target in Makefile.inc1 and update the release
infrastructure to use it. make distributeworld can now be used without
preparing its environment first and installs games into its distribution
using the regular make distribute logic instead of post-processing with
a script.

Also add two new targets, packageworld and packagekernel, that tar up the
results of distributeworld and distributekernel (also new), respectively.
2011-03-02 14:39:26 +00:00
Nathan Whitehorn 0dd04e5470 Get powerpc64 install CDs a little closer: some powerpc things should be
used on powerpc64 as well (build scripts, for instance), and the MFS root
must be adjusted upward on powerpc64 as well.

This doesn't completely solve things: sysinstall stil needs some
persuasion to deal with a default kernel named GENERIC64.
2010-07-15 01:48:30 +00:00
Nathan Whitehorn 8bb2397180 Connect powerpc64 to the build. It is not presently part of make universe,
which will be added soon.

Reviewed by:	imp
2010-07-13 21:19:59 +00:00
Ken Smith a3238bcf8f Shift the version of perl used by the release build process over to
perl-5.10.  This aligns the release build process with the current
default version of perl in the ports tree.

I'll MFC this to all active branches.

MFC after:	3 days
2010-04-09 14:27:17 +00:00
Ken Smith 49ac20555f Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition
to FTP_PASSIVE_MODE so release building works for a machine that needs
to use a proxy.

PR:		misc/137688
Submitted by:	Michael Leun
MFC after:	2 weeks
2010-04-09 14:24:00 +00:00
Yoshihiro Takahashi 3c66b23034 Do kgzip to the loader on pc98, too. Now pc98's boot2 works for ELF.
MFC after:	2 week
2010-01-02 12:37:54 +00:00
Ken Smith 8a7c9fcc3c Add "FreeBSD-" to the beginning of the filenames for the ISO images.
People who collect ISOs from more than just us have been requesting
this for a while.

MFC after:	1 week
2009-12-21 14:42:35 +00:00
Ken Smith 6877964545 Have sparc64 join the separate livefs crowd. Including the docs packages
on disc1 (needed now by sysinstall) overflows the target CDROM iso size.

MFC after:	3 days
2009-09-18 14:53:01 +00:00
Marc Fonvieille d4267a481b Update some comments to match the removal of the docset compilation
during the release build.
2009-08-27 13:18:59 +00:00
John Baldwin 1dc6903b78 Invoke the recently added mm-mtree.sh release script to store a pre-built
mergemaster mtree database in the 'base' dist.

MFC after:	3 days
2009-08-24 21:56:41 +00:00
John Baldwin 7b0eef0b32 Fix a few issues with the lib32 dist so that it includes ldd32.
- Use a better find invocation to purge empty directories from all the dist
  trees during a release build.  The previous version did not purge
  directories whose contents were all empty directories.
- Explicitly blacklist a few files from the lib32 dist instead of using a
  whitelist.  A better longterm solution is to fix the few offenders to not
  install data files during a lib32 install.

MFC after:	3 days
2009-08-24 21:55:43 +00:00
Ken Smith cf48cc9f69 Make head 9.0-CURRENT in preparation for lifting code freeze.
Approved by:	re (implicit)
2009-08-22 23:44:37 +00:00
John Baldwin b03ddec95f Add the ability to build a release from an SVN checkout instead of a CVS
checkout.  If SVNROOT is specified, then the source tree will be checked
out from that SVN repository instead of using CVS.  ports and docs still
use CVS.  If SVNROOT is not specified, then the source tree will be checked
out using CVS.  An explicit SVN branch can be specified using SVNBRANCH
(e.g. SVNBRANCH=stable/8).  If SVNBRANCH is not set but RELEASETAG is set
to a CVS branch (such as RELENG_8) the appropriate SVN branch will be
inferred from the CVS branch using svnbranch.awk.

Note that there are still several open questions about using SVN instead
of CVS in the release process.  However, this does enable one to build a
release from an SVN repository if needed.

Approved by:	re (kensmith)
2009-08-14 20:35:42 +00:00
Marc Fonvieille 944bc81da9 - release/* update to use freebsd-doc-* packages instead of building
FreeBSD docset during 'make release' this will speed up release
  builds;
- sysinstall(8) has also been updated to use these packages with a new
  menu allowing people to choose what localized doc to install;
- mention in UPDATING that docs from the FreeBSD Documentation project
  are now installed in /usr/local/share/doc/freebsd instead of
  /usr/share/doc.

Approved by:	re (kensmith)
2009-06-28 08:59:46 +00:00
Marcel Moolenaar ed9f335141 Make a DVD for ia64. 2009-06-25 04:25:26 +00:00
Yoshihiro Takahashi e4506c14fd Restore MAKE_FLOPPIES for pc98. 2009-02-14 14:53:51 +00:00
Ken Smith fc94457307 Turn off the parallel make options accidentally turned on by the previous
commit.  Sigh.

Noticed by:	rdivacky
2009-02-10 15:11:26 +00:00
Ken Smith b8db5085d2 Turn off the building of boot floppies for amd64/i386. 2009-02-10 15:03:08 +00:00
Ken Smith 3dddcecced This is being committed from a sparc64 (US-III, thanks Marius!) that
was installed from a DVD so apparently it works... :-)

Enable building DVDs for sparc64.
2008-11-13 01:47:08 +00:00
Ken Smith 5fc898dffe Move an echo that accidentally got put under the .if defined(MAKE_DVD).
Pointy hat:	kensmith
2008-10-21 23:36:28 +00:00
Ken Smith 0cd91f065a Oops, add missing @. 2008-10-21 22:50:01 +00:00
Ken Smith 89811440d5 The thought of making more than one DVD image for a release really
freaks me out.  But it turns out we might be able to generalize
a few of the other things RE uses to assemble the package trees
for releases if the DVDs use a naming theme close to what is used
for the CDROMS (disc1, disc2, etc).  So change the name to dvd1.
Hopefully this way src/release/scripts/{package-split.py,package-trees.sh}
can be generalized instead of copied-and-hacked.

MFC after:	5 days
2008-10-14 02:13:12 +00:00
Ken Smith 2e3a155793 Add a build knob MAKE_DVD to control on a per-architecture basis whether
or not to build a tree used for the creation of a DVD image.  If that is
enabled set up a DVD tree by installing everything we normally install
to the individual CDROM trees into the one DVD tree.  The result is one
image with all the install bits, livefs bits, and doc bits suitable for
burning to a DVD instead of CDROM.

Enable building the DVD for amd64 and i386.

MFC after:	1 week
2008-10-12 02:52:56 +00:00
Marcel Moolenaar d8e78869fb When making release with NOPORTS, we'll checkout only the
mininal set of ports required to make the docs. However,
we also need ports/sysutils/cdrtools in order to make the
ISO images. When a platform doesn't have packages, the
release will fail in that case. Add ports/sysutils/cdrtools
to RELEASEPORTSMODULE for the DOMINIMALDOCPORTS case to
handle the NOPORTS release build.

Note that this change doesn't try to handle the NOPORTS with
NODOC case. For we have NOPORTSATALL set and it seems wrong
to check out a ports module in that case.
2008-07-07 16:23:04 +00:00