Makefile: Move privileged daemon to /usr/lib/freedombox

Tests:

- Running make install installs to /usr/lib/freedombox. Non-privileged users
don't find it in the path. root user does.

- New service file contains path to /usr/lib/freedombox/. Actions works as
expected.

- Build and install the debian package. Privileged daemon runs as expected and
first setup steps complete as expected. First wizard works as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2025-08-16 18:29:19 -07:00 committed by Veiko Aasa
parent 904e5935cb
commit e227e9a919
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
3 changed files with 8 additions and 2 deletions

View File

@ -37,6 +37,7 @@ DIRECTORIES_TO_CREATE := \
STATIC_FILES_DIRECTORY := $(DESTDIR)/usr/share/plinth/static
BIN_DIR := $(DESTDIR)/usr/bin
LIB_DIR := $(DESTDIR)/usr/lib
FIND_ARGS := \
-not -iname "*.log" \
@ -102,7 +103,7 @@ install:
rm -f $(DESTDIR)$${lib_dir}/plinth*.dist-info/COPYING.md && \
rm -f $(DESTDIR)$${lib_dir}/plinth*.dist-info/direct_url.json && \
$(INSTALL) -D -t $(BIN_DIR) bin/plinth
$(INSTALL) -D -t $(BIN_DIR) bin/freedombox-privileged
$(INSTALL) -D -t $(LIB_DIR)/freedombox bin/freedombox-privileged
$(INSTALL) -D -t $(BIN_DIR) bin/freedombox-cmd
# Static web server files

View File

@ -8,7 +8,7 @@ StartLimitIntervalSec=0
[Service]
Type=notify
ExecStart=/usr/bin/freedombox-privileged
ExecStart=/usr/lib/freedombox/freedombox-privileged
TimeoutSec=300s
User=root
Group=root

View File

@ -19,3 +19,8 @@ freedombox binary: web-application-works-only-with-apache
# Not documentation
freedombox: package-contains-documentation-outside-usr-share-doc [usr/share/plinth/static/jslicense.html]
freedombox: package-contains-documentation-outside-usr-share-doc [usr/lib/python3/dist-packages/plinth-*.dist-info/top_level.txt]
# This executable is meant to executed from systemd service file and is not
# meant for user. However, don't install to /usr/libexec and follow systemd
# convention instead.
freedombox: executable-in-usr-lib [usr/lib/freedombox/freedombox-privileged]