scc-changes(1)



NAME


	scc-changes - split logbooks into files per change

RELEASE


	scc-srv	1.19.44

SYNOPSIS


	scc-changes [ -k|--keep <days> ] [ -s|--skip ]
	     [ -p|--prog <program> [ -d|--dest <destination> ] [ -m|--mode <mode> ] [ -u|--user <user> ]
	     [ -L|--list <list> | -F|--file <file> ]
	     <realm>

DESCRIPTION


	This program extracts changes from all logbooks in a realm into separate
	files for further processing. The identification of the changes that were extracted 
	during previous runs is maintained in file scc.changes in the processed realm.
	The change files reside in the subdirectory "changes" of the specified realm.
	The format of the name of the change files is: scc.<host>.<date>_<time>.log.

OPTIONS


	-k|--keep <days>        Keep files in staging area for max <days> days.
	-s|--skip               Record identification of all present changes in the known changes 
	                        file without creating (and processing) their change files.
	                        When the -p option is used, a summary of ignored changes is emailed.

	To process the change files once they are in the staging area:

	-p|--prog <program>     Program for further processing, possible values for <program>:
	                        mail    email each change file and a summary of skipped changes
	                        cp      copy change files to directory
	-d|--dest <destination> Destination for processing change files. Destination:
	                        mail    email address.
	                        cp      directory
	-m|--mode <mode>        Mode of copied change files, default: 0700.
	-u|--user <user>        User of copied change files, default: root.

	Without specifying any of the above options, all changes (systems and dates) are
	recorded in file scc.changes in the realm directory.

	To specify the systems in the realm to be processed:

	-F|--file <file>        The file contains a list of systems in realm <realm>, one system
	                        per line. Empty and comment lines (starting with "#") are ignored.
	                        Requires full path of file. Processing in <realm> is limited to
	                        the specified systems.
	-L|--list <list>        Comma separated list of systems in realm <realm>. Processing is
	                        limited to the specified systems.

	Without specifying any of the above options, all systems in <realm> are processed.

ARGUMENTS


	<realm>                 Realm to process. Without the -F and -L options, all systems in
	                        the realm are processed.

DIAGNOSTICS


	This program writes the following messages to stderr:

	Syntax error, use: scc-changes <options>
	A syntax error has been detected and reported.

	scc-changes: unable to combine -L and -F options
	Use either one of these options.

	scc-changes: realm name should not contain '/': <realm>
	Supply the name of the realm, not the directory path.

	scc-changes: cannot find realm <realm>
	The directory indicated with the argument cannot be found in
	/var/opt/scc-srv/data/www.

	scc-change: unknown file with -F option: <file>
	Correct the specified file name.

	scc-changes: unsupported method: <prog>
	The value provided with the -p option is not supported.

	scc-changes: unknown directory for cp: <dest>
	Directory specified with -d option cannot be found.

	scc-changes: -p option requires -d option
	Specifiy a destination when processing the new change files.

EXTERNAL INFLUENCES


	This program processes SCC logbooks in a realm and should be called after
	scc-update has run. To email the change files, a working MTA should be present.

	The contents of the change files depend upon the logbook. When unified diff
	is used for the logbook, context lines (prefix "ctx") are also present in the change files.

RETURN VALUE


	The possible exit values are:
		0: success
		1: syntax error
		2: general runtime error

COPYRIGHT


	scc-changes is free software under the terms of the GNU General Public 
	License. Copyright (C) 2014-2018 QNH, 2019 Siem Korteweg.

EXAMPLES


	To start auditing the changes of realm SOX and accept all current configurations
	including all changes, use the --skip option:

		scc-changes --skip SOX

	Schedule the next command line with cron to email further changes:

		scc-changes --prog mail --dest auditors@company.com SOX

	When the changes of the new system "newhost" should be audited, add it
	to this SOX realm and accept/skip the current changes in its logbook:

		scc-realm --add --list newhost SOX
		scc-changes --list newhost --skip SOX

	Subsequent, scheduled calls of scc-changes will detect new changes for newhost.

FILES


	/var/opt/scc-srv/data/www - base-directory for all realms
	  <realm> - base directory of realm
	    scc.*.log - log files to process
	    scc.changes - file containing the host-date-time data of processed changes
	    changes/ - directory with change files
	      scc-<host>.<date>.<time>.log - change file

SEE ALSO


	scc-baseline(1), scc-changes(1), scc-debug(1), scc-pull(1), scc-realm(1),
	scc-receive-mail(1), scc-rules(1), scc-setup(1), scc-smt(1), scc-summary(1),
	scc-syscmp(1), scc-transfer(1), scc-update(1), scc-wrapper.cgi(1), scc.cgi(1),
	scc-srv(5)

VERSION


	$Revision: 6217 $