浏览代码

Merge pull request #8045 from ThomasWaldmann/brewfile-1.4

Create and use Brewfile (1.4-maint)
TW 1 年之前
父节点
当前提交
5b77bfef06
共有 3 个文件被更改,包括 23 次插入14 次删除
  1. 1 5
      .github/workflows/ci.yml
  2. 12 0
      Brewfile
  3. 10 9
      docs/installation.rst

+ 1 - 5
.github/workflows/ci.yml

@@ -99,11 +99,7 @@ jobs:
 
     - name: Install macOS packages
       if: ${{ runner.os == 'macOS' }}
-      run: |
-        brew install pkg-config || brew upgrade pkg-config
-        brew install zstd || brew upgrade zstd
-        brew install lz4 || brew upgrade lz4
-        brew install openssl@1.1 || brew upgrade openssl@1.1
+      run: brew bundle install
 
     - name: Install Python requirements
       run: |

+ 12 - 0
Brewfile

@@ -0,0 +1,12 @@
+brew 'pkg-config'
+brew 'zstd'
+brew 'lz4'
+brew 'xxhash'
+brew 'openssl@1.1'
+
+# osxfuse (aka macFUSE) is only required for "borg mount",
+# but won't work on github actions' workers.
+# it requires installing a kernel extension, so some users
+# may want it and some won't.
+
+#cask 'osxfuse'

+ 10 - 9
docs/installation.rst

@@ -247,16 +247,10 @@ Alternatively, you can enumerate all build dependencies in the command line::
 macOS
 +++++
 
-When installing via Homebrew_, dependencies are installed automatically. To install
-dependencies manually::
+When installing borgbackup via Homebrew_, the basic dependencies are installed automatically.
 
-    brew install python3 openssl zstd lz4 xxhash
-    brew install pkg-config
-    pip3 install virtualenv pkgconfig
-
-For FUSE support to mount the backup archives, you need at least version 3.0 of
-macFUSE, which is available via `github
-<https://github.com/osxfuse/osxfuse/releases/latest>`__, or Homebrew::
+For FUSE support to mount the backup archives, you need macFUSE, which is available
+via `github <https://github.com/osxfuse/osxfuse/releases/latest>`__, or Homebrew::
 
     brew install --cask macfuse
 
@@ -266,6 +260,13 @@ the installed ``openssl`` formula, point pkg-config to the correct path::
 
     PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" pip install borgbackup[llfuse]
 
+When working from a borg git repo workdir, you can install dependencies using the
+Brewfile::
+
+    brew install python@3.11  # can be any supported python3 version
+    brew bundle install  # install requirements from borg repo's ./Brewfile
+    pip3 install virtualenv pkgconfig
+
 Be aware that for all recent macOS releases you must authorize full disk access.
 It is no longer sufficient to run borg backups as root. If you have not yet
 granted full disk access, and you run Borg backup from cron, you will see