Summary:
This change has a few changes in the way our MacOS app was built and packaged.
- Instead of placing the Node binary inside the MacOS folder, place it inside the Resources folder. This is more in compliance with how an app is bundled. Also, with the added benefit of making it a resource which makes it eligible for code signing.
- Both, Node binary and server bundle are placed in the right location before building the MacOS app. By doing this, we ensure the app is not modified after the built process which messes up with code signing, if in place.
Reviewed By: antonk52
Differential Revision: D51568778
fbshipit-source-id: 0b1b0ad9947550ddf0f6d4b04e5aff41f7edcdee
Summary:
Add codesign capabilities to Flipper Server Cocoa app.
Also, push the version to the build step instead of overriding once built. Otherwise, the Info.plist will be marked as 'being tampered with'.
Note: we are still not using the signing, but the capability is there.
Reviewed By: antonk52
Differential Revision: D51547008
fbshipit-source-id: 33abcd2fce33a7daf2ae8941b54989dba82fc0e3
Summary:
As mentioned on the previous diff, we no longer use a pre-built template when creating a release build.
This change moves the built binary directly into place instead of updating the existing template after which it was moved to its final destination.
Reviewed By: antonk52
Differential Revision: D51424944
fbshipit-source-id: 284fb53bb5f00f92b3ca9db3b28cfd1e4dacfa19
Summary:
So far we have used a 'template' approach, in which the release build script will copy and use to create the final deliverable.
The template itself was updated locally by running:
cd ~/fbsource/xplat/sonar/facebook/flipper-server
yarn start
This would:
- Build the MacOS app for all supported architectures: x64 and arm64
- Update the template found on the static directory
After the update, we would just commit the changes to the repo.
## About this change
Instead, build the MacOS app when the release script is used. This is leaves way less margin for error as we have removed all the manual steps that had to be done as listed above.
Reviewed By: antonk52
Differential Revision: D51397661
fbshipit-source-id: 2234c9996fa98f32db244764acf3e35dc9a388c9
Summary: This is a duplicate, is not needed, causes confusion.
Reviewed By: aigoncharov
Differential Revision: D51307091
fbshipit-source-id: 4d55d727ea5f20100ecd15ad6e23aa0c01722524
Summary:
The current '--mac' arg builds all supported architectures. This is great when generating release builds but not so much when testing a release for the current architecture.
Not modifying the existing '--mac' arg as to not update our current CI.
Reviewed By: antonk52
Differential Revision: D50497211
fbshipit-source-id: 3e4d9728adc822c48788556e2ea47f4dd1c21b05
Summary: This is the immediate follow-up from the previous diff which aims to integrate the MacOS app into our release build script, meta only.
Reviewed By: antonk52, aigoncharov
Differential Revision: D50301369
fbshipit-source-id: 23a4842666c3a7aa9616c6237e16b71bae87ba36
Summary: Changelog: When requesting Keychain Access, you will now see "flipper-runtime" instead of a generic "node" process.
Reviewed By: lblasa
Differential Revision: D50261830
fbshipit-source-id: ef6fd7d5099c4ff7370f0401a5de3fde1659f1f3
Summary: This is more reliable and follows redirect which we need for GitHub downloads.
Reviewed By: antonk52
Differential Revision: D50263976
fbshipit-source-id: d001b6eb460510b0b673ea66651e7c39cac3092f
Summary:
Copying files will randomly fail with something akin to
```
Error: Cannot copy '../acirb/bin/acorn' to a subdirectory of itself, '../acorn/bin/acorn'.
```
See https://github.com/jprichardson/node-fs-extra/issues/708
Reviewed By: antonk52
Differential Revision: D50263977
fbshipit-source-id: 39091ef57b79c692ec89e7a250595509839e2af8
Summary:
As discussed with lblasa. This solves a few issues:
- Confusing names in `ps` and Activity Monitor related to Flipper.
- Permission requests for the Keychain from "node" lead users to deny it.
- Seeing "node" as allowed apps for an entry in Keychain is confusing.
Reviewed By: lblasa
Differential Revision: D50232337
fbshipit-source-id: 3bc92aae0ca31d1a80582fb8a794bbc64fc2f2e5
Summary: Add an option to archive the server build inside a DMG.
Reviewed By: antonk52
Differential Revision: D49504225
fbshipit-source-id: 3c34e6f0e4c9a685d36771199a6e20394f68baef
Summary: A few improvements to the installation wizard.
Reviewed By: antonk52
Differential Revision: D49145069
fbshipit-source-id: 1aadd85e1d187bd61983a0b4201b530cbdbf509a
Summary: Need to copy this resource too from the static directory.
Reviewed By: aigoncharov
Differential Revision: D48864174
fbshipit-source-id: 0f3bfe9608bb9d48ec1cfb7243b3f0701d2fd8cf
Summary: UDS will be removed. The first step would be to remove the TCP optionality.
Reviewed By: passy
Differential Revision: D48264741
fbshipit-source-id: ca9e1b68be61e99240e95bcd4f26f2db63a64005
Summary: This is needed on Windows, otherwise it just throws an error when using spawn.
Reviewed By: passy
Differential Revision: D47832379
fbshipit-source-id: c1a5094c2e72683a695949cd99b2a1054f01aced
Summary: Just adds a function stub that will add the necessary run script for windows.
Reviewed By: passy
Differential Revision: D47627532
fbshipit-source-id: 09b6a203c2a5def20e586b5753d95ca58797852a
Summary:
Right now, both Launcher and PWA share the same icon.
As to make it easier to identify which one is which, PWA will have a greyed icon instead.
Reviewed By: antonk52
Differential Revision: D47436998
fbshipit-source-id: 69d4d273c35e327263fbbf02d4ac7a005013f1d9
Summary:
It seems the available binary for macOS arm64 is not signed:
```
codesign -dv --verbose=4 ./node-v16.16.0-macos-arm64
./node-v16.16.0-macos-arm64: code object is not signed
```
This is an issue as it crashes for our flipper server releases.
This can be compared to a binary downloaded from the Node distribution page:
```
codesign -dv --verbose=4 ./node
Executable=/Users/realpassy/Downloads/node-v16.15.0-darwin-arm64/bin/node
Identifier=node
Format=Mach-O thin (arm64)
CodeDirectory v=20500 size=597360 flags=0x10000(runtime) hashes=18657+7 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=721152
Hash type=sha256 size=32
CandidateCDHash sha256=31cdf84cac42a622c1a68558376700a2dd12d40d
CandidateCDHashFull sha256=31cdf84cac42a622c1a68558376700a2dd12d40d81c5118f3b0e0370c414eb69
Hash choices=sha256
CMSDigest=31cdf84cac42a622c1a68558376700a2dd12d40d81c5118f3b0e0370c414eb69
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=56082432
Executable Segment flags=0x1
Page size=4096
Launch Constraints:
None
CDHash=31cdf84cac42a622c1a68558376700a2dd12d40d
Signature size=8986
Authority=Developer ID Application: Node.js Foundation (HX7739G8FX)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=26 Apr 2022 at 23:00:57
Info.plist=not bound
TeamIdentifier=HX7739G8FX
Runtime Version=11.1.0
Sealed Resources=none
Internal requirements count=1 size=164
```
For additional context:
Node binary by using pkg-fetch. We just get the binary from this release page: https://github.com/vercel/pkg-fetch/releases/tag/v3.4
The exact binary we're downloading is https://github.com/vercel/pkg-fetch/releases/download/v3.4/node-v16.15.0-macos-arm64
If you just download that via Chrome, it will trigger Gatekeeper and you need to manually click "Allow" in the system privacy settings. You can also do the same by just running:
xattr -c ./node-v16*
Afterwards you can:
chmod +x ./node*
It will crash in the same way that it does after our distribution.
Reviewed By: passy
Differential Revision: D46225503
fbshipit-source-id: f0ae2d5101b99c9db7fe80333573caef52c787a2
Summary:
The file manifest.json is injected with the auth token and it happens with every launch.
Because the file is tracked, these changes will always get picked no matter what the .gitignore file specifies, because is a tracked file.
So, the solution is to have a template with a different name, that gets copied into the right location during build time.
Reviewed By: LukeDefeo
Differential Revision: D46184772
fbshipit-source-id: 938b9433045485d9846a6a50c1c955ebe7925581
Summary:
Replace an existing running instance, if any.
This is useful for:
- Applying updates
- Ensuring freshness of server
Reviewed By: passy
Differential Revision: D46146814
fbshipit-source-id: bfb760f3ab26b7632510773609f1c6ca3a97c4ec
Summary: Currently, Flipper server cannot be used with Flipper Launcher on Linux because there is no `flipper` binary in the root of the directory. Adding a quick shell script bridges the call from the checked-in node binary and the server JS file.
Reviewed By: ardavank
Differential Revision: D43837781
fbshipit-source-id: d954ae21d5330aa549d4bc76aefb1d76af8e2c84
Summary: Now that we build all plugins at all times and it is super-fast, these options are redundant
Reviewed By: lblasa
Differential Revision: D39542723
fbshipit-source-id: 1b30ba384267ec4fd0c35b4dc14f0223ffe414c9
Summary: Make flipper-server link local flipper-* deps for intern prod build. Update flipper-* deps versions for public builds so `npx` pulls them from npm
Reviewed By: lblasa
Differential Revision: D39497944
fbshipit-source-id: ca2674a4ac8f5b6c3efa9546b631f2526bf48f8e
Summary: Move flipper local deps to prod deps, so yarn installs them later when we build a bundle
Reviewed By: lblasa
Differential Revision: D39475545
fbshipit-source-id: 5b61d15b45ee315c3b35d8e6836c114b90503b1a
Summary: prepareDefaultPlugins builds all plugins now. We no longer need extra helpers
Reviewed By: lblasa
Differential Revision: D39308098
fbshipit-source-id: 4f12a0bdbc2afd2b306565fff3494daa630e1a20
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them.
Reviewed By: lblasa
Differential Revision: D39276249
fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1
Summary: Flipper server itself requires no babel transforms. We applied extra transforms only for the bundled plugins. However, we pack and ship all plugins in the /static folder. They are always available on the FS. Therefore we could stop bundling any plugins into flipper-server's source code.
Reviewed By: lblasa
Differential Revision: D38910251
fbshipit-source-id: b3e9fe5ae2ab69ce5579b01b6793ebf7e88baf66
Summary: prepareDefaultPlugins and prepareHeadlessPlugins should come before compileServerMain to bundle plugins
Reviewed By: passy
Differential Revision: D38862132
fbshipit-source-id: 952a2f6d4f857f4faacfc952bebb4e59afcbc5b0
Summary:
Provide an option to enable/disable TCP connections on flipper-server.
The only change at this stage is that Flipper Desktop will use UDS to connect to flipper-server.
Reviewed By: passy
Differential Revision: D37519656
fbshipit-source-id: 3d02084666fde532ec76134edf8cf6a231060a48
Summary: This was lost when I changed from `pkg-fetch` writing it to copying the file.
Reviewed By: mweststrate, aigoncharov
Differential Revision: D36682861
fbshipit-source-id: 23822d4cc75720a83282de949d28029a05a2a7f9
Summary:
Provide the same build parameters as for the main build and move
the two bundles to a folder where we can pick them up.
For consistency, I'm keeping the naming scheme with the main build.
Reviewed By: antonk52
Differential Revision: D36521046
fbshipit-source-id: 9ea992d6e5dc299d88083d751ca8e84eadb1430b
Summary:
pkg-fetch is a bit weird in that it doesn't use the offline cache
if an output path is defined. That makes building in Sandcastle a lot harder.
Reviewed By: lawrencelomax, aigoncharov
Differential Revision: D36485283
fbshipit-source-id: 27596999c69441bc25e341db77b409ed0caaf0fe
Summary: Current temporary limitations: all headless plugins are bundled with Flipper.
Reviewed By: antonk52
Differential Revision: D36098168
fbshipit-source-id: c58abe41776157258a5c39a80a5c1a33cf3f42c5
Summary:
This bundles up the Flipper Server in a Mac App Bundle which is identically in shape to a regular Desktop bundle. That means we can swap them out transparently without having to keep the layout in sync with Flipper Launcher.
It bundles nodeJS binary which we can later also provide for aarch64.
Reviewed By: aigoncharov
Differential Revision: D36140809
fbshipit-source-id: fb3410626ab172ce0da48f1a4a1489da68450369
Summary:
To roll out Flipper Server for desktop, we need a bundle that comes with all node dependencies pre-installed and a bundled Node runtime. This creates some platform-specific sub-folders in `dist/` with both.
The `--mac`, `--linux`, `--win` options are chosen to be compatible with the main build script. For now, we only build x64 builds for Mac which is also in line with the Desktop build as we don't have signing for the whole bundle.
Reviewed By: lblasa
Differential Revision: D35545492
fbshipit-source-id: cce7165916d91a333f305713b9d6d7b9984984f4
Summary:
Some internal jobs started to fail in the same way as GH did. Applied the same patch as in the parent diff.
I suspect the cause is an earlier update of node / bash / other dep? Couldn't really find anything clearly pointing at the problem
Reviewed By: aigoncharov
Differential Revision: D35212673
fbshipit-source-id: c09956137a4b10537718ffa60223cc4e557f41f7
Summary: Prior to this fix, plugins were copied with verion 0.0.0 which forced them to be updated with "newer" versions from marketplace
Reviewed By: nikoant
Differential Revision: D34457087
fbshipit-source-id: a3242578c570447f8ecf9c62bcaa69e5d9688c42