Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bug Report
about: Report a bug in systemd-netlogd
title: ''
labels: bug
assignees: ''
---

**systemd-netlogd version**
Output of `systemd-netlogd --version`:

**OS and systemd version**
- Distribution:
- systemd version (`systemctl --version`):

**Configuration**
```ini
# Contents of /etc/systemd/netlogd.conf (redact sensitive data)
[Network]
Address=
Protocol=
```

**Describe the bug**
A clear description of what the bug is.

**Steps to reproduce**
1.
2.
3.

**Expected behavior**
What you expected to happen.

**Actual behavior**
What actually happened.

**Logs**
```
# Output of: journalctl -u systemd-netlogd -n 50
```

**Additional context**
Any other relevant information (network setup, TLS certificates, firewall rules, etc.).
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem?**
A clear description of the problem. Example: "I need to forward logs to multiple destinations..."

**Describe the solution you'd like**
What you want to happen.

**Describe alternatives you've considered**
Any alternative solutions or workarounds.

**Additional context**
Any other context, config examples, or references (RFCs, other implementations, etc.).
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Summary

Brief description of the changes.

Fixes #(issue number)

## Changes

-
-

## Testing

- [ ] `meson test -C build` passes
- [ ] Tested with UDP/TCP/TLS as applicable
- [ ] New code has test coverage (if applicable)

## Checklist

- [ ] Code follows systemd coding style
- [ ] Commit messages are clear and descriptive
- [ ] Documentation updated (if applicable)
- [ ] No new compiler warnings
170 changes: 124 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
python3-sphinx \
ninja-build \
meson \
glib-2.0-dev \
libudev-dev \
libsystemd-dev \
clang \
gperf \
Expand All @@ -35,13 +33,15 @@ jobs:
libssl-dev

- name: Build project
run: make
run: |
meson setup build
meson compile -C build

- name: Run tests
run: meson test -C build -v

- name: Install
run: sudo make install
run: sudo meson install -C build

- name: Create systemd-journal-netlog user
run: sudo useradd -r -d / -s /usr/sbin/nologin -g systemd-journal systemd-journal-netlog || true
Expand All @@ -55,55 +55,100 @@ jobs:
run: sudo systemctl status systemd-netlogd

build-rpm:
name: Build RPM on ${{ matrix.os }}
name: Build RPM (${{ matrix.os }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [fedora:latest, fedora:39, rockylinux:9, rockylinux:8]
os: [fedora:latest, fedora:41]

container:
image: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install RPM build dependencies (Fedora)
if: startsWith(matrix.os, 'fedora')
- name: Install RPM build dependencies
run: |
dnf install -y \
rpm-build \
rpmdevtools \
meson \
ninja-build \
gcc \
glib2-devel \
systemd-devel \
libcap-devel \
gperf \
openssl-devel \
libcmocka-devel \
python3-sphinx \
git
python3-devel \
python3-lxml

- name: Set up RPM build tree
run: rpmdev-setuptree

- name: Create source tarball
run: |
VERSION=$(grep "version:" meson.build | head -1 | sed "s/.*'\(.*\)'.*/\1/")
echo "Building version $VERSION"
tar czf ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz \
--transform "s,^\.,systemd-netlogd-$VERSION," \
--exclude='.git' --exclude='builddir' \
.

- name: Copy spec file
run: cp systemd-netlogd.spec ~/rpmbuild/SPECS/

- name: Build RPMs
run: rpmbuild -ba ~/rpmbuild/SPECS/systemd-netlogd.spec

- name: Test install RPM
run: |
dnf install -y ~/rpmbuild/RPMS/*/systemd-netlogd-*.rpm
rpm -qi systemd-netlogd
systemctl status systemd-netlogd || true

- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpms-${{ matrix.os }}
path: |
~/rpmbuild/RPMS/*/*.rpm
~/rpmbuild/SRPMS/*.rpm
retention-days: 30

build-rpm-rocky:
name: Build RPM (rockylinux:9)
runs-on: ubuntu-latest

container:
image: rockylinux:9

steps:
- uses: actions/checkout@v4

- name: Install RPM build dependencies (Rocky/RHEL)
if: startsWith(matrix.os, 'rockylinux')
- name: Enable CRB and install EPEL
run: |
dnf install -y epel-release
/usr/bin/crb enable

- name: Install RPM build dependencies
run: |
dnf install -y \
rpm-build \
rpmdevtools \
meson \
ninja-build \
gcc \
glib2-devel \
systemd-devel \
libcap-devel \
gperf \
openssl-devel \
libcmocka-devel \
python3-pip \
python3-sphinx \
git
python3-devel \
python3-lxml
pip3 install meson ninja

- name: Set up RPM build tree
run: rpmdev-setuptree
Expand All @@ -112,23 +157,16 @@ jobs:
run: |
VERSION=$(grep "version:" meson.build | head -1 | sed "s/.*'\(.*\)'.*/\1/")
echo "Building version $VERSION"
git archive --format=tar.gz --prefix=systemd-netlogd-$VERSION/ -o ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz HEAD
tar czf ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz \
--transform "s,^\.,systemd-netlogd-$VERSION," \
--exclude='.git' --exclude='builddir' \
.

- name: Copy spec file
run: cp systemd-netlogd.spec ~/rpmbuild/SPECS/

- name: Build source RPM
run: rpmbuild -bs ~/rpmbuild/SPECS/systemd-netlogd.spec

- name: Build binary RPM
run: rpmbuild -bb ~/rpmbuild/SPECS/systemd-netlogd.spec

- name: List built RPMs
run: |
echo "Source RPMs:"
ls -lh ~/rpmbuild/SRPMS/
echo "Binary RPMs:"
ls -lh ~/rpmbuild/RPMS/*/
- name: Build RPMs
run: rpmbuild -ba ~/rpmbuild/SPECS/systemd-netlogd.spec

- name: Test install RPM
run: |
Expand All @@ -139,19 +177,19 @@ jobs:
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpms-${{ matrix.os }}
name: rpms-rockylinux-9
path: |
~/rpmbuild/RPMS/*/*.rpm
~/rpmbuild/SRPMS/*.rpm
retention-days: 30

build-deb:
name: Build DEB on ${{ matrix.os }}
name: Build DEB (${{ matrix.os }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu:24.04, ubuntu:22.04, debian:12, debian:11]
os: [ubuntu:24.04, ubuntu:22.04, debian:12]

container:
image: ${{ matrix.os }}
Expand All @@ -160,6 +198,8 @@ jobs:
- uses: actions/checkout@v4

- name: Install build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y \
Expand All @@ -168,26 +208,64 @@ jobs:
meson \
ninja-build \
pkg-config \
libglib2.0-dev \
libsystemd-dev \
libcap-dev \
gperf \
libssl-dev \
libcmocka-dev \
python3-sphinx \
git
fakeroot \
devscripts

- name: Build DEB package
run: dpkg-buildpackage -us -uc -b

- name: Test install DEB
run: |
# Create simple debian package structure
mkdir -p debian

# Note: This is a basic build. For production, create proper debian/ directory
# with control, rules, changelog, etc.
make
meson test -C build -v
DESTDIR=$(pwd)/debian/tmp make install

echo "DEB packaging would continue here with proper debian/ directory structure"
echo "For now, verifying build and install locations:"
find debian/tmp -type f
dpkg -i ../systemd-netlogd_*.deb || apt-get install -f -y
dpkg -s systemd-netlogd
systemctl status systemd-netlogd || true

- name: Upload DEB artifacts
uses: actions/upload-artifact@v4
with:
name: debs-${{ matrix.os }}
path: ../*.deb
retention-days: 30

build-archlinux:
name: Build on Arch Linux
runs-on: ubuntu-latest

container:
image: archlinux:latest

steps:
- name: Install base-devel and dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm \
base-devel \
meson \
gperf \
libcap \
openssl \
systemd-libs \
python-sphinx \
cmocka \
git

- uses: actions/checkout@v4

- name: Build
run: |
meson setup build \
--prefix=/usr/lib/systemd \
--sysconfdir=/etc/systemd
meson compile -C build

- name: Run tests
run: meson test -C build -v

- name: Install
run: meson install -C build --destdir "$PWD/pkg"
Loading
Loading