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