FiloSottile/homebrew-musl-cross

backblaze B2 404 on bottle tarball

joemiller opened this issue · 5 comments

I'm getting a 404 when brew tries to download the bottle tarball:

==> Installing musl-cross from filosottile/musl-cross
==> Downloading f001.backblazeb2.com/file/filippo-public/musl-cross-0.9.9_1.catalina.bottle.tar.gz
curl: (22) The requested URL returned error: 404 
Error: Failed to download resource "musl-cross"
Download failed: f001.backblazeb2.com/file/filippo-public/musl-cross-0.9.9_1.catalina.bottle.tar.gz

I first noticed this from github-actions: https://github.com/joemiller/vault-token-helper/runs/2313692421?check_suite_focus=true

And was able to reproduce locally (macOS 10.15.7 catalina, intel):

$ brew install FiloSottile/musl-cross/musl-cross

==> Installing musl-cross from filosottile/musl-cross
==> Downloading https://f001.backblazeb2.com/file/filippo-public/musl-cross-0.9.9_1.catalina.bottle.tar.gz
#=#=#                                                                         
curl: (22) The requested URL returned error: 404 
Error: Failed to download resource "musl-cross"
Download failed: https://f001.backblazeb2.com/file/filippo-public/musl-cross-0.9.9_1.catalina.bottle.tar.gz

Maybe there is no bottle for macOS Catalina? Or maybe an issue from the move to B2 ?

BTW, thank you so much for building and maintaining this tap!!!!

Thanks for the report, I had gotten the paths in the B2 bucket wrong. Should work now, sorry!

If you use filosottile/musl-cross in CI, could you look into caching the brew download cache between runs? I pay for the bandwidth now 😅

If it gets too expensive I'll set up Cloudflare egress, but I wanted to see if it was worth it first.

@FiloSottile I can look into that. I only use musl-cross in one repo right now and it only gets a few updates per year, for what it's worth.

For others that come across this, here is what seems to be working for me to cache the tarball in GH-actions:

      - name: Homebrew musl-cross cache
        uses: actions/cache@v2
        with:
          path: |
            ~/Library/Caches/Homebrew/musl-cross--*
            ~/Library/Caches/Homebrew/downloads/*--musl-cross-*
          key: brew-musl-cross-${{ hashFiles('~/Library/Caches/Homebrew/downloads/*--musl-cross-*') }}
          restore-keys: brew-musl-cross-

      - name: install release deps
        run: |
          brew install FiloSottile/musl-cross/musl-cros

output from cached CI run:

> Run actions/cache@v2
Received 4194304 of 71090207 (5.9%), 4.0 MBs/sec
Received 62914560 of 71090207 (88.5%), 30.0 MBs/sec
Received 71090207 of 71090207 (100.0%), 24.0 MBs/sec
Cache Size: ~68 MB (71090207 B)
/usr/bin/tar --use-compress-program zstd -d -xf /Users/runner/work/_temp/bac1a8c5-871b-4e4e-8746-c031bd91bd7f/cache.tzst -P -C /Users/runner/work/vault-token-helper/vault-token-helper
Cache restored from key: brew-musl-cross-

> Run Homebrew musl-cross cache
 brew install FiloSottile/musl-cross/musl-cross
==> Tapping filosottile/musl-cross
Cloning into '/usr/local/Homebrew/Library/Taps/filosottile/homebrew-musl-cross'...
Tapped 1 formula (30 files, 65KB).
==> Installing musl-cross from filosottile/musl-cross
==> Downloading f001.backblazeb2.com/file/filippo-public/musl-cross-0.9.9_1.catalina.bottle.tar.gz
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/194caf3ba62d6e99dcaab83fd78ae35d1db4e79b7d8521ea0fc2ff4c200086ec--musl-cross-0.9.9_1.catalina.bottle.tar.gz
==> Pouring musl-cross-0.9.9_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/musl-cross/0.9.9_1: 1,851 files, 246.3MB

Awesome, thank you! It sounds like it was not a CI action running every hour or something, so it would probably be fine either way, but I appreciate you adding caching!