From 0a6865ecb2f7fb6499b0add91284301f95bad07b Mon Sep 17 00:00:00 2001 From: Hirotaka Wakabayashi Date: Feb 10 2019 14:44:48 +0000 Subject: Node.js: Fix dead links Merges: #858 Signed-off-by: Igor Gnatenko --- diff --git a/guidelines/modules/ROOT/pages/Node.js.adoc b/guidelines/modules/ROOT/pages/Node.js.adoc index 47a719c..6c1b207 100644 --- a/guidelines/modules/ROOT/pages/Node.js.adoc +++ b/guidelines/modules/ROOT/pages/Node.js.adoc @@ -14,7 +14,7 @@ To build a package containing pure JavaScript node modules, you need to have: BuildRequires: nodejs-packaging .... -Additional BuildRequires are necessary for native modules. See link:#Building_native_modules_with_node-gyp[#Building native modules with node-gyp] for more information. +Additional BuildRequires are necessary for native modules. See <> for more information. == Macros @@ -27,10 +27,10 @@ The following macros are defined for you: |nodejs_version |e.g. 0.9.5 |The currently installed version of Node.js. |nodejs_sitelib |%\{_prefix}/lib/node_modules |Where Node.js modules written purely in JavaScript are installed |nodejs_sitearch |%\{_prefix}/lib/node_modules |Where native C++ Node.js modules are installed -|nodejs_symlink_deps |%\{_prefix}/lib/rpm/nodejs-symlink-deps |See link:#Symlinking_Dependencies[#Symlinking Dependencies] below. -|nodejs_fixdep |%\{_prefix}/lib/rpm/nodejs-fixdep |See link:#Correcting_Dependencies[#Correcting Dependencies] +|nodejs_symlink_deps |%\{_prefix}/lib/rpm/nodejs-symlink-deps |See <> below. +|nodejs_fixdep |%\{_prefix}/lib/rpm/nodejs-fixdep |See <> below. |nodejs_arches |%\{ix86} x86_64 %\{arm} |See #ExclusiveArch. This macro is provided by `+redhat-rpm-config+` in F19+ so it works with Koji properly. -|nodejs_default_filter |%global __provides_exclude_from ^%\{nodejs_sitearch}/.*\\.node$ |Filters unwanted provides from native modules. See link:#Filtering_Unwanted_Provides[#Filtering Unwanted Provides] below. +|nodejs_default_filter |%global __provides_exclude_from ^%\{nodejs_sitearch}/.*\\.node$ |Filters unwanted provides from native modules. See <> below. |================================================================================================================================================================================================================= These macros are provided by the _nodejs-packaging_ package. @@ -172,7 +172,7 @@ cp -p build/Release/index.node package.json %{buildroot}%{nodejs_sitelib}/foomod If the shared object is called by JavaScript wrapper code, the situation is slightly more complicated. -If the module uses the npm https://npmjs.org/package/bindings[_bindings_] module, the shared object file should be installed in `+%{nodejs_sitelib}/+``+/build/+``+.node+`, which is at the top of _bindings_' search path and where `+node-gyp+` usually creates a symlink to wherever the real shared object file exists. For example: +If the module uses the npm https://npmjs.org/package/bindings[_bindings_] module, the shared object file should be installed in `+%{nodejs_sitelib}/+``+/build/+``+.node+`, which is at the top of https://npmjs.org/package/bindings[_bindings_] search path and where `+node-gyp+` usually creates a symlink to wherever the real shared object file exists. For example: .... %install @@ -181,19 +181,19 @@ cp -p package.json wrapper.js %{buildroot}%{nodejs_sitelib}/foomodule/ cp -p build/Release/foomodule.node %{buildroot}%{nodejs_sitelib}/foomodule/build/ .... -If the module hardcodes `+build/Release/+``+.node+`, the module should be patched to use `+build/+``+.node+` instead, and upstream should be advised that they should use the _bindings_ module, because their module could break when users use debug builds of node. +If the module hardcodes `+build/Release/+``+.node+`, the module should be patched to use `+build/+``+.node+` instead, and upstream should be advised that they should use the https://npmjs.org/package/bindings[_bindings_] module, because their module could break when users use debug builds of node. If the module uses it's own Makefiles to locate the shared object file(s) to a specific location, then those files should installed in that location. === Dealing with Bundled Libraries -Many native modules contain bundled copies of libraries already present in Fedora. You must build against the system version of these libraries. For more information, see Packaging:No_Bundled_Libraries[Packaging:No Bundled Libraries]. +Many native modules contain bundled copies of libraries already present in Fedora. You must build against the system version of these libraries. For more information, see xref:index.adoc#bundling[Bundled Libraries Guidelines]. The Fedora version of `+node-gyp+` will handle the fact that shared versions of libuv, v8, and http_parser without modification to the module, since `+node-gyp+` always unconditionally configures these libraries. However, some modules may rely on other libraries bundled with node, such as openssl or c-ares. These may need to be patched to use the system headers for these libraries. === Filtering Unwanted Provides -RPM automatically adds some unwanted virtual provides to the shared object files included with native modules. To remove them, add `+%{?nodejs_default_filter}+` to the top of the package's spec file. For more information, see Packaging:AutoProvidesAndRequiresFiltering. +RPM automatically adds some unwanted virtual provides to the shared object files included with native modules. To remove them, add `+%{?nodejs_default_filter}+` to the top of the package's spec file. For more information, see xref:AutoProvidesAndRequiresFiltering.adoc[Packaging:AutoProvidesAndRequiresFiltering]. == Build testing in %check