mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Makefile: Move most of the provision process into build system
Tests: - Performing a fresh container setup works. - Performing a fresh VM setup works. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
808380ff52
commit
ba55d8fe2e
3 files changed
+35
-34
No files matched your search
@@ -127,4 +127,35 @@ clean:
|
||||
rm -rf Plinth.egg-info
|
||||
find plinth/locale -name *.mo -delete
|
||||
|
||||
.PHONY: update-translations configure build install check clean
|
||||
# Run basic setup for a developer environment (VM or container)
|
||||
provision-dev:
|
||||
# Install newer build dependencies if any
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get build-dep --yes .
|
||||
|
||||
# Install latest code over .deb
|
||||
$(MAKE) build install
|
||||
|
||||
# Reload newer systemd units, ignore failure
|
||||
-systemctl daemon-reload
|
||||
|
||||
# Stop any ongoing upgrade, ignore failure
|
||||
-killall -9 unattended-upgr
|
||||
|
||||
# Fix any broken packages
|
||||
dpkg --configure -a
|
||||
apt-get -f install
|
||||
apt-get update
|
||||
|
||||
# Install new packages needed by essential apps. Don't uninstall
|
||||
# freedombox in case new dependencies conflict with old dependencies
|
||||
apt-mark hold freedombox
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --no-upgrade --yes \
|
||||
$$(sudo -u plinth ./run --develop --list-dependencies)
|
||||
apt-mark unhold freedombox
|
||||
|
||||
# Install additional packages
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes ncurses-term \
|
||||
sshpass bash-completion
|
||||
|
||||
.PHONY: update-translations configure build install check clean provision
|
||||
Reference in new issue
Block a user