Version 4.0.1 of syslog-ng was released a month ago. Unfortunately, the new release does not compile on FreeBSD. It was a temporary problem in the environment generating the source tgz. The next release is still almost a month away, but you can compile syslog-ng 4.0.1 yourself from my unofficial ports Makefile.

You can learn more about the syslog-ng 4.0.1 release from the release notes: https://github.com/syslog-ng/syslog-ng/releases/tag/syslog-ng-4.0.1 or from the syslog-ng future blog at: https://syslog-ng-future.blog/

If you are curious, check https://github.com/syslog-ng/syslog-ng/issues/4275 for some background information why the official syslog-ng 4.0.1 release does not compile on FreeBSD.

Before you begin

I did all my development and testing on FreeBSD 13.1 with all the latest security updates and up-to-date FreeBSD ports and packages. However, most likely it also works on any supported FreeBSD release and using the quarterly branch of ports.

As the official syslog-ng source release does not work with FreeBSD, I prepared an unofficial 4.0.1 relesae tgz. So, instead of updating the official ports, I published the port I prepared on GitHub. You will need GIT to download it. I have the git-lite port installed, as it has a lot less dependencies and it is more than enough to download sources.

Downloading sources

Change to a directory that does not have a “freebsd” sub-directory and then run:

git clone https://github.com/czanik/freebsd

It will clone my FreeBSD repo to the local directory. Change to the freebsd/syslog-ng4 directory. From here on, everything works as in a regular FreeBSD ports directory.

A single make command will let you configure which syslog-ng features are enabled, download sources from my web server and compile syslog-ng with the configured options. Run:

make

To install syslog-ng 4.0.1 on your system and clean up the directory, run:

make install clean


Testing

You are now ready to test syslog-ng 4.0.1 on your FreeBSD system. If you use the default syslog-ng configuration, you will not notice any changes. However, if you use PatternDB or the JSON parser, many destinations will behave differently. Data type information from these parsers are now preserved and used correctly on the destination side.

What is next?

Hopefully, the 4.1 release will compile on FreeBSD without this workaround. Until that, please test my unofficial port and provide us with feedback: https://github.com/syslog-ng/syslog-ng/issues

-

If you have questions or comments related to syslog-ng, do not hesitate to contact us. You can reach us by email or even chat with us. For a list of possibilities, check our GitHub page under the “Community” section at https://github.com/syslog-ng/syslog-ng. On Twitter, I am available as @PCzanik, on Mastodon as @Pczanik@fosstodon.org.

Related Content