Skip to content

Commit

Permalink
Merge pull request #6052 from stephengroat/patch-1
Browse files Browse the repository at this point in the history
Create and use Brewfile
  • Loading branch information
ThomasWaldmann committed Jan 14, 2024
2 parents a2ef268 + 08bb028 commit 2787da2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 15 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
12 changes: 12 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -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'
8 changes: 8 additions & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -170,13 +174,15 @@ 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

Then, update the local ``master`` branch with changes made in the upstream
repository.
::

git pull borg master

Rebase feature branch onto updated master branch
Expand All @@ -185,13 +191,15 @@ 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

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
Expand Down
19 changes: 10 additions & 9 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 2787da2

Please sign in to comment.