1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-01 12:45:34 +00:00

Merge pull request #6052 from stephengroat/patch-1

Create and use Brewfile
This commit is contained in:
TW 2024-01-14 19:49:28 +01:00 committed by GitHub
commit 2787da205c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 15 deletions

View file

@ -160,12 +160,7 @@ jobs:
${{ runner.os }}- ${{ runner.os }}-
- name: Install macOS packages - name: Install macOS packages
run: | run: brew bundle install
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
- name: Install Python requirements - name: Install Python requirements
run: | run: |

12
Brewfile Normal file
View 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'

View file

@ -127,6 +127,7 @@ e.g. 1.4.x).
Start by checking out the appropriate branch: Start by checking out the appropriate branch:
:: ::
git checkout master git checkout master
It is best practice for a developer to keep local ``master`` branch as an 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: Thus, create a new branch now:
:: ::
git checkout -b MYCONTRIB-master # choose an appropriate own branch name git checkout -b MYCONTRIB-master # choose an appropriate own branch name
Now, work on your contribution in that branch. Use these git commands: Now, work on your contribution in that branch. Use these git commands:
:: ::
git status # is there anything that needs to be added? git status # is there anything that needs to be added?
git add ... # if so, add it git add ... # if so, add it
git commit # finally, commit it. use a descriptive comment. git commit # finally, commit it. use a descriptive comment.
Then push the changes to your Github repository: Then push the changes to your Github repository:
:: ::
git push --set-upstream origin MYCONTRIB-master git push --set-upstream origin MYCONTRIB-master
Finally, make a pull request on ``borgbackup/borg`` Github repository against 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 commit that was made before you started working on your contribution and perform
a hard reset. a hard reset.
:: ::
git checkout master git checkout master
git log git log
git reset --hard THATHASH git reset --hard THATHASH
@ -177,6 +182,7 @@ a hard reset.
Then, update the local ``master`` branch with changes made in the upstream Then, update the local ``master`` branch with changes made in the upstream
repository. repository.
:: ::
git pull borg master git pull borg master
Rebase feature branch onto updated master branch 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 After updating the local ``master`` branch from upstream, the feature branch
can be checked out and rebased onto (the now uptodate) ``master`` branch. can be checked out and rebased onto (the now uptodate) ``master`` branch.
:: ::
git checkout MYCONTRIB-master git checkout MYCONTRIB-master
git rebase -i 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 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. conflicts or after resolving them, push your changes to your Github repository.
:: ::
git log git log
git diff master git diff master
git push -f git push -f

View file

@ -245,16 +245,10 @@ Alternatively, you can enumerate all build dependencies in the command line::
macOS macOS
+++++ +++++
When installing via Homebrew_, dependencies are installed automatically. To install When installing borgbackup via Homebrew_, the basic dependencies are installed automatically.
dependencies manually::
brew install python3 openssl zstd lz4 xxhash For FUSE support to mount the backup archives, you need macFUSE, which is available
brew install pkg-config via `github <https://github.com/osxfuse/osxfuse/releases/latest>`__, or Homebrew::
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::
brew install --cask macfuse 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] 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. 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 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 granted full disk access, and you run Borg backup from cron, you will see