Use fakeroot when building .deb packages - #759
Conversation
Without fakeroot, files in the .deb are created with the build user's UID:GID instead of root:root (0:0), causing incorrect ownership when installed via dpkg. Closes Syncplay#513 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I'm not a Linux user, but would it be better to use Under this alternative, the only changes from # ci/deb-script.sh
make install DESTDIR=/tmp/syncplay
-dpkg -b /tmp/syncplay/
+dpkg-deb --root-owner-group -b /tmp/syncplay/
# ci/deb-server-script.sh
make install-server DESTDIR=/tmp/syncplay-server
-dpkg -b /tmp/syncplay-server/
+dpkg-deb --root-owner-group -b /tmp/syncplay-server/The For clarity, this sets the ownership of filesystem entries recorded in the package to Debian documents
It also notes that the option is useful for rootless builds: https://manpages.debian.org/trixie/dpkg/dpkg-deb.1.en.html This directly addresses #513 by preventing the CI user’s UID/GID from being stored in the package. The option requires dpkg 1.19.0 or newer, which should be fine for current Debian and Ubuntu CI environments. Since Syncplay does not appear to ship files that intentionally require non-root ownership, this seems cleaner and more focused than adding |
Summary
fakeroot, files in the.debpackage are created with the build user's UID:GID instead ofroot:root(0:0), causing incorrect ownership when installed viadpkgmake installanddpkg -bwithfakerootin the client and server deb build scriptsCloses #513