[Pkg-mozext-maintainers] tree-style-tab conversion to WebExtensions

Ximin Luo infinity0 at debian.org
Thu Jul 26 04:31:00 BST 2018


Dmitry Smirnov:
> On Thursday, 26 July 2018 3:58:00 AM AEST Ximin Luo wrote:
>> to create these zips during build time rather than postinst time?
> 
> There are some good reasons to zip on postinst rather than on build time.
> 
> Unpacked addons is what Chromium needs (for those addons that support both 
> browsers) and addons directory should be prepared for browser consumption in 
> DFSG-compliant manner where some files (like source-less pre-minified .js 
> files) should be replaced with symlinks to files provided by corresponding 
> packages. Luckily tree-style-tab don't seem to carry non-DFSG files that 
> needs replacing but that's not a usual case.
> 
> Preparing Firefox's zip bundle on build-time requires same dependencies on 
> build and install time. Also making zip on build-time is more difficult as 
> one would have to assemble addon directory with all symlinks on build time.
> 

Requiring same dependencies on build and install time is pretty normal, you generally need to do that if you have any sort of test suite.

I'm not sure why you think it's "difficult" to create symlinks at build time. Do you need to verify that the symlinks point to valid targets? At any rate it doesn't seem like you're doing that in the postinst.

In general doing stuff in the postinst is bad because it's arbitrary code execution as root. In general we'd like to move towards more declarative packaging that doesn't involve executing Turing-complete logic. It's safer for users, in case there are bugs, and gives less space for developers to abuse users' end systems.

X

> Compressing from postinst is easier because addon directory is already 
> prepared as required.
> 
> Besides maybe there is a way to drop Firefox addons cache (how?) and avoid 
> zip bundle in which case there are less changes to accommodate.
> 


-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Pkg-mozext-maintainers mailing list