ADMIN(1) — USER COMMANDS
NAME
admin − create and administer SCCS files
SYNOPSIS
/usr/sccs/admin [ −n ] [ −i[name]] [ −rrel ] [ −t[name]] [ −fflag [flag-val]] ...
[ −dflag [flag-val]] ... [ −alogin ] ... [ −elogin ] ... [ −m[mrlist]]
[ −y[comment]] [ −h ] [ −z ] filename ...
DESCRIPTION
Admin creates new SCCS files and changes parameters of existing ones. Options and SCCS file names may appear in any order on the admin command line. SCCS file names must begin with the characters ‘s.’. A named file is created if it doesn’t exist already, and its parameters are initialized according to the specified options. Any parameter not initialized by an option is assigned a default value. If a named file does exist, parameters corresponding to specified options are changed, and other parameters are left as is.
If a directory is named, admin behaves as though each file in the directory were specified as a named file, except that non-SCCS files (last component of the path name does not begin with s.) and unreadable files are silently ignored. A name of − means the standard input — each line of the standard input is taken as the name of an SCCS file to be processed. Again, non-SCCS files and unreadable files are silently ignored.
OPTIONS
Options are explained as though only one named file is to be processed, since options apply independently to each named file.
−nA new SCCS file is being created.
−i[name]
Initial text: the file name contains the text of a new SCCS file. The text is the first delta of the file — see −r option for delta numbering scheme. If name is omitted, the text is obtained from the standard input. Omitting the −i option altogether creates an empty SCCS file. You can only create one SCCS file with an admin −i command. Creating more than one SCCS file with a single admin command requires that they be created empty, in which case the −i option should be omitted. Note that the −i option implies the −n option.
−rrelInitial release: the release into which the initial delta is inserted. −r may be used only if the −i option is also used. The initial delta is inserted into release 1 if the −r option is not used. The level of the initial delta is always 1, and initial deltas are named 1.1 by default.
−t[name]
Descriptive text: The file name contains descriptive text for the SCCS file. The descriptive text file name must be supplied when creating a new SCCS file (either or both −n and −i options) and the −t option is used. In the case of existing SCCS files: 1) a −t option without a file name removes descriptive text (if any) currently in the SCCS file, and 2) a −t option with a file name replaces the descriptive text currently in the SCCS file with any text in the named file.
−fflag
Set flag: specifies a flag, and, possibly, a value for the flag, to be placed in the SCCS file. Several −f options may be supplied on a single admin command line. Flags and their values appear in the FLAGS section after this list of options.
−dflag
Delete flag from an SCCS file. The −d option may be specified only when processing existing SCCS files. Several −d options may be supplied on a single admin command. See the FLAGS section below.
−llistUnlock the specified list of releases. See the −f option for a description of the l flag and the syntax of a list.
−alogin
Add login name, or numerical UNIX group ID, to the list of users who may make deltas (changes) to the SCCS file. A group ID is equivalent to specifying all login names common to that group ID. Several −a options may appear on a single admin command line. As many logins, or numerical group IDs, as desired may be on the list simultaneously. If the list of users is empty, anyone may add deltas.
−elogin
Erase login name, or numerical group ID, from the list of users allowed to make deltas (changes) to the SCCS file. Specifying a group ID is equivalent to specifying all login names common to that group ID. Several −e options may be used on a single admin command line.
−y[comment]
The comment text is inserted into the SCCS file as a comment for the initial delta in a manner identical to that of delta(1). If the −y option is omitted, a default comment line is inserted in the form:
date and time created YY/MM/DD HH:MM:SS by login
The −y option is valid only if the −i and/or −n options are specified (that is, a new SCCS file is being created).
−m[mrlist]
The list of Modification Requests (MR) numbers is inserted into the SCCS file as the reason for creating the initial delta in a manner identical to delta(1). The v flag must be set and the MR numbers are validated if the v flag has a value (the name of an MR number validation program). Diagnostics are displayed if the v flag is not set or MR validation fails.
−hCheck the structure of the SCCS file (see sccsfile(5)), and compare a newly computed check-sum (the sum of all the characters in the SCCS file except those in the first line) with the check-sum that is stored in the first line of the SCCS file.
The −h option inhibits writing on the file, so that it nullifies the effect of any other options supplied, and is, therefore, only meaningful when processing existing files.
−zrecompute the SCCS file check-sum and store it in the first line of the SCCS file (see −h, above).
Using the −z option on a truly corrupted file may prevent future detection of the corruption.
FLAGS
The list below is a description of the flags which may appear as arguments to the −f (set flags) and −d (delete flags) options.
bWhen set, the −b option can be used on a get(1) command to create branch deltas.
cceilThe highest release (ceiling) which may be retrieved by a get(1) command for editing. The ceiling is a number less than or equal to 9999. The default value for an unspecified c flag is 9999.
ffloorThe lowest release (floor) which may be retrieved by a get(1) command for editing. The floor is a number greater than 0 but less than 9999. The default value for an unspecified f flag is 1.
dSIDThe default delta number (SID) to be used by a get(1) command.
iTreats the ‘No id keywords (ge6)’ message issued by get(1) or delta(1) as a fatal error. In the absence of the i flag, the message is only a warning. The message is displayed if no SCCS identification keywords (see get(1)) are found in the text retrieved or stored in the SCCS file.
jConcurrent get(1) commands for editing may apply to the same SID of an SCCS file. This allows multiple concurrent updates to the same version of the SCCS file.
llistA list of locked releases to which deltas can no longer be made. A get −e fails when applied against one of these locked releases. The list has the following syntax:
<list>
<range> ::=RELEASE NUMBER | a
The character a in the list is equivalent to specifying all releases for the named SCCS file.
n
The delta(1) command creates a ‘null’ delta in each release (if any) being skipped when a delta is made in a new release. For example, releases 3 and 4 are skipped when making delta 5.1 after delta 2.7. These null deltas serve as ‘anchor points’ so that branch deltas may be created from them later. If the n flag is absent from the SCCS file, skipped releases will be non-existent in the SCCS file, preventing branch deltas from being created from them in the future.
qtext
Text is defined by the user. The text is substituted for all occurrences of the %Q% keyword in SCCS file text retrieved by get(1).
mmodule
Module name of the SCCS file substituted for all occurrences of the %M% keyword in SCCS file text retrieved by get(1). If the m flag is not specified, the value assigned is the name of the SCCS file with the leading s. removed.
ttype
Type of module in the SCCS file substituted for all occurrences of %Y% keyword in SCCS file text retrieved by get(1).
v[program]
Validity checking program: delta(1) prompts for Modification Request (MR) numbers as the reason for creating a delta. The optional program specifies the name of an MR number validity checking program (see delta(1)). If this flag is set when creating an SCCS file, the −m option must also be used even if its value is null.
FILES
The last component of all SCCS file names must be of the form s.file-name. New SCCS files are given mode 444 (see chmod(1V)). Write permission in the pertinent directory is, of course, required to create a file. All writing done by admin is to a temporary x-file, called x.file-name, (see get(1)), created with mode 444 if the admin command is creating a new SCCS file, or with the same mode as the SCCS file if it exists. After successful execution of admin, the SCCS file is removed (if it exists), and the x-file is renamed with the name of the SCCS file. This ensures that changes are made to the SCCS file only if no errors occurred.
It is recommended that directories containing SCCS files be mode 755 and that SCCS files themselves be mode 444. The mode of the directories allows only the owner to modify SCCS files contained in the directories. The mode of the SCCS files prevents any modification at all except by SCCS commands.
If it should be necessary to patch an SCCS file for any reason, the mode may be changed to 644 by the owner allowing use of a text editor. "Care must be taken!" The edited file should always be processed by an admin −h to check for corruption followed by an admin −z to generate a proper check-sum. Another admin −h is recommended to ensure the SCCS file is valid.
Admin also uses a transient lock file (called z.file-name), to prevent simultaneous updates to the SCCS file by different users. See get(1) for further information.
SEE ALSO
sccs(1), delta(1), ed(1), get(1), help(1), prs(1), what(1), sccsfile(5).
Programming Utilities for the Sun Workstation.
DIAGNOSTICS
Use help(1) for explanations.
Sun Release 3.2 — Last change: 1 February 1985