utils package and manually fixed some places where perltidy's
reformatting made it harder to read. the options used were--
-i=4 # 4-space indentation
-l=0 # unlimited line length (for now)
-pt=2 # slightly tightened parens
-ce # cuddled elses
-nolq # don't outdent long quotes
-nsfs # don't add spaces in front of semi-colons in for ( ) statements
-isbc # only indent block comments that have whitespace in front of them
-otr # don't place a break between a comma and an opening brace
the code will be refactored to make it possible to switch to using
80-column line-breaks without resorting to really nasty formatting
constructs.
(TimeDate) package for parsing dates and fall back to using Date::Manip
if Date::Parse isn't available -- Date::Manip is more commonly available,
but is written solely in perl and is more general-purpose and heavyweight
than Date::Parse.
The DateTime package (datetime.perl.org) doesn't suffice as it it
either uses Date::Manip internally and DateTime::Format::Strptime also
isn't commonly available. Given that our regex for identifying dates
in syslog is pretty static; POSIX::strptime (implementing strptime(3))
functionality would probably be the best way to go -- except that perl's
POSIX doesn't include strptime and POSIX::strptime is another not commonly
available package. Sigh.
the apparmor defined event numbers. genprof, logprof, and aa-eventd
should all still function correctly even when the audit daemon is not
configured correctly. This commit addresses that as well as adding the
needed dependency on perl-gettext.