Refresh WebExtensions portal patch

Bug #2077587 reported by Amin Bandali
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
Fix Released
High
Amin Bandali
Jammy
Fix Released
High
Amin Bandali
Noble
Fix Released
High
Amin Bandali
Oracular
Fix Released
High
Amin Bandali

Bug Description

[ Impact ]

 * Without this change, firefox users on jammy who rely on the
   WebExtensions portal for firefox add-ons that need a native
   executable to function correctly will experience breakage when the
   latest version of the firefox native messaging patch is landed
   upstream in the near future.
   https://phabricator.services.mozilla.com/D140803

   An instance of such breakage already happened earlier this year
   when we refreshed the firefox native messaging patch we carry in
   the firefox snap to the latest revision under review in Mozilla
   Phabricator and inadvertently broke native messaging for users of
   firefox snap on jammy.
   https://discourse.ubuntu.com/t/firefox-122-snap-temporary-native-messaging-breakage-for-ubuntu-22-04-users-fixed-since/41940

 * The newer changes to the WebExtensions portal are being backported
   because jammy and noble are the current primary targets for the
   effort of enabling native messaging in the firefox snap, and once
   the firefox implementation lands in the firefox snap, we want this
   to continue working seamlessly and as expected.

   Moreover, with both the firefox-side and portal-side patches being
   nearly ready for merge in the corresponding upstreams, it makes
   sense to ship an up-to-date version of the portal patch in jammy
   and noble to provide a uniform platform for the firefox-side patch
   across these two LTS releases, helping ease the maintenance burden
   and lessen the difference between them from this aspect should the
   need to debug and fix potential issues in firefox or in the portal
   arise later in the future.

 * Updating the WebExtensions portal in xdg-desktop-portal before
   updating the firefox-side implementation in the firefox snap is
   fine and covered as part of the test plan.

[ Test Plan ]

 * To test and verify the native messaging portal works as expected,
   we can test the extensions.gnome.org browser integration before
   and after updating our installed xdg-desktop-portal package.

   Before upgrading xdg-desktop-portal:

   - in a fully up-to-date Ubuntu VM, install the chrome-gnome-shell
     deb package
   - if it exists, delete ~/.local/share/flatpak/db/webextensions
     and reboot to ensure a pristine state
   - run the firefox snap and browse to
     https://addons.mozilla.org/firefox/addon/gnome-shell-integration/
     and click the "Add to Firefox" blue button
   - accept the firefox prompt to install the extension
   - you will soon be prompted by GNOME Shell (with a modal dialog)
     to allow firefox to use the WebExtensions portal to start the
     native connector, click "Allow"
   - browse to https://extensions.gnome.org/local/
   - see that firefox is able to talk to the native connector and
     display a list of the currently installed GNOME Shell extensions

   Note: the WebExtensions portal can also be tested using other
   firefox browser extensions that use native messaging, such as
   https://keepassxc.org

 * Upgrade xdg-desktop-portal to the new version from -proposed.

 * To test and verify that the firefox snap's native messaging portal
   support continues to work as intended after the portal is updated
   in xdg-desktop-portal, download and install the test snap from
   https://launchpad.net/~bandali/+snap/firefox-snap-nm-cur-old-patch
   (even though the main firefox snap distributed via the snap store
    currently ships an older revision of the firefox-side patch for
    compatibility for jammy users, a build of the firefox snap from
    the above link can be downloaded and installed to ensure that the
    current older firefox-side implementation is used):

   - in a fully up-to-date Ubuntu VM, download the newest test firefox
     snap from the above link and install it by running a command like
     'sudo snap install --dangerous filename.snap' in the terminal
   - follow the steps of the above test case but *without* deleting
     ~/.local/share/flatpak/db/webextensions and verify that native
     messaging continues to work as intended in the firefox snap.

 * To test and verify that the firefox snap's snap's native messaging
   portal support works as intended when starting fresh after the
   portal is updated in xdg-desktop-portal, repeat the above test case
   but this time do delete ~/.local/share/flatpak/db/webextensions
   and verify that native messaging continues to work as intended in
   the firefox snap and that you get prompted by GNOME Shell to allow
   firefox to use the WebExtensions portal.

 * We continue running the upstream xdg-desktop-portal test suite to
   help ensure there is no breakage in other portals.

 * Additionally, this refresh of the patch brings in new tests for the
   WebExtensions portal from our upstream PR under review into jammy,
   helping provide assurance that the WebExtensions portal we ship in
   jammy behaves identically to those shipped in newer releases, and
   establishes a baseline for potential future updates if we need to
   do further SRUs for xdg-desktop-portal.

[ Where problems could occur ]

 * For jammy, there should be little risk refreshing the distro patch
   in xdg-desktop-portal as this is a 'new' portal and there were no
   changes to the existing portals shipped in xdg-desktop-portal.

 * Given that this port of the newer changes from our upstream PR back
   to jammy includes several new commits, it is possible that one of
   them may inadvertently introduce a bug. However, we believe this
   risk is low, given that the PR changes were made with backward
   compatibility in mind to minimize the likelihood of breakage for
   existing users. Additionally, the 'risk' of certain breakage once
   the firefox-side patch is merged upstream far outweighs the risk
   of refreshing the portal-side patch to bring it up-to-date with
   the latest revision under review for merging into upstream.

[ Other Info ]

 * SRUing the latest revision under review of our WebExtensions portal
   into jammy (and noble) will allow to us finally safely land the
   firefox-side implementation in upstream Firefox, helping avoid
   bitrot of the patch we carry against the firefox snap and easing
   the maintenance burden of the firefox snap and the native messaging
   portal support itself as part of the upstream codebase.

Amin Bandali (bandali)
Changed in xdg-desktop-portal (Ubuntu Noble):
importance: Undecided → High
Changed in xdg-desktop-portal (Ubuntu Jammy):
importance: Undecided → High
Changed in xdg-desktop-portal (Ubuntu Noble):
assignee: nobody → Amin Bandali (bandali)
Changed in xdg-desktop-portal (Ubuntu Jammy):
assignee: nobody → Amin Bandali (bandali)
Jeremy Bícha (jbicha)
Changed in xdg-desktop-portal (Ubuntu Oracular):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal - 1.18.4-1ubuntu4

---------------
xdg-desktop-portal (1.18.4-1ubuntu4) oracular; urgency=medium

  * Refresh webextensions portal patch to latest version proposed
    upstream (LP: #2077587)

 -- Amin Bandali <email address hidden> Wed, 21 Aug 2024 20:13:17 -0400

Changed in xdg-desktop-portal (Ubuntu Oracular):
status: Fix Committed → Fix Released
Changed in xdg-desktop-portal (Ubuntu Noble):
status: New → Fix Committed
Changed in xdg-desktop-portal (Ubuntu Noble):
status: Fix Committed → Incomplete
Revision history for this message
Chris Halse Rogers (raof) wrote :

I have a couple of questions with the test plan - as it stands, I don't see where we're performing before/after tests of the xdg-desktop-portal package? That is - where, in the test plan steps, do we actually install the package from proposed? Do we need to
> delete ~/.local/share/flatpak/db/webextensions and reboot to ensure a pristine state
after upgrading xdg-desktop-portal? Do we need to *not* delete those, to test upgrades? Do we need to test both?

Also, it's not clear what the manually-downloaded snap is for? The description is currently:
> even though the main firefox snap distributed via the snap store
> currently ships an older revision of the firefox-side patch for
> compatibility for jammy users, a build of the firefox snap from
> the above link can be downloaded and installed to ensure that the
> current older firefox-side implementation is used

It seems to say that the snap store ships an old revision of the firefox-side patch, but we should also download this specific snap, which has the current old revision of the firefox-side patch? Is this so that we can test the old codepath even once the snap-store firefox is updated to the *new* codepath?

The only other question is: Is this likely to be the final xdg-desktop-portal implementation, or is it expected that further revisions will be needed?

Feel free to give me a ping in #ubuntu-release once you've answered these!

Revision history for this message
Amin Bandali (bandali) wrote :

Hi Chris, thank you for the review and feedback. Regarding your questions:

I've updated the description to explicitly point out at which point in the test plan the xdg-desktop-portal should be upgraded to the -proposed version, and also clarify about the deletion of that file. Basically, we'd like to delete that file before we upgrade xdg-desktop-portal and verify that the current xdg-desktop-portal works as expected and creates that file again. Then, upgrade to the -proposed version and keep the file around and verify that the portal continues to work like it did before the upgrade. Then, delete the file again and verify that the portal works as expected when starting from scratch with the -proposed version.

Regarding the manually-downloaded firefox snap, yes exactly: I wasn't sure about the exact timeline of the SRU being reviewed and landed, and we thought it may be helpful to have a separate build of the firefox snap with the current older firefox-side patch in case a newer revision gets merged upstream in the mean time. However, as of now this has not happened, so there is currently no need to manually download that separate revision, and using any of the official builds from the snap store would suffice.

Lastly, regarding the state of the xdg-desktop-portal side of the implementation, it has been stable for quite a while, and the feedback we received from Mozilla is that it looks good to them. However, considering the PR against xdg-desktop-portal upstream is still open, there is a possibility for future revisions, though more likely due to feedback from xdg-desktop-portal folks in a final review before merging the PR rather than from Mozilla folks.

I hope this helps clarify things more. :)

description: updated
Amin Bandali (bandali)
Changed in xdg-desktop-portal (Ubuntu Jammy):
status: New → Fix Committed
Amin Bandali (bandali)
Changed in xdg-desktop-portal (Ubuntu Noble):
status: Incomplete → Fix Committed
Amin Bandali (bandali)
description: updated
Revision history for this message
Amin Bandali (bandali) wrote :

Per https://canonical-sru-docs.readthedocs-hosted.com/en/latest/howto/standard/ I believe the status should be In Progress for uploads that haven't been accepted into -proposed yet, so I'm updating the statuses accordingly.

Changed in xdg-desktop-portal (Ubuntu Jammy):
status: Fix Committed → In Progress
Changed in xdg-desktop-portal (Ubuntu Noble):
status: Fix Committed → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Amin, or anyone else affected,

Accepted xdg-desktop-portal into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-desktop-portal/1.18.4-1ubuntu2.24.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xdg-desktop-portal (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Proposed package upload rejected

An upload of xdg-desktop-portal to jammy-proposed has been rejected from the upload queue for the following reason: "the package revision bumps to -1ubuntu3, which is unnecessary".

Revision history for this message
Amin Bandali (bandali) wrote :

> "the package revision bumps to -1ubuntu3, which is unnecessary"

Re-uploaded to the jammy queue as 1.14.4-1ubuntu2~22.04.2

Revision history for this message
Amin Bandali (bandali) wrote :

Successfully tested xdg-desktop-portal 1.18.4-1ubuntu2.24.04.1 from noble-proposed using the test plan in the bug description, in a clean and up-to-date noble amd64 VM.

Following the test plan, I first tested that the native messaging portal works as expected before upgrading xdg-desktop-portal by installing the chrome-gnome-shell deb package and installing the GNOME Shell integration add-on in the Firefox snap, then visiting https://extensions.gnome.org/local/ and verifying that Firefox can talk to the native connector and display a list of the currently installed GNOME Shell extensions. I also tested with KeepassXC and its Firefox add-on that requires native messaging to function correctly. I then upgraded xdg-desktop-portal to 1.18.4-1ubuntu2.24.04.1 from noble-proposed, and per the test plan verified that native messaging continues to work as intended in the Firefox snap, both with existing ~/.local/share/flatpak/db/webextensions and after deleting it and rebooting the VM for a pristine portal state.

tags: added: verification-done-noble
removed: verification-needed-noble
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Amin, or anyone else affected,

Accepted xdg-desktop-portal into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-desktop-portal/1.14.4-1ubuntu2~22.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in xdg-desktop-portal (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Amin Bandali (bandali) wrote :

Successfully tested xdg-desktop-portal 1.14.4-1ubuntu2~22.04.2 from jammy-proposed using the test plan in the bug description, in a clean and up-to-date jammy amd64 VM.

Following the test plan, I first tested that the native messaging portal works as expected before upgrading xdg-desktop-portal by installing the chrome-gnome-shell deb package and installing the GNOME Shell integration add-on in the Firefox snap, then visiting https://extensions.gnome.org/local/ and verifying that Firefox can talk to the native connector and display a list of the currently installed GNOME Shell extensions. I also tested with KeepassXC and its Firefox add-on that requires native messaging to function correctly. I then upgraded xdg-desktop-portal to 1.14.4-1ubuntu2~22.04.2 from jammy-proposed, and per the test plan verified that native messaging continues to work as intended in the Firefox snap, both with existing ~/.local/share/flatpak/db/webextensions and after deleting it and rebooting the VM for a pristine portal state.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal - 1.18.4-1ubuntu2.24.04.1

---------------
xdg-desktop-portal (1.18.4-1ubuntu2.24.04.1) noble; urgency=medium

  * Refresh webextensions portal patch to latest version proposed
    upstream (LP: #2077587)
    - Backported tree:
      https://github.com/ubuntu/xdg-desktop-portal/tree/nmp-1.18-backport

 -- Amin Bandali <email address hidden> Mon, 26 Aug 2024 10:56:42 -0400

Changed in xdg-desktop-portal (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for xdg-desktop-portal has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-desktop-portal - 1.14.4-1ubuntu2~22.04.2

---------------
xdg-desktop-portal (1.14.4-1ubuntu2~22.04.2) jammy; urgency=medium

  * Refresh webextensions portal patch to latest version proposed
    upstream (LP: #2077587)
    - Backported tree:
      https://github.com/ubuntu/xdg-desktop-portal/tree/nmp-1.14-backport

 -- Amin Bandali <email address hidden> Fri, 13 Sep 2024 14:26:10 -0400

Changed in xdg-desktop-portal (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.