rfjakob / gocryptfs

Encrypted overlay filesystem written in Go
https://nuetzlich.net/gocryptfs/
MIT License
3.57k stars 253 forks source link

Mac OS X support #15

Closed rfjakob closed 7 years ago

rfjakob commented 8 years ago

Go support Mac OS X, as does the FUSE library we use, go-fuse.

gocrypts may actually work out of the box on OSX, but there probably are small issues that have to be sorted out.

At the very least, gocryptfs has to be tested on OSX. As I do not have a Mac to test on, this would be an opportunity for somebody from the Mac community to step up. Please comment here if you are interested.

agarbato commented 5 years ago

Just updated my macos to Catalina and gocryptfs does not work anymore :-( gocryptfs installed with brew. Used to work before the update.

➜ ~ gocryptfs src dest Password: Decrypting master key fuse.NewServer failed: exit status 2 Maybe you should run: /Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse

agarbato commented 5 years ago

I got it fixed after installing osxfuse. I guess the update deleted it? brew cask install osxfuse

ijoseph commented 4 years ago

Seconding @agarbato . Stopped working when I updated to Catalina.brew install gocryptfs didn't do anything (even when I forced a reinstall). However, brew cask install osxfuse fixed it.

Jumanjii commented 3 years ago

For those that already had fuse installed before, doing brew reinstall osxfuse solved the issue in my case.

cocoonkid commented 3 years ago
brew install gocryptfs
Error: gocryptfs has been disabled because it requires FUSE!

But I have macFUSE installed 4.10 @ BigSour.

What could the issue be?

JayBrown commented 3 years ago

macFUSE is closed source, and therefore Homebrew is blocking all formulae that depend on it.

alexanderharm commented 3 years ago

This could be fixed, see e. g. https://github.com/borgbackup/homebrew-tap/blob/master/Formula/borgbackup-fuse.rb, no?

Unfortunately this requires maintaining your own tap. So if you create a repo named homebrew-gocryptfs I could submit a pr.

cocoonkid commented 3 years ago

@JayBrown thank you for the explanation.

rfjakob commented 3 years ago

Excuse my ignorance, but doesn't homebrew also include lots of closed-source stuff like Microsoft Office?

cocoonkid commented 3 years ago

@rfjakob yes as casks. most recent command e.g. brew install --cask <appname>

rfjakob commented 3 years ago

Ok. I see that macfuse is available as a cask: https://formulae.brew.sh/cask/macfuse So if gocryptfs becomes a cask that would solve the problem?

JayBrown commented 3 years ago

Yes, that would probably work. But I assume you would need to pre-build gocryptfs for macOS then… as a Universal 2 binary for arm64 & x86_64.

litori commented 3 years ago

Anyway we can get gocryptfs to work with Macfuse 4.1 for the M1? We have no way to use the old osxfuse since Big Sur does not support it.

dsuievalov commented 3 years ago

@litori

  1. Install Macfuse
  2. Install go
  3. Download / Clone this repository
  4. Run bash ./build-without-openssl.bash which will produce the gocryptfs binary without openssl libs support (bad performance on M1);
  5. Add ${HOME}/go/bin/gocryptfs to your PATH variable: PATH="${PATH}:${HOME}/go/bin/gocryptfs"

More details in a correspondence - https://github.com/rfjakob/gocryptfs/issues/556

MarcelBochtler commented 3 years ago

gocryptfs can now also be installed using MacPorts. It installs macfuse and macports (by default without openssl) for you.

sudo port install gocryptfs

This should work out of the box for Intel as well as for M1 Macs.

AlexBasile123 commented 2 years ago

M1 has an issue w/ pandoc dependency. Please advise.

% sudo port install gocryptfs Password: ---> Computing dependencies for gocryptfs Error: Cannot install gocryptfs for the arch 'arm64' because Error: its dependency pandoc only supports the arch 'x86_64'. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port gocryptfs failed

rfjakob commented 2 years ago

pandoc is only needed to generate the man page, gocryptfs itself does not need it

MarcelBochtler commented 2 years ago

M1 has an issue w/ pandoc dependency. Please advise.

Hi @AlexBasile123, unfortunately pandoc does not provide an arm64 release yet (See: https://github.com/jgm/pandoc/issues/6960) I'll look into the gocryptfs port to remove the dependency for M1 Macs for now.

MarcelBochtler commented 2 years ago

Fixed the build for M1 Macs. See: https://github.com/macports/macports-ports/pull/13069

AlexBasile123 commented 2 years ago

pandoc is only needed to generate the man page, gocryptfs itself does not need it

Thanks @rfjakob for quick feedback!

AlexBasile123 commented 2 years ago

Thanks @MarcelBochtler for getting the fix out so quickly! The change is working on M1 now