Hello community, here is the log from the commit of package cronic.5288 for openSUSE:13.2:Update checked in at 2016-07-05 16:20:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:13.2:Update/cronic.5288 (Old) and /work/SRC/openSUSE:13.2:Update/.cronic.5288.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cronic.5288" Changes: -------- New Changes file: --- /dev/null 2016-06-25 11:41:22.768041005 +0200 +++ /work/SRC/openSUSE:13.2:Update/.cronic.5288.new/cronic.changes 2016-07-05 16:20:31.000000000 +0200 @@ -0,0 +1,33 @@ +------------------------------------------------------------------- +Mon Jun 27 21:01:12 UTC 2016 - [email protected] + +- Security update to v3 (CVE-2016-3992): + * Use mktemp-d to avoid race-conditions and security problems. + * Drop cronic.patch, which has become redundant. + +------------------------------------------------------------------- +Fri Sep 5 11:07:44 UTC 2014 - [email protected] + +- Fix /tmp races + +------------------------------------------------------------------- +Wed Sep 3 19:15:54 UTC 2014 - [email protected] + +- Fixed license string in .spec file + +------------------------------------------------------------------- +Mon Sep 1 15:48:39 UTC 2014 - [email protected] + +- Updated script from source, it now states the license + +------------------------------------------------------------------- +Mon Sep 1 13:12:00 UTC 2014 - [email protected] + +- Added source URL +- Fix license specification + +------------------------------------------------------------------- +Sat Apr 6 23:17:51 UTC 2013 - [email protected] + +- Initial RPM package + New: ---- cronic cronic.1 cronic.changes cronic.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cronic.spec ++++++ # # spec file for package cronic # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: cronic Version: 3 Release: 0 Summary: A cure for Cron's chronic email problem License: SUSE-Public-Domain Group: System/Base Url: http://habilis.net/cronic/ Source0: http://habilis.net/cronic/cronic Source1: cronic.1 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description Cronic is a small shim shell script for wrapping cron jobs so that cron only sends email when an error has occurred. Cronic defines an error as any non- trace error output or a non-zero result code. Cronic filters Bash execution traces (or anything matching PS4) from the error output, so jobs can be run with execution tracing to aid forensic debugging. Cronic has no options, it simply executes its arguments. %prep %setup -q -c -T cp %{SOURCE0} . %build %install mkdir -p %{buildroot}/%{_bindir} cp cronic %{buildroot}/%{_bindir}/cronic mkdir -p %{buildroot}/%{_mandir}/man1 gzip -c %{SOURCE1} >%{buildroot}/%{_mandir}/man1/cronic.1.gz %files %defattr (-, root, root) %attr(755,root,root) %{_bindir}/cronic %{_mandir}/man1/cronic.1.gz %changelog ++++++ cronic ++++++ #!/bin/bash # Cronic v3 - cron job report wrapper # Copyright 2007-2016 Chuck Houpt. No rights reserved, whatsoever. # Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/ set -eu TMP=$(mktemp -d) OUT=$TMP/cronic.out ERR=$TMP/cronic.err TRACE=$TMP/cronic.trace set +e "$@" >$OUT 2>$TRACE RESULT=$? set -e PATTERN="^${PS4:0:1}\\+${PS4:1}" if grep -aq "$PATTERN" $TRACE then ! grep -av "$PATTERN" $TRACE > $ERR else ERR=$TRACE fi if [ $RESULT -ne 0 -o -s "$ERR" ] then echo "Cronic detected failure or error output for the command:" echo "$@" echo echo "RESULT CODE: $RESULT" echo echo "ERROR OUTPUT:" cat "$ERR" echo echo "STANDARD OUTPUT:" cat "$OUT" if [ $TRACE != $ERR ] then echo echo "TRACE-ERROR OUTPUT:" cat "$TRACE" fi fi rm -rf "$TMP" ++++++ cronic.1 ++++++ .TH cronic 1 "April 2013" "habilis.net" "User Commands" .SH NAME cronic - a cure for Cron's chronic email problem .SH SYNOPSIS .B cronic [COMMAND] .P The Disease: .RS 0 1 * * * backup >/dev/null 2>&1 .RE .P The Cure: .RS 0 1 * * * cronic backup .RE .SH DESCRIPTION Cronic is a shell script to help control the most annoying feature of cron: unwanted emailed output, or "cram" (cron spam). If the Unix Haters list was still active, I would submit the rant below to gain membership. .SS The Disease One of the best features of cron is its automatic email - it is also its worst feature. Cron automatically emails the output of a cron job to the user. On the face of it, this sounds like a great idea. Cron jobs can run automatically in the background for months at a time - so getting an email when a problem occurs sounds useful. .P Unfortunately, cron's idea of "output" is simultaneously too broad and too narrow to actually be useful. Cron considers .I any output to be significant - including standard output. This interacts badly with many unix commands, which often send status info to standard out. Some commands have a quiet options, but that can turn off all error output too. To make matters worse, cron .I ignores command result codes, meaning that errors from quiet programs are ignored. .P It is almost impossible to create a non-trivial cron job that is quiet enough to run without output, but still reports all errors. Following the principle of "Worse is Better", the typical solution is to sweep it all under the carpet by redirecting all output to /dev/null, and hoping for the best: .P .RS 0 1 * * * backup >/dev/null 2>&1 .RE .P Now when your cron job fails, you will never know about it. Using cron to backup your files? Sorry, the cron job has been failing due to permission errors for months - all your files are gone. .P Could cron be fixed? Although almost all current implementation of cron are open source, cron's pathological behavior has been petrified into the Unix standards. So if it isn't broken, it isn't cron. The only solution left is a work-around. .SS The Cure: Cronic Cronic is a small shim shell script for wrapping cron jobs so that cron only sends email when an error has occurred. Cronic defines an error as any non-trace error output or a non-zero result code. Cronic filters Bash execution traces (or anything matching PS4) from the error output, so jobs can be run with execution tracing to aid forensic debugging. Cronic has no options, it simply executes its arguments. .P .RS 0 1 * * * cronic backup .RE .P With cronic, you can turn on Bash's strict error handling and debug options (exit on error, unset variable detection and execution tracing to make sure problems are caught early. For example: .P .RS .nf #!/bin/bash set -o errexit -o nounset -o xtace cp -rp data1 /backup cp -rp data2 /backup cp -rp data3 /backup .fi .RE .P When an error is detected, Cronic outputs a report listing the result code, error output, and combined trace and error output. The combined output can help put error messages in context. An example: .P .RS .nf From: [email protected] (Cron Daemon) To: [email protected] Subject: Cron <user@server> cronic backup Cronic detected failure or error output for the command: backup RESULT CODE: 1 ERROR OUTPUT: cp: data2: Permission denied STANDARD OUTPUT: TRACE-ERROR OUTPUT: + cp -rp data1 /backup + cp -rp data2 /backup cp: data2: Permission denied .fi .RE .SH HISTORY .TP 8 v2 Corrected command evaluation, so shell meta-chars are preserved correctly (Thanks to Frank Wallingford for the fix). .TP v1 Initial release. .SH AUTHOR Chuck Houpt <http://habilis.net/cronic/> .SH BUGS Feedback to: [email protected] .SH RELATED PROJECTS Cronic isn't the only cure for cron. Cronic's main advantage it is small, simple and a shell script. There are several C-based cron wrapper programs with many additional capabilities and options: .SS Shush A C-based cron wrapper, with multiple report formats, syslogging, etc. .br <http://web.taranis.org/shush/> .SS Cronwrap A C-based cron wrapper, with time-out control, logging, etc. .br <http://www.uow.edu.au/~sah/cronwrap.html> .SH SEE ALSO .SS Cron <http://en.wikipedia.org/wiki/Cron> .br <http://www.opengroup.org/onlinepubs/009695399/utilities/crontab.html> .SS "Unix Haters" <http://www.mindspring.com/~blackhart/> .SS "Worse is Better" <http://www.jwz.org/doc/worse-is-better.html>
