From 22596956706e72a4e1d92e4e3476f4b9bd6ca5b1 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 18 2024 13:54:11 +0000 Subject: [PATCH 1/3] 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"] From 319061ff09596f8f715c4adca5ae50f12c83f4ce Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 18 2024 14:06:39 +0000 Subject: [PATCH 2/3] Add missing punctuation, fix link The wiki page redirects to the antora page, and the anchor didn't work anymore. Also use semanatic line breaks. --- diff --git a/guidelines/modules/ROOT/pages/Node.js.adoc b/guidelines/modules/ROOT/pages/Node.js.adoc index 0ac29d6..c458977 100644 --- a/guidelines/modules/ROOT/pages/Node.js.adoc +++ b/guidelines/modules/ROOT/pages/Node.js.adoc @@ -68,7 +68,10 @@ Native (binary) packages must omit `+noarch+` and list only `+%{nodejs_arches}+` == Bundled Licenses -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 +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 the 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]. @@ -76,7 +79,8 @@ 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"] +List all unique licenses on the License: line of your spec file. +https://docs.fedoraproject.org/en-US/legal/license-field/#_basic_rule[Separate each license with the word "and"]. .... License: and and @@ -91,7 +95,7 @@ cp %{SOURCE3} . %license LICENSE %{npm_name}-%{version}-bundled-licenses.txt .... -If you have further questions refer to the https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/[Fedora Licensing Guidelines] +If you have further questions refer to the https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/[Fedora Licensing Guidelines]. == Using tarballs from the npm registry From adf7c36214bda86daefb1e02d4c26057b71a5816 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 18 2024 14:06:51 +0000 Subject: [PATCH 3/3] Say that pregenerated css can be shipped Implements https://pagure.io/fesco/issue/3269. --- diff --git a/guidelines/modules/ROOT/pages/Web_Assets.adoc b/guidelines/modules/ROOT/pages/Web_Assets.adoc index e2a7d7c..7f1a7d0 100644 --- a/guidelines/modules/ROOT/pages/Web_Assets.adoc +++ b/guidelines/modules/ROOT/pages/Web_Assets.adoc @@ -103,7 +103,12 @@ Pure CSS frameworks can be included as-is. CSS frameworks that use an alternative language that compiles to CSS, such as https://lesscss.org/[LESS], must compile to CSS as part of the build process. -It is not acceptable to include pre-compiled CSS in Fedora packages. + +Packages containing CSS should make the best effort to regenerate any precompiled/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 with a specfile comment explaining the decision. +This does not eliminate the requirement to validate licenses of bundled content. == Flash