Skip to content

Commit

Permalink
Unquarantine clickhouse binary on mac (#5223)
Browse files Browse the repository at this point in the history
After #5127 (I assume, because this problem came up immediately after
that) macOS Gatekeeper is putting the `clickhouse` binary in quarantine
after download, which means we can't execute it unless we take it out of
quarantine. This is apparently a new thing, as [this
doc](https://github.com/ClickHouse/clickhouse-docs/blob/08d7a329d/knowledgebase/fix-developer-verification-error-in-macos.md)
about how to do that was only [added Jan
9](ClickHouse/clickhouse-docs#1835).

Here I am doing it in the simplest way possible: if mac, then remove
quarantine attr. If anyone has a better way, I'm all ears.
  • Loading branch information
david-crespo authored Mar 7, 2024
1 parent cd0effe commit 358eec4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/ci_download_clickhouse
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ function main
# Unpack the tarball into a local directory
do_untar "$TARBALL_FILE" "$DEST_DIR"

# on macOS, we need to take the binary out of quarantine after download
# https://github.com/ClickHouse/clickhouse-docs/blob/08d7a329d/knowledgebase/fix-developer-verification-error-in-macos.md
if [[ $CIDL_OS == darwin* ]]; then
xattr -d com.apple.quarantine "$DEST_DIR/clickhouse"
fi

# Run the binary as a sanity-check.
"$DEST_DIR/clickhouse" server --version
}
Expand Down

0 comments on commit 358eec4

Please sign in to comment.