mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-29 11:16:43 +00:00
Merge pull request #6052 from stephengroat/patch-1
Create and use Brewfile
This commit is contained in:
commit
2787da205c
4 changed files with 31 additions and 15 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -160,12 +160,7 @@ jobs:
|
|||
${{ runner.os }}-
|
||||
|
||||
- name: Install macOS packages
|
||||
run: |
|
||||
brew install pkg-config || brew upgrade pkg-config
|
||||
brew install zstd || brew upgrade zstd
|
||||
brew install lz4 || brew upgrade lz4
|
||||
brew install xxhash || brew upgrade xxhash
|
||||
brew install openssl@1.1 || brew upgrade openssl@1.1
|
||||
run: brew bundle install
|
||||
|
||||
- name: Install Python requirements
|
||||
run: |
|
||||
|
|
12
Brewfile
Normal file
12
Brewfile
Normal file
|
@ -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'
|
|
@ -127,6 +127,7 @@ e.g. 1.4.x).
|
|||
|
||||
Start by checking out the appropriate branch:
|
||||
::
|
||||
|
||||
git checkout master
|
||||
|
||||
It is best practice for a developer to keep local ``master`` branch as an
|
||||
|
@ -140,16 +141,19 @@ only to ``master``.
|
|||
|
||||
Thus, create a new branch now:
|
||||
::
|
||||
|
||||
git checkout -b MYCONTRIB-master # choose an appropriate own branch name
|
||||
|
||||
Now, work on your contribution in that branch. Use these git commands:
|
||||
::
|
||||
|
||||
git status # is there anything that needs to be added?
|
||||
git add ... # if so, add it
|
||||
git commit # finally, commit it. use a descriptive comment.
|
||||
|
||||
Then push the changes to your Github repository:
|
||||
::
|
||||
|
||||
git push --set-upstream origin MYCONTRIB-master
|
||||
|
||||
Finally, make a pull request on ``borgbackup/borg`` Github repository against
|
||||
|
@ -170,6 +174,7 @@ Next, check out the ``master`` branch again. Find the commit hash of the last
|
|||
commit that was made before you started working on your contribution and perform
|
||||
a hard reset.
|
||||
::
|
||||
|
||||
git checkout master
|
||||
git log
|
||||
git reset --hard THATHASH
|
||||
|
@ -177,6 +182,7 @@ a hard reset.
|
|||
Then, update the local ``master`` branch with changes made in the upstream
|
||||
repository.
|
||||
::
|
||||
|
||||
git pull borg master
|
||||
|
||||
Rebase feature branch onto updated master branch
|
||||
|
@ -185,6 +191,7 @@ Rebase feature branch onto updated master branch
|
|||
After updating the local ``master`` branch from upstream, the feature branch
|
||||
can be checked out and rebased onto (the now uptodate) ``master`` branch.
|
||||
::
|
||||
|
||||
git checkout MYCONTRIB-master
|
||||
git rebase -i master
|
||||
|
||||
|
@ -192,6 +199,7 @@ Next, check if there are any commits that exist in the feature branch
|
|||
but not in the ``master`` branch and vice versa. If there are no
|
||||
conflicts or after resolving them, push your changes to your Github repository.
|
||||
::
|
||||
|
||||
git log
|
||||
git diff master
|
||||
git push -f
|
||||
|
|
|
@ -245,16 +245,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
|
||||
|
||||
|
@ -264,6 +258,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
|
||||
|
|
Loading…
Reference in a new issue