Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew #320

Open
dpassen opened this issue Oct 6, 2023 · 10 comments
Open

Homebrew #320

dpassen opened this issue Oct 6, 2023 · 10 comments

Comments

@dpassen
Copy link

dpassen commented Oct 6, 2023

Please consider adding the precompiled binaries to homebrew. Would make my team's bootstrap process (a Brewfile) a lot easier than piping a curl request to bash

@weavejester
Copy link
Owner

This seems like a good idea. If anyone wants to contribute a homebrew recipe for cljfmt, I'd be very appreciative.

@dpassen
Copy link
Author

dpassen commented Oct 6, 2023

I started to take a look at what's entailed (Homebrew/homebrew-cask@d7e5c44) and when I audit the recipe,

$ brew audit --new-cask cljfmt
==> Downloading https://github.com/weavejester/cljfmt/releases/download/0.11.2/cljfmt-0.11.2-darwin-amd64.tar.gz
Already downloaded: /Users/dpassen/Library/Caches/Homebrew/downloads/706494976ae0e50b6bd28e2617ee8b8028806f36f4dbe96c04d96ad226d85beb--cljfmt-0.11.2-darwin-amd64.tar.gz
==> Downloading https://github.com/weavejester/cljfmt/releases/download/0.11.2/cljfmt-0.11.2-darwin-amd64.tar.gz
Already downloaded: /Users/dpassen/Library/Caches/Homebrew/downloads/706494976ae0e50b6bd28e2617ee8b8028806f36f4dbe96c04d96ad226d85beb--cljfmt-0.11.2-darwin-amd64.tar.gz
audit for cljfmt: failed
 - Signature verification failed:
/private/tmp/d20231005-32724-1kmtepo/cljfmt: rejected

macOS on ARM requires software to be signed.
Please contact the upstream developer to let them know they should sign and notarize their software.
cljfmt
  * line 9, col 2: Signature verification failed:
    /private/tmp/d20231005-32724-1kmtepo/cljfmt: rejected
    
    macOS on ARM requires software to be signed.
    Please contact the upstream developer to let them know they should sign and notarize their software.
Error: 1 problem in 1 cask detected.

Not sure if that's easy or not.

@weavejester
Copy link
Owner

Looks like I need a developer certificate, and then we'll set up a GitHub action to sign the MacOS ARM binary. It might be a while before I get around to doing that.

@raszi
Copy link
Contributor

raszi commented Feb 9, 2024

In the meantime what you could do is to support a Homebrew tap.

I created my version here: https://github.com/raszi/homebrew-tap/blob/master/cljfmt.rb

@weavejester
Copy link
Owner

Does that Homebrew tap actually work? I thought the binary would still require a signature?

@raszi
Copy link
Contributor

raszi commented Feb 9, 2024

It works for me on 13.6.1 (22G313):

$ brew tap raszi/tap  
==> Tapping raszi/tap
Cloning into '/opt/homebrew/Library/Taps/raszi/homebrew-tap'...
remote: Enumerating objects: 97, done.
remote: Counting objects: 100% (50/50), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 97 (delta 32), reused 43 (delta 27), pack-reused 47
Receiving objects: 100% (97/97), 17.40 KiB | 1.02 MiB/s, done.
Resolving deltas: 100% (54/54), done.
Tapped 6 formulae (21 files, 36.5KB).
$ brew install cljfmt
==> Fetching raszi/tap/cljfmt
==> Downloading https://github.com/weavejester/cljfmt/releases/download/0.12.0/cljfmt-0.12.0-darwin-aarch64.tar.gz
Already downloaded: /Users/ikaraszi/Library/Caches/Homebrew/downloads/8533e7b608b29aa0c2a6c5ceacef537c7622acb23e27c317691bb405ec027b28--cljfmt-0.12.0-darwin-aarch64.tar.gz
==> Installing cljfmt from raszi/tap
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Settings.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 15.1.

🍺  /opt/homebrew/Cellar/cljfmt/64: 3 files, 35.3MB, built in 1 second
==> Running `brew cleanup cljfmt`...

@weavejester
Copy link
Owner

And when you run the cljfmt installed via the tap, it works and doesn't complain about not being signed?

@raszi
Copy link
Contributor

raszi commented Feb 9, 2024

Nope, no warnings:

$ which cljfmt
/opt/homebrew/bin/cljfmt
$ cljfmt
Usage:
        cljfmt (check | fix) [PATHS...]
Options:
  -h, --help
      --version
  -q, --quiet
  -v, --verbose
      --[no-]parallel                              false
      --project-root PROJECT_ROOT                  .
      --file-pattern FILE_PATTERN                  \.clj[csx]?$
      --config CONFIG_FILE
      --[no-]ansi                                  true
      --[no-]indentation                           true
      --[no-]remove-multiple-non-indenting-spaces  false
      --[no-]remove-surrounding-whitespace         true
      --[no-]remove-trailing-whitespace            true
      --[no-]insert-missing-whitespace             true
      --[no-]remove-consecutive-blank-lines        true
      --[no-]split-keypairs-over-multiple-lines    false
      --[no-]sort-ns-references                    false
      --function-arguments-indentation STYLE       community     STYLE may be community, cursive, or zprint

But please notice that I am not using macOS Sonoma but Ventura. This might be a new addition.

@raszi
Copy link
Contributor

raszi commented Aug 2, 2024

I upgraded to Sonoma since then and there are still no issues.

@dpassen
Copy link
Author

dpassen commented Aug 2, 2024

I think the signing issue is only for recipes directly a part of homebrew. For third-party taps, it's relaxed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants