Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
RELEASE(8)		FreeBSD	System Manager's Manual		    RELEASE(8)

NAME
     release --	building an OpenBSD release

DESCRIPTION
     There are several steps necessary to build	a release:

	   1.	Update sources.
	   2.	Build and install a new	kernel.
	   3.	Build a	new base system.
	   4.	Make and validate the base system release.
	   5.	Build and install Xenocara.
	   6.	Make and validate the Xenocara release.
	   7.	Make the third party packages.
	   8.	Create boot and	installation disk images.

     This manual describes the steps for the release and stable	branches.  To
     build a current release, additional steps may be required.	 See
	   https://www.openbsd.org/faq/current.html
     for any needed workarounds.

     Commands to be run	as a user are preceded by a dollar sign	`$'.  Commands
     that must be run as the superuser are preceded by a hash mark `#'.	 Priv-
     ileges will be de-escalated to the	user build whenever possible.

     Most of the defaults can be overridden by setting the appropriate vari-
     ables in mk.conf(5).

   1. Update sources
     A release should use sources that were checked out	using the same cvs(1)
     tag.  There are two families of tags:

     OPENBSD_x_y_BASE  The sources for the OpenBSD x.y release.

     OPENBSD_x_y       The sources for the OpenBSD x.y stable branch.  It con-
		       tains the patches described in .:
			     https://www.openbsd.org/stable.html

     See
	   https://www.openbsd.org/anoncvs.html
     for instructions on fetching the sources for the first time.

     To	update existing	sources	to the versions	identified by one of the above
     tags, use the commands:

	   $ cd	/usr/src && cvs	up -r TAG -Pd
	   $ cd	/usr/xenocara && cvs up	-r TAG -Pd
	   $ cd	/usr/ports && cvs up -r	TAG -Pd

     Warning: cvs(1) tags are `sticky'.	 See cvs(1) for	more information.

   2. Build and	install	a new kernel
     Always build and install a	new kernel and reboot before building the pro-
     grams that	will use the kernel.  This ensures that	any new	system calls,
     for example, will be present when needed.

	   # cd	/sys/arch/$(machine)/compile/GENERIC.MP

     Replace GENERIC.MP	with a different kernel	configuration if necessary.

     Create the	build directory	and configuration file,	then compile and
     install the kernel:

	   # make obj
	   # make config
	   # make && make install

     The current kernel	is copied to /obsd and the new kernel to /bsd.
     Reboot.

   3. Build a new base system
     The build process will place the object files in a	tree under /usr/obj.
     This directory must be owned by build:wobj	with mode 770.

     The first time, the /usr/obj directory must be cleaned out	completely
     before proceeding to avoid	permission issues.  After a successful release
     build, this is no longer needed.

     Create the	tree of	obj directories	and begin the build:

	   # cd	/usr/src
	   # make obj && make build

     After the build is	completed, update /etc,	/var, and /dev,	using
     sysmerge(8) and MAKEDEV(8):

	   # sysmerge
	   # cd	/dev &&	./MAKEDEV all

     At	this point, the	base system is up to date and running the code that
     will be made into a release.

   4. Make and validate	the base system	release
     The base system release consists of at least one generic kernel, some
     installation media, the release tarballs, installation instructions, and
     checksum files.

     Create a RELEASEDIR directory to store the	release	files.	This directory
     must be writable by build.

     To	build a	release, it is necessary to prepare a filesystem mounted with
     the noperm	mount(8) option.  The root of this filesystem must have	owner
     build and mode 700.  On this filesystem, create a DESTDIR directory.
     This will be the root of a	complete OpenBSD installation.

     Warning: DESTDIR and RELEASEDIR must not refer to any directory with /mnt
     in	its path, as /mnt is used in the release generation process.  The
     vnd(4) device vnd0	is also	used and must not be configured.

     Make the release and check	the contents of	the release tarballs:

	   # export DESTDIR=your-destdir; export RELEASEDIR=your-releasedir
	   # cd	/usr/src/etc &&	make release
	   # cd	/usr/src/distrib/sets && sh checkflist
	   # unset RELEASEDIR DESTDIR

   5. Build and	install	Xenocara
     Xenocara is based on the X.Org modular build system.  Its sources are
     supposed to be in /usr/xenocara.  The /usr/src tree is also needed	while
     building Xenocara.	 The object directory /usr/xobj	should be empty	and
     owned by build:wobj with mode 770.

     The following steps will build and	install	Xenocara.

	   # cd	/usr/xenocara
	   # make bootstrap
	   # make obj
	   # make build

   6. Make and validate	the Xenocara release
     Xenocara uses DESTDIR and RELEASEDIR as described above.  Use a different
     DESTDIR for the Xenocara release than for the base	release, as the	con-
     tents of DESTDIR will be removed.

     The steps to build	and validate the Xenocara release are:

	   # export DESTDIR=your-destdir; export RELEASEDIR=your-releasedir
	   # make release
	   # make checkdist
	   # unset RELEASEDIR DESTDIR

     At	this point, OpenBSD base system	and X Window System tarballs are in
     RELEASEDIR.

   7. Make the third party packages
     The ports subsystem of contributed	applications is	capable	of producing
     packages for installation,	either individually or in bulk.	 This is
     described in ports(7).

   8. Create boot and installation disk	images
     The disk images install${VERSION}.fs and install${VERSION}.iso are	suit-
     able for installs without network connectivity.  They contain the tar-
     balls and ports built in the previous steps.

	   # export RELDIR=your-releasedir
	   # export RELXDIR=your-xenocara-releasedir
	   # cd	/usr/src/distrib/$(machine)/iso	&& make
	   # make install

     The two installer images are now stored in	the local release directory.

SEE ALSO
     cvs(1), pkg_add(1), mk.conf(5), ports(7), sysmerge(8)

HISTORY
     This document first appeared in OpenBSD 2.8.

FreeBSD	11.1		       November	22, 2017		  FreeBSD 11.1

NAME | DESCRIPTION | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=release&sektion=8&manpath=OpenBSD+6.2>

home | help