mksb(1) UNIX Programmer's Manual mksb(1)
NAME
mksb - make new sandbox
SYNOPSIS
mksb [-v -def] [-back backing-tree] [-dir sandbox-dir] [-rc
rc-file] [-set setname]
[-m machine[:machine]*] sandbox
mksb -list [-rc rc-file]
mksb -c [-rc rc-file -v]
mksb -undo [-v -auto] [-rc rc-file] sandbox
mksb -usage
mksb -rev
FLAGS
-v Print out information about what mksb is doing while it
is doing it.
-def Establishes the sandbox which is about to be created as
the default sandbox. The default sandbox is listed in
the specified rc file or ${HOME}/.sandboxrc if no rc
file is specified. The default sandbox is used when
the environment variable SANDBOX is not set. If there
is no rc file at the specified location, a new one will
be created and the new sandbox will automatically be
set as the default.
-back backing-tree
Use the argument as the name of the backing tree. The
backing tree can be one of the builds in the form osc.#
where "#" is the build number, or it can be the full
path to another sandbox starting with "/". The backing
tree can also be specified as latest. If this option
is not specified, the program will list the builds
available and prompt the user for his/her choice. The
user can enter a build or a path to another sandbox.
-dir sandbox-dir
Creates the new sandbox under the directory specified.
The directory needs to already exist. If this option
is not used, the directory given after the
default_sandbox_base target in the .sandboxrc file will
be used. If the file or target is not found, mksb will
prompt the user for the directory.
-rc rc-file
Provides the path and name of the user's rc file to use
instead of the default ${HOME}/.sandboxrc. If this
Printed 1/23/91 5/4/90 1
mksb(1) UNIX Programmer's Manual mksb(1)
option is not used, the default rc file will be used.
-set setname
Gives the name of the default set to create in the
sandbox. If this option is not used, the name of the
sandbox will be used as the name of the default set.
Due to bcs restrictions, set names cannot include the
characters '.' or '-'.
-m machine[:machine]*
Makes a list of the names of the machines to build
machine dependent directories for in the new sandbox.
If there is more than one machine, the names should be
separated by a colon, ':', without spaces. If this
option is not used, the machines listed after the
default_machines target in the .sandboxrc file will be
used. If the file or target is not found, mksb will
prompt for the information.
-list
Lists the sandboxes, the default sandbox, and any sand-
box bases in the user's rc file. This option works
with the -rc option so rc files other than the default
can be examined. Note: this option does not accept a
name of the sandbox.
-c Reconfigures an existing mksb rc file. A new sandbox
is not created. This option works with the -rc option
so rc files other than the default can be edited.
Note: this option does not accept a name of the sand-
box.
-undo
Removes a sandbox. This option requires the name of
the sandbox and accepts the verbose option and the name
of an alternate rc file. It also accepts the -auto
option if the user does not wish to be prompted for
confirmation. The -undo option will not function if
the user has added anything to the sandbox.
-auto
Used in conjunction with the -undo option, this option
will allow a sandbox to be removed without user confir-
mation.
-usage
Prints a brief usage message.
-rev Prints the revision information.
mksb is used to create a new sandbox. It builds the direc-
tory structure, creates a default set, populates the new
Printed 1/23/91 5/4/90 2
mksb(1) UNIX Programmer's Manual mksb(1)
sandbox according to the directories in the rc file, and
will create the rc file if it doesn't already exist, other-
wise it updates the information in it.
DESCRIPTION
mksb is the first step in getting setup for using the OSF/1
Development Environment (ODE). It creates a sandbox and
creates a set so the source control tools are ready to work.
It can also be used to populate the sandbox with copies of
or links to the backing tree.
Much of the information mksb uses can be stored in an rc
file so the user does not have to enter the information each
time he/she creates a new sandbox. mksb creates this file
initially and then helps maintain it. The default location
for the file is ${HOME}/.sandboxrc.
mksb needs the following information: the name of the sand-
box, the directory to create it in, the build or sandbox to
back the new sandbox with, the name of the rc file to read
and update, the machines to create machine dependent direc-
tories for, and the name of the default set to create.
mksb tries to get this information first from the command
line, then from the rc file, and then, if there are not
established defaults, by prompting the user.
The only place mksb will accept the name of the sandbox to
create is from the command line. This argument is the name
of the sandbox, not a path, so cannot have a '/' character
in it, and, because it is required, does not have a "-" flag
associated with it. There can only be one sandbox name for
each call to mksb. Because sandboxes "float" between backing
trees, the name of the sandbox should not be too specific.
Latest or osc.9 would not be good names for a sandbox as
over time the backing tree changes.
The directory to create the sandbox in can be specified on
the command line or within the rcs file, else mksb will
prompt the user for this information. The list of machine
dependent directories is treated the same way.
Each sandbox must be backed by a build or by another sand-
box. latest is always one of the legal builds. If the
backing is another sandbox, the full path and name of the
sandbox, starting with a "/", must be given. For a build
only the name is necessary, for example, "osc.11" or
"latest". All the sandbox tools assume the builds will be
in the path:
/project/osc/build
Printed 1/23/91 5/4/90 3
mksb(1) UNIX Programmer's Manual mksb(1)
It doesn't matter how the builds appear under this direc-
tory; symbolic links, mounts, etc, but they must be there.
If backing information is not given on the command line,
mksb will prompt for it; there is no target in the rc file
for field.
The rc file, if not specified on the command line, defaults
to the user's home directory, file name: .sandboxrc. The
name of the set created by mksb can be specified, or it will
default to the same name as the sandbox. If the default is
used, the sandbox name cannot include a period, '.', or
dash, '-', as these characters have meaning for the bcs
tools.
A user is not allowed to have two sandboxes with the same
name even if they have different base directories, nor can a
user have two sets with the same name in the same sandbox.
It is recommended that set names also be unique across sand-
boxes, though the tools do not enforce this; it simply
avoids confusion. For similar reasons, and because sand-
boxes are easily moved from one backing tree to another, the
sandbox name should not be connected with a particular
build, for example, osc.14 and latest are not good choices
for sandbox names.
rc Files
mksb does not have to have an rc file to function, but it
will try to create one if one does not exist. It will
prompt the user before creating it, however. The rc file
contains and mksb maintains the list of which sandboxes have
been created, where the base directory for each sandboxes
is, and the name of teh default sandbox. It also has a
number of targets which are used only by mksb:
default_sandbox_base
The default directory to build sandboxes in. It does
not have to be the same as the directory of the default
sandbox or where most of the current sandboxes are; it
is where the next sandbox should be created if not
overridden on the command line.
default_machines
A colon separated list of the machine dependent direc-
tories to create by default. This is the list that
will be used if not overridden on the command line.
copy_link_tools
Indicates how to populate the tools area; by linking
the backing tree's tools in the local area, 'l', by
copying the tools into the local area, 'c', or by leav-
ing them backed, 'b'. The tools will be copied or
Printed 1/23/91 5/4/90 4
mksb(1) UNIX Programmer's Manual mksb(1)
linked for each of the machines specified in the
machine target.
copy_link_objs
Indicates how to populate the obj area; by linking the
backing tree's objects in the local area, 'l', by copy-
ing the objects into the local area, 'c', or by leaving
them backed, 'b'. Since it is usually not desirable to
have all the objects copied or linked, this target has
a final field, a colon separated list of the direc-
tories to copy or link, for example /bin:/usr/bin. To
get all the objects use '/'. These directories will be
copied or linked for each of the machines specified in
the machine target.
copy_link_sources
Indicates how to populate the source area; by linking
the backing tree's sources in the local area, 'l', by
copying the sources into the local area, 'c', or by
leaving them backed, 'b'. Since it is usually not
desirable to have all the sources copied or linked,
this target has a final field, a colon separated list
of the directories to copy or link, for example
/bin:/usr/bin. To get all the sources use '/'.
The rc files are covered in detail in sandboxrc (5).
Editing rc Files
The -c option can be used to edit an rc file. This can also
be done with any editor.
Sandbox Environment
The sandbox environment is inherited from its backing tree
and is found in the two rc files sandbox/rc_files/local and
sandbox/rc_files/shared. The local file can be edited to
affect just the sandbox, while the shared file will affect
anything not overridden by the local file and any other
sandbox which uses this sandbox as a backing tree. The
shared file also has the line which includes the backing
tree's shared file. In this way, each sandbox inherits part
of its environment from its backing tree.
The current sandbox is determined by the environment vari-
able SANDBOX or, if that is not set, by the default sandbox
listed in the rc file. Sandbox commands also accept an -sb
sandbox option which allows the user to change the sandbox
for a single invocation of a command. The command workon
actually sets the variable SANDBOX before it creates a new
shell.
Set name
Printed 1/23/91 5/4/90 5
mksb(1) UNIX Programmer's Manual mksb(1)
mksb creates a default set, a working area in the sandbox
which the bcs commands use to do check-in's, check-out's,
and submissions. Just as there is a default sandbox for
each user, there is a default set for each sandbox. If the
user does not change it, the default set is the set created
by mksb. The list of sets and the default are found in each
sandbox in the file sandbox/rc_files/sets.
Populating a Sandbox
If a user does not have an rc file, mksb will prompt for the
information on populating the sandbox. Once an rc file
exists, instead of prompting for the information, mksb
extracts it from the rc file. If the user wants to modify
how the sandbox is populated, he can do this by either modi-
fying the rc file before calling mksb or by running mklinks
after the sandbox has been created.
Undoing a Sandbox
The -undo option can be used to remove a sandbox, removing
both the sandbox itself and the entry in the rc file. If
one or the other has been removed, but not both, this option
will not work. If the user has done any work in the sand-
box, for example, checked a file out, this option will not
work.
EXAMPLES
mksb -v -back osc.12 -
dir /project/osc/sandboxes/suzieq symphony
Give verbose information on creating the new sandbox
symphony in the directory
/project/osc/sandboxes/suzieq. The sandbox will be
backed by build osc.12. The set name will be the same
as the sandbox's, the machine's to create machine
dependent directories for will be taken from defaults
or prompted for. and the user's rc file will be the
default.
libc
mksb -back /project/osc/sandboxes/libc -m pmax -
set strings my-
Creates a sandbox backed by another sandbox, libc with
the name my-libc. Note that the name can contain a "-"
character because the default set is being specified as
anothe name, strings. The location of the new sandbox
is taken from the rc file or is prompted for, the
machine dependent directories will be pmax, and the
user's rc file will be the default.
Printed 1/23/91 5/4/90 6
mksb(1) UNIX Programmer's Manual mksb(1)
FILES
${HOME}/.sandboxrc
rc file that specifies existing sandboxes and mksb
defaults.
sandbox/rc_files/sets
list of valid sets in each sandbox
sandbox/rc_files/local
the environment for the current sandbox; includes
sandbox/rc_files/shared
sandbox/rc_files/shared
the environment for the current sandbox and any sandbox
which uses this sandbox as a backing tree
EXIT VALUES
mksb returns '0' upon successful completion, '-1' otherwise.
RELATED INFORMATION
bcs(1), latest(7), mklinks(1), resb(1), sandbox(7) sand-
boxrc(5), workon(1).
PLANNED ENHANCEMENTS
Enhancements for mksb include a more sophisticated way of
populating the sandbox. Right now the only option is every-
thing in the directory or nothing. Command line options for
populating the sandbox also will be added.
Printed 1/23/91 5/4/90 7