diff --git a/projects/tart.run/package.yml b/projects/tart.run/package.yml index 217fbb02..51c296af 100644 --- a/projects/tart.run/package.yml +++ b/projects/tart.run/package.yml @@ -1,34 +1,31 @@ distributable: - url: https://github.com/cirruslabs/tart/archive/refs/tags/{{version}}.tar.gz - strip-components: 1 + # vendoring for newer versions + # url: https://github.com/cirruslabs/tart/archive/refs/tags/{{version}}.tar.gz + url: https://github.com/cirruslabs/tart/releases/download/{{version}}/tart.tar.gz + +warnings: + - vendored versions: - github: cirruslabs/tart - # NOTE: 1.x uses non-open source license - # https://tart.run/blog/2023/02/11/changing-tart-license/ - ignore: /^[1-9]/ + github: cirruslabs/tart/releases platforms: - darwin/aarch64 -build: - dependencies: - rust-lang.org: ^1.54 - rust-lang.org/cargo: ^0 - # apple.com/xcode: >=14.1 - # swift.org: 5 - script: - - run: | - curl -L $SOFTNET | tar -zxf - --strip-components=1 - cargo install --locked --path . --root {{prefix}} - working-directory: softnet - - swift build --disable-sandbox -c release - - codesign -f -s - --entitlement Resources/tart.entitlements .build/release/tart - - run: cp "$SRCROOT"/.build/release/tart . - working-directory: ${{prefix}}/bin - env: - SOFTNET: https://github.com/cirruslabs/softnet/archive/refs/tags/0.6.2.tar.gz +#FIXME proper system for re-using pre-built binaries +# we must require the vendor to provide signatures against a published public +# key. If they don’t then really we should build ourselves or warn the user +# about the fact. +# The thing is, we trust the sources implicitly currently because signing is +# so rare. The only way wide spread signing will occur is via our protocol. +# This only works on macOS, arm64, monterey and above. It requires xcode 14.1 to build + +build: + script: + - mkdir -p "{{prefix}}/bin" + - cp -a tart.app "{{prefix}}" + - cp props/tart-shim "{{prefix}}"/bin/tart provides: - bin/tart @@ -37,8 +34,8 @@ test: script: - ': >empty.ispw' - OUT=$(tart create - --from-ipsw empty.ipsw - test 2>&1 || true) + --from-ipsw empty.ipsw + test 2>&1 || true) - 'test "$OUT" = "Error: The restore image failed to load. Unable to create sandbox extensions."' env: - TART_HOME: $PWD \ No newline at end of file + TART_HOME: $PWD diff --git a/projects/tart.run/tart-shim b/projects/tart.run/tart-shim new file mode 100755 index 00000000..bdbbc60e --- /dev/null +++ b/projects/tart.run/tart-shim @@ -0,0 +1,5 @@ +#!/bin/sh + +tart="$(cd "$(dirname "$0")/.." && pwd)"/tart.app/Contents/MacOS/tart + +exec "$tart" "$@" \ No newline at end of file