In https://pagure.io/fesco/issue/3177, FESCo decided that “Packages containing JavaScript should make the best effort to regenerate any precompiled/pre-minimized JS wherever possible, as this leads to more maintainable packages. Where this would result in a significant hardship, the bundled pregenerated JS may be shipped. This does not eliminate the requirement to validate licenses of bundled code.”
Packages that have precompiled/pre-minimized JavaScript that cannot easily be re-generated from original sources are very likely to also have precompiled/pre-minimized CSS – often built with really heavy NodeJS-based toolchains, e.g. Tailwind CSS.
It would seem to make sense to allow such CSS under the same circumstances as JavaScript, but currently the applicable guidelines contain an absolute ban. (“It is not acceptable to include pre-compiled CSS in Fedora packages.”)
This issue asks FESCo to consider whether the conclusion of https://pagure.io/fesco/issue/3177 could be extended to cover CSS.
A motivation for filing this issue is a recent change in Snakemake to “download report assets upon package build such that reports become possible offline” – downloading can be avoided by supplying the necessary files in the expected locations, but there’s no obvious path to shipping current releases of Snakemake without including these web assets at all.
Isn't the guideline in FPC "jurisdiction"?
FPC would bounce it back to us because it's ultimately about the suitability of inclusion, which is our remit.
oh, man. I had no idea this was a rule. Our openqa package violates this, and I honestly have no idea how I could reasonably go about having the CSS assets built at package build time. it feels like it would be a huge amount of pointless work, honestly.
to be more specific, openQA currently handles its web assets by bundling 13 node packages, none of which (at a quick look) are packaged in Fedora. I am not going to package all of those node packages, then rewire openQA's build process to work from the packaged node packages. Life is too short.
Given other rules we have for generated / minified code (in general and for JavaScript in particular) I don't think it makes sense to keep a hard ban for preprocessed CSS in place.
oh, man. I had no idea this was a rule. Our openqa package violates this...
I believe jupyterlab/notebook is probably doing the same.
This sounds reasonable to me.
I support extending #3177 to cover CSS too. It'd be very strange to allow JS but not CSS.
It's reasonable to me too. +1
Just to make the exact proposal explicit:
Proposal: "Packages containing Cascading Style Sheets (CSS) should make the best effort to regenerate any precompiled/pre-minimized CSS wherever possible, as this leads to more maintainable packages. Where this would result in a significant hardship, the bundled pregenerated CSS may be shipped. This does not eliminate the requirement to validate licenses of bundled code."
+1 to this proposal.
+1 to the proposal.
+1
FWIW FPC had a look at this today (thanks Nirik), and it seems like a good change to us.
+1 - rule for CSS and JS should be aligned
+1 here also.
Note that this should pass tomorrow (1 week) unless there's a -1 at the last minute.
Allowing more and more prebuilt blobs is a step in the wrong direction. Instead, the exception for prebuilt JS should be dropped.
After a week: APPROVED (+7, 0, 0)
Metadata Update from @zbyszek: - Issue tagged with: document it, pending announcement
Announced: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/JNDBZIIXKWG6YFPOWJIAUAUWNJD3WZ2Q/ (still needs documenting)
Metadata Update from @zbyszek: - Issue untagged with: pending announcement
https://pagure.io/packaging-committee/pull-request/1402
PR was merged.
Metadata Update from @zbyszek: - Issue untagged with: document it - Issue close_status updated to: Accepted - Issue status updated to: Closed (was: Open)