From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 4 Aug 2005 02:01:14 +0400 From: Alexey Tourbin To: sisyphus@altlinux.org Message-ID: <20050803220114.GB6496@solemn.turbinal.org> Mail-Followup-To: sisyphus@altlinux.org References: <20050803190207.GA29729@basalt.office.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Fba/0zbH8Xs+Fj9o" Content-Disposition: inline In-Reply-To: <20050803190207.GA29729@basalt.office.altlinux.org> Cc: Subject: [sisyphus] qa-robot 0.1 X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2005 22:02:09 -0000 Archived-At: List-Archive: --Fba/0zbH8Xs+Fj9o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 03, 2005 at 11:02:07PM +0400, Alexey M. Tourbin wrote: > qa-robot - Simple notification system > * Wed Aug 03 2005 Alexey Tourbin 0.1-alt1 > - initial revision NAME qa-robot - simple notification system SYNOPSIS qa-robot [-d *workdir*] [-j] [-n] [-m *mailto*] [-h] *cmd* [*args*] DESCRIPTION qa-robot reports various state changes, in terms of new, old, and (possibly) updated entries. *cmd* must be a shell script which, whenever sourced or executed, dumps its current state to "stdout", one line per entry; the script may also provide its custom formatting routines. OPTIONS -d *workdir* Use *workdir* working directory. Save *cmd* state under *workdir*. Default working directory is "$HOME/.qa-robot/$(basename *cmd*)". -j Enable join mode; join records on the first field. Fields must be separated by tabs. -n Do not finally replace the old *cmd* state with the new one. Useful for test runs. -m *mailto* Suppress normal output. Send email notification to *mailto* address(es) instead. Messages larger than 32K are sent as gzipped attachments. Messages larger than 1024K produce a fatal error. -h Display this help and exit. FILES Files in use under the working directory dump.new, dump.old Current and previous *cmd* state files. comm.plus, comm.minus Comparison between dump.new and dump.old. comm.plus has lines unique to the current state, while comm.minus has lines unique to the previous state. join.new, join.old, join.updated In join mode, comm.plus and comm.minus' lines are treated as records, whose fields are separated by tabs. The first field must be a primary key. comm.plus and comm.minus are then joined on the first field. Thus join.new has records unique to comm.plus (i.e. lines in comm.plus unpairable with those in comm.minus), join.old has records unique to comm.minus, and join.updated contains pairable records joined on the first field. lock Semaphore file, to guard against simultaneous runs. message The report is saved to this file. signature When email message is sent, this file, should it exist, is appended to the message (except when sending gzipped attachments). Other files $PATH, /usr/share/qa-robot Default *cmd* script location. $HOME/.qa-robot/$(basename *cmd*) Default working directory. FORMATTING Variables noun A countable noun that describes the entries, in the singular number. subj The message subject. Functions fmt_start Executed when formatting is started. fmt_plus, fmt_minus Main formatting routines, for displaying new and old entries; executed only when the entries have actually been found. Calling convention for these routines is as follows: fmt_$s $n $noun . packages [*DIR*] Reports new, old (removed), and updated rpm packages under *DIR* directory. Last changelog entry is listed for new and updated packages. The default *DIR* is "$sisyphus/files/SRPMS", where $sisyphus is vendor-specific location. BUGS qa-robot is executed in "noglob" and "errexit" mode, so is the *cmd* sciprt. After *cmd* script is sourced, the current working directory is set to *workdir* and may not be changed by formatting routines. The locale is set to "LC_ALL=C". AUTHOR Written by Alexey Tourbin . COPYING Copyright (c) 2005 Alexey Tourbin, ALT Linux Team. This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. --Fba/0zbH8Xs+Fj9o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFC8T6qfBKgtDjnu0YRApC8AJ49Srmpwpwa5Db6e04p5nFmRhS6sQCgyjEa PsK8Y/xg4PhzvxniuQXNQ20= =Tp9V -----END PGP SIGNATURE----- --Fba/0zbH8Xs+Fj9o--