Fix upstart behaviour

This seems to fix restart issues
contrib/upstart/: Fix a typo in the service file

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
doc/Makefile.am: Always include the manpages in the tarball

Whether man page building is enabled or not, include them in the
tarball. This means that you won't be able to build a tarball from git
unless you build the man pages too, but it also means that if you do a
make dist from a tarball, without xsltproc installed, they will still be
included.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #47 from balabit/merge/h/mans-in-dist

doc/Makefile.am: Always include the manpages in the tarball
Merge pull request #46 from balabit/merge/h/upstart-fixes

Upstart fixes
configure.ac: Improve the bison version check

Some versions of bison have "-" in their version number too, allow that
too, when verifying that the bison installed is a recent version.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
configure.ac: Teach it about bison >= 3

When encountering bison >= 3, treat it as ok, always. This addresses
part of #49.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Makefile.am: bison >= 3 improvements

We add -Wno-yacc to AM_YFLAGS, to simplify the Makefile. This works for
all autoconf versions, with all bison versions, and we require bison
anyway. We also add -Wno-other there, to skip the bison warnings we
previously grepped out in Mk/lex-rules.am.

Grepping does not work anymore, as bison 3.0 uses multi-line messages,
so we get half of them anyway.

This addresses another part of #49.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
lib/cfg-grammar.y: bison3 compatibility

In bison3, YYID() is gone. To make things easier, this patch adds a
compatibility macro in this case.

With the previous patches, this fixes #49.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Mk/lex-rules.am: Silence mkinstalldirs in silent mode

When in silent mode, make the mkinstalldirs calls silent too.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Merge pull request #50 from balabit/merge/h/bison-3

Bison 3 fixes
transport: introduce LogTransportAuxData struct

The purpose of this struct to encapsulate transport specific meta
information that relates to a given read operation. Some transports
(like unix-domain sockets) provide additional information that is useful
for syslog-ng, like the PID of the sending process, etc.

This struct makes it possible to carry this kind of meta information
in a format that allows injecting these values as name-value pairs to
messages. The peer GSockAddr address also got its new home in the struct.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
LogProto/LogTransport: use LogTransportAuxData to pass meta information around

Earlier, syslog-ng didn't have the notion of transport/logproto specific
meta information. The only thing that was passed around when receiving
a message is the address of the peer as a GSockAddr instance.

This patch is changing this, it uses the introduced LogTransportAuxData
struct, which encompasses all information that the LogTransport/LogProto
combination is willing to provide.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
LogReader: feed LogTransport provided aux messages into the newly created message

This patch iterates on all nvpairs provided by the LogTransport/LogProto
part and adds them to the newly created LogMessage.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
transport: make LogTransportSocket a derivable class

This patch publishes the instance struct and adds init_instance()
methods.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afsocket: added unix domain specific LogTransport derivative
afsocket: use LogTransportUnixSocket for unix domain socket drivers
system: use ${.unix.pid} to overwrite $PID if present

The unix-dgram driver will automatically set ${.unix.pid} if the
system supports SO_PASSCRED socket options, which is the actual PID
sending syslog-ng the message. rsyslog and journald both uses this
PID in place of the PID sent by the peer process and with this patch
so will syslog-ng.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Merge branch '3.6/f/peer-pid-in-log-message'
Merge pull request #48 from balabit/merge/h/improved-yacc-check

configure.ac: Improve the bison version check