Repository navigation
On macOS, make bundle builds a signed Hush.app and make install puts it in /Applications - #268
Merged
Merged
Conversation
…it in /Applications The GPUI app ran on macOS as a bare program: no notifications (macOS shows them only to an app bundle) and a keychain prompt after every rebuild. scripts/bundle.sh builds the release hush and assembles Hush.app: Info.plist (dev.pitis.hush, version from the crate, macOS 12 as GPUI's shaders need), the icon compiled from AppIcon.icon by actool, the hardened runtime. It signs with the team's Apple Development identity when the keychain has one, else ad-hoc with a warning. The build folder ends in .noindex and the built copy is unregistered from LaunchServices, so the Dock and Spotlight open only the installed one. README and CLAUDE.md say how to build, install and sign; comments on notifications and open at login now describe the bundle.
…s before it replaces Review fixes. actool's output is shown when it fails or warns (it can also fail silently with exit 0, so the made files stay the test). The identity lookup's own failures stop the script instead of reading as "no identity". make install copies the new app beside the installed one before swapping them, so a full disk leaves the old one. Only lsregister's "not registered" is ignored. Docs: the keychain note no longer assumes the Mac app's key, the bundle id is the removed Mac app's, and the notification shortcut says when to upgrade.
Owner
Author
Review (
|
# Conflicts: # README.md
Owner
Author
|
Merged
On the merged head:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS the GPUI app now builds into a real
Hush.app. Run as a bare program, it got no notifications (macOS shows them only to an app bundle), and the keychain asked for its key after every rebuild.What changed
make bundle(scripts/bundle.sh): builds the releasehush(cargo build --release -p hush-desktop, the workspace release profile as is) and assemblescore/target/bundle.noindex/Hush.app:Info.plist: bundle iddev.pitis.hush, name and display name Hush, executablehush, both versions from the crate (cargo pkgid, now 0.1.0),LSMinimumSystemVersion12.0 (GPUI's Metal shaders are built for macOS 12,gpui-pre-apple's build.rs),NSHighResolutionCapable, category social-networking.CFBundleIconFile/CFBundleIconNamecome from actool's partial plist.xcrun actoolcompilescore/desktop/AppIcon.iconintoAssets.car(macOS 26's layered icon) andAppIcon.icns(earlier systems'). No fallback was needed. actool can fail without a word and exit 0 (a missing or malformed icon), so the script checks that both files were made. It shows actool's output when actool exits non-zero or reports errors or warnings.--options runtime), no entitlements. Nothing the app does outside the sandbox needs one: network, the login keychain throughkeyring, notifications, file pickers, audio playback. It makes no calls, so it needs no microphone. It links only system libraries. The script signs with the Apple Development identity of team95KQ82C586when one is in the keychain. It finds it by the certificate's OU, because the name shows a member id, not the team. A failed lookup stops the script instead of reading as "no identity". Otherwise it signs ad-hoc and warns that the keychain will ask after every rebuild. It then runscodesign --verify --strict --deep..noindex, so Spotlight doesn't index it. Spotlight indexing is how macOS registers a bundle it sees. The script also unregisters the built copy (lsregister -u; only "not registered", -10814, is ignored), so the Dock and Spotlight open only the installed one.make install: the same build, copied whole beside/Applications/Hush.appfirst (ditto), then swapped in and registered (lsregister -f), so a full disk leaves the old app in place. That removes the old Swift Hush.app if it is still there. Its data and keychain item stay.dev.pitis.hush/db-key, the former Swift app's since On macOS the desktop app opens the Mac app's data, linked, with its drafts and settings #266), and that development runs withHUSH_DATA_DIRnever ask. CLAUDE.md: a stack rule for the bundle, its signing and its bundle id (it replaces the Mac app's signing rule that Hush is the Rust core and the GPUI app: the Swift Mac app and its build are gone #265 removed), and the two commands. DESIGN.md: macOS notifications come from Hush.app only.APP_ID's doc says it is Hush.app's bundle id.notifications.rs: macOS shows GPUI's notifications only from the bundle, and GPUI asks for permission at the first one. Theshortcut:stays for Reply, sound and threads, the follow-up the issue names.login.rs: the LaunchAgent stays, because the app also runs unbundled. It opens this executable, which from the bundle isHush.app/Contents/MacOS/hush(current_exe).Checked against GPUI (gpui-pre-macos 0.3.11)
system_notifications.rsonly createsUNUserNotificationCenterwhenNSBundle.mainBundle.bundleIdentifieris set. Without a bundle, that call would abort the process. It asks for authorization (alert and sound) at the first notification and shows banners while Hush is frontmost.set_app_identitydoes nothing on macOS. The bundle id comes from Info.plist only.How it was tested
make bundleon this Mac (no Apple Development identity, so ad-hoc): it builds and signs,codesign --verify --strict --deep -vvsays "valid on disk / satisfies its Designated Requirement".codesign -dvvvshowsIdentifier=dev.pitis.hushandflags=0x10002(adhoc,runtime), with no entitlements.plutil -lintOK, andplutil -pshows the values above.assetutil --info Assets.carlistsAppIconas an IconImageStack (light, dark, tinted) plus 16–1024 px images.AppIcon.icnshas 16 to 256 px images.otool -L: system frameworks and dylibs only. The binary'sminosis 11.0 (below the plist's 12.0).spctl -a -vv: rejected, as expected for an ad-hoc, unnotarized app. It isn't quarantined, so it opens on the Mac that built it.lsregister -dump, andmdfindfinds only/Applications/Hush.app.securityoutput and real certificates made with openssl (LibreSSL and OpenSSL 3). It takes the team's Apple Development identity and skips another team's and a Developer ID. With a real certificate it is untested, because there is none on this Mac.plutil -lint, andcodesign --verify.make check) on the head merged with On macOS the desktop app opens the Mac app's data, linked, with its drafts and settings #266 and DESIGN.md and PRODUCT.md describe the GPUI app as it is, on macOS, Windows and Linux #269, fromcore/:cargo fmt --checkpass;cargo clippy --all-targets -q -- -D warningspass;cargo clippy --all-targets --features hush-desktop/snapshot -q -- -D warningspass;cargo test --features hush-desktop/snapshot -qpass (desktop 363, core 541).make bundleon that head: built, signed ad-hoc with the runtime, verified. The release link prints duplicate-symbol warnings fromcubeb-sys's bundled Rust objects; they were there before (make perfbuilds the same) and the build succeeds.For the owner
make install(quit Hush first). At the first launch of each ad-hoc build, macOS asks whether Hush may use its key: enter the login password and choose Always Allow.95KQ82C586) in the login keychain,make bundlepicks it on its own. The first signing may ask to letcodesignuse the key (Always Allow). The bundle reads the former Swift app's key (dev.pitis.hush/db-key). If a team-signed Swift build made that key, it opens without asking. Otherwise it asks once, then never after a rebuild. The Swift Hush.app now in /Applications on this Mac is signed ad-hoc, so one prompt is possible.HUSH_DATA_DIRkeep the key in a file and never ask, whether throughmake runor the bundle'sContents/MacOS/hush.lsregister -dump | grep 'path:.*Hush.app'). They have the same bundle id. Unregister them withlsregister -u <path>if the Dock opens the wrong one.Closes #264