Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borgbackup: Make build on darwin possible #31707

Merged
merged 2 commits into from Nov 15, 2017
Merged

borgbackup: Make build on darwin possible #31707

merged 2 commits into from Nov 15, 2017

Conversation

mbld
Copy link

@mbld mbld commented Nov 15, 2017

Motivation for this change

The borgbackup package of the current master branch refuses to build on darwin because of some dependencies which are only available for the linux platform. These dependecies (acl and fuse) are optional for the borgbackup software. Therefore i removed them depending on the current platform.

After these changes the borgbackup package can be installed on darwin. But the removed llfuse package breaks features which rely on FUSE (only on darwin). Would be very cool to get them to work again but i am not very familiar with FUSE and the fuse package in nixpkgs. I am even not sure if it's possibile to get FUSE to work on darwin. But all other features seem to work fine and the software is very useful without it. Also the borgbackup folks themself say that it's ok to remove the fuse dependency if it's not avaiable, see: https://github.com/borgbackup/borg/blob/72232a9bd573aeb4818b36c9c8764b6008e9283e/setup.py#L32

Things done

Make acl and llfuse build inputs optional depending on current platform.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
    Completed without errors. Looks like nothing depends on it, only borgbackup itself was built.
  • Tested execution of all binary files (usually in ./result/bin/)
    As said before features which require FUSE support are broken on darwin, e.g. mounting a backup into filesystem with "borg mount /path/to/repo /path/to/mountpoint". Therefore i assume that "bin/borgfs" is also broken which is a wrapper around "borg mount" to use in the fstab.
  • Fits CONTRIBUTING.md.

cc @nckx @flokli

Martin Bornhold added 2 commits November 15, 2017 17:49
The acl libraray is only required by the borgbackup package if building on a
linux platform. Adding it only in this case should be fine. Also see the
conditional in the setup.py at [1].

[1] https://github.com/borgbackup/borg/blob/72232a9bd573aeb4818b36c9c8764b6008e9283e/setup.py#L768
The llfuse package depends on fuse which refuses to build on darwin. But
according to a comment in the setup.py of borgbackup [1] it's ok to leave it out
if it's not available. Most of borgbackup should work without it. Would be great
to make it work on darwin but i am not sure if it's possible to get fuse to work
on darwin. I do not know enough about it ;)

After this modification at least the "borg mount" subcommand is broken due to
the missing llfuse module. But the rest seems to work normally.

[1] https://github.com/borgbackup/borg/blob/72232a9bd573aeb4818b36c9c8764b6008e9283e/setup.py#L32
@Mic92
Copy link
Member

Mic92 commented Nov 15, 2017

@GrahamcOfBorg build borgbackup

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-darwin


Build finished. The manual pages are in _build/man.
make: Leaving directory '/private/tmp/nix-build-borgbackup-1.1.1.drv-0/borgbackup-1.1.1/docs'
post-installation fixup
gzipping man pages under /nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1/share/man/
stripping (with flags -S) in /nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1/lib  /nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1/bin
patching script interpreter paths in /nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1
wrapping `/nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1/bin/borg'...
wrapping `/nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1/bin/borgfs'...
/nix/store/g3d3hi8a4iijmm1pj4c0245msfrw7d0j-borgbackup-1.1.1

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

shrinking /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/lib/python3.6/site-packages/borg/compress.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/lib/python3.6/site-packages/borg/platform/posix.cpython-36m-x86_64-linux-gnu.so
shrinking /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/lib/python3.6/site-packages/borg/platform/linux.cpython-36m-x86_64-linux-gnu.so
gzipping man pages under /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/share/man/
stripping (with flags -S) in /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/lib  /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/bin 
patching script interpreter paths in /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1
checking for references to /tmp/nix-build-borgbackup-1.1.1.drv-0 in /nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1...
wrapping `/nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/bin/borg'...
wrapping `/nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1/bin/borgfs'...
/nix/store/a7lmwvpfpca0979fw6b27nvjsz6p8118-borgbackup-1.1.1

@FRidh FRidh merged commit 6deba8c into NixOS:master Nov 15, 2017
@mbld mbld deleted the darwin-borgbackup branch November 15, 2017 20:21
@ThomasWaldmann
Copy link

https://github.com/borgbackup/borg/blob/1.1-maint/Vagrantfile#L58

^ does that help for the fuse stuff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants