Skip to content

Latest commit

 

History

History
151 lines (105 loc) · 4.17 KB

INSTALL.md

File metadata and controls

151 lines (105 loc) · 4.17 KB

It is strongly recommended to download fwbackups from your package manager or by using an application distribution system like Flatpak, which will automatically include all dependencies.

If you wish to manually build and install fwbackups, read on.

Building fwbackups from source

Dependencies

If you do want to build from source, fwbackups uses the meson build system and requires:

  • Python 3
    • paramiko package
    • pygobject package
  • GTK 4
  • libadwaita 1.x
  • gettext
  • cronie (or any other cron service that provides crontab)
  • tar (archive engine) or rsync (direct copy engine) binaries on system $PATH

These packages can be installed on Fedora-based systems:

dnf install meson cronie rsync gettext gtk4 libadwaita adwaita-icon-theme python3-paramiko python3-gobject

On Ubuntu/Debian-based systems:

apt-get install meson cron rsync gettext gtk4 libadwaita-1-0 adwaita-icon-theme python3-paramiko python3-gi

On MacOS:

brew install meson rsync gettext gtk4 libadwaita adwaita-icon-theme pygobject3
python3 -m pip install paramiko

Try fwbackups (run from source)

If the above dependencies are installed, one can run fwbackups directly from the source tree without building:

python -m fwbackups

Note that any backups sets will not run as scheduled when fwbackups is run directly from source.

Build & install

fwbackups can be built and installed to your system with:

meson setup _build -Dpython.install_env=auto --prefix=/usr
meson install -C _build

Customized Python installations

On MacOS and systems with customized Python installations outside /usr, meson may incorrectly identify the installation path due to this issue.

In these situations, the force_system_python build option should be enabled to ensure the package folder for the detected python installation is used:

meson setup _build -Dpython.install_env=auto -Dforce_system_python=true
meson install -C _build

Installing Python packages

If you cannot install the Python packages with your OS package manger (e.g apt-get), it is recommended you setup a virtual environment to contain your dependencies.

poetry can be used to install them in a Python virtual environment:

python3 -m pip install -U poetry
poetry install

It may be useful to include your system site packages to avoid installing GTK4 bindings within the virtual environment (i.e. on MacOS, where GTK4 is provided via brew):

poetry config virtualenvs.options.system-site-packages true
poetry install

Run fwbackups from the virtual environment with:

poetry run python -m fwbackups

Troubleshooting

Poetry install hangs on package installation with 'pending'

Try disabling the experimental installer:

poetry config experimental.new-installer false

More details at poetry issue #3352.

Building flatpak

Setup the out-of-source build:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
mkdir -p _build_flatpak

Build and test the image locally:

flatpak-builder --user --install --force-clean _build_flatpak com.diffingo.fwbackups.json
flatpak run com.diffingo.fwbackups

Note if you have made local changes to the source code, they need to be committed in order for them to be included in the built flatpak.

Run the administrator GUI:

flatpak run com.diffingo.fwbackups

Run one of the CLI commands:

flatpak run com.diffingo.fwbackups --command=/bin/env -- fwbackups-run 'setname'