Bug#877040: New upstream version, including transition to webext

2017-09-27 Thread Sean Whitton
Source: ublock-origin
Version: 1.13.8+dfsg-1
Severity: normal
Tags: help

uBlock Origin in Debian is several versions behind upstream.  This is
because packaging a recent upstream release requires

- installing the webext version, as a new binary package
  webext-ublock-origin, rather than the traditional XUL extension; and

- providing a script for the user to transition their data from the XUL
  extension to the new webext.

I am filing this bug because I know that I won't be able to work on this
any time soon.  I hope to provide enough information that someone else
is able to work on it independently.

This bug will become release-critical when every version of Firefox in
unstable is greater than or equal to 57, assuming Mozilla's plans do not
change.  At that point, XUL extensions will stop working.

Note that none of this affects the Chrome extension binary package,
unless Chrome, too, decides to support only web extensions.

Installing the webext
=

Ideally this would be achieved by fixing #866997.  But it would be fine
for this package to install the web extension without a helper; indeed,
it's not clear we need a helper for web extensions.

There have been several discussions about what needs to be done.  In
addition to those linked from #866997, see [3].  In summary:

- use the binary package namespace 'webext-'

- install to /usr/share/webext/ublock-origin

- create a symlink in the appropriate subdirectory of /usr/share/firefox
  such that Firefox loads the web extension (requires searching through
  the source of Firefox; possibly no such directory exists yet)

The purpose of the symlinking is to accommodate the fact that some web
extensions work with only one browser but others work with multiple
browsers.  We can manage this with symlinks.

See the webext branch of ublock-origin's Vcs-Git repository for first
attempts at installing the webext.

Providing the transition script
===

It is not possible to automatically transition the user's data -- by
patching the web extension to import the data, say.  This is because web
extensions cannot access the parts of the filesystem where the XUL
extension stored its data.

Upstream attempted a hybrid XUL and web extension which would import the
data.  They abandoned this project, but in any case, it would have been
no use for Debian: later point updates of stretch and the initial
release of buster will contain no version of Firefox capable of loading
XUL extensions.  So we must provide a script that users can run to
transition their data.  I would suggest a NEWS.Debian entry suggesting
that users run the script.

Upstream (Raymond Hill) has very helpfully provided guidance on writing
such a script.[1] For archival purposes, I reproduce the most
significant parts of Raymond's messages in the linked thread here:

> So anyways, basically this is how things are:
> 
> - With uBO/legacy, the settings are located in
>   ~/.config/firefox/[profile]/extension-data/ublock0.sqlite
>   - The content of the ublock0.sqlite db is one table, named settings,
> with two columns, named name and value.
>   - Each name is unique, and is the name of a setting.
>   - Each value is a string, and is JSON.parse'd after being read, and
> before being sent to the caller.
> - With uBO/webext, the settings are located in
>   
> ~/.config/firefox/[profile]/browser-extension-data/ublo...@raymondhill.net/storage.js
>   (that is a Firefox's controlled location).
>   - The content of storage.js is simple JSON data, in which each setting
> is a [setting name]: [setting value] entry. The value can be any
> valid JSON value: number, string, array, etc.
> 
> Now given all this, it's a matter of fetching all entries in the sqlite
> table, and converting them into an object property in one single
> destination JSON object structure { ... }.
> 
> Now not all entries in the table are to be transferred to the JSON
> structure, many entries are strictly for internal use by uBO. Any entry
> which name starts with cache/ must be ignored. Additionally, the
> following entries must also be ignored: assetCacheRegistry,
> assetSourceRegistry, selfie.
> 
> The code to migrate is located in this bootstrap.js file.[2] The
> function named getStorageMigrator contains all the code to deal with
> reading all entries one by one from the settings table.
> 
> [...]
> 
> So far I got something with this command -- needs more work though to
> get a valid JSON file -- so before I lose that command:
> 
> sqlite3 ublock0.sqlite ".separator "\\t " SELECT * FROM settings;" | awk 
> '!/^(?:assetCacheRegistry|assetSourceRegistry|cache\/.+|selfie)$/' > 
> output.txt
> 
> This outputs two fields per line, separated by \t.
> 
> [field1]  [field2]
> 
> After this is for each line to be output this way:
> 
> "[field1]": [field2]
> 
> Then to separate all the lines with a , character, then finally wrap the
> result in { and }.

[1]  https://github.com/gor

Bug#877040: New upstream version, including transition to webext

2017-10-12 Thread Adrian Bunk
Control: found -1 1.10.4+dfsg-1
Control: severity -1 serious

On Wed, Sep 27, 2017 at 06:48:41PM -0700, Sean Whitton wrote:
>...
> This bug will become release-critical when every version of Firefox in
> unstable is greater than or equal to 57, assuming Mozilla's plans do not
> change.  At that point, XUL extensions will stop working.
>...

I'm adding the version in stretch as found since the problem will
also be present in stretch when Firefox will be upgraded to the
next ESR there next year.

Whatever solution will happen, it should enter *stable* before
the new ESR comes through a DSA.

I am immediately raising to RC to make it more visible that based on the 
current information:
- this has to be fixed for buster, and
- the fix is required even sooner for stretch,
  ideally a point release before the new ESR

> Sean Whitton

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Bug#877040: New upstream version, including transition to webext

2017-10-13 Thread Paul Wise
On Thu, 12 Oct 2017 15:15:03 +0300 Adrian Bunk wrote:

> I am immediately raising to RC to make it more visible that based on the 
> current information:

That seems a bit premature, given that Firefox ESR will stay at
version 52 until June 2018 (according to Mozilla #webextensions).

Also, someone should probably announce an MBF for this transition.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#877040: New upstream version, including transition to webext

2018-03-08 Thread david s
Hello,

I'm interested in potentially taking on maintenance of this package. I
am new to Debian but I'd like to start contributing.

To explore this possibility, I've created a proof-of-concept transition
script. Please take a look at the attached script and let me know your
thoughts and suggestions.

Regarding the other part of this bug, it appears that some work has been
done on #866997 to support webext. I plan to look into this and see if I
can contribute to that as well.

David


ublock_migration.sh
Description: Bourne shell script


Bug#877040: New upstream version, including transition to webext

2018-04-04 Thread Michael Meskes
On Thu, Mar 08, 2018 at 01:19:29PM -0600, david s wrote:
> I'm interested in potentially taking on maintenance of this package. I
> am new to Debian but I'd like to start contributing.

Great.

> To explore this possibility, I've created a proof-of-concept transition
> script. Please take a look at the attached script and let me know your
> thoughts and suggestions.

Excellent.

> Regarding the other part of this bug, it appears that some work has been
> done on #866997 to support webext. I plan to look into this and see if I
> can contribute to that as well.

Having done several webext packages already I should be able to help with that 
part. 

As a first step I would love to see us migrate to salsa. The current git
structure is different from what I usually use, so I have to dig into that.

Michael



-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



Bug#877040: [Pkg-mozext-maintainers] Bug#877040: New upstream version, including transition to webext

2018-04-04 Thread Sean Whitton
Hello,

On Wed, Apr 04 2018, Michael Meskes wrote:

> As a first step I would love to see us migrate to salsa. The current git
> structure is different from what I usually use, so I have to dig into that.

README.source has some details but please feel free to ask me any
questions, since I came up with that structure (a long time ago..).

-- 
Sean Whitton


signature.asc
Description: PGP signature