[Pkg-javascript-devel] pkg-js-tools auto install

Xavier yadd at debian.org
Tue Jul 30 09:03:33 BST 2019


Le 30/07/2019 à 09:35, Pirate Praveen a écrit :
> 
> 
> On 2019, ജൂലൈ 30 12:01:19 PM IST, Xavier <yadd at debian.org> wrote:
>> Hi all,
>>
>> I continue to improve auto_install. Here is a resume (from doc). Do you
>> thinks it's in the right way to provide an auto-installer? (this part
>> is
>> not published in experimental but ready and with tests on salsa repo)
>>
>> NB: debian/nodejs/
>>
>> - - - 8< - - -
>> pkg-js-tools provides:
>> * dh_auto_configuration for embedded components: it automatically
>> creates links in node_modules/ directory and removes them during clean
>> * dh_auto_install: automatic install (0.8.4)
>>  * main module: if no debian/install exists, pkg-js-tools will read
>> package.json#files field to install files. If not, it install all files
>> except *.md, doc*, example*, test*. If install is not good, use
>> debian/nodejs/files to fix the list. Files are installed following
>> "Architecture" field in /usr/share/nodejs or /usr/lib/<gnu-arch>/nodejs
>>  * components: pkg-js-tools does the same for each component in
>> <module/path>/node_modules/<component-package-name>. To restrict this
>> behavior, write a debian/node_submodules and list the components to
>> install. An empty debian/node_submodules installs no component.
>> * dh_auto_test: launch test written in debian/tests/pkg-js/test (using
>> sh -e). If you use pkg-js-autopkgtest, you can also use the same test
>> during build.
>>
>> Files:
>>
>> * debian/nodejs/submodules lists components to install (all if missing)
>> * debian/nodejs/files overwrites package.json#files field.
>> * debian/nodejs/<component>/files overwrites package.json#files field.
>>                                  Use component name, not module name
>>                                 here if different. An empty file avoid
>>                                  any install
>> * debian/nodejs/install overwrite debian/nodejs/files: same usage as
>>                        debian/install except that destination not
>>                        starting with / are related to arch path
>>                      (/usr/share/nodejs or /usr/lib/<gnu-arch>/nodejs)
>> * debian/nodejs/<component>/install overwrite
>>                                    debian/nodejs/<component>/files,
>>                                    same as debian/nodejs/install for
>>                                    components
>> * debian/nodejs/<component>/nolink avoid node_modules links creation
>> for
>>                                   this component (configuration step)
> 
> Looks good except for linking part. I think nolink should be default.

After a quick IRC discussion, debian/nodejs/<component>/nolink  will be
replaces by a debian/nodejs/component_links to list components that
needs another (for build, test,...), only main node_modules links will
be created automatically. Example:

  # debian/nodejs/component_links
  requireoptional   bson

will create a link from ../../requireoptional/ to
bson/node_modules/require_optional

Then debian/nodejs/<component>/nolink will list only components that
must not be linked in main node_modules/ directory



More information about the Pkg-javascript-devel mailing list