diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00e8d76f1..3bd0e581d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,7 +126,7 @@ jobs: permissions: contents: write name: Generate build data - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest needs: buildid outputs: build_date: ${{ steps.data.outputs.builddate }} @@ -359,7 +359,7 @@ jobs: name: AppImage build - Linux ${{ matrix.arch }} permissions: contents: write - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest strategy: matrix: arch: [x86_64, aarch64] @@ -439,7 +439,7 @@ jobs: path: ./dist/zen-${{ matrix.arch }}.AppImage.zsync stop-self-hosted: - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest needs: [windows-step-3, linux] if: always() steps: @@ -505,14 +505,9 @@ jobs: run: | git clone https://github.com/zen-browser/windows-binaries.git .github/workflows/object --depth 1 - - name: Download signmar-linux-x86_64 from artifacts - uses: actions/download-artifact@v4 - with: - name: signmar-linux-x86_64 - - name: Sign MAR files env: - SIGNMAR: ${{ github.workspace }}/signmar-linux-x86_64/signmar + SIGNMAR: ${{ github.workspace }}/linux-bin-x86_64/signmar ZEN_MAR_SIGNING_PASSWORD: ${{ secrets.ZEN_MAR_SIGNING_PASSWORD }} ZEN_SIGNING_CERT_PEM_BASE64: ${{ secrets.ZEN_SIGNING_CERT_PEM_BASE64 }} ZEN_SIGNING_PRIVATE_KEY_PEM_BASE64: ${{ secrets.ZEN_SIGNING_PRIVATE_KEY_PEM_BASE64 }} @@ -523,6 +518,9 @@ jobs: env: RELEASE_BRANCH: ${{ inputs.update_branch }} run: | + # IMPORTANT: If changing any of these names, + # make sure to also update the paths in the mar_sign.sh script + cd updates-server mkdir -p updates cp -a ../linux_update_manifest_x86_64/. updates/ @@ -616,7 +614,7 @@ jobs: permissions: write-all name: Prepare Flatpak needs: [release, linux, build-data] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest steps: - name: Checkout Flatpak repository @@ -675,7 +673,7 @@ jobs: permissions: write-all name: Release Flatpak needs: [prepare-flatpak, build-data] - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest steps: - name: Checkout Flatpak repository diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 2ce7906cc..2fba0e880 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -174,10 +174,10 @@ jobs: name: linux_update_manifest_${{ matrix.arch }} path: ./dist/update - - name: Upload signmar + - name: Upload linux bin if: ${{ matrix.arch == 'x86_64' }} uses: actions/upload-artifact@v4 with: retention-days: 2 - name: signmar-linux-x86_64 - path: engine/obj-x86_64-pc-linux-gnu/dist/bin/signmar + name: linux-bin-x86_64 + path: engine/obj-x86_64-pc-linux-gnu/dist/bin/ diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index a7260a733..10c1da6d3 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -285,7 +285,7 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }} with: - retention-days: 5 + retention-days: 2 name: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-${{ inputs.profile-data-path-archive }} path: ./zen.win64-pgo-stage-1.zip @@ -312,14 +312,6 @@ jobs: name: windows-x64-obj-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} path: obj-${{ matrix.arch }}-pc-windows-msvc - - name: Upload artifact (if Twilight branch, binary) - if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} - uses: actions/upload-artifact@v4 - with: - retention-days: 5 - name: zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip - path: ./zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip - - name: Upload artifact (if Twilight branch, installer) if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index fe46e784a..f92956ab3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne ### Firefox Versions - [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `149.0.2`! 🚀 -- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 149.0.2`! +- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 150.0`! ### Contributing diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash index adafe3fc8..901736b71 100644 --- a/build/firefox-cache/l10n-last-commit-hash +++ b/build/firefox-cache/l10n-last-commit-hash @@ -1 +1 @@ -fc45ac45a16dd9312a3e678fdaef33aaa7e0e641 \ No newline at end of file +11d1ba8e182db855a1aba82796e219c2abe8c3ac \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c773998a9..b794c5098 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1902,9 +1902,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "dev": true, "funding": [ { diff --git a/prefs/zen/glance.yaml b/prefs/zen/glance.yaml index ef01648c1..299e616c7 100644 --- a/prefs/zen/glance.yaml +++ b/prefs/zen/glance.yaml @@ -15,7 +15,7 @@ value: "alt" # ctrl, alt, shift - name: zen.glance.animation-duration - value: 350 # in milliseconds + value: 300 # in milliseconds - name: zen.glance.deactivate-docshell-during-animation value: true diff --git a/prefs/zen/gtk.yaml b/prefs/zen/gtk.yaml index 5fb3a41ab..c0f39dd26 100644 --- a/prefs/zen/gtk.yaml +++ b/prefs/zen/gtk.yaml @@ -4,9 +4,9 @@ # GTK-specific preferences - name: widget.gtk.rounded-bottom-corners.enabled - # Disabled for https://github.com/zen-browser/desktop/issues/6302, - # also see https://bugzilla.mozilla.org/show_bug.cgi?id=1979083 - value: false + # See https://bugzilla.mozilla.org/show_bug.cgi?id=1979083 + # and https://bugzilla.mozilla.org/show_bug.cgi?id=1994267 + value: true condition: "defined(MOZ_WIDGET_GTK)" - name: zen.widget.linux.transparency diff --git a/prefs/zen/split-view.yaml b/prefs/zen/split-view.yaml index 869b4c459..aa02b6def 100644 --- a/prefs/zen/split-view.yaml +++ b/prefs/zen/split-view.yaml @@ -15,7 +15,7 @@ value: true - name: zen.splitView.drag-over-split-delayMC - value: 1000 + value: 350 - name: zen.splitView.drag-over-split-threshold - value: 40 + value: 25 diff --git a/prefs/zen/view.yaml b/prefs/zen/view.yaml index d990c13fa..1f36da3f0 100644 --- a/prefs/zen/view.yaml +++ b/prefs/zen/view.yaml @@ -57,3 +57,6 @@ - name: zen.view.overflow-webext-toolbar value: "@IS_TWILIGHT@" + +- name: zen.view.enable-loading-indicator + value: true diff --git a/prefs/zen/workspaces.yaml b/prefs/zen/workspaces.yaml index 400a4bc9e..58a0499ac 100644 --- a/prefs/zen/workspaces.yaml +++ b/prefs/zen/workspaces.yaml @@ -33,7 +33,7 @@ value: true - name: zen.workspaces.dnd-switch-padding - value: 5 + value: 20 - name: zen.workspaces.debug value: "@cond" diff --git a/prefs/zen/zen.yaml b/prefs/zen/zen.yaml index fd0dbd67f..685bb3866 100644 --- a/prefs/zen/zen.yaml +++ b/prefs/zen/zen.yaml @@ -27,7 +27,7 @@ value: 20 # Percentage of folder height to trigger dragover - name: zen.tabs.dnd-switch-space-delay - value: 800 # milliseconds + value: 500 # milliseconds - name: zen.ctrlTab.show-pending-tabs value: false diff --git a/scripts/mar_sign.sh b/scripts/mar_sign.sh index 8b12a5d68..fb47c6a80 100644 --- a/scripts/mar_sign.sh +++ b/scripts/mar_sign.sh @@ -84,7 +84,7 @@ create_nss_config_dir() { openssl pkcs12 -export \ -inkey "$CERT_PATH_DIR/private_key.pem" \ -in "$CERT_PATH_DIR/cert.pem" \ - -name "private_key" \ + -name "mar_sig" \ -passout pass:"$ZEN_MAR_SIGNING_PASSWORD" \ -out "$CERT_PATH_DIR/private_key.p12" @@ -105,6 +105,57 @@ cleanup_certs() { rm -f "$CERT_PATH_DIR/cert.pem" } +update_manifests() { + mar_file=$(basename "$1") + if [[ "$mar_file" == "linux.mar" ]]; then + manifest="linux_update_manifest_x86_64" + elif [[ "$mar_file" == "linux-aarch64.mar" ]]; then + manifest="linux_update_manifest_aarch64" + elif [[ "$mar_file" == "windows.mar" ]]; then + manifest=".github/workflows/object/windows-x64-signed-x86_64/update_manifest" + if [ ! -f "$manifest" ]; then + manifest="windows_update_manifest_x86_64" + fi + elif [[ "$mar_file" == "windows-arm64.mar" ]]; then + manifest=".github/workflows/object/windows-x64-signed-arm64/update_manifest" + if [ ! -f "$manifest" ]; then + manifest="windows_update_manifest_arm64" + fi + elif [[ "$mar_file" == "macos.mar" ]]; then + manifest="macos_update_manifest" + else + echo "Unknown MAR file name format: $mar_file. Skipping manifest update." >&2 + exit 1 + fi + # There can be any update.xml file, lets just recursively search for the one + manifest_files=$(find "$manifest" -type f -name "update.xml") + for manifest_file in $manifest_files; do + # Example manifest: + # + # + # + # + # When signing the mar, hashValue and size will change, so we need to update the manifest with + # the new values. We can get the new values by running "mar -i signed_mar_file.mar" + echo "Updating manifest $manifest_file with new hash and size for $mar_file" + size=$(wc -c < "$1" | tr -d ' ') + hashValue=$(sha512sum "$1" | awk '{print $1}') + # Update the manifest with the new values. We can use sed to do this. + # We need to find the line that contains the URL of the mar file, and update the hashValue and size attributes in the same element. + old_hashValue=$(grep -oP 'hashValue="\K[^"]+' "$manifest_file") + old_size=$(grep -oP 'size="\K[^"]+' "$manifest_file") + if [ -z "$old_hashValue" ] || [ -z "$old_size" ]; then + echo "Could not find old hashValue or size in manifest. Skipping manifest update." >&2 + exit 1 + fi + echo "Old hashValue: $old_hashValue, Old size: $old_size" + echo "New hashValue: $hashValue, New size: $size" + sed -i.bak "s/hashValue=\"$old_hashValue\"/hashValue=\"$hashValue\"/g; s/size=\"$old_size\"/size=\"$size\"/g" "$manifest_file" + rm "$manifest_file.bak" + echo "Manifest updated with new hashValue and size for $mar_file" + done +} + sign_mars() { if [ ! -f "$SIGNMAR" ]; then echo "Error: signmar not found at $SIGNMAR. Build the engine first." >&2 @@ -119,7 +170,7 @@ sign_mars() { linux.mar linux-aarch64.mar windows.mar - windows-arm64 + windows-arm64.mar macos.mar ) # each folder will contain the .mar files for that platform, and the signature will be written in-place @@ -130,17 +181,20 @@ sign_mars() { echo "" echo "Signing $mar_file..." # mar [-C workingDir] -d NSSConfigDir -n certname -s archive.mar out_signed_archive.mar - "$SIGNMAR" -d "$NSS_CONFIG_DIR" -n "private_key" -s "$mar_file" "$mar_file".signed + "$SIGNMAR" -d "$NSS_CONFIG_DIR" -n "mar_sig" -s "$mar_file" "$mar_file".signed echo "Signed $mar_file. Verifying signature..." - "$SIGNMAR" -d "$NSS_CONFIG_DIR" -n "private_key" -v "$mar_file".signed + "$SIGNMAR" -d "$NSS_CONFIG_DIR" -n "mar_sig" -v "$mar_file".signed mv "$mar_file".signed "$mar_file" echo "Successfully signed $mar_file" + update_manifests "$mar_file" else echo "No .mar files found in $folder, skipping." + exit 1 fi done else echo "Directory $folder not found, skipping." + exit 1 fi done diff --git a/scripts/update_external_patches.py b/scripts/update_external_patches.py index 3e4c1057b..341cb77f7 100644 --- a/scripts/update_external_patches.py +++ b/scripts/update_external_patches.py @@ -24,6 +24,9 @@ def download_phab_patch(phab_id, output_file): print(f"Downloading patch from {patch_url}") response = requests.get(patch_url) response.raise_for_status() # Raise an error for bad responses + folder = os.path.dirname(output_file) + if not os.path.exists(folder): + os.makedirs(folder) with open(output_file, 'wb') as f: f.write(response.content) print(f"Patch saved to {output_file}") @@ -51,24 +54,27 @@ def main(): expected_files = set() for patch in manifest: if patch.get("type") == "phabricator": - phab_id = patch.get("id") + phab_ids = [patch.get("id")] if patch.get("id") else patch.get("ids", []) name = patch.get("name") - if not phab_id or not name: + if not phab_ids or not name: die(f"Patch entry missing 'id' or 'name': {patch}") name = name.replace(" ", "_").replace(".", "_").lower() - output_file = os.path.join(OUTPUT_DIR, "firefox", f"{name}.patch") - print(f"Processing Phabricator patch: {phab_id} -> {output_file}") - download_phab_patch(phab_id, output_file) - replaces = patch.get("replaces", {}) - for replace in replaces.keys(): - value = replaces[replace] - with open(output_file, 'r') as f: - content = f.read() - if replace not in content: - die(f"Replace string '{replace}' not found in {output_file}") - with open(output_file, 'w') as f: - f.write(content.replace(replace, value)) - expected_files.add(output_file) + for phab_id in phab_ids: + output_file = ( + os.path.join(OUTPUT_DIR, "firefox", f"{name}.patch") + if len(phab_ids) == 1 else + os.path.join(OUTPUT_DIR, "firefox", name, f"{phab_id}.patch") + ) + print(f"Processing Phabricator patch: {phab_id} -> {output_file}") + download_phab_patch(phab_id, output_file) + replaces = patch.get("replaces", {}) + for replace in replaces.keys(): + value = replaces[replace] + with open(output_file, 'r') as f: + content = f.read() + with open(output_file, 'w') as f: + f.write(content.replace(replace, value)) + expected_files.add(output_file) elif patch.get("type") == "local": print(f"Local patch: {patch.get('path')}") expected_files.add(os.path.join(OUTPUT_DIR, patch.get("path"))) diff --git a/src/-prettierignore.patch b/src/-prettierignore.patch index a1963c31b..5f64ab634 100644 --- a/src/-prettierignore.patch +++ b/src/-prettierignore.patch @@ -1,8 +1,8 @@ diff --git a/.prettierignore b/.prettierignore -index 3e562d74d744bb703c9ebb8ea2df496feb40f48a..3285ee51c32029ce80e8b22616389bc776345da4 100644 +index 4c6d186c501f7e1b029db186d387f73d97dfed1e..81d0f7dc7f412151256c13ed93bd34d7bd872681 100644 --- a/.prettierignore +++ b/.prettierignore -@@ -1804,3 +1804,12 @@ tools/ts/test/baselines/ +@@ -1806,3 +1806,12 @@ tools/ts/test/baselines/ try_task_config.json xpcom/idl-parser/xpidl/fixtures/xpctest.d.json **/package-lock.json diff --git a/src/browser/base/content/browser-addons-js.patch b/src/browser/base/content/browser-addons-js.patch index ba8db225e..eb78c7461 100644 --- a/src/browser/base/content/browser-addons-js.patch +++ b/src/browser/base/content/browser-addons-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js -index 737ccf0feff4910426f7f75a20ac20ec480461dc..177ab12f9478e1ce664b7b2c66b0e2c8bca63573 100644 +index 098cf2408bc462f61fb547716754a3af832ffa1e..d062d03f7d258b66740d785cc30abe7932eaea41 100644 --- a/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js @@ -1061,7 +1061,7 @@ var gXPInstallObserver = { diff --git a/src/browser/base/content/browser-box-inc-xhtml.patch b/src/browser/base/content/browser-box-inc-xhtml.patch index 7e8420c22..938d1881c 100644 --- a/src/browser/base/content/browser-box-inc-xhtml.patch +++ b/src/browser/base/content/browser-box-inc-xhtml.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml -index 2faed30e09511c381051bc40910a883d1d7bc10d..959fa83f647a8919641c5b852a4cb8814fca9ab5 100644 +index d58fcdf99843d110b708f3fbf9fb317787fadfcf..ba37068c52b24c6ebcb835c59b43ca2f1621a001 100644 --- a/browser/base/content/browser-box.inc.xhtml +++ b/browser/base/content/browser-box.inc.xhtml @@ -3,6 +3,9 @@ @@ -25,7 +25,7 @@ index 2faed30e09511c381051bc40910a883d1d7bc10d..959fa83f647a8919641c5b852a4cb881 +#include zen-tabbrowser-elements.inc.xhtml -