Skip to content

Commit 806bd6f

Browse files
Merge pull request #39 from fasmat/fix-36
Fix borgbackup unable to find packaging dependency
2 parents cc4929c + e94839c commit 806bd6f

File tree

3 files changed

+59
-28
lines changed

3 files changed

+59
-28
lines changed

.github/workflows/main.yml

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,68 @@
1-
on: [push, pull_request]
1+
on:
2+
# Allow manually triggering this workflow
3+
workflow_dispatch:
4+
# run for all pull requests and pushes to certain branches
5+
pull_request:
6+
push:
7+
branches:
8+
- master
29

310
jobs:
411
test:
512
name: Test Homebrew install
6-
runs-on: macos-latest
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
os:
18+
- macos-13
19+
- macos-14
720
timeout-minutes: 15
821

922
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v1
23+
- name: Set up Homebrew
24+
id: set-up-homebrew
25+
uses: Homebrew/actions/setup-homebrew@master
26+
with:
27+
test-bot: false
28+
29+
- name: Cache Homebrew Gems
30+
id: cache
31+
uses: actions/cache@v4
32+
with:
33+
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
34+
key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
35+
restore-keys: ${{ matrix.os }}-rubygems-
36+
37+
- name: Install Homebrew Gems
38+
id: gems
39+
run: brew install-bundler-gems
40+
if: steps.cache.outputs.cache-hit != 'true'
1241

1342
- name: Install macFUSE
1443
run: brew install --cask macfuse
1544

16-
# - name: Debug
17-
# uses: mxschmitt/action-tmate@v3
18-
1945
- name: Test formula
20-
working-directory: ./Formula
46+
env:
47+
HOMEBREW_NO_INSTALL_FROM_API: 1
2148
run: |
22-
# brew audit --strict borgbackup-fuse.rb
23-
brew install borgbackup-fuse.rb
24-
brew test borgbackup-fuse.rb
49+
brew install borgbackup-fuse
2550
51+
brew test borgbackup-fuse
52+
brew style borgbackup-fuse
53+
brew audit --online --strict borgbackup-fuse
54+
55+
brew uninstall borgbackup-fuse
56+
57+
# Step is disabled because it times out on GH hosted runners
58+
# bacause of a macOS security prompt - can only be done on
59+
# selfhosted runners
2660
- name: Test mount command
61+
if: vars.TESTMOUNT
2762
run: |
2863
borg init -e none test-repo
2964
borg create test-repo::test-archive Formula
30-
# Will timeout due to macOS security prompt
31-
# mkdir mnt
32-
# borg mount test-repo::test-archive mnt
33-
# ls mnt/Formula
34-
65+
66+
mkdir mnt
67+
borg mount test-repo::test-archive mnt
68+
ls mnt/Formula

Formula/borgbackup-fuse.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,25 @@ class BorgbackupFuse < Formula
4646
depends_on "libb2"
4747
depends_on "lz4"
4848
depends_on "openssl@3"
49-
depends_on "python-packaging"
50-
depends_on "[email protected]"
49+
depends_on "[email protected]"
5150
depends_on "xxhash"
5251
depends_on "zstd"
5352

5453
conflicts_with "borgbackup", because: "borgbackup-fuse is a patched version of borgbackup"
5554

5655
resource "msgpack" do
57-
url "https://files.pythonhosted.org/packages/08/4c/17adf86a8fbb02c144c7569dc4919483c01a2ac270307e2d59e1ce394087/msgpack-1.0.8.tar.gz"
58-
sha256 "95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"
56+
url "https://files.pythonhosted.org/packages/cb/d0/7555686ae7ff5731205df1012ede15dd9d927f6227ea151e901c7406af4f/msgpack-1.1.0.tar.gz"
57+
sha256 "dd432ccc2c72b914e4cb77afce64aab761c1137cc698be3984eee260bcb2896e"
5958
end
6059

61-
resource "pyparsing" do
62-
url "https://files.pythonhosted.org/packages/46/3a/31fd28064d016a2182584d579e033ec95b809d8e220e74c4af6f0f2e8842/pyparsing-3.1.2.tar.gz"
63-
sha256 "a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad"
60+
resource "packaging" do
61+
url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz"
62+
sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"
6463
end
6564

6665
resource "llfuse" do
67-
url "https://files.pythonhosted.org/packages/d2/2c/64f01042d1ed08725342c85ddb48a29d2a4f8712d27f22f66f28a67a079c/llfuse-1.5.0.tar.gz"
68-
sha256 "d094448bb4eb20099537be53dc2b5b2c0369d36bde09207a9bb228cc3cd58ee1"
66+
url "https://files.pythonhosted.org/packages/be/a5/a3dc8426732f75ff2cdd48aaaa60a44afd56812760f49198c0d204768b1f/llfuse-1.5.1.tar.gz"
67+
sha256 "7c9be52289cf647e3d735104531cc23a1a89fd1be3a621613a1cc0991f1b2699"
6968
end
7069

7170
def install
@@ -74,6 +73,7 @@ def install
7473
ENV["BORG_LIBXXHASH_PREFIX"] = Formula["xxhash"].prefix
7574
ENV["BORG_LIBZSTD_PREFIX"] = Formula["zstd"].prefix
7675
ENV["BORG_OPENSSL_PREFIX"] = Formula["openssl@3"].prefix
76+
7777
virtualenv_install_with_resources
7878

7979
man1.install Dir["docs/man/*.1"]

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,20 @@ These dependencies have been [removed](https://github.com/Homebrew/homebrew-core
88

99
If one doesn’t plan on using `borg mount`, installing Borg using `brew install borgbackup` works just fine.
1010

11-
1211
## How to install Borg using this tap?
1312

1413
```shell
1514
brew install --cask macfuse
1615
brew install borgbackup/tap/borgbackup-fuse
1716
```
1817

19-
2018
## How to update to a new BorgBackup version?
2119

2220
1. Get new package URLs and SHAs from [PyPi](https://pypi.org/project/borgbackup/)
2321
2. ~~Lint `brew audit --strict Formula/borgbackup-fuse.rb`~~
2422
3. Install `brew install Formula/borgbackup-fuse.rb`
2523
4. Test `brew test Formula/borgbackup-fuse.rb`
2624

27-
2825
## Documentation
2926

3027
`brew help`, `man brew` or check [Homebrew’s documentation](https://docs.brew.sh).

0 commit comments

Comments
 (0)