Building syslog-ng with bundled ivykis on FreeBSD

You are currently viewing Building syslog-ng with bundled ivykis on FreeBSD

One of the core dependencies of syslog-ng is the ivykis library. We have a few FreeBSD specific fixes in our ivykis fork, however the syslog-ng port uses ivykis from ports instead of the bundled version. I am now working on making it selectable. Testing and help are welcome.

Before you begin

For many years, syslog-ng in FreeBSD ports used the ivykis version bundled with syslog-ng. Our fork (https://github.com/balabit/ivykis) is a few commits ahead of the original, providing some fixes and experimental features. However, ivykis is also available in ports at https://www.freshports.org/devel/ivykis/ and it caused build problems when installed. To avoid these problems, the syslog-ng port was changed to use ivykis from ports instead of the bundled version. Unfortunately, our fixes are unavailable to users this way.

For many years I have been testing syslog-ng git snapshots on FreeBSD and saved my ports updates to a GitHub repository. My aim now is to make ivykis selectable by the user. The default ivykis setting would stay to use the one from ports, as using bundled libraries is against packaging recommendations. However, if the user encounters a problem that needs the bundled version, I want to make it possible for them to handle the issue without having to edit the Makefile by hand.

You can read about how to use my repo at https://www.syslog-ng.com/community/b/blog/posts/installing-a-syslog-ng-4-development-snapshot-on-freebsd

Current state

It works 🙂 However, it is ugly as hell. I spent a couple of hours reading the ports documentation, but I could not find a solution for my problems. Here is the ivykis part:

 

IVYKIS_CONFIGURE_OFF=                   –with-ivykis=internal

# Error: Orphaned: include/syslog-ng/ivykis/iv.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_avl.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_event.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_event_raw.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_fd_pump.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_inotify.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_list.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_popen.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_signal.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_thread.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_tls.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_wait.h

# Error: Orphaned: include/syslog-ng/ivykis/iv_work.h

IVYKIS_CONFIGURE_ON=                    –with-ivykis=system

IVYKIS_LIB_DEPENDS=                         libivykis.so:devel/ivykis

There are two problems:

  • The extra files appear in the packaging list when the ivykis option is disabled.
  • Syslog-ng conflicts with devel/ivykis when the option is disabled.

As far as I can understand, related options only work for the enabled option. I tried to reverse the ON/OFF options, but that did not work either, as IVYKIS_LIB_DEPENDS can only be used when the option is enabled.

What is next?

Testing my ivykis related changes is very welcome. However, until me or someone else finds a proper solution for these packaging problems, you should make sure that devel/ivykis is not installed when you compile syslog-ng with internal ivykis. Also, if you change your mind and want to use system ivykis again, make sure that you remove the content of include/syslog-ng/ivykis by hand.

–

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.