From 22596956706e72a4e1d92e4e3476f4b9bd6ca5b1 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 18 2024 13:54:11 +0000 Subject: Move note about JavaScript to the JavaScript page 889df8a added the note, but put in the Node.js section. The decision is about JS in general, so let's move it and provide a link from the Node.js page. --- diff --git a/guidelines/modules/ROOT/pages/JavaScript.adoc b/guidelines/modules/ROOT/pages/JavaScript.adoc index 7b1eb6e..8673aa5 100644 --- a/guidelines/modules/ROOT/pages/JavaScript.adoc +++ b/guidelines/modules/ROOT/pages/JavaScript.adoc @@ -20,6 +20,12 @@ Node.js xref:Node.js.adoc[have their own guidelines], and software like GNOME which embeds JavaScript for extensions have their own directories and policies as well. +Packages containing JavaScript should make the best effort to regenerate any precompiled/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 with a specfile comment explaining the decision. +This does not eliminate the requirement to validate licenses of bundled code. + == Naming Guidelines The name of a JavaScript library package MUST start with diff --git a/guidelines/modules/ROOT/pages/Node.js.adoc b/guidelines/modules/ROOT/pages/Node.js.adoc index 86af23f..0ac29d6 100644 --- a/guidelines/modules/ROOT/pages/Node.js.adoc +++ b/guidelines/modules/ROOT/pages/Node.js.adoc @@ -2,8 +2,6 @@ The upstream Node.js stance on https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/[global library packages] is that they are ".. best avoided if not needed." In Fedora, we take the same stance with our nodejs packages. You can provide a package that uses nodejs, but you should bundle all the nodejs libraries that are needed. -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 with a specfile comment explaining the decision. This does not eliminate the requirement to validate licenses of bundled code. See <> below. - == What to Package * The interpreter, development headers/libraries, and the assorted tools to manage project-level installations. @@ -72,7 +70,11 @@ Native (binary) packages must omit `+noarch+` and list only `+%{nodejs_arches}+` The licenses of the bundled Node.js modules need to be in the spec file. If you are using our bundling script they will be listed in --bundled-licenses.txt. It is recommended that you include --bundled-licenses.txt in your rpm -Each time you update your package, you need to verify the bundled licenses against https://fedoraproject.org/wiki/Licensing:Main#Software_License_List[Fedoras Software License List]. +Each time you update your package, you need to verify the bundled licenses against +https://fedoraproject.org/wiki/Licensing:Main#Software_License_List[Fedoras Software License List]. +Note that precompiled/minimized JavaScript may be packaged, +but the requirement to verify the licenses also applies to it, +see the :xref:JavaScript.adoc[JavaScript guidelines]. List all unique licenses on the License: line of your spec file. https://fedoraproject.org/wiki/Licensing:FAQ?rd=Licensing/FAQ#How_should_I_handle_multiple_licensing_situations.3F[Separate each license with the word "and"]