43 Commits

Author SHA1 Message Date
Thomas Eizinger
a1b2ca195c ci(apple): explicitly select Xcode 26.0 (#10511)
In order to build the iOS app with the Xcode version that is installed
on the GitHub runners, we need to select the Xcode version by major and
minor version. Currently, the iOS builds are failing because Xcode 26.1
also exists but iOS 26.1 isn't supported (or released?).

See
https://github.com/firezone/firezone/actions/runs/18239282351/job/51938727311.
2025-10-06 16:07:34 +00:00
Jamil
8eb738e66a chore(ci): downgrade runners to free tier (#10248)
To avoid burning Azure credits, we move the runners back down to the
free tier. Now that caching is properly set up, this should incur only a
minor increase in CI time.
2025-08-26 10:48:45 -07:00
Jamil
f50fa95778 fix(ci): lock xcode major (#9585)
Apple won't allow apps built with Xcode betas to be reviewed.

<img width="1146" alt="Screenshot 2025-06-19 at 9 04 17 AM"
src="https://github.com/user-attachments/assets/11470f04-603b-4c5c-aad2-fba0e4eb391a"
/>
2025-06-19 09:21:58 -07:00
Jamil
1856749d1b fix(ci): download iOS SDK explicitly (#9572)
The runners don't seem to have this installed any longer by default.

Related:
https://github.com/actions/runner-images/issues/12355#issuecomment-2977352487
2025-06-18 19:22:17 +00:00
Thomas Eizinger
042d03af2a feat(gui-client): polish Linux bundling (#9181)
Tauri's `deb` and `rpm` bundler have support for configuring maintainer
scripts. We can therefore just use those instead of tearing apart the
`deb` file that it creates and rebuilding it ourselves.

Our `rpm` packaging is currently completely broken as well. I couldn't
get it to work on CentOS 9 at all due to missing dependencies, likely
introduced by our move to Tauri v2. It installs fine on CentOS 10
though, assuming that the user has the EPEL repository installed which
provides the WebView dependency. I extended the docs to reflect this.

Hence, with this PR, we drop support for CentOS 9 and now require CentOS
10. This allows us to remove a lot of cruft from our bundling process
and instead entirely rely on the Tauri provided bundler.

Lastly, for consistency with other platforms, the name of the
application in places like app drawers has been changed from "Firezone
Client" to just "Firezone".

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2025-05-20 15:34:16 +00:00
Jamil
03d8ed0b5d fix(ci): Revert removal of CURRENT_PROJECT_VERSION (#9189)
In #9072 this variable was removed in favor of populating it via an
Xcode build script. It appears however that the script does not take
effect properly when run from CLI and we need to populate this variable
again.
2025-05-20 08:19:25 -07:00
Jamil
4e61ba9582 fix(apple): set new project version on each build (#9072)
When developing the macOS app, we always build the exact same version
and build code for each build. ~~This _may_ be one reason why we
constantly have to deactivate the extension before the new one will
launch.~~ Edit: Just tested, and I can verify that this does fix the
issue on dev builds, so no more having to uninstall the sysex between
builds.

Even if that's not the reason, this is a cleaner approach than building
it in our prod-only scripts.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2025-05-12 00:55:14 +00:00
Jamil
091b52ef07 ci: Prevent having to manually update provisioning profile UUIDs (#9074)
When updating the provisioning profiles (i.e. when changing anything the
Apple Developer Portal), we needed to manually update these build
scripts to point to the new UUIDs.

This can be made simpler to automatically pull it out of the profiles in
CI.
2025-05-11 22:54:14 +00:00
Jamil
3de8a1e405 fix(apple/iOS): Use pointer directly for libresolv API calls (#9038)
Somewhere between Xcode 16.0 and Xcode 16.3, the API for the libresolv
functions we call changed slightly, and we can now pass the return value
of `__res_9_state()` directly to the `res_9_ninit`, `res_9_ndestroy` and
`res_9_getservers` functions.
2025-05-06 03:32:35 +00:00
Jamil
54e60ca820 fix(ci): Use Developer ID Installer cert to sign pkg (#8796)
Apple requires standalone-distributed `PKG` installers to be signed with
a Developer ID Installer certificate.

Fixes
https://github.com/firezone/firezone/actions/runs/14497960810/job/40670440720#step:6:3500

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2025-04-16 18:29:59 +00:00
Jamil
fc7b6e3fb0 feat(ci): Publish installer PKG for macOS standalone (#8795)
Microsoft Intune's DMG provisioner currently fails unexpectedly when
trying to provision our published DMG file with the error:

> The DMG file couldn't be mounted for installation. Check the DMG file
if the error persists. (0x87D30139)

I ran the following verification commands locally, which all passed:

```
hdiutil verify -verbose <dmg>
hdiutil imageinfo -verbose <dmg>
hdiutil hfsanalyze -verbose <dmg>
hdiutil checksum -type SHA256 -verbose <dmg>
hdiutil info -verbose
hdiutil pmap -verbose <dmg>
```

So the issue appears to be most likely that Intune doens't like the
`/Applications` shortcut in the DMG. This is a UX feature to make it
easy to drag the application the /Applications folder upon opening the
DMG.

So we're publishing an PKG in addition to the DMG, which should be a
more reliable artifact for MDMs to use.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2025-04-16 16:21:40 +00:00
Thomas Eizinger
7791fc143a ci: fix apple artifact upload (#8753) 2025-04-11 13:33:43 +00:00
Jamil
280dc6c97b ci: Don't specify Xcode version (#8293)
A particular version of Xcode locks in particular versions of SDKs to
build against. If we hardcode this, the benefit is that we have a
predictable and repeatable build environment.

The downside is whenever GitHub updates its macOS runner images, we
could fail to build due to a version mismatch.

In general, drift between Xcode versions isn't a problem, and tracking
the latest will more closely track developer's machines.
2025-02-28 07:41:56 +00:00
Thomas Eizinger
411c9b7899 ci: split installation test for GUI client into separate script (#7851)
In #7795, we optimised our CI pipeline to only test the installation of
the GUI client whenever we actually upload to the draft release. This
trigger has been moved to `workflow_dispatch`, meaning no CI builds
neither from PRs nor `main` perform these steps.

This makes it difficult to test GUI client binaries from PRs because
they also no longer get uploaded to the artifacts of the CI run on the
PR.

To fix this, we split the testing away from the rename script and
unconditionally run the rename script, which allows us to also always
upload the binaries to the CI artifacts.

Finally, uploading to the draft releases is only done when we explicitly
trigger the workflow from `main`. This is a defense-in-depth measure: We
should never publish a code to a release that hasn't been merged to
`main`.
2025-01-24 06:00:11 +00:00
Jamil
4eb8a5b9be ci: Notarize disk image instead of .zip (#7718)
Rather than notarizing the embedded app, the `notarytool` supports
notarizing the entire disk image instead which will recursively notarize
relevant binaries inside.
2025-01-09 23:24:25 +00:00
Jamil
216ca9b8bc chore(apple/macOS): Add boilerplate Info.plist parameters (#7717)
Some reports online indicate Gatekeeper relies on some of these to be
set for standalone apps and missing them can result in apps failing to
be marked "verified".

https://developer.apple.com/forums/thread/129024?page=2
2025-01-09 22:14:03 +00:00
Jamil
10c166dda4 fix(ci): Fix typo when moving final DMG into place (#7710)
The customized DMG needs to be moved to `ARTIFACT_PATH`. Currently, this
is set to the intermediate `$package_path`.
2025-01-09 07:24:42 +00:00
Jamil
cda50e319a ci: Remove DMG staging directory to prevent Sentry from walking its /Applications symlink (#7687)
`sentry-cli debug-files upload` offers no option to exclude certain
files or directories when recursively searching the given path. Thus, we
need to remove this staging directory to prevent it from recursively
walking the directory and inevitably erroring out when it hits a path it
doesn't have access to.
2025-01-07 17:51:56 +00:00
Jamil
24e2503e01 ci: Upload sentry debug dSYMs for Apple (#7682)
Needed to print traces in Sentry issues for the apple clients.
2025-01-07 10:55:18 +00:00
Jamil
0c38409588 ci: Add standalone macOS build support (#7581)
The CI swift workflow needs to be updated to accommodate the macOS
standalone build. This required a decent amount of refactoring to make
the Apple build process more maintainable.

Unfortunately this PR ended up being a giant ball of yarn where pulling
on one thread tended to unravel things elsewhere, since building the
Apple artifacts involve multiple interconnected systems. Combined with
the slow iteration of running in CI, I wasn't able to split this PR into
easier to digest commits, so I've annotated the PR as much as I can to
explain what's changed.

The good news is that Apple release artifacts can now be easily built
from a developer's machine with simply
`scripts/build/macos-standalone.sh`. The only thing needed is the proper
provisioning profiles and signing certs installed.

Since this PR is so big already, I'll save the swift/apple/README.md
updates for another PR.
2024-12-28 22:28:09 +00:00
Reactor Scram
7daa1a9ec3 chore(ci): build RPM package (#7190)
Refs #6145 

This bundles aarch64 and x86_64 RPMs in CI and CD.

We'll need a 2nd PR to add everything to the changelog and knowledge
base, after the first release with RPMs is cut.
2024-11-01 18:06:09 +00:00
Reactor Scram
4fe4001760 chore(rust/gui-client): migrate to Tauri v2 (#6996)
Closes #4883 

Refs #7005 

Adds support for Ubuntu 24.04, drops support for Ubuntu 20.04

Known issues:
- On Ubuntu 22.04, sometimes GNOME shows the wrong tray icon
- On Ubuntu 24.04, the first time you open the tray menu, GNOME takes a
long time to open the menu.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-10-24 16:31:28 +00:00
Reactor Scram
f1cd137e24 feat(rust/gui-client/windows): sign the IPC service exe (#7009)
Closes #7008.

We already signed the GUI exe and the entire MSI package, but when
adding the IPC service we overlooked that one.
This PR:
- Modifies the signing script to accept multiple EXEs
- Modifies the Tauri bundle command to sign both exes
- Updates the changelog

![image](https://github.com/user-attachments/assets/ba58c540-dd0c-42b4-ba62-9c96fc4682c5)
2024-10-11 20:32:50 +00:00
Jamil
2294391d22 ci: Don't clobber assets for published releases (#5352)
Adds a sanity check to prevent clobbering assets on published releases.
Otherwise, assets will continue to be pushed to the published release
until the version is bumped.
2024-06-13 06:41:38 +00:00
Reactor Scram
37b3bc2047 test(gui-client): remove parts of the test scripts that are redundant (#5280)
The post-install script does all this stuff now
63567b5b33/rust/gui-client/src-tauri/deb_files/postinst (L9-L15)

Ran into this while working on #5279
2024-06-07 20:00:49 +00:00
Reactor Scram
d59c3fef0a build(gui-client): add post-install and pre-remove scripts to the deb package (#5011)
Closes #4987

```[tasklist]
### Before merging
- [x] Get an x64 test VM on the Windows laptop and test a CI-built deb
```
2024-05-16 23:03:21 +00:00
Reactor Scram
5814efc036 chore(windows-client): proof of concept for installing a system service with WiX (#4903)
```[tasklist]
### Before merging
- [x] Make sure the service auto-starts
- [x] Make the process idle and report its status to Windows properly using https://github.com/mullvad/windows-service-rs
- [x] DRY log dir code
- [x] Figure out where service logs will go and how the GUI will zip them
- [x] Make sure the service gets a shut down signal from Windows (this is hard to catch in the Tauri GUI)
- [x] Make sure the service restarts when Firezone is updated
- [x] Make sure the service is stopped and un-installed when Firezone is un-installed
- [x] Add test to install the MSI and check that the service runs
- [x] (will move to another PR) ~~Clean up function names~~
- [x] Make sure the Linux GUI was not broken by refactoring
```
2024-05-13 14:08:21 +00:00
Reactor Scram
390f9de811 refactor(ci): use the same test framework for headless client and IPC service (#4943)
This will fix an issue with `linux-group` and `token-path` that happens
when I try to split up the binaries.

```[tasklist]
### Before merging
- [x] Fix linux-group. That stub-ipc-client command doesn't even exist anymore
```
2024-05-10 14:57:55 +00:00
Reactor Scram
7870dcab25 ci(gui-client/linux): publish deb package in the release (#4876)
```[tasklist]
### Before merging
- [x] (FAILED) Test CI deb on Ubuntu 24.04 #4883
- [x] Wait for everything else to merge: #3884
- [x] Fix #4889
- [x] Fix #4890
- [x] Test on Ubuntu 20.04 (683bddc0b passed)
- [x] Test on Ubuntu 22.04 (683bddc0b passed)
- [x] diff between main and 683bddc0b to make sure nothing in the code changed
- [ ] Someone other than me should give it a once-over. `intended_behavior.md` has the manual smoke test I've been doing on it. Install script is <a943a9dba1/scripts/firezone-client-gui-install.sh> Deb package from CI is <https://github.com/firezone/firezone/actions/runs/8972824465/artifacts/1477261361> 
```
2024-05-07 14:11:24 +00:00
Reactor Scram
35a802d6d9 chore(gui-client/linux): add install script and change group to firezone-client (#4879)
Closes #4873
2024-05-02 17:51:28 +00:00
Reactor Scram
d0155bc786 fix(windows-client): package name should be "Firezone" not "firezone-client-gui" (#4814)
Closes #4813 

After PR, the installer, UAC dialog, and notifications all say
"Firezone" again

<img width="494" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/69a4fe0b-78fa-4945-b17f-625e68ac09db">
2024-04-29 17:34:25 +00:00
Reactor Scram
b93e8870c3 refactor(linux-client): package systemd unit for IPC service (#4752)
This aligns some of the internal names with #4531, but it shouldn't
break the externally-visible things like package names or permalinks.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-04-26 23:07:02 +00:00
Jamil
af066dcb97 ci: use consistent binary dest path naming (#4772) 2024-04-24 20:11:00 +00:00
Reactor Scram
e1eda7977c refactor: Make published artifact names consistent and use permalinks (#4746)
```[tasklist]
- [x] Update website
- [x] Update blog entry with old link
- [ ] ~~Replace Github URL in GUI Client updater with our own links~~
- [ ] Wait for CI to go green
```

Refs #4531 

This proposes a unified scheme for deb and MSI packages, and moves
Windows to that scheme.

This breaks compatibility. Existing Clients won't recognize the new
asset names once this is merged, so they won't show the "Firezone 1.0.0
is available" pop-up.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2024-04-24 09:42:12 -07:00
Reactor Scram
023c885967 refactor(linux-client): extract all code to firezone-client-tunnel (#4448)
Refs #3713 

With this, the deb package for the Linux GUI Client contains a build of
the Linux CLI Client, at `/usr/bin/firezone-client-tunnel`. Future PRs
can add IPC to the code.

There is also a Windows stub, since Windows will eventually need a
tunnel process and a CLI Client.

In the future we might need to move or rename things, since the CLI
Clients and tunnel binaries for both Linux and Windows may all share
code or at least architecture. For now there is a slight duplication
with this being built as both "Firezone Client Tunnnel" and "Firezone
Linux Client"
2024-04-02 16:59:29 +00:00
Reactor Scram
64f0427ef4 ci(gui-client): hide the Linux GUI deb since it's not ready yet (#4258)
It's still in the CI artifacts for easy testing, but there's no point
letting users see it since it's in the middle of the process split
re-architect
2024-03-21 23:49:34 +00:00
Reactor Scram
b0904e382a chore: add crate for privileged Linux tunnel process (#4229)
Refs #3713 

```[tasklist]
### Before merging
- [ ] Is 'firezone-client-tunnel' okay for the binary name?
- [ ] Using a library and building it as two binaries is correct, right? `cargo run -p firezone-client-tunnel` takes 1 second. `cargo run -p firezone-gui-client --bin firezone-client-tunnel` takes 1m42s because it builds all the GUI deps.
```
2024-03-21 14:06:55 +00:00
Reactor Scram
e05cbbe0a0 build(gui-client/linux): include an empty firezone-tunnel binary with the Tauri deb package (#4220)
I thought this was going to use `cargo-deb` but it was actually easy
with the Tauri deb bundling we already use.

```[tasklist]
### Before merging
- [x] Make sure every file in the Tauri deb is also in our deb (e.g. icons)
```
2024-03-20 14:11:41 +00:00
Reactor Scram
651ea3ae00 build(gui-client/linux): make sure debug symbols get uploaded for the Linux GUI client (#4217)
- Split up CI artifacts into "exe", "pkg", and "syms" so it's easy to
check they're being uploaded. This shouldn't affect published artifacts
- Set `strip = "none"` which seems to be necessary to get the debug
symbols in Linux, although they still end up in the exe and not the dwp
file 🤔 don't know why
- Test Linux stacktrace in CI

Stacktrace examples:
- On Linux we at least get function names, but we aren't getting line
numbers for some reason
https://github.com/firezone/firezone/actions/runs/8350493514/job/22857032124#step:10:268
- On Windows we also get line numbers, as before
https://github.com/firezone/firezone/actions/runs/8350493514/job/22857033367#step:11:351

I didn't test downloading the files and doing a stacktrace locally, but
I have batched that up for whenever I do a big manual test of the
CD-produced release artifacts:
https://github.com/firezone/firezone/issues/3887
2024-03-19 22:18:03 +00:00
Reactor Scram
74026d8b13 build(gui-client): disable AppImage bundling (#4216)
AppImages won't work with process splitting. (#3713)

As far as I can tell, they just produce one binary. Internally they use
FUSE or something to mount a squashfs image, but that image won't be
able to hook into systemd and run with root permissions and everything.
I don't think it's practical, and Tauri's AppImage bundling doesn't have
the features for it.

Even their deb bundler doesn't have any way to specify a path for a
daemon to be installed. The sidecar feature only seems intended for the
GUI app to call, not anything else on the system.

(There is such a thing as installing AppImages, but I don't think it's
worth pursuing - We should just do debs)
2024-03-19 17:26:25 +00:00
Jamil
9cab250696 chore(windows): Sign internal exe using beforeBundleCommand (#3994)
Refs #3230 

It looks like we need to sign the internal exe before it gets bundled
too. We can use `beforeBundleCommand` to do so.

Soon, Tauri should have native support for this exact scenario:
https://github.com/tauri-apps/tauri/pull/8718
2024-03-06 16:00:54 +00:00
Jamil
19e833262f chore(windows): Sign windows exe too (#3992)
Fixes #3230
2024-03-05 22:35:24 -08:00
Reactor Scram
fd31152106 refactor(ci): enable Linux do-nothing GUI builds (but not tests) in CI/CD, extract scripts for that (#3735)
Builds a do-nothing `return 0` Linux client to make sure the CI/CD
scripts are set up and producing AppImage / deb bundles as expected.


![image](https://github.com/firezone/firezone/assets/13400041/7d2d8f02-adde-4b1b-89ec-02aaf112ac48)

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-23 17:57:39 +00:00