MAJ(8) |
OpenBSD System Manager's Manual |
MAJ(8) |
NAME
maj — manage system sources
SYNOPSIS
maj |
[-itVX] [-C configfile] [-c component] [-D destdir] [-d cvsroot] [-g tree] [-j njobs] [-k component] [-p tree] [-R releasedir] [-r component] [-u tree] |
DESCRIPTION
maj is a
sh(1) script designed to help the administrator update base system, including xenocara, from sources and manage
cvs(1) source trees.
maj is also able to make a system release.
The options are as follows:
-
-C configfile
-
In conjunction with -c kernel, use the specified kernel configfile.
-
-c component
-
Build the specified component from BSDSRCDIR and XSRCDIR. The component can be:
-
kernel
-
Build the kernel in ${BSDSRCDIR}/sys/arch/${ARCH}/compile/${KERNCONF}/bsd. The kernel is compiled by default from ``GENERIC'' if one CPU is found or ``GENERIC.MP'' in case more than one CPU are found. You can specify the ${KERNCONF} using -C.
-
uland
-
Build and install the userland.
-
xenocara
-
Build and install xenocara.
-
all
-
Build and install the kernel, build and install the userland and finally, build and install xenocara if installed (use -X to force xenocara build and installation). Be warned to use this mode with care.
-
-D destdir
-
Set releasedir, where release is built (required by -r ).
-
-d cvsroot
-
Specify the cvsroot to use in conjunction with -g and -u. Useful when the cvs(1) source tree comes from a CDROM, when you don't have the CVSROOT environment variable set or to change the cvs(1) server.
-
-g cvstree
-
Get the specified cvs(1) source tree. cvstree can be:
-
src
-
src source tree in BSDSRCDIR.
-
xenocara
-
xenocara source tree in XSRCDIR.
-
ports
-
ports source tree in PORTSDIR.
-
all
-
all of the above. In case you do not have xenocara installed, its tree is not fetched, unless -X is specified.
-
-i
-
Install the kernel from ${BSDSRCDIR}/sys/arch/${ARCH}/compile/${KERNCONF}/bsd to /bsd.
-
-j njobs
-
Turn on parallel building. Specify the maximum number of jobs that make(1) may have running at any one time. Only useful with -c or -r.
-
-k component
-
Clean the specified component. It can be:
-
kobj
-
Clean the kernel build objects in ${BSDSRCDIR}/sys/arch/${ARCH}/compile/${KERNCONF}.
-
bsdobj
-
Clean the userland build objects in BSDOBJDIR.
-
xobj
-
Clean the xenocara build objects in XOBJDIR.
-
all
-
Clean all the kernel, userland and xenocara (if present, unless -X is specified) objects on the system.
-
-p cvstree
-
Change permissions on the specified cvs(1) source tree. The group owner is set to wsrc and group permissions are set to rw (file and directories for src and xenocara, directories for ports). cvstree can be:
-
src
-
src source tree in BSDSRCDIR.
-
xenocara
-
xenocara source tree in XSRCDIR.
-
ports
-
ports source tree in PORTSDIR.
-
all
-
all of the above. In case you do not have xenocara installed, its tree is not updated unless -X is specified.
-
-R releasedir
-
Set releasedir, where release tarballs are created (required by -r ).
-
-r component
-
Make an OpenBSD release of the specified component (require -D and -R ):
-
src
-
system release.
-
xenocara
-
xenocara release.
-
all
-
all of the above. In case you do not have xenocara installed, its release is not built unless -X is specified.
-
-t
-
In conjunction with -c and -r, print start and end date of the compilation.
-
-u cvstree
-
Update the specified cvs(1) source tree. cvstree can be:
-
src
-
src source tree in BSDSRCDIR.
-
xenocara
-
xenocara source tree in XSRCDIR.
-
ports
-
ports source tree in PORTSDIR.
-
all
-
all of the above. In case you do not have xenocara installed, its tree is not updated unless -X is specified.
-
-V
-
In conjunction with -g and -u, force the use of ``HEAD'' cvs(1) tag. This option is useful to track -current when a release is being tagged.
-
-X
-
Force the presence of xenocara. Useful with -c, -g, -k, -r and -u.
ENVIRONMENT
-
SUDO
-
Use ${SUDO} to do actions requiring root privileges. See release(8) to see what kind of actions requires privileges.
-
BSDSRCDIR
-
The directory where system cvs(1) source tree is located.
-
XSRCDIR
-
The directory where xenocara cvs(1) source tree is located.
-
PORTSDIR
-
The directory where ports cvs(1) source tree is located.
-
BSDOBJDIR
-
The directory where userland objects are built.
-
XOBJDIR
-
The directory where xenocara objects are built.
EXAMPLES
To update your system, you need to update your
cvs(1) trees:
$ maj -u all
Then, you need to compile a kernel:
$ maj -c kernel
Install this kernel:
$ maj -i
After that, reboot the computer. Compile and install the userland:
$ maj -c uland
Compile and install xenocara:
$ maj -c xenocara
And finally, reboot the computer. At this moment, your machine is updated.
FILES
-
/etc/mk.conf
-
System make configuration file.
AUTHORS
The maj shell script was written by Mattieu Baptiste <mattieu@brimbelle.org>.
CAVEATS
When
maj is used to track -current, precautions must be taken to update
/etc. It is therefore advised to run
sysmerge(8) after a system update. It is also extremely encouraged to follow cvs logs and the OpenBSD FAQ at:
http://www.openbsd.org/faq/current.html