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

tmignore fails to install via Homebrew on macOS Big Sur #13

Open
rmtsrc opened this issue Dec 21, 2020 · 7 comments
Open

tmignore fails to install via Homebrew on macOS Big Sur #13

rmtsrc opened this issue Dec 21, 2020 · 7 comments

Comments

@rmtsrc
Copy link

rmtsrc commented Dec 21, 2020

On macOS Big Sur (11.1) the tmignore installation step from the README.md file fails with the following error:

brew install samuelmeuli/tap/tmignore
==> Installing tmignore from samuelmeuli/tap
==> Downloading https://github.com/samuelmeuli/tmignore/archive/v1.2.2.tar.gz
Already downloaded: /Users/seb/Library/Caches/Homebrew/downloads/694e9e2acfa7fc1d36e4be32543d766098b853eaf69a98ec5ec66fbc803d0abd--tmignore-1.2.2.tar.gz
==> make build
Last 15 lines from /Users/seb/Library/Logs/Homebrew/tmignore/01.make:

Fetching https://github.com/jakeheis/SwiftCLI

Fetching https://github.com/samuelmeuli/swift-exec

Fetching https://github.com/apple/swift-log

Fetching https://github.com/SwiftyJSON/SwiftyJSON

Fetching https://github.com/IBM-Swift/HeliumLogger

xcodebuild: error: Could not resolve package dependencies:
  sandbox-exec: sandbox_apply: Operation not permitted

make: *** [build] Error 74

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/samuelmeuli/homebrew-tap/issues

These open issues may also help:
tmignore Build for macOS Big Sur  https://github.com/samuelmeuli/homebrew-tap/issues/2

Possibly related to:

Workaround

However, checking out this repo and running make manually does correctly build bin/tmignore successfully.

Setup Xcode

  1. Install Xcode from the App Store
  2. sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  3. sudo xcodebuild -license accept

Manually build and Install tmignore

  1. git clone https://github.com/samuelmeuli/tmignore.git && cd tmignore
  2. make
  3. cp bin/tmignore /usr/local/bin/
  4. crontab -l | { cat; echo "0 10 * * * /usr/local/bin/tmignore run &>> /tmp/tmignore.log"; } | crontab -
@mfranzke
Copy link

same for macOS Catalina (10.15.7)

@cjahv
Copy link

cjahv commented Dec 30, 2020

  1. HOMEBREW_EDITOR=vim brew edit tmignore
  2. write
class Tmignore < Formula
  desc "Exclude development files from Time Machine backups"
  homepage "https://github.com/samuelmeuli/tmignore"
  url "https://github.com/samuelmeuli/tmignore/releases/download/v1.2.2/tmignore"
  sha256 "80a8b0e3e05dc30113b9a4db1997b39fadfabbe2a58fa7f63ac4f757b2de9012"
  head "https://github.com/samuelmeuli/tmignore.git"

  depends_on :macos => :high_sierra

  def install
    bin.install "./tmignore"
    system "curl", "-L","-o", "#{prefix}/homebrew.tmignore.plist", "https://github.com/samuelmeuli/tmignore/raw/master/homebrew.tmignore.plist"
  end

  test do
    system "#{bin}/tmignore", "version"
  end
end
  1. brew install tmignore
  2. brew services start samuelmeuli/tap/tmignore

@elstgav
Copy link

elstgav commented Apr 28, 2022

The above didn’t work for me. Running brew services start samuelmeuli/tap/tmignore returned the following error:

Error: Formula `tmignore` has not implemented #plist, #service or installed a locatable service file

Adding mv "#{prefix}/homebrew.tmignore.plist", plist_path (as recommended here) got it working again:

NOTE: This only works after first trying the install script from the previous comment.
So the steps are:

  1. brew edit tmignore
  2. Replace with @cjahv’s script
  3. brew install tmignore
  4. brew edit tmignore
  5. Add “mv to plist_path” line like below
  6. brew reinstall tmignore
  7. brew services start tmignore
class Tmignore < Formula
  desc "Exclude development files from Time Machine backups"
  homepage "https://github.com/samuelmeuli/tmignore"
  url "https://github.com/samuelmeuli/tmignore/releases/download/v1.2.2/tmignore"
  sha256 "80a8b0e3e05dc30113b9a4db1997b39fadfabbe2a58fa7f63ac4f757b2de9012"
  head "https://github.com/samuelmeuli/tmignore.git"

  depends_on :macos => :high_sierra

  def install
    bin.install "./tmignore"
    system "curl", "-L","-o", "#{prefix}/homebrew.tmignore.plist", "https://github.com/samuelmeuli/tmignore/raw/master/homebrew.tmignore.plist"
    mv "#{prefix}/homebrew.tmignore.plist", plist_path
  end

  test do
    system "#{bin}/tmignore", "version"
  end
end

@fangzhengjin
Copy link

This is effective on Mac OS 12.3.1

class Tmignore < Formula
  desc "Exclude development files from Time Machine backups"
  homepage "https://github.com/samuelmeuli/tmignore"
  url "https://github.com/samuelmeuli/tmignore/releases/download/v1.2.2/tmignore"
  sha256 "80a8b0e3e05dc30113b9a4db1997b39fadfabbe2a58fa7f63ac4f757b2de9012"
  head "https://github.com/samuelmeuli/tmignore.git"

  depends_on :macos => :high_sierra

  def install
    bin.install "./tmignore"
    system "curl", "-L","-o", plist_path, "https://github.com/samuelmeuli/tmignore/raw/master/homebrew.tmignore.plist"
  end

  test do
    system "#{bin}/tmignore", "version"
  end
end

@llemllen
Copy link

The above didn’t work for me. Running brew services start samuelmeuli/tap/tmignore returned the following error:

Error: Formula `tmignore` has not implemented #plist, #service or installed a locatable service file

Adding mv "#{prefix}/homebrew.tmignore.plist", plist_path (as recommended here) got it working again:

NOTE: This only works after first trying the install script from the previous comment.
So the steps are:

  1. brew edit tmignore
  2. Replace with @cjahv’s script
  3. brew install tmignore
  4. brew edit tmignore
  5. Add “mv to plist_path” line like below
  6. brew reinstall tmignore
  7. brew services start tmignore
class Tmignore < Formula
  desc "Exclude development files from Time Machine backups"
  homepage "https://github.com/samuelmeuli/tmignore"
  url "https://github.com/samuelmeuli/tmignore/releases/download/v1.2.2/tmignore"
  sha256 "80a8b0e3e05dc30113b9a4db1997b39fadfabbe2a58fa7f63ac4f757b2de9012"
  head "https://github.com/samuelmeuli/tmignore.git"

  depends_on :macos => :high_sierra

  def install
    bin.install "./tmignore"
    system "curl", "-L","-o", "#{prefix}/homebrew.tmignore.plist", "https://github.com/samuelmeuli/tmignore/raw/master/homebrew.tmignore.plist"
    mv "#{prefix}/homebrew.tmignore.plist", plist_path
  end

  test do
    system "#{bin}/tmignore", "version"
  end
end

thank,it work on
Mac OS 12.3.1
Xcode 13.3.1

@marijoo
Copy link

marijoo commented Dec 5, 2023

On Ventura 13.4.1 with Homebrew 4.1.23 I had to slightly modify the script mentioned by elstgav and use launchd_service_path instead of plist_path:

class Tmignore < Formula
    desc "Exclude development files from Time Machine backups"
    homepage "https://github.com/samuelmeuli/tmignore"
    url "https://github.com/samuelmeuli/tmignore/releases/download/v1.2.2/tmignore"
    sha256 "80a8b0e3e05dc30113b9a4db1997b39fadfabbe2a58fa7f63ac4f757b2de9012"
    head "https://github.com/samuelmeuli/tmignore.git"
    
    depends_on :macos => :high_sierra
    
    def install
        bin.install "./tmignore"
        system "curl", "-L","-o", "#{prefix}/homebrew.tmignore.plist", "https://github.com/samuelmeuli/tmignore/raw/master/homebrew.tmignore.plist"
        mv "#{prefix}/homebrew.tmignore.plist", launchd_service_path
    end
    
    test do
        system "#{bin}/tmignore", "version"
    end
end

@fangzhengjin
Copy link

fangzhengjin commented Dec 7, 2023

I found a project that can replace this tool. It has GUI and complete functions.
https://github.com/PhotonQuantum/tmexclude

image

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

7 participants