Skip to content

Commit 91f39d8

Browse files
committed
Fix CI: remove git dep ordering, fix DEB meson prefix conflict
- RPM jobs: remove git config step that ran before git was installed, remove fetch-depth (not needed since using tar instead of git archive) - DEB jobs: call meson directly in debian/rules instead of using dh_auto_configure which injects conflicting --prefix=/usr
1 parent b2c0aba commit 91f39d8

2 files changed

Lines changed: 19 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ jobs:
6767

6868
steps:
6969
- uses: actions/checkout@v4
70-
with:
71-
fetch-depth: 0
72-
73-
- name: Mark directory as safe for git
74-
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
7570

7671
- name: Install RPM build dependencies
7772
run: |
@@ -86,8 +81,7 @@ jobs:
8681
gperf \
8782
openssl-devel \
8883
libcmocka-devel \
89-
python3-sphinx \
90-
git
84+
python3-sphinx
9185
9286
- name: Set up RPM build tree
9387
run: rpmdev-setuptree
@@ -97,7 +91,7 @@ jobs:
9791
VERSION=$(grep "version:" meson.build | head -1 | sed "s/.*'\(.*\)'.*/\1/")
9892
echo "Building version $VERSION"
9993
tar czf ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz \
100-
--transform "s,^,systemd-netlogd-$VERSION/," \
94+
--transform "s,^\.,systemd-netlogd-$VERSION," \
10195
--exclude='.git' --exclude='builddir' \
10296
.
10397
@@ -131,11 +125,6 @@ jobs:
131125

132126
steps:
133127
- uses: actions/checkout@v4
134-
with:
135-
fetch-depth: 0
136-
137-
- name: Mark directory as safe for git
138-
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
139128

140129
- name: Enable CRB and install EPEL
141130
run: |
@@ -154,8 +143,7 @@ jobs:
154143
openssl-devel \
155144
libcmocka-devel \
156145
python3-pip \
157-
python3-sphinx \
158-
git
146+
python3-sphinx
159147
pip3 install meson ninja
160148
161149
- name: Set up RPM build tree
@@ -166,7 +154,7 @@ jobs:
166154
VERSION=$(grep "version:" meson.build | head -1 | sed "s/.*'\(.*\)'.*/\1/")
167155
echo "Building version $VERSION"
168156
tar czf ~/rpmbuild/SOURCES/systemd-netlogd-$VERSION.tar.gz \
169-
--transform "s,^,systemd-netlogd-$VERSION/," \
157+
--transform "s,^\.,systemd-netlogd-$VERSION," \
170158
--exclude='.git' --exclude='builddir' \
171159
.
172160

debian/rules

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@
33
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
44

55
%:
6-
dh $@
6+
dh $@ --buildsystem=meson
77

88
override_dh_auto_configure:
9-
dh_auto_configure --buildsystem=meson -- \
10-
-Dprefix=/usr/lib/systemd \
11-
-Dsysconfdir=/etc/systemd
9+
meson setup obj-$(DEB_HOST_MULTIARCH) \
10+
--prefix=/usr/lib/systemd \
11+
--sysconfdir=/etc/systemd
12+
13+
override_dh_auto_build:
14+
meson compile -C obj-$(DEB_HOST_MULTIARCH)
1215

1316
override_dh_auto_test:
14-
dh_auto_test -- -v
17+
meson test -C obj-$(DEB_HOST_MULTIARCH) -v
18+
19+
override_dh_auto_install:
20+
DESTDIR=$(CURDIR)/debian/systemd-netlogd \
21+
meson install -C obj-$(DEB_HOST_MULTIARCH)
22+
23+
override_dh_auto_clean:
24+
rm -rf obj-$(DEB_HOST_MULTIARCH)

0 commit comments

Comments
 (0)