Skip to content

Commit

Permalink
fix(render) (#71)
Browse files Browse the repository at this point in the history
* fix(render)

* this too
  • Loading branch information
jhheider authored Apr 5, 2023
1 parent ffb7dad commit 2af645a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions share/brewkit/fix-elf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default async function fix_rpaths(installation: Installation, pkgs: (Pack
const skip_rpaths = [
"go.dev", // skipping because for some reason patchelf breaks the go binary resulting in the only output being: `Segmentation Fault`
"tea.xyz", // this causes tea to pass -E/--version (and everything else?) directly to deno, making it _too_ much of a wrapper.
"render.com", // same as `tea.xyz`
]
if (skip_rpaths.includes(installation.pkg.project)) {
console.info(`skipping rpath fixes for ${installation.pkg.project}`)
Expand Down
11 changes: 9 additions & 2 deletions share/brewkit/fix-machos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@ def codesign!(filename)

signing_id = ENV['APPLE_IDENTITY'] || "-"

_, _, status = Open3.capture3("codesign", "--sign", signing_id, "--force",
_, stderr_str, status = Open3.capture3("codesign", "--sign", signing_id, "--force",
"--preserve-metadata=entitlements,requirements,flags,runtime",
filename)

raise MachO::CodeSigningError, "#{filename}: signing failed!" unless status.success?
# This is messy, but Deno (and Zig, and possibly others) output working binaries
# that fail strict validation. Deno has an open issue about this since 2018:
# https://github.com/denoland/deno/issues/575
# codesign "fails" after correctly signing these binaries with the below error,
# but the binaries still work.
raise MachO::CodeSigningError, "#{filename}: signing failed!"
unless status.success? ||
stderr_str.include?("main executable failed strict validation")
end

def fix_id
Expand Down

0 comments on commit 2af645a

Please sign in to comment.