borgbase / ansible-role-borgbackup

Ansible role to set up Borg and Borgmatic
MIT License
221 stars 98 forks source link

/usr/local/bin/borgmatic calls itself recursively on Fedora #74

Closed Ramblurr closed 3 years ago

Ramblurr commented 3 years ago

Problem

/usr/local/bin/borgmatic calls itself recursively on Fedora systems

Explanation

This commit has introduced a bug on Fedora systems (and possibly Fedora derivatives like CentOs)

https://github.com/borgbase/ansible-role-borgbackup/commit/b99de011fc040afe3f6c8045f155168f7402707b

For Fedora systems borg_python_packages is not defined, so the pip install never happens.

This results in the first borgmatic in PATH being /usr/local/bin/borgmatic, so when the script calls borgmatic it calls itself.

It seems that Fedora was forgotten when the switch from distro packages to pip occurred, as on Fedora the distro package is still installed.

Proposed Solutions

One solution is to simply define the proper borg_python_packages so that the pip install occurs.

However I want to push back against the "always install from pip" behavior.

Some of use prefer using distro packages when available. Eventually I'd like to see that as an option, but for now I'll create a PR that correctly installs on fedora systems.

Ramblurr commented 3 years ago

I see that a PR for fixing the bug directly already exists:

https://github.com/borgbase/ansible-role-borgbackup/pull/71

However the PR seems old and stale.