[syslog-ng] [Bug 128] template() broken in latest 3.3 git

Nix nix at esperi.org.uk
Wed Jul 20 16:55:46 CEST 2011


On 20 Jul 2011, Balazs Scheidler said:

> This patch finally makes both work for me:

This causes test_template to fail:

FAIL: error compiling template, template=$(echo $HOST $PID), error=Unknown template function echo
FAIL: error compiling template, template=$(echo "$(echo $HOST)" $PID), error=Unknown template function echo
FAIL: error compiling template, template=$(echo "$(echo '$(echo $HOST)')" $PID), error=Unknown template function echo
FAIL: error compiling template, template=$(echo "$(echo '$(echo $HOST)')" $PID), error=Unknown template function echo
FAIL: error compiling template, template=$(echo '"$(echo $(echo $HOST))"' $PID), error=Unknown template function echo
FAIL: error compiling template, template=$(ipv4-to-int $SOURCEIP), error=Unknown template function ipv4-to-int
FAIL: error compiling template, template=$(grep 'facility(local3)' $PID), error=Unknown template function grep
FAIL: error compiling template, template=$(grep 'facility(local3)' $PID $PROGRAM), error=Unknown template function grep
FAIL: error compiling template, template=$(grep 'facility(local4)' $PID), error=Unknown template function grep
FAIL: error compiling template, template=$(grep ('$FACILITY' == 'local4') $PID), error=Unknown template function grep
FAIL: error compiling template, template=$(grep ('$FACILITY(' == 'local3(') $PID), error=Unknown template function grep
FAIL: error compiling template, template=$(grep ('$FACILITY(' == 'local4)') $PID), error=Unknown template function grep
FAIL: error compiling template, template=$(grep \'$FACILITY\'\ ==\ \'local4\' $PID), error=Unknown template function grep
FAIL: error compiling template, template=$(if 'facility(local4)' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if 'facility(local3)' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY" lt "local3"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY" le "local3"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY" eq "local3"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY" ne "local3"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY" gt "local3"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY" ge "local3"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" < "19"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" <= "19"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" == "19"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" != "19"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" > "19"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" >= "19"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" >= "19" and "kicsi" == "nagy"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(if '"$FACILITY_NUM" >= "19" or "kicsi" == "nagy"' alma korte), error=Unknown template function if
FAIL: error compiling template, template=$(echo ${HOST}@0 ${PID}@1), error=Unknown template function echo
FAIL: error compiling template, template=$(echo $HOST $PID)@0, error=Unknown template function echo
FAIL: error compiling template, template=$(grep 'facility(local3)' $PID)@0, error=Unknown template function grep
FAIL: error compiling template, template=$(grep 'facility(local3)' $PID)@1, error=Unknown template function grep
FAIL: error compiling template, template=$(grep 'facility(local3)' $PID)@2, error=Unknown template function grep
FAIL: error compiling template, template=dani $(echo $HOST $DATE $(echo huha)) balint, error=Unknown template function echo
WARNING: template: the default value for template-escape is changing to 'no' in version 3.0, please update your configuration file accordingly;
WARNING: template: the meaning of the $MSG/$MESSAGE macros is changing in version 3.0, please prepend a $MSGHDR when upgrading to 3.0 config format;
FAIL: test_template

Not installing on the grounds that this is probably a bad sign (but it
may be a testsuite error, I suppose).


Also, you missed a call site, so the csvparser module won't compile
anymore. Here's a patch, which does things the same way you did them in
cfg-grammar.y, and which compiles, at least:



More information about the syslog-ng mailing list