Skip to content

Commit 84ef305

Browse files
committed
fix(ci): fix armhf runner and conffiles dpkg-deb failure
Two bugs in the initial debian-package.yml: 1. armhf runner was ubuntu-24.04-arm (arm64 host). Building arm32 under QEMU on an arm64 host is unstable — libuv cmake fails. docker-publish.yml uses ubuntu-latest (amd64) for arm/v7, which is stable. Align the armhf runner to ubuntu-latest. 2. DEBIAN/conffiles listed /etc/lightnvr/lightnvr.ini and /etc/lightnvr/go2rtc/go2rtc.yaml, but the runtime Docker image does not include these files (they live only in the builder stage and are NOT copied to the runtime stage). dpkg-deb --build exits 2 when conffiles references files absent from the package. Fix: install config/lightnvr.ini from the repo checkout and generate go2rtc.yaml inline — both now guaranteed to be present.
1 parent e71b4fe commit 84ef305

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

.github/workflows/debian-package.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- runner: ubuntu-24.04-arm
2525
platform: linux/arm64
2626
deb_arch: arm64
27-
- runner: ubuntu-24.04-arm
27+
- runner: ubuntu-latest
2828
platform: linux/arm/v7
2929
deb_arch: armhf
3030

@@ -118,10 +118,37 @@ jobs:
118118
ln -sf libsqlite3.so.0 libsqlite3.so 2>/dev/null || true)
119119
fi
120120
121-
# Web assets, migrations, config
122-
docker cp "${CID}:/var/lib/lightnvr/www/." "${PKG_DIR}/var/lib/lightnvr/www/"
123-
docker cp "${CID}:/usr/share/lightnvr/migrations/." "${PKG_DIR}/usr/share/lightnvr/migrations/"
124-
docker cp "${CID}:/etc/lightnvr/." "${PKG_DIR}/etc/lightnvr/"
121+
# Web assets and migrations from the Docker image
122+
docker cp "${CID}:/var/lib/lightnvr/www/." "${PKG_DIR}/var/lib/lightnvr/www/"
123+
docker cp "${CID}:/usr/share/lightnvr/migrations/." "${PKG_DIR}/usr/share/lightnvr/migrations/"
124+
125+
# Config files: use the checked-out repo source so they are
126+
# guaranteed to exist in the package (the runtime Docker image
127+
# does not include them; they are only created in the builder
128+
# stage and NOT copied into the runtime stage).
129+
install -m 644 config/lightnvr.ini "${PKG_DIR}/etc/lightnvr/lightnvr.ini"
130+
131+
# Default go2rtc config (mirrors what the Dockerfile builder creates)
132+
cat > "${PKG_DIR}/etc/lightnvr/go2rtc/go2rtc.yaml" << 'GO2RTC_EOF'
133+
# go2rtc configuration file
134+
# See https://github.com/AlexxIT/go2rtc for documentation
135+
136+
api:
137+
listen: :1984
138+
origin: "*"
139+
140+
webrtc:
141+
ice_servers:
142+
- urls: [stun:stun.l.google.com:19302]
143+
144+
log:
145+
level: info
146+
147+
streams:
148+
# Streams will be added dynamically by LightNVR
149+
GO2RTC_EOF
150+
# Strip 10-space YAML indent from the go2rtc config
151+
sed -i 's/^ //' "${PKG_DIR}/etc/lightnvr/go2rtc/go2rtc.yaml"
125152
126153
# ── ldconfig drop-in ────────────────────────────────────────────────
127154
echo "/usr/lib/lightnvr" > "${PKG_DIR}/etc/ld.so.conf.d/lightnvr.conf"

0 commit comments

Comments
 (0)