Git Product home page Git Product logo

homebrew-tap's Introduction

CryFS

CryFS encrypts your files, so you can safely store them anywhere. It works well together with cloud services like Dropbox, iCloud, OneDrive and others. See https://www.cryfs.org.

Install latest release

Linux

CryFS is available through apt, but depending on which version of Ubuntu or Debian you're using, you may get an old version.

sudo apt install cryfs

The following should work on Arch and Arch-based distros:

sudo pacman -S cryfs

If you use homebrew-core, using the following instruction you should be able to install CrysFS:

brew install cryfs/tap/cryfs

Additionally, the following would work for any Linux distro with the Nix package manager:

nix-env -iA nixpkgs.cryfs

OSX

CryFS is distributed via Homebrew, MacPorts, and Nix.

If you use Homebrew:

brew install --cask macfuse
brew install cryfs/tap/cryfs

If you use MacPorts:

port install cryfs

For Nix, the macOS build for cryfs is available in the Nixpkgs channel 21.05 and later:

brew install --cask macfuse # or download from https://osxfuse.github.io/
nix-env -iA nixpkgs.cryfs

Windows (experimental)

CryFS has experimental Windows support since the 0.10 release series. To install it, do:

  1. Install DokanY
  2. Install Microsoft Visual C++ Redistributable for Visual Studio 2019
  3. Install CryFS

GUI

There are some GUI applications with CryFS support. You usually have to install the GUI and also CryFS itself for it to work.

Stability / Production readiness

CryFS 0.10 or later is stable for most use cases, but has a couple of known issues that can corrupt your file system. They don't happen in normal day to day use, but can happen if you don't pay attention or aren't aware of them. This is why the version number hasn't reached 1.0 yet.

  • If you kill the CryFS process while it was in the middle of writing data (either intentionally or unintentionally by losing power to your PC), your file system could get corrupted. CryFS does not do journaling. Note that in 0.10.x, read accesses into a CryFS file system can cause writes because file timestamps get updated. So if you're unlucky, your file system could get corrupted if you lose power while you were reading files as well. Read accesses aren't an issue in CryFS 0.11.x anymore, because it mounts the filesystem with noatime by default.
  • The same corruption mentioned above can happen when CryFS is trying to write data but your disk ran out of space, causing the write to fail.
  • CryFS does not currently support concurrent access, i.e. accessing a file system from multiple devices at the same time. CryFS works very well for storing data in a cloud and using it from multiple devices, but you need to make sure that only one CryFS process is active at any point in time, and you also need to make sure that the cloud synchronization client (e.g. Dropbox) finishes its synchronization before you switch devices. There are some ideas on how concurrent access could be supported in future versions, but it's a hard problem to solve. If you do happen to access the file system from multiple devices at the same time, it will likely go well most of the time, but it can corrupt your file system.
  • In addition to the scenarios above that can corrupt your file system, note that there is currently no fsck-like tool for CryFS that could recover your data. Although such a tool is in theory, possible, it hasn't been implemented yet and a corrupted file system will most likely cause a loss of your data.

If the scenarios mentioned above don't apply to you, then you can consider CryFS 0.10.x as stable. The 0.9.x versions are not recommended anymore.

Building from source

Requirements

  • Git (for getting the source code)
  • GCC version >= 7 or Clang >= 7
  • CMake version >= 3.10
  • pkg-config (on Unix)
  • Conan package manager (version 1.x)
  • libFUSE version >= 2.9 (including development headers), on Mac OS X instead install macFUSE from https://osxfuse.github.io/
  • Python >= 3.5
  • OpenMP

You can use the following commands to install these requirements

    # Ubuntu
    $ sudo apt install git g++ cmake make pkg-config libfuse-dev python3 python3-pip
    $ sudo pip3 install conan==1.60.1

    # Fedora
    $ sudo dnf install git gcc-c++ cmake make pkgconf fuse-devel python3 python3-pip
    $ sudo pip3 install conan==1.60.1

    # Macintosh
    $ brew install cmake pkg-config libomp macfuse
    $ sudo pip3 install conan==1.60.1

Build & Install

  1. Clone repository

    $ git clone https://github.com/cryfs/cryfs.git cryfs
    $ cd cryfs
    
  2. Build

    $ mkdir build && cd build
    $ cmake ..
    $ make
    
  3. Install

    $ sudo make install
    

You can pass the following variables to the cmake command (using -Dvariablename=value):

  • -DCMAKE_BUILD_TYPE=[Release|Debug]: Whether to run code optimization or add debug symbols. Default: Release
  • -DBUILD_TESTING=[on|off]: Whether to build the test cases (can take a long time). Default: off
  • -DCRYFS_UPDATE_CHECKS=off: Build a CryFS that doesn't check online for updates and security vulnerabilities.

Building on Windows (experimental)

  1. Install conan. If you want to use "pip install conan", you may have to install Python first.
  2. Install DokanY 2.0.6.1000. Other versions may not work.
  3. Run CMake to generate Visual Studio 2019 project files (this may not be necessary, but it makes sure everything works as expected and you can see potential errors happening during this step)

$ mkdir build && cd build $ cmake .. -G "Visual Studio 16 2019" -DDOKAN_PATH=[dokan library location, e.g. "C:\Program Files\Dokan\DokanLibrary-2.0.6"]

  1. Potentially modify CMakeSettings.json file to fit your needs
  2. Open the cryfs source folder with Visual Studio 2019, or alternatively build on command line using

$ cd build && cmake --build . --config RelWithDebInfo

Troubleshooting

On most systems, CMake should find the libraries automatically. However, that doesn't always work.

  1. Fuse library not found

    Pass in the library path with

     PKG_CONFIG_PATH=/path-to-fuse-or-macFUSE/lib/pkgconfig cmake ..
    
  2. Fuse headers not found

    Pass in the include path with

     PKG_CONFIG_PATH=/path-to-fuse-or-macFUSE/lib/pkgconfig cmake ..
    
  3. Openssl headers not found

    Pass in the include path with

     cmake .. -DCMAKE_C_FLAGS="-I/path/to/openssl/include"
    
  4. OpenMP not found (osx)

    Either build it without OpenMP

     cmake .. -DDISABLE_OPENMP=on
    

    but this will cause slower file system mount times (performance after mounting will be unaffected). If you installed OpenMP with homebrew or macports, it will be autodetected. If that doesn't work for some reason (or you want to use a different installation than the autodetected one), pass in these flags:

     cmake .. -DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I/path/to/openmp/include' -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY=/path/to/libomp.dylib
    

Using local dependencies

Starting with CryFS 0.11, Conan is used for dependency management. When you build CryFS, Conan downloads the exact version of each dependency library that was also used for development. All dependencies are linked statically, so there should be no incompatibility with locally installed libraries. This is the recommended way because it has the highest probability of working correctly.

However, some distributions prefer software packages to be built against dependencies dynamically and against locally installed versions of libraries. So if you're building a package for such a distribution, you have the option of doing that, at the cost of potential incompatibilities. If you follow this workflow, please make sure to extensively test your build of CryFS. You're using a setup that wasn't tested by the CryFS developers.

To use local dependencies, you need to tell the CryFS build how to get these dependencies. You can do this by writing a small CMake configuration file and passing it to the CryFS build using -DDEPENDENCY_CONFIG=filename. This configuration file needs to define a cmake target for each of the dependencies.

Here's an example config file that gets the dependencies from conan. And here's another example config file that works for getting dependencies that are locally installed in Ubuntu. You can create your own configuration file to tell the build how to get its dependencies and, for example, mix and match. Get some dependencies from Conan and others from the local system.

Creating .deb and .rpm packages

It is recommended to install CryFS using packages, because that allows for an easy way to uninstall it again once you don't need it anymore.

If you want to create a .rpm package, you need to install rpmbuild.

  1. Clone repository

    $ git clone https://github.com/cryfs/cryfs.git cryfs
    $ cd cryfs
    
  2. Build

    $ mkdir cmake && cd cmake
    $ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=off
    $ make package
    

Disclaimer

In the event of a password leak, you are strongly advised to create a new filesystem and copy all the data over from the previous one. Then, remove all copies of the compromised filesystem and config file(e.g, from the "previous versions" feature of your cloud system) to prevent access to the key (and, as a result, your data) using the leaked password.

homebrew-tap's People

Contributors

smessmer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mtomczynski

homebrew-tap's Issues

Can't install cryfs 0.11.1 on Monterey - Cmake did not find OpenMP.

Fresh monterey on Apple M1, I cannot install cryfs. I've also tried reinstalling libomp.

brew install cryfs/tap/cryfs                                          
==> Downloading https://ghcr.io/v2/homebrew/core/libffi/manifests/3.4.2
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/1fcd5858590a42dc0fad3ce5012bdc2be712f542cdc9763c9289d2ec9efd4b61--libffi-3.4.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libffi/blobs/sha256:6a3605cff71
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/24d861b405e3f34950d1c1cb3ac9820b87a155860d4c001c2a9f86e8b986cc1c--libffi--3.4.2.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/manifests/1.22
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/e8b58066428135b278689a186abeaae951e5816cd8204e57b85c80b41adb13cc--gdbm-1.22.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/blobs/sha256:25cfaedb0fd8f
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/79cddbc71979a3749644a793e742326f5ae03b943ba6137c38540d4199c1409a--gdbm--1.22.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/mpdecimal/manifests/2.5.1
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/f367c2ee08c56b88be0662703a8e4275f8657608a268c8c44e845154b0cea543--mpdecimal-2.5.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/mpdecimal/blobs/sha256:726e8ec0
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/ffb0c2f865ae1dafbb01e2e7d9772cf80bfaa1d725ec77730d2c3523eef8c6d0--mpdecimal--2.5.1.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.2.5
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/9447dbb900ef03dd46277002d89d92c65920edee6c60ea22c33be6cf99d01dc6--xz-5.2.5.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/xz/blobs/sha256:fcda3e81efe284f
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/64dbe71f9204854898c794b9e289f4f607c483ef4d18e627b2b910c60fbb32fe--xz--5.2.5.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.10/manifests/3.10.1
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/ba44b4cfaec4b0996a8fc2b2def6f21371f8c859781b668a30ceb2e6f4bbf3be--python@3.10-3.10.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:610ffb
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/9f33296799fb0f3d8dc0e02e5a3f0248cc3f930fecbe9d5484feebad2976e337--python@3.10--3.10.1.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/six/manifests/1.16.0_2-1
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/da758f292f24fca4cc0e2176b5f4c778e5482fc66c144f637e4c3c23a7b6aaa6--six-1.16.0_2-1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/six/blobs/sha256:560f73cafaea61
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/b92bf7290f3bb55c674acf9d90729b6048e8c847703cdffc737e4e4eb9c59882--six--1.16.0_2.all.bottle.1.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/conan/manifests/1.44.0
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/736afed90004c510df0840a9560cd25eaf4f76a869bf7d9e649e1c8a34cc5d71--conan-1.44.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/conan/blobs/sha256:e886809cb3ae
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/4b351fd2db60b35b6457688d5b449e04f2942d6911e18336e04c78c623fefdd4--conan--1.44.0.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/ninja/manifests/1.10.2_1
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/3d885b06ee8943649e1e4f3edebcca2003dc2e9e332202cc2a0b16ccce4f8cae--ninja-1.10.2_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/ninja/blobs/sha256:8efac5a9c8b7
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/deb592b6fb7dd715b57a170608e055406d978bbc68c284ffa7ecef67acef899a--ninja--1.10.2_1.arm64_monterey.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/manifests/0.29.2_3
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/ac691fc7ab8ecffba32a837e7197101d271474a3a84cfddcc30c9fd6763ab3c6--pkg-config-0.29.2_3.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/blobs/sha256:2af9bce
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/733b30dce1aac09a672845fb0d3c4c5dd29f2f6ea9a1868688689f0acf21755f--pkg-config--0.29.2_3.arm64_monterey.bottle.tar.gz
==> Downloading https://github.com/cryfs/cryfs/releases/download/0.11.1/cryfs-0.
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/0715d38efe3e320b77523b92c338b566fa5648178219391e3b2c885a1d74477d--cryfs-0.11.1.tar.xz
==> Installing cryfs from cryfs/tap
==> Installing dependencies for cryfs/tap/cryfs: libffi, gdbm, mpdecimal, xz, [email protected], six, conan, ninja and pkg-config
==> Installing cryfs/tap/cryfs dependency: libffi
==> Pouring libffi--3.4.2.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/libffi/3.4.2: 17 files, 673.3KB
==> Installing cryfs/tap/cryfs dependency: gdbm
==> Pouring gdbm--1.22.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/gdbm/1.22: 24 files, 1MB
==> Installing cryfs/tap/cryfs dependency: mpdecimal
==> Pouring mpdecimal--2.5.1.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/mpdecimal/2.5.1: 71 files, 2.2MB
==> Installing cryfs/tap/cryfs dependency: xz
==> Pouring xz--5.2.5.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/xz/5.2.5: 95 files, 1.4MB
==> Installing cryfs/tap/cryfs dependency: [email protected]
==> Pouring [email protected]_monterey.bottle.tar.gz
==> /opt/homebrew/Cellar/[email protected]/3.10.1/bin/python3 -m ensurepip
==> /opt/homebrew/Cellar/[email protected]/3.10.1/bin/python3 -m pip install -v --no-d
๐Ÿบ  /opt/homebrew/Cellar/[email protected]/3.10.1: 3,134 files, 57.9MB
==> Installing cryfs/tap/cryfs dependency: six
==> Pouring six--1.16.0_2.all.bottle.1.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/six/1.16.0_2: 20 files, 122.3KB
==> Installing cryfs/tap/cryfs dependency: conan
==> Pouring conan--1.44.0.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/conan/1.44.0: 1,572 files, 18MB
==> Installing cryfs/tap/cryfs dependency: ninja
==> Pouring ninja--1.10.2_1.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/ninja/1.10.2_1: 10 files, 388KB
==> Installing cryfs/tap/cryfs dependency: pkg-config
==> Pouring pkg-config--0.29.2_3.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/pkg-config/0.29.2_3: 11 files, 676.4KB
==> Installing cryfs/tap/cryfs
==> cmake . -GNinja -DBUILD_TESTING=off
Last 15 lines from /Users/x/Library/Logs/Homebrew/cryfs/01.cmake:
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
CMake Error at vendor/cryptopp/vendor_cryptopp/CMakeLists.txt:1173 (message):
  OpenMP: Did not find OpenMP.  Build without USE_OPENMP if you want to allow
  this.


-- Configuring incomplete, errors occurred!
See also "/tmp/cryfs-20211230-25970-1fdr1s0/CMakeFiles/CMakeOutput.log".
See also "/tmp/cryfs-20211230-25970-1fdr1s0/CMakeFiles/CMakeError.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/cryfs/homebrew-tap/issues

brew reinstall libomp                                                                                                    
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/manifests/13.0.0
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/e5d1162de21152d4e8edcdcad88daf8290f53769dd8c7677d94025982d5594fc--libomp-13.0.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/blobs/sha256:2a7253a4e9ff0ed48b1ea2cf98f953d17a28037ce3b9cbfb22c0c733918e22
Already downloaded: /Users/x/Library/Caches/Homebrew/downloads/23065afe04a7593ccae727b6178a684abb78c6f38179096dd70ed6ff50e8c4c2--libomp--13.0.0.arm64_monterey.bottle.tar.gz
==> Reinstalling libomp
==> Pouring libomp--13.0.0.arm64_monterey.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/libomp/13.0.0: 9 files, 1.6MB
==> Running `brew cleanup libomp`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Conan build profile doesn't exist

I'm encountering an issue when installing cryfs on my M1 Mac

$ brew install cryfs/tap/cryfs
-- Conan executing: /opt/homebrew/bin/conan install /tmp/cryfs-20230417-17256-9mkzb2/conanfile.py --build missing --settings build_type=Release --settings compiler=apple-clang --settings compiler.version=14.0 --settings compiler.libcxx=libc++
ERROR: The default build profile '/private/tmp/cryfs-20230417-17256-9mkzb2/.brew_home/.conan2/profiles/default' doesn't exist.
You need to create a default profile (type 'conan profile detect' command)
or specify your own profile with '--profile:build=<myprofile>'
CMake Error at cmake-utils/conan.cmake:633 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  cmake-utils/DependenciesFromConan.cmake:4 (conan_cmake_install)
  CMakeLists.txt:47 (include)

Running conan profile detect doesn't help since it seems to need a profile relative to CryFs

No such file or directory - versioneer error.

Mac OS version: 12.3.1
cryfs version: 11.2

โฏ brew install cryfs/tap/cryfs
==> Downloading https://github.com/cryfs/cryfs/releases/download/0.11.2/cryfs-0.11.2.tar.xz
Already downloaded: /Users/kapil/Library/Caches/Homebrew/downloads/9dc7238113b42752def2773c94a3e21cd132b0bccba20d0fd6bfe34f9a84f648--cryfs-0.11.2.tar.xz
==> Installing cryfs from cryfs/tap
==> cmake . -GNinja -DBUILD_TESTING=off
Last 15 lines from /Users/kapil/Library/Logs/Homebrew/cryfs/01.cmake:
-- Compiler: /opt/homebrew/Library/Homebrew/shims/mac/super/clang++
-- Compiler options:
-- Compiler definitions:
-- Build type: Release
-- Building version
CMake Error at src/gitversion/gitversion.cmake:13 (MESSAGE):
Error running versioneer. Return code is: No such file or directory, error
message is:
Call Stack (most recent call first):
src/gitversion/CMakeLists.txt:4 (get_git_version)

-- Configuring incomplete, errors occurred!
See also "/tmp/cryfs-20220409-19009-hp1r2m/CMakeFiles/CMakeOutput.log".
See also "/tmp/cryfs-20220409-19009-hp1r2m/CMakeFiles/CMakeError.log".

Cmake log file is attached. If anyone can make sense of it, it would be helpful. Error's at line 295
01.cmake.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.