Add comprehensive task list documenting the Firefox upgrade from v135.0.1 to v147.0b3 (12 major versions). Includes status tracking for all 45 patches after syncing with upstream LibreWolf (Firefox 146) and Playwright repositories. Key changes: - 25 broken patches identified (56% failure rate) - 20 patches applying cleanly (44% success rate) - LibreWolf patches updated from upstream: 17 patches synced, 5 deleted, 2 auto-fixed -
20 KiB
Firefox v147 Patch Update Task List
Status: Firefox upgraded from v135.0.1 to v147.0b3 (12 major versions) Date: 2025-12-19 Last Updated: 2025-12-19 (LibreWolf + Playwright patches synced with upstream) Total Patches: 45 (5 LibreWolf patches removed) Broken Patches: 25 (56%) Clean Patches: 20 (44%)
🔄 Upstream Patches Update (2025-12-19)
LibreWolf Patches Update
Action taken: Updated all LibreWolf patches from upstream repository Source: https://codeberg.org/librewolf/source (Firefox 146.0.1)
Playwright Patch Update
Action taken: Updated 0-playwright.patch from upstream Playwright repository Source: https://github.com/microsoft/playwright/blob/main/browser_patches/firefox/patches/bootstrap.diff
✅ Updated Patches (17 patches)
All LibreWolf patches have been updated to match Firefox 146 upstream versions:
- bootstrap.patch
- bootstrap-without-vcs.patch.opt
- arm.patch.opt
- rust-gentoo-musl.patch
- mozilla_dirs.patch
- dbus_name.patch
- devtools-bypass.patch
- urlbarprovider-interventions.patch
- custom-ubo-assets-bootstrap-location.patch
- 1550_1549.diff.opt
- disable-data-reporting-at-compile-time.patch
- sed-patches/stop-undesired-requests.patch
- ui-patches/firefox-view.patch
- ui-patches/handlers.patch
- ui-patches/hide-default-browser.patch
- ui-patches/remove-cfrprefs.patch
- ui-patches/remove-organization-policy-banner.patch
❌ Deleted Patches (5 patches - no longer in LibreWolf upstream)
These patches have been removed as they no longer exist in LibreWolf's repository:
- context-menu.patch - Was broken (1 failed hunk) ✅ Removed .rej file
- remove_addons.patch - Was broken (4 failed hunks) - ⚠️ .rej files still exist (orphaned)
- sed-patches/allow-searchengines-non-esr.patch - Was broken (1 failed hunk) ✅ Removed .rej file
- sed-patches/disable-pocket.patch - Was broken (2 failed hunks) - ⚠️ .rej files still exist (orphaned)
- ui-patches/remove-branding-urlbar.patch - Was working ✅
⚠️ New Issues from Updates
-
mozilla_dirs.patch (updated from LibreWolf) now has 1 NEW failed hunk:
- toolkit/xre/nsXREDirProvider.cpp.rej
-
0-playwright.patch (updated from Playwright upstream):
- MAJOR IMPROVEMENT: Reduced from 34 → 23 failed hunks (33% improvement!)
- Fixed 11 files that now apply cleanly
- Still broken: 17 files need manual adaptation to Firefox 147
-
1-leak-fixes.patch now has 1 NEW failed hunk:
- toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs.rej
- This broke because upstream Playwright changed how it patches this file
Net Impact:
- LibreWolf: Deleted 4 broken patches, added 1 new broken patch (mozilla_dirs)
- Playwright: Improved significantly (11 files fixed), but added 1 broken patch (1-leak-fixes)
- Still have orphaned .rej files from deleted patches (need manual cleanup)
- Actual broken patches: 25 (was 27, then 24, now 25 after Playwright update)
Summary Statistics
- Total .rej files: 58 rejection files across the codebase (after all updates)
- 6 orphaned .rej files from deleted patches (need manual cleanup)
- 52 active .rej files from broken patches
- Total failed hunks: ~73 individual hunks that need manual resolution (reduced from ~82!)
- Patches needing updates: 25 patches
- 22 patches that were already broken
- 1 NEW broken patch from LibreWolf update (mozilla_dirs.patch)
- 1 NEW broken patch from Playwright update (1-leak-fixes.patch)
- 1 IMPROVED patch (0-playwright.patch: 34 → 23 hunks)
- Patches working perfectly: 20 patches
Priority 1: Critical Patches (MUST FIX FIRST)
1. 0-playwright.patch ⚠️ HIGHEST PRIORITY - ✅ UPDATED FROM UPSTREAM
Status: Updated from Playwright upstream (2025-12-19)
Failed hunks: 34 → 23 across 17 files (33% improvement!)
Complexity: Very High
Strategy: Sync with upstream ✅ DONE - Now needs manual adaptation to Firefox 147
Files NOW FIXED (11 files - no longer have .rej files):
- ✅ accessible/interfaces/nsIAccessibleDocument.idl
- ✅ accessible/xpcom/xpcAccessibleDocument.cpp
- ✅ accessible/xpcom/xpcAccessibleDocument.h
- ✅ browser/installer/package-manifest.in
- ✅ dom/geolocation/Geolocation.cpp
- ✅ dom/geolocation/Geolocation.h
- ✅ docshell/base/nsDocShell.h
- ✅ security/manager/ssl/* (3 files - no longer patched)
- ✅ toolkit/xre/nsAppRunner.cpp (no longer patched)
Files STILL BROKEN (17 files need manual fixes):
- docshell/base/BrowsingContext.h.rej (2 hunks - got worse!)
- docshell/base/CanonicalBrowsingContext.cpp.rej (1 hunk)
- docshell/base/nsDocShell.cpp.rej (1 hunk)
- dom/base/Navigator.cpp.rej (2 hunks)
- dom/base/Navigator.h.rej (1 hunk)
- dom/base/nsContentUtils.cpp.rej (4 hunks)
- dom/base/nsContentUtils.h.rej (1 hunk)
- dom/base/nsDOMWindowUtils.cpp.rej (4 hunks - got worse!)
- dom/base/nsDOMWindowUtils.h.rej (1 hunk)
- dom/html/HTMLInputElement.cpp.rej (1 hunk)
- dom/media/systemservices/video_engine/desktop_capture_impl.cc.rej (1 hunk)
- dom/workers/RuntimeService.cpp.rej (2 hunks)
- js/src/vm/DateTime.cpp.rej (1 hunk)
- layout/style/GeckoBindings.h.rej (1 hunk)
- netwerk/base/LoadInfo.cpp.rej (1 hunk)
- toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp.rej (1 hunk)
- widget/InProcessCompositorWidget.cpp.rej (1 hunk)
- widget/gtk/nsFilePicker.cpp.rej (1 hunk)
- widget/headless/HeadlessWidget.cpp.rej (1 hunk)
- widget/nsGUIEventIPC.h.rej (2 hunks)
Estimated time: 2-4 hours → 1.5-3 hours (reduced due to upstream update)
2. 1-leak-fixes.patch ⚠️ NEW BROKEN (from Playwright update)
Failed hunks: 1 Complexity: Low Impact: Fixes memory leaks from Playwright patches
Affected files:
- toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs.rej (1 hunk)
Note: This patch broke because upstream Playwright changed how it patches EnterprisePoliciesParent.sys.mjs
Estimated time: 10-15 minutes
3. fingerprint-injection.patch
Failed hunks: 9 across 5 files Complexity: High Impact: Core fingerprinting functionality
Affected files:
- browser/app/moz.build.rej (1 hunk)
- dom/base/Element.cpp.rej (1 hunk)
- dom/base/Navigator.cpp.rej (4 hunks) - overlap with Playwright
- dom/base/nsScreen.cpp.rej (1 hunk)
- dom/battery/BatteryManager.cpp.rej (1 hunk)
Note: Navigator.cpp has conflicts from both Playwright and this patch
Estimated time: 1-2 hours
3. roverfox/font-fingerprinting.context.patch
Failed hunks: 8 across 5 files Complexity: High Impact: Per-context font isolation (new feature)
Affected files:
- dom/base/nsGlobalWindowInner.cpp.rej (1 hunk)
- dom/canvas/CanvasRenderingContext2D.cpp.rej (1 hunk)
- gfx/thebes/gfxTextRun.cpp.rej (2 hunks)
- layout/generic/MathMLTextRunFactory.cpp.rej (1 hunk)
- layout/mathml/nsMathMLChar.cpp.rej (3 hunks)
Estimated time: 1.5-2.5 hours
4. roverfox/font-fingerprinting.context.patch (renumbered from 3)
Failed hunks: 8 across 5 files Complexity: High Impact: Per-context font isolation (new feature)
Affected files:
- dom/base/nsGlobalWindowInner.cpp.rej (1 hunk)
- dom/canvas/CanvasRenderingContext2D.cpp.rej (1 hunk)
- gfx/thebes/gfxTextRun.cpp.rej (2 hunks)
- layout/generic/MathMLTextRunFactory.cpp.rej (1 hunk)
- layout/mathml/nsMathMLChar.cpp.rej (3 hunks)
Estimated time: 1.5-2.5 hours
5. roverfox/webrtc-ip.context.patch
Failed hunks: 2 across 2 files Complexity: Medium Impact: Per-context WebRTC IP isolation
Affected files:
- dom/base/nsGlobalWindowInner.cpp.rej (1 hunk) - overlap with font patch
- dom/media/webrtc/jsapi/PeerConnectionImpl.cpp.rej (1 hunk)
Estimated time: 30-60 minutes
Priority 2: Stealth/Spoofing Patches
5. webgl-spoofing.patch
Failed hunks: 3 across 1 file Complexity: Medium
Affected files:
- dom/canvas/ClientWebGLContext.cpp.rej (3 hunks)
Estimated time: 30-45 minutes
6. font-hijacker.patch
Failed hunks: 2 across 2 files Complexity: Medium
Affected files:
- layout/style/FontFaceImpl.h.rej (1 hunk)
- layout/style/moz.build.rej (1 hunk)
Estimated time: 20-30 minutes
7. audio-context-spoofing.patch
Failed hunks: 1 across 1 file Complexity: Low
Affected files:
- dom/media/moz.build.rej (1 hunk)
Estimated time: 10-15 minutes
8. geolocation-spoofing.patch
Failed hunks: 1 across 1 file Complexity: Low
Affected files:
- dom/geolocation/moz.build.rej (1 hunk)
Estimated time: 10-15 minutes
9. voice-spoofing.patch
Failed hunks: 1 across 1 file Complexity: Low
Affected files:
- dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp.rej (1 hunk)
Estimated time: 10-15 minutes
10. webrtc-ip-spoofing.patch
Failed hunks: 1 across 1 file Complexity: Low
Affected files:
- dom/media/webrtc/jsapi/PeerConnectionImpl.cpp.rej (1 hunk)
Estimated time: 10-15 minutes
Priority 3: LibreWolf UI/Config Patches (Lower Impact)
11. allow-searchengines-non-esr.patch ❌ DELETED (no longer in LibreWolf upstream)
Failed hunks: 1
Affected files: browser/components/enterprisepolicies/schemas/policies-schema.json.rej
Estimated time: 10 minutes
12. context-menu.patch ❌ DELETED (no longer in LibreWolf upstream)
Failed hunks: 1
Affected files: browser/base/content/browser-context.inc.rej
Estimated time: 10 minutes
13. custom-ubo-assets-bootstrap-location.patch
Failed hunks: 1 Affected files: toolkit/components/extensions/parent/ext-storage.js.rej Estimated time: 10 minutes
14. disable-pocket.patch ❌ DELETED (no longer in LibreWolf upstream)
Failed hunks: 2
Affected files:
- browser/base/content/browser.js.rej (1 hunk)
- browser/components/BrowserGlue.sys.mjs.rej (1 hunk)
Estimated time: 15-20 minutes
15. hide-default-browser.patch ✅ FIXED (updated from LibreWolf upstream)
Failed hunks: 2
Affected files: browser/components/preferences/main.inc.xhtml.rej
Status: Updated patch from LibreWolf Firefox 146 - now applies cleanly!
Estimated time: 15 minutes
16. mozilla_dirs.patch ⚠️ NEW BROKEN (from LibreWolf update)
Failed hunks: 1 Affected files: toolkit/xre/nsXREDirProvider.cpp.rej Estimated time: 10-15 minutes Note: This patch was working before, but the updated version from LibreWolf (Firefox 146) introduced a conflict with Firefox 147
17. network-patches.patch
Failed hunks: 1 Affected files: netwerk/protocol/http/nsHttpHandler.cpp.rej Estimated time: 15 minutes
18. no-search-engines.patch
Failed hunks: 2 Affected files:
- browser/components/urlbar/UrlbarProviderInterventions.sys.mjs.rej (1 hunk)
- toolkit/components/search/SearchEngineSelector.sys.mjs.rej (1 hunk) Estimated time: 15-20 minutes
19. remove-cfrprefs.patch ✅ FIXED (updated from LibreWolf upstream)
Failed hunks: 2
Affected files: browser/components/preferences/main.inc.xhtml.rej
Status: Updated patch from LibreWolf Firefox 146 - now applies cleanly!
Estimated time: 15 minutes
19. remove_addons.patch ❌ DELETED (no longer in LibreWolf upstream)
Failed hunks: 4
Affected files:
- browser/locales/Makefile.in.rej (2 hunks)
- browser/locales/filter.py.rej (1 hunk)
- browser/locales/l10n.ini.rej (1 hunk)
Estimated time: 20-30 minutes
20. windows-theming-bug-modified.patch
Failed hunks: 1 Affected files: browser/app/Makefile.in.rej Estimated time: 10 minutes
📊 LibreWolf Patches Summary After Update:
- ✅ 2 patches FIXED: hide-default-browser.patch, remove-cfrprefs.patch
- ⚠️ 1 patch BROKE: mozilla_dirs.patch (new conflict)
- ❌ 4 patches DELETED: context-menu, remove_addons, allow-searchengines-non-esr, disable-pocket
- Net result: -3 broken patches (27 → 24)
Patches That Applied Successfully ✅
These 21 patches need NO UPDATES:
✅ 1-leak-fixes.patch⚠️ NOW BROKEN (1 new hunk from Playwright update)- ✅ Disable-Onboarding-Messages.patch (Ghostery)
- ✅ all-addons-private-mode.patch
- ✅ anti-font-fingerprinting.patch
- ✅ bootstrap.patch (LibreWolf)
- ✅ browser-init.patch
- ✅ chromeutil.patch
- ✅ config.patch
- ✅ dbus_name.patch (LibreWolf)
- ✅ devtools-bypass.patch (LibreWolf)
- ✅ disable-data-reporting-at-compile-time.patch (LibreWolf)
- ✅ disable-extension-newtab.patch
- ✅ disable-remote-subframes.patch
- ✅ force-default-pointer.patch
- ✅ global-style-sheets.patch
- ✅ handlers.patch (LibreWolf)
- ✅ locale-spoofing.patch
- ✅ media-device-spoofing.patch
- ✅ mozilla_dirs.patch (LibreWolf)
- ✅ no-css-animations.patch
- ✅ pin-addons.patch
✅ remove-branding-urlbar.patch (LibreWolf)❌ DELETED (no longer in LibreWolf upstream)- ✅ remove-organization-policy-banner.patch (LibreWolf)
- ✅ rust-gentoo-musl.patch (LibreWolf)
- ✅ screen-hijacker.patch
- ✅ shadow-root-bypass.patch
- ✅ stop-undesired-requests.patch (LibreWolf)
- ✅ timezone-spoofing.patch
- ✅ urlbarprovider-interventions.patch (LibreWolf)
Execution Plan
Phase 1: Preparation (10 min)
- ✅ DONE: Identified all broken patches (27 patches)
- ✅ DONE: Categorized by priority
- TODO: Clean workspace:
make revert - TODO: Create backup of current patches directory
Phase 2: Critical Patches (4-8 hours)
Step 1: Update Playwright Patch (2-4 hours)
- Download Playwright's latest bootstrap.diff
- Compare with current 0-playwright.patch
- Strategy decision:
- If Playwright has v147: Replace entire patch
- If not: Manual update of all 34 failed hunks
- Test standalone: Apply only Playwright patches, verify build
- Success criteria: Zero .rej files for Playwright
Step 2: Fix fingerprint-injection.patch (1-2 hours)
- Use
make workspace ./patches/fingerprint-injection.patch - Resolve 9 failed hunks across 5 files
- Pay special attention to Navigator.cpp (overlaps with Playwright)
- Test: Basic build + browser launch
- Success criteria: Core fingerprinting loads without errors
Step 3: Fix Roverfox Context Patches (2-3 hours)
- Fix font-fingerprinting.context.patch (8 hunks)
- Fix webrtc-ip.context.patch (2 hunks)
- Note: Both patches touch nsGlobalWindowInner.cpp
- Test: Verify RoverfoxStorageManager integration
- Success criteria: Per-context isolation works
Phase 3: Stealth Patches (2-3 hours)
Fix in order:
- webgl-spoofing.patch (3 hunks, 30-45 min)
- font-hijacker.patch (2 hunks, 20-30 min)
- audio-context-spoofing.patch (1 hunk, 10-15 min)
- geolocation-spoofing.patch (1 hunk, 10-15 min)
- voice-spoofing.patch (1 hunk, 10-15 min)
- webrtc-ip-spoofing.patch (1 hunk, 10-15 min)
Success criteria: All spoofing features functional
Phase 4: LibreWolf Patches (30-45 minutes)
✅ MOSTLY COMPLETE: LibreWolf patches updated from upstream (Firefox 146)
- 17 patches updated to latest versions
- 4 broken patches deleted (no longer needed)
- 2 patches auto-fixed by update (hide-default-browser, remove-cfrprefs)
- Only 4 LibreWolf patches remaining to fix:
- custom-ubo-assets-bootstrap-location.patch (1 hunk) - 10 min
- mozilla_dirs.patch (1 hunk) ⚠️ NEW - 10-15 min
- network-patches.patch (1 hunk) - 15 min
- no-search-engines.patch (2 hunks) - 15-20 min
- windows-theming-bug-modified.patch (1 hunk) - 10 min
Total estimated time: 60-70 minutes for 5 patches
Success criteria: Browser builds with all UI customizations
Phase 5: Integration Testing (2-3 hours)
- Clean apply all patches:
make revert && make dir - Verify zero .rej files:
find . -name "*.rej" - Full build:
make build(30-60 min build time) - Smoke tests:
- Browser launches
- Navigation works
- Console has no errors
- Automated tests:
make tests(run all 51 test files) - Manual fingerprinting tests:
- WebGL spoofing
- Canvas fingerprinting
- Font fingerprinting
- Audio context
- Screen dimensions
- Geolocation
- WebRTC IP handling
Success criteria: All tests pass, all features work
Phase 6: Cleanup & Documentation (30 min)
- Remove all .rej, .orig, .bak files
- Document changes made to each patch
- Update changelog/release notes
- Git commit updated patches
- Tag release (if applicable)
Time Estimates
| Phase | Optimistic | Realistic | Pessimistic |
|---|---|---|---|
| Phase 1: Prep | |||
| Phase 2: Critical | 4 hours | 6 hours | 8 hours |
| Phase 3: Stealth | 1.5 hours | 2.5 hours | 3.5 hours |
| Phase 4: LibreWolf | |||
| Phase 5: Testing | 2 hours | 3 hours | 4 hours |
| Phase 6: Cleanup | 20 min | 30 min | 45 min |
| TOTAL | 8 hours | 12.5 hours | 17.75 hours |
Realistic estimate: 1.5 work days (12-13 hours) - saved ~1.5 hours by updating LibreWolf patches
Update: LibreWolf update had mixed results:
- ✅ Fixed 2 patches automatically
- ❌ Introduced 1 new broken patch (mozilla_dirs)
- ❌ Net benefit: ~1.5 hours saved (not 2 hours as initially hoped)
Tools & Commands Reference
Reset workspace
make revert # Reset to unpatched state
Developer GUI
make edits # Launch developer.py GUI
python3 scripts/developer.py 147.0b3 beta.25
Edit single patch
make workspace ./patches/<patch-name>.patch
Apply all patches
make dir
Check for reject files
find camoufox-147.0b3-beta.25 -name "*.rej" -type f
Build and test
make build # Full Firefox build
make run # Launch browser
make tests # Run automated tests
Write updated patch
Use developer.py GUI: "Write workspace to patch"
Success Criteria Checklist
- All 27 broken patches updated
- Zero .rej files after
make dir - Clean build with no compilation errors
- Browser launches successfully
- All 51 automated tests pass
- Manual fingerprinting tests verify features work:
- WebGL spoofing active
- Canvas fingerprinting working
- Font fingerprinting working
- Audio context spoofing working
- Screen dimension spoofing working
- Geolocation spoofing working
- WebRTC IP handling working
- Per-context isolation (Roverfox) working
- No console errors during normal browsing
- Updated patches committed to git
- Documentation updated
Notes & Warnings
⚠️ File Overlap Conflicts:
dom/base/Navigator.cpp- Modified by both Playwright AND fingerprint-injectiondom/base/nsGlobalWindowInner.cpp- Modified by BOTH roverfox patchesdom/media/webrtc/jsapi/PeerConnectionImpl.cpp- Modified by both WebRTC patches
These files need careful attention to ensure all patch intents are preserved.
⚠️ Playwright Upstream Sync: The 0-playwright.patch is critical infrastructure. Check if Playwright has already updated for Firefox 147:
- https://github.com/microsoft/playwright/blob/main/browser_patches/firefox/patches/bootstrap.diff
- Check their supported Firefox versions
⚠️ Build Time: Full Firefox builds can take 30-90 minutes depending on hardware. Plan accordingly.
⚠️ Backup: Before starting, backup the current patches directory:
cp -r patches patches.backup.v135
Document created: 2025-12-19 Firefox version: v147.0b3-beta.25 Previous version: v135.0.1-beta.24 Status: Planning complete, ready for execution