Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build macOS installer for tsh.app #12751

Merged
merged 7 commits into from
May 23, 2022
Merged

Build macOS installer for tsh.app #12751

merged 7 commits into from
May 23, 2022

Conversation

codingllama
Copy link
Contributor

@codingllama codingllama commented May 18, 2022

Changes how make pkg-tsh works so instead of building an installer for the tsh binary, placed under /usr/local/bin, we install an app to /Applications/tsh-vXXX.app and link its tsh binary to /usr/local/bin.

The app shell is necessary to distribute a provisioning profile along with the signed/entitled/notarized binary. All of that is required for Touch ID to work. Naked tsh binaries are unable to use Touch ID, even if built with the correct build tags.

I've elected to split the logic from build-package.sh into a separate script - it already does too much as-is. build-pkg-tsh.sh is more idiomatic, clears additional shellcheck rules and is easier to dry-run.

#9160

@codingllama
Copy link
Contributor Author

There are more changes required to make sure the packages really work, like building with the proper build tags, but this is enough for a single PR (and my brain is fried for today).

@codingllama
Copy link
Contributor Author

Also, give me a shout if you want and I can send a fully-functional "tshdev" installer to you. :)

Copy link
Contributor

@ibeckermayer ibeckermayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naively going through your instructions at build.assets/macos/tshdev/README.md, I get to

$skel/sign.sh $skel/tsh.app                  # sign .app

and my terminal complains

error: The specified item could not be found in the keychain.

I'm thinking I'm missing the One-time setup, however when I try to log in to my personal developer profile by navigating to https://developer.apple.com/account/resources/profiles/list and signing in, I get

Screen Shot 2022-05-19 at 09 53 37.

Presuming I do indeed need to do One-time setup before going through the instructions, a note at the top of the Instructions setting would be helpful. Also, a note or link to a Slab post about how I request to get enrolled in Teleport's developer program (or should I just enroll in my own developer program?) would be useful.

(If you find any of this to be overly pedantic to add then feel free to just ignore me, I'm coming at it from a place of total ignorance about Apple's code signing system).

build.assets/macos/tshdev/README.md Show resolved Hide resolved
@codingllama
Copy link
Contributor Author

@ibeckermayer thanks for going through the README with such attention, I appreciate the feedback.

One-time setup is pretty much done, the idea of the README is to document how I got those files in the first place in case someone wants to recreate them. I'll mention that in the file.

You won't be able to use that signing key without access to our Apple Dev account. Personal account won't cut it for Keychain access, you need to be enrolled in the Apple Developer program. Ping me in private and I can give some instructions. A Slab page would indeed be nice, I'll add that to my backlog (I won't do it right now, but I'll get to it!).

@codingllama codingllama force-pushed the codingllama/apple-build branch from af2f4e3 to 1c0d7ea Compare May 19, 2022 17:11
@codingllama
Copy link
Contributor Author

Thanks for the quick review, Isaiah.

@codingllama
Copy link
Contributor Author

Friendly ping @timothyb89 ?

@codingllama
Copy link
Contributor Author

Friendly ping @timothyb89 ?

@codingllama
Copy link
Contributor Author

codingllama commented May 23, 2022

Thanks folks. Now let's see what I missed when it gets to Drone.

@codingllama codingllama force-pushed the codingllama/apple-build branch from 1c0d7ea to 7f56eb6 Compare May 23, 2022 17:43
@codingllama codingllama enabled auto-merge (squash) May 23, 2022 17:46
@codingllama codingllama force-pushed the codingllama/apple-build branch from 7f56eb6 to 5060963 Compare May 23, 2022 19:22
@codingllama codingllama force-pushed the codingllama/apple-build branch from 5060963 to 28cfa9d Compare May 23, 2022 20:11
@codingllama codingllama merged commit 99ad5c5 into master May 23, 2022
@codingllama codingllama deleted the codingllama/apple-build branch May 23, 2022 21:42
codingllama added a commit that referenced this pull request May 25, 2022
Add the TOUCHID=yes Makefile toggle and enable it on Drone.

Complements #12751.

#9160

* Enable touchid builds on Drone
* Update Drone URL in error message
* Run `make dronegen`
codingllama added a commit that referenced this pull request Jun 28, 2022
Drop the `v` from the tsh installer version number, which was inadvertently
changed by #12751. Makes the installer reappear as a download option in Houston.

Note that the final .app name still has the `v`. Ie:

* tsh-10.0.0-dev.pkg (installer)
* tsh-10.0.0-dev.pkg.sha256 (installer hash)
* tsh-v10.0.0-dev.app (Application package)
codingllama added a commit that referenced this pull request Jun 29, 2022
Drop the `v` from the tsh installer version number, which was inadvertently
changed by #12751. Makes the installer reappear as a download option in Houston.

Note that the final .app name still has the `v`. Ie:

* tsh-10.0.0-dev.pkg (installer) tsh-10.0.0-dev.pkg.sha256 (installer hash)
* tsh-v10.0.0-dev.app (Application package)

Backport #13896 to branch/v10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants