Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

Syslog-ng on BSDs

My FOSDEM presentation in the BSD devroom showcased what is new in sudo and syslog-ng and explained how to install or compile these software yourself on FreeBSD. Not only am I a long time FreeBSD user (started with version 1.0 in 1994) I also work on keeping the syslog-ng port in FreeBSD up to date. But soon after my presentation I was asked what I knew about other BSDs. And – while I knew that all BSDs have syslog-ng in their ports system – I realized I had no idea about the shape of those ports.

For this article I installed OpenBSD, DragonFlyBSD and NetBSD to check syslog-ng on them. Admittedly, they are not in the best shape: they contain old versions, some do not even start or are unable to collect local log messages.

OpenBSD

OpenBSD ports have version 3.12 of syslog-ng. Some Linux distributions have an even earlier version of syslog-ng and they work just fine. Unfortunately, it is not the case here: logging in OpenBSD changed and it means that local log messages cannot be collected by syslog-ng 3.12. Support for collecting local log messages was added in a later syslog-ng version: https://github.com/syslog-ng/syslog-ng/pull/1875

Installation of this ancient syslog-ng version is really easy, just use pkg_add:

openbsd68# pkg_add syslog-ng
quirks-3.441 signed on 2021-02-13T20:25:37Z
syslog-ng-3.12.1p7: ok
The following new rcscripts were installed: /etc/rc.d/syslog_ng
See rcctl(8) for details.

Collecting log messages over the network works perfectly, so as a workaround, you might want to keep using syslogd from the base system as well while forwarding log messages to syslog-ng using the network.

DragonFlyBSD

Once upon a time DragonFlyBSD was forked from FreeBSD. While they took a different route from FreeBSD they also stayed close to the original. DragonFlyBSD ports build on FreeBSD ports even though there are some additional applications and other smaller differences. This means that syslog-ng is up to date in DragonFlyBSD ports, - which in this case means version 3.29. Installation is easy, using the same command as on FreeBSD:

pkg install syslog-ng

Problems start when you actually try to start syslog-ng:

dragon# /usr/local/etc/rc.d/syslog-ng forcestart
Starting syslog_ng.
[2021-02-17T08:59:13.598727] system(): Error detecting platform, unable to define the system() source. Please send your system information to the developers!; sysname='DragonFly', release='5.8-RELEASE'
Error parsing config, syntax error, unexpected LL_ERROR, expecting '}' in /usr/local/etc/syslog-ng.conf:19:14-19:20:
14      options { chain_hostnames(off); flush_lines(0); threaded(yes); };
15      
16      #
17      # sources
18      #
19----> source src { system();
19---->              ^^^^^^
20      	     udp(); internal(); };
21      
22      #
23      # destinations
24      #


syslog-ng documentation: https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
contact: https://lists.balabit.hu/mailman/listinfo/syslog-ng

While system() source works on FreeBSD, where this configuration was prepared, it does not work on DragonFlyBSD. You need to edit /usr/local/etc/syslog-ng.conf and replace system() source with the following lines:

     unix-dgram("/var/run/log");
     unix-dgram("/var/run/logpriv" perm(0600));
     file("/dev/klog" follow-freq(0) program-override("kernel"));

This is based on the earlier FreeBSD configuration and seems to work. I have filed an issue at the syslog-ng GitHub repo, so in a future release it might work automatically.

I also tried to build syslog-ng from ports myself, but right now it is broken. The sysutils/syslog-ng port is still a metaport referring to another port, but that version has already been deleted. The syslog-ng port was reorganized recently, and it seems like not everything was followed up on the DragonFlyBSD side perfectly.

NetBSD

NetBSD also has a quite ancient version of syslog-ng: 3.17.2. Installation of the package is easy, just:

pkgin install syslog-ng

Syslog-ng works and can collect local log messages out of box as well, with a catch. NetBSD seems to have switched to RFC5424 syslog format, just as FreeBSD 12.0, so local log messages collected by syslog-ng’s system() source look a kind of funny:

Feb 17 12:43:07 localhost 1 2021-02-17T12:43:07.935565+01:00 localhost sshd 2160 - - Server listening on :: port 22.
Feb 17 12:43:07 localhost 1 2021-02-17T12:43:07.936064+01:00 localhost sshd 2160 - - Server listening on 0.0.0.0 port 22.

Also, the system() source seems to have missed kernel logging. To fix this, open syslog-ng.conf in your favorite text editor, remove the system() source and add these two lines instead:

        unix-dgram("/var/run/log" flags(syslog-protocol));
        file("/dev/klog" flags(kernel) program_override("kernel"));

This makes sure that local logs are parsed correctly and that kernel messages are collected by syslog-ng as well.

What is next

In this blog I identified many problems related to syslog-ng in various BSD port systems. I also provided some workarounds, but of course these are not real solutions. I cannot promise anything, as I am not an active user or developer of any of these BSD systems and I am also short on time. However, I’m planning to fix as many of these problems at the best effort level, as time allows.

 

If you have any 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.

the avatar of Nathan Wolf

the avatar of Ish Sookun

openSUSE distributions dedicated page

Previously, it would take someone new to the project quite some time to learn about the distributions and understand their differences. Not every new openSUSE user would know that it's ideal to use openSUSE MicroOS for single-purpose server hosting and Kubic for container orchestration with Kubernetes.

Thanks to a revamp of the openSUSE Project website, now the distributions get a dedicated page at get.opensuse.org.

A little work is still needed on the documentation part for each specific distribution. If you would like to help with that, you are most welcome. Join the openSUSE Documentation mailing list and coordinate with what's already being done to improve doc.opensuse.org or head to GitHub to have a look at the current opened issues. You will also find instructions on how to start contributing to the openSUSE Documentation.

For now, each distribution's individual page on get.opensuse.org points to the same official documentation guide which is Leap-centric. The documentation does not cover specific instructions for MicroOS, Kubic or even Tumbleweed.

the avatar of Nathan Wolf

a silhouette of a person's head and shoulders, used as a default avatar

openSUSE Tumbleweed – Review of the weeks 2021/07

Dear Tumbleweed users and hackers,

This week might not have seen the highest count of snapshots being published (only 3, 0212, 0215, and 0217), but for sure we reached the highest count of packages to replace on your system and megabytes to transfer this year (so far). We have few reasons to trigger rebuilds of all packages, and most of the time I do that on a glibc update and when we switch the default compiler (in both cases to make use of new technologies). This week, glibc was the ‘guilty’ one.

The three snapshots contained the following changes (and more):

  • glibc 2.33
  • Mozilla Thunderbird 78.7.1
  • Mozilla Firefox 85.0.1
  • Linux kernel 5.10.14 & 5.10.16
  • LibreOffice 7.1.0.3
  • KDE Plasma 5.21.0
  • KDE Frameworks 5.79.0
  • postfix 3.5.9: note: the default format for its databases changed from bdb to lmdb; bdb support is in postfix-bdb

That is almost everything I promised you last week. Almost! But don’t worry: while we all enjoy a stable, rolling release, the developers keep on submitting new changes. Currently, we are testing the integration of these parts:

  • Linux kernel 5.11.x
  • Binutils 2.36
  • GNOME 3.38.4 (GNOME 40.beta is being tested in GNOME:Next)
  • openssl 1.1.1i, based on centralized crypto-policies package
  • Use GCC 11 as default compiler (Staging:Gcc7)
the avatar of Nathan Wolf

the avatar of openSUSE Heroes

IPv6 support for machines in US region

Today we reached a new milestone: all openSUSE services around the world now support IPv6 natively. The last set of machines in Provo are equipped with IPv6 addresses since today. IPv6 was missing for those machines since the renumbering (which was needed because of the carve out of SUSE from Microfocus). Thanks to one of our providers, who now reserved and routed a whole /48-IPv6 network for us.

With this, we can also run all our DNS servers with IPv6 (and they do not only have a IPv6 address, but all our external DNS entries for the opensuse.org domain should now contain IPv4 and IPv6 addresses as well. Don't worry, you did not miss much. The Dual-Stack (IPv4 and IPv6) is the case for all services in Germany since a long, long time already - and we even had it for the machines in US for a long time, before SUSE switched the provider. But this finally brings us to the same level on all locations!

the avatar of Nathan Wolf
the avatar of openSUSE News

Tumbleweed Gets Newest KDE Frameworks, Plasma

Updates of both KDE’s Plasma and Frameworks landed in openSUSE Tumbleweed as part of three snapshots released this week.

The rolling Tumbleweed distribution began the week with Linux Kernel 5.10.12 and has ended it with version 5.10.16, which was the latest stable Kernel when the 20210215 snapshot was released.

The newest Frameworks 5.79.0 version arrived in snapshot 20210217. As part of the release, Kholidays package updated holidays for Mauritius and Taiwan. The Kirigami user interface framework had fixes to the controls and enhanced some vertical alignments. Removal of the usage of non-UTF-8 string literals were made with Framework’s kcodecs package update. GNOME had some updates with gnome-builder updating to version 3.38.2, which provided support for an --add-policy for Flatpak, and gnome-software updating to version 3.38.1, which updated translations and ignores harmless warnings when using unusual fwupd versions. Three areas of focus were emphasized for the update of dhcp 4.4.2 with changes for dynamic DNS additions, dhclient improvements and support for dynamic shared libraries; the package is now licensed under the Mozilla Public License, MPL 2.0. Multiple PyPI packages were updated including python-greenlet 1.0.0, which requires setuptools to build from source, and python-numpy 1.20.1, which fixed a random.shuffle regression. A major update of perl-Mojolicious 9.01 added an experimental color attribute and an experimental color log environment variable. Other packages to update in the snapshot were Long-Term Support package subversion 1.14.1, filesystem mounter fuse3 3.10.2, pipewire 0.3.21 and git 2.30.1.

Plasma 5.21 is all about upgrading the looks and usability of Plasma. Snapshot 20210215 brought this Plasma update, which refreshed the color scheme and sports a brand new unified headerbar style with a clean and cool new look. The new Plasma System Monitor app for monitoring system resources is now an integral part of Plasma; the application shows all the running applications along with detailed statistics and graphs. Plasma 5.21 makes massive progress toward first-class support for Wayland. The virtual keyboard in Wayland has been improved and supports GTK applications using the text-input-v3 protocol. The update of Mozilla Firefox 85.0.1 fixed a few bugs like a crash in the browser in case of an unexpected Cache Application Programming Interface state. The trim that was not working in ImageMagick was fixed in version 7.0.10.62 and the GPS info for TIFF images now works with the imaging applications. Terminal emulator xterm 366 corrected the upper-limit for a selection buffer, which fixed a Common Vulnerabilities and Exposure. PDF library poppler 21.02.0 fixed a memory leak if saving a file fails. Some other packages in the snapshot were LibreSSL 3.2.4, text rendering package pango 1.48.2 and Linux Kernel 5.10.16.

The Linux Kernel updated from 5.10.12 to 5.10.14 in the 20210212 snapshot, which brought in some KVM fixes. New packages were inherited from GNU Compiler Collection 10 into the GCC 11.0.0+git183291 update. CardDAV address books now support OAuth2 and Google Contacts in the email client update of Mozilla Thunderbird 78.7.1. The glibc 2.33 version optimized dynamic linker loads and the implementations of shared objects from subdirectories under the glibc-hwcaps directory on the library search path; that’s if the system’s capabilities meet the requirements for this subdirectory. The 7.1.0.3 LibreOffice updated bundled dependencies and php7 7.4.15 fixed a Curl bug and core fix that provided a bogus parser error on more than 4GB of source code. The regular expression library re2 had an update from a November release to version 20210202, which addressed -Wnull-dereference warnings from GCC 10.x.

a silhouette of a person's head and shoulders, used as a default avatar

Perseverance Landing

NASA Logo by Bruce Blackburn

Things are hectic and busy here on Earth. We may have disrupted the seeemingly eternal atmospheric streams by warming up the planet. We seem to be really terrible at dealing with a viral threat we've known about for a long time. We're doing a lot of bad things as species.

But today I won't be bitching about our government failing to distribute vaccines handed to them on a silver platter. I'll be admiring the work of another government agency that did amazingly organizing resources and talent and will be landing the Perseverance rover on Mars at 19:15 UTC.

Join me and watch it here