Skip to content

Commit

Permalink
borgbackup: deprecate due to FUSE Requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchang committed Nov 11, 2020
1 parent 4ffaa3e commit 8c2f17e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Formula/borgbackup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Borgbackup < Formula
license "BSD-3-Clause"
revision 1

deprecate! because: "requires FUSE"

livecheck do
url "https://github.com/borgbackup/borg/releases/latest"
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
Expand Down

7 comments on commit 8c2f17e

@fjarlq
Copy link

@fjarlq fjarlq commented on 8c2f17e Nov 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to @ncw's observation that FUSE is optional in rclone, FUSE is an optional dependency of borgbackup. Borg is a fully functional backup utility without its mount support. I expect far more people will complain about the disappearance of borgbackup from Homebrew than will complain about the disappearance of mount from borgbackup.

@darthShadow, perhaps you would be interested in including borgbackup in your discussion about dropping mount support from rclone?

@darthShadow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I don't use borgbackup and am also not at all familiar with the code so I am not comfortable making or suggesting changes to fix this. Perhaps you could create an issue on their tracker and see if anyone is willing to pick it up?

@rfrancoise
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it just work if you remove the llfuse and osxfuse references from the formula? FUSE has always been optional in Borg...

@ThomasWaldmann any comments?

@ThomasWaldmann
Copy link

@ThomasWaldmann ThomasWaldmann commented on 8c2f17e Nov 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All borg functions except borg mount work without FUSE.

So, homebrew does not need to change anything:

  • people who do not have "FUSE for macOS" (aka osxfuse) or llfuse installed will still have working backups and restores
  • people who have installed that (from other sources) will automatically also have a working borg mount

(I am the borgbackup maintainer, btw.)

@fjarlq
Copy link

@fjarlq fjarlq commented on 8c2f17e Nov 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasWaldmann I don't have much experience fixing Homebrew packages, but what you've said doesn't seem to be true, because:

  1. When I remove all FUSE-related references from Homebrew's borgbackup formula, borg sucessfully builds but borg mount complains that it can't find llfuse even though I've manually installed the module with pip3 install llfuse. Looks like Homebrew's installation of borg can only see python packages that have been installed into its virtualenv:
    $ borg mount $BORG_REPO test-borg
    borg mount not available: loading FUSE support failed [ImportError: No module named 'llfuse']
  1. When I remove only the osxfuse dependency from Homebrew's borgbackup formula, while leaving the llfuse resource, it fails to build because llfuse requires the "fuse" package which comes with osxfuse:
    ==> /usr/local/Cellar/borgbackup/1.1.14_1/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/borgbackup--llfuse-20201122-84906-1152kxr/llfuse-1.3.8
    Using pip 20.2.4 from /usr/local/Cellar/borgbackup/1.1.14_1/libexec/lib/python3.9/site-packages/pip (python 3.9)
    Non-user install because user site-packages disabled
    Created temporary directory: /private/tmp/pip-ephem-wheel-cache-39qa4l9s
    Created temporary directory: /private/tmp/pip-req-tracker-kgwq2s3p
    Initialized build tracking at /private/tmp/pip-req-tracker-kgwq2s3p
    Created build tracker: /private/tmp/pip-req-tracker-kgwq2s3p
    Entered build tracker: /private/tmp/pip-req-tracker-kgwq2s3p
    Created temporary directory: /private/tmp/pip-install-701fmrpb
    Processing /private/tmp/borgbackup--llfuse-20201122-84906-1152kxr/llfuse-1.3.8
      Created temporary directory: /private/tmp/pip-req-build-wdpr0y3s
      Added file:///private/tmp/borgbackup--llfuse-20201122-84906-1152kxr/llfuse-1.3.8 to build tracker '/private/tmp/pip-req-tracker-kgwq2s3p'
        Running setup.py (path:/private/tmp/pip-req-build-wdpr0y3s/setup.py) egg_info for package from file:///private/tmp/borgbackup--llfuse-20201122-84906-1152kxr/llfuse-1.3.8
        Created temporary directory: /private/tmp/pip-pip-egg-info-h3udxfyx
        Running command python setup.py egg_info
        Package fuse was not found in the pkg-config search path.
        Perhaps you should add the directory containing `fuse.pc'
        to the PKG_CONFIG_PATH environment variable
        No package 'fuse' found
    ERROR: No .egg-info directory found in /private/tmp/pip-pip-egg-info-h3udxfyx

@jonchang
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Folks, suggest you move to a discussion at https://github.com/homebrew/discussions/discussions. You are of course welcome to continue talking here but it's unlikely that anyone except me and the people pinged will see this.

That being said, the diagnosed problem is exactly why I deprecated these formulae without attempting to get these "optional" fuse features to work. Formulae with optional fuse features will still probably need the fuse headers and libraries to at least compile. Homebrew migrated nearly all XQuartz formulae to brewed X11 without distributing an X display server, because the needed libraries built on macOS more or less without modification. That is not gonna be the case with libfuse, as to my knowledge, the macOS changes haven't been upstreamed. This is going to be a requirement for shipping libfuse for macOS in Homebrew/core, as the Homebrew maintainers won't distribute the osxfuse fork of libfuse because it does not have stable releases and is not the canonical upstream.

The easiest solution to this is also the one I suggested in the original issue, which is to maintain a fuse tap which uses a osxfuse cask Requirement. The harder solution is to work with the libfuse maintainers upstream the osxfuse changes and get it to build on macOS without patches.

@ThomasWaldmann
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fjarlq I am not a macOS (and neither a brew) user.

So if brew is doing anything special (like using a separate virtual env for itself), that needs to be considered of course.

And yes, if you remove osxfuse requirement from brew package, you also need to remove llfuse requirement.

What I meant with "no change needed" was the deprecation (and that borg happily works without fuse / llfuse also, except the borg mount subcommand).

Please sign in to comment.