Skip to content

Commit f8ffd22

Browse files
authored
Merge pull request #145 from ssahani/fix/rfc3164-rename
Fix RFC 3339 vs RFC 3164 mixup for message format
2 parents eac4fc6 + 20e8142 commit f8ffd22

28 files changed

Lines changed: 540 additions & 1094 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in systemd-netlogd
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**systemd-netlogd version**
10+
Output of `systemd-netlogd --version`:
11+
12+
**OS and systemd version**
13+
- Distribution:
14+
- systemd version (`systemctl --version`):
15+
16+
**Configuration**
17+
```ini
18+
# Contents of /etc/systemd/netlogd.conf (redact sensitive data)
19+
[Network]
20+
Address=
21+
Protocol=
22+
```
23+
24+
**Describe the bug**
25+
A clear description of what the bug is.
26+
27+
**Steps to reproduce**
28+
1.
29+
2.
30+
3.
31+
32+
**Expected behavior**
33+
What you expected to happen.
34+
35+
**Actual behavior**
36+
What actually happened.
37+
38+
**Logs**
39+
```
40+
# Output of: journalctl -u systemd-netlogd -n 50
41+
```
42+
43+
**Additional context**
44+
Any other relevant information (network setup, TLS certificates, firewall rules, etc.).
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or enhancement
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem?**
10+
A clear description of the problem. Example: "I need to forward logs to multiple destinations..."
11+
12+
**Describe the solution you'd like**
13+
What you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
Any alternative solutions or workarounds.
17+
18+
**Additional context**
19+
Any other context, config examples, or references (RFCs, other implementations, etc.).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Summary
2+
3+
Brief description of the changes.
4+
5+
Fixes #(issue number)
6+
7+
## Changes
8+
9+
-
10+
-
11+
12+
## Testing
13+
14+
- [ ] `meson test -C build` passes
15+
- [ ] Tested with UDP/TCP/TLS as applicable
16+
- [ ] New code has test coverage (if applicable)
17+
18+
## Checklist
19+
20+
- [ ] Code follows systemd coding style
21+
- [ ] Commit messages are clear and descriptive
22+
- [ ] Documentation updated (if applicable)
23+
- [ ] No new compiler warnings

.github/workflows/ci.yml

Lines changed: 124 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jobs:
2424
python3-sphinx \
2525
ninja-build \
2626
meson \
27-
glib-2.0-dev \
28-
libudev-dev \
2927
libsystemd-dev \
3028
clang \
3129
gperf \
@@ -35,13 +33,15 @@ jobs:
3533
libssl-dev
3634
3735
- name: Build project
38-
run: make
36+
run: |
37+
meson setup build
38+
meson compile -C build
3939
4040
- name: Run tests
4141
run: meson test -C build -v
4242

4343
- name: Install
44-
run: sudo make install
44+
run: sudo meson install -C build
4545

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

5757
build-rpm:
58-
name: Build RPM on ${{ matrix.os }}
58+
name: Build RPM (${{ matrix.os }})
5959
runs-on: ubuntu-latest
6060
strategy:
6161
fail-fast: false
6262
matrix:
63-
os: [fedora:latest, fedora:39, rockylinux:9, rockylinux:8]
63+
os: [fedora:latest, fedora:41]
6464

6565
container:
6666
image: ${{ matrix.os }}
6767

6868
steps:
6969
- uses: actions/checkout@v4
7070

71-
- name: Install RPM build dependencies (Fedora)
72-
if: startsWith(matrix.os, 'fedora')
71+
- name: Install RPM build dependencies
7372
run: |
7473
dnf install -y \
7574
rpm-build \
7675
rpmdevtools \
7776
meson \
7877
ninja-build \
7978
gcc \
80-
glib2-devel \
8179
systemd-devel \
8280
libcap-devel \
8381
gperf \
8482
openssl-devel \
8583
libcmocka-devel \
8684
python3-sphinx \
87-
git
85+
python3-devel \
86+
python3-lxml
87+
88+
- name: Set up RPM build tree
89+
run: rpmdev-setuptree
90+
91+
- name: Create source tarball
92+
run: |
93+
VERSION=$(grep "version:" meson.build | head -1 | sed "s/.*'\(.*\)'.*/\1/")
94+
echo "Building version $VERSION"
95+
tar czf ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz \
96+
--transform "s,^\.,systemd-netlogd-$VERSION," \
97+
--exclude='.git' --exclude='builddir' \
98+
.
99+
100+
- name: Copy spec file
101+
run: cp systemd-netlogd.spec ~/rpmbuild/SPECS/
102+
103+
- name: Build RPMs
104+
run: rpmbuild -ba ~/rpmbuild/SPECS/systemd-netlogd.spec
105+
106+
- name: Test install RPM
107+
run: |
108+
dnf install -y ~/rpmbuild/RPMS/*/systemd-netlogd-*.rpm
109+
rpm -qi systemd-netlogd
110+
systemctl status systemd-netlogd || true
111+
112+
- name: Upload RPM artifacts
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: rpms-${{ matrix.os }}
116+
path: |
117+
~/rpmbuild/RPMS/*/*.rpm
118+
~/rpmbuild/SRPMS/*.rpm
119+
retention-days: 30
120+
121+
build-rpm-rocky:
122+
name: Build RPM (rockylinux:9)
123+
runs-on: ubuntu-latest
124+
125+
container:
126+
image: rockylinux:9
127+
128+
steps:
129+
- uses: actions/checkout@v4
88130

89-
- name: Install RPM build dependencies (Rocky/RHEL)
90-
if: startsWith(matrix.os, 'rockylinux')
131+
- name: Enable CRB and install EPEL
91132
run: |
92133
dnf install -y epel-release
134+
/usr/bin/crb enable
135+
136+
- name: Install RPM build dependencies
137+
run: |
93138
dnf install -y \
94139
rpm-build \
95140
rpmdevtools \
96-
meson \
97-
ninja-build \
98141
gcc \
99-
glib2-devel \
100142
systemd-devel \
101143
libcap-devel \
102144
gperf \
103145
openssl-devel \
104146
libcmocka-devel \
147+
python3-pip \
105148
python3-sphinx \
106-
git
149+
python3-devel \
150+
python3-lxml
151+
pip3 install meson ninja
107152
108153
- name: Set up RPM build tree
109154
run: rpmdev-setuptree
@@ -112,23 +157,16 @@ jobs:
112157
run: |
113158
VERSION=$(grep "version:" meson.build | head -1 | sed "s/.*'\(.*\)'.*/\1/")
114159
echo "Building version $VERSION"
115-
git archive --format=tar.gz --prefix=systemd-netlogd-$VERSION/ -o ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz HEAD
160+
tar czf ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz \
161+
--transform "s,^\.,systemd-netlogd-$VERSION," \
162+
--exclude='.git' --exclude='builddir' \
163+
.
116164
117165
- name: Copy spec file
118166
run: cp systemd-netlogd.spec ~/rpmbuild/SPECS/
119167

120-
- name: Build source RPM
121-
run: rpmbuild -bs ~/rpmbuild/SPECS/systemd-netlogd.spec
122-
123-
- name: Build binary RPM
124-
run: rpmbuild -bb ~/rpmbuild/SPECS/systemd-netlogd.spec
125-
126-
- name: List built RPMs
127-
run: |
128-
echo "Source RPMs:"
129-
ls -lh ~/rpmbuild/SRPMS/
130-
echo "Binary RPMs:"
131-
ls -lh ~/rpmbuild/RPMS/*/
168+
- name: Build RPMs
169+
run: rpmbuild -ba ~/rpmbuild/SPECS/systemd-netlogd.spec
132170

133171
- name: Test install RPM
134172
run: |
@@ -139,19 +177,19 @@ jobs:
139177
- name: Upload RPM artifacts
140178
uses: actions/upload-artifact@v4
141179
with:
142-
name: rpms-${{ matrix.os }}
180+
name: rpms-rockylinux-9
143181
path: |
144182
~/rpmbuild/RPMS/*/*.rpm
145183
~/rpmbuild/SRPMS/*.rpm
146184
retention-days: 30
147185

148186
build-deb:
149-
name: Build DEB on ${{ matrix.os }}
187+
name: Build DEB (${{ matrix.os }})
150188
runs-on: ubuntu-latest
151189
strategy:
152190
fail-fast: false
153191
matrix:
154-
os: [ubuntu:24.04, ubuntu:22.04, debian:12, debian:11]
192+
os: [ubuntu:24.04, ubuntu:22.04, debian:12]
155193

156194
container:
157195
image: ${{ matrix.os }}
@@ -160,6 +198,8 @@ jobs:
160198
- uses: actions/checkout@v4
161199

162200
- name: Install build dependencies
201+
env:
202+
DEBIAN_FRONTEND: noninteractive
163203
run: |
164204
apt-get update
165205
apt-get install -y \
@@ -168,26 +208,64 @@ jobs:
168208
meson \
169209
ninja-build \
170210
pkg-config \
171-
libglib2.0-dev \
172211
libsystemd-dev \
173212
libcap-dev \
174213
gperf \
175214
libssl-dev \
176215
libcmocka-dev \
177216
python3-sphinx \
178-
git
217+
fakeroot \
218+
devscripts
179219
180220
- name: Build DEB package
221+
run: dpkg-buildpackage -us -uc -b
222+
223+
- name: Test install DEB
181224
run: |
182-
# Create simple debian package structure
183-
mkdir -p debian
184-
185-
# Note: This is a basic build. For production, create proper debian/ directory
186-
# with control, rules, changelog, etc.
187-
make
188-
meson test -C build -v
189-
DESTDIR=$(pwd)/debian/tmp make install
190-
191-
echo "DEB packaging would continue here with proper debian/ directory structure"
192-
echo "For now, verifying build and install locations:"
193-
find debian/tmp -type f
225+
dpkg -i ../systemd-netlogd_*.deb || apt-get install -f -y
226+
dpkg -s systemd-netlogd
227+
systemctl status systemd-netlogd || true
228+
229+
- name: Upload DEB artifacts
230+
uses: actions/upload-artifact@v4
231+
with:
232+
name: debs-${{ matrix.os }}
233+
path: ../*.deb
234+
retention-days: 30
235+
236+
build-archlinux:
237+
name: Build on Arch Linux
238+
runs-on: ubuntu-latest
239+
240+
container:
241+
image: archlinux:latest
242+
243+
steps:
244+
- name: Install base-devel and dependencies
245+
run: |
246+
pacman -Syu --noconfirm
247+
pacman -S --noconfirm \
248+
base-devel \
249+
meson \
250+
gperf \
251+
libcap \
252+
openssl \
253+
systemd-libs \
254+
python-sphinx \
255+
cmocka \
256+
git
257+
258+
- uses: actions/checkout@v4
259+
260+
- name: Build
261+
run: |
262+
meson setup build \
263+
--prefix=/usr/lib/systemd \
264+
--sysconfdir=/etc/systemd
265+
meson compile -C build
266+
267+
- name: Run tests
268+
run: meson test -C build -v
269+
270+
- name: Install
271+
run: meson install -C build --destdir "$PWD/pkg"

0 commit comments

Comments
 (0)