Merge pull request #1087 from kacfengine/master

Revert "cf-agent --bootstrap fails on Debian systems, because sys.workdi...
Fix possible buffer overflow.
Merge pull request #1088 from jimis/varfix3

Fix possible buffer overflow.
contrib/cfengine.el: ElDoc, completion, and compilation goodies
use sys.workdir instead of hardcoded path. Some distros use a different workdir.
Merge pull request #1092 from basvandervlies/bootstrap_workdir

use sys.workdir instead of hardcoded path.
Redmine#3576: acceptance test to ensure cf-promises only evaluates common bundles
Redmine#3578: acceptance test to ensure execresult is only executed once
Test: read long files (regression after 3.5)
Check compiler name for -Wno-duplicate-decl-specifier

Just passing -Wno-duplicate-decl-specifier does not cause GCC to abort.
Cosmetics
Merge FileRead/FileReadMax into single function

This change simplifies error reporting and avoids unreliable checking
of stat(2) to preallocate buffers. (Closes: Redmine #3658).
Merge pull request #1086 from dottedmag/test/read-long-files-broken

Fix reading long files using readfile() by consolidating existing file-reading functionality
Expose begin/end information from StringMatch
Move plain-string comparison out of StringMatch[Full]

This makes semantics of those functions cleaner.
StripPatterns: use StringMatch, not BlockTextMatch

BlockTextMatch sets $(match) context, which is not needed in this
case.
Don't use BlockTextMatch in RlistFromSplitRegex

BlockTextMatch populates $(match) scope, which should not be
touched in RlistFromSplitRegex (closes Redmine #1875).
Merge pull request #1096 from dottedmag/bugfix/slow-readstringlist

Fix slow readstringlist() on large files
Only record promises in the enterprise database when -r is supplied.

'-r' enables SHOWREPORTS
Merge pull request #1098 from awsiv/master

Only record promises in the enterprise database when -r is supplied.