Skip to content

Commit e0ca565

Browse files
committed
Enhance macOS build workflows with quarantine removal and ad-hoc code signing
- Updated the macOS build workflows for both ARM64 and Intel architectures to include steps for removing quarantine attributes and adding an ad-hoc code signature to prevent "damaged" warnings. - Improved first run instructions for users encountering security warnings, detailing multiple methods to bypass macOS Gatekeeper restrictions for unsigned applications.
1 parent 75d5668 commit e0ca565

File tree

2 files changed

+70
-8
lines changed

2 files changed

+70
-8
lines changed

.github/workflows/macos-build-arm64.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,23 @@ jobs:
197197
# Make sure the main executable is executable
198198
chmod +x dist/Huntarr.app/Contents/MacOS/Huntarr
199199
200+
# Remove quarantine attributes that cause "damaged" warnings
201+
echo "Removing quarantine attributes..."
202+
xattr -cr dist/Huntarr.app || echo "xattr removal failed (expected on CI)"
203+
204+
# Sign the app with ad-hoc signature to prevent damage warnings
205+
echo "Adding ad-hoc code signature..."
206+
codesign --force --deep --sign - dist/Huntarr.app || echo "Code signing failed (expected on CI)"
207+
200208
# Verify the build
201209
echo "Checking built app:"
202210
ls -la dist/
203211
ls -la dist/Huntarr.app/Contents/MacOS/
204212
file dist/Huntarr.app/Contents/MacOS/Huntarr
205213
214+
# Check code signature
215+
codesign -dv dist/Huntarr.app || echo "Code signature check failed"
216+
206217
# Test that the app can at least start (basic smoke test)
207218
echo "Testing app startup..."
208219
timeout 10s dist/Huntarr.app/Contents/MacOS/Huntarr --help || echo "App startup test completed"
@@ -253,10 +264,30 @@ jobs:
253264
- Drag Huntarr.app to your Applications folder
254265
- Or run it directly from this location
255266
256-
First Run:
257-
- macOS may show a security warning for unsigned apps
258-
- Go to System Preferences > Security & Privacy
259-
- Click "Open Anyway" to allow Huntarr to run
267+
⚠️ IMPORTANT - First Run Security Steps:
268+
269+
If you see "Huntarr is damaged and can't be opened":
270+
271+
Option 1 - Remove Quarantine (Recommended):
272+
1. Open Terminal
273+
2. Run: xattr -cr /Applications/Huntarr.app
274+
3. Run: sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app
275+
4. Try opening Huntarr again
276+
277+
Option 2 - System Preferences:
278+
1. Go to System Preferences > Security & Privacy > General
279+
2. Click "Open Anyway" next to the Huntarr warning
280+
3. Confirm you want to open it
281+
282+
Option 3 - Right-click Method:
283+
1. Right-click on Huntarr.app
284+
2. Select "Open" from the context menu
285+
3. Click "Open" in the security dialog
286+
287+
Why this happens:
288+
- Huntarr is not signed with an Apple Developer certificate
289+
- macOS Gatekeeper blocks unsigned apps by default
290+
- This is normal for open-source applications
260291
261292
Configuration:
262293
- Config files are stored in: ~/Library/Application Support/Huntarr/

.github/workflows/macos-build-intel.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,23 @@ jobs:
197197
# Make sure the main executable is executable
198198
chmod +x dist/Huntarr.app/Contents/MacOS/Huntarr
199199
200+
# Remove quarantine attributes that cause "damaged" warnings
201+
echo "Removing quarantine attributes..."
202+
xattr -cr dist/Huntarr.app || echo "xattr removal failed (expected on CI)"
203+
204+
# Sign the app with ad-hoc signature to prevent damage warnings
205+
echo "Adding ad-hoc code signature..."
206+
codesign --force --deep --sign - dist/Huntarr.app || echo "Code signing failed (expected on CI)"
207+
200208
# Verify the build
201209
echo "Checking built app:"
202210
ls -la dist/
203211
ls -la dist/Huntarr.app/Contents/MacOS/
204212
file dist/Huntarr.app/Contents/MacOS/Huntarr
205213
214+
# Check code signature
215+
codesign -dv dist/Huntarr.app || echo "Code signature check failed"
216+
206217
# Test that the app can at least start (basic smoke test)
207218
echo "Testing app startup..."
208219
timeout 10s dist/Huntarr.app/Contents/MacOS/Huntarr --help || echo "App startup test completed"
@@ -253,10 +264,30 @@ jobs:
253264
- Drag Huntarr.app to your Applications folder
254265
- Or run it directly from this location
255266
256-
First Run:
257-
- macOS may show a security warning for unsigned apps
258-
- Go to System Preferences > Security & Privacy
259-
- Click "Open Anyway" to allow Huntarr to run
267+
⚠️ IMPORTANT - First Run Security Steps:
268+
269+
If you see "Huntarr is damaged and can't be opened":
270+
271+
Option 1 - Remove Quarantine (Recommended):
272+
1. Open Terminal
273+
2. Run: xattr -cr /Applications/Huntarr.app
274+
3. Run: sudo xattr -rd com.apple.quarantine /Applications/Huntarr.app
275+
4. Try opening Huntarr again
276+
277+
Option 2 - System Preferences:
278+
1. Go to System Preferences > Security & Privacy > General
279+
2. Click "Open Anyway" next to the Huntarr warning
280+
3. Confirm you want to open it
281+
282+
Option 3 - Right-click Method:
283+
1. Right-click on Huntarr.app
284+
2. Select "Open" from the context menu
285+
3. Click "Open" in the security dialog
286+
287+
Why this happens:
288+
- Huntarr is not signed with an Apple Developer certificate
289+
- macOS Gatekeeper blocks unsigned apps by default
290+
- This is normal for open-source applications
260291
261292
Configuration:
262293
- Config files are stored in: ~/Library/Application Support/Huntarr/

0 commit comments

Comments
 (0)