[Pkg-javascript-devel] bundling solitary nodejs modules as components

Paolo Greppi paolo.greppi at libpf.com
Thu Apr 26 12:40:22 BST 2018


Il 23/04/2018 14:16, Jérémy Lal ha scritto:
> After years of hesitation... i started to experiment bundling node modules as components,
> thanks to the experiment led by pkg-components.
> 
> I just uploaded to experimental node-tar-4.4.1+ds-2, please look into it if you're interested.
> Some docs are written in changelog and README.source.
> 
> I call here "solitary modules" a subset of modules that are mostly only used by a single software,
> and have all the same author, more or less, up to the point their distribution as independent modules is not interesting for debian.
> 
> (Caveats: not pristine-tar friendly. The git-buildpackage layout is useless in that situation).
> 
> Jérémy.

Hi I am trying to see if this technique can be applied to node-gulp-sourcemaps, which I need to update to v2.6.4.
It requires @gulp-sourcemaps/map-sources and @gulp-sourcemaps/identity-map which clearly match the description of solitary modules.

Trying to grasp what you did, I found this useful piece of documentation:
https://lists.debian.org/debian-devel/2010/09/msg00208.html
but I am not sure that it is up to date.

A few questions for you:

- I see your patch to pkg-components has been merged in 0.10 which is accepted in unstable since 2018-04-23 so you could depend on pkg-component (>= 0.10) ?

- Is repeating the names of the components in debian/rules, autopkgtest target unavoidable ?

- I run dpkg-buildpackage and it bails out with:

make[2]: Entering directory '/root/node-tar'
mkdir -p COMPONENTS
make[2]: *** No rule to make target 'chownr', needed by 'COMPONENTS/chownr'.  Stop.
make[2]: Leaving directory '/root/node-tar'
dh_components: CURDIR=/root/node-tar PACKAGE=node-tar DH_COMPONENT=chownr /usr/share/pkg-components/build_stages/copy returned exit code 2
make[1]: *** [debian/rules:11: override_dh_install] Error 2
make[1]: Leaving directory '/root/node-tar'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

  what did I do wrong ?

- could this technique be integrated in npm2deb (https://github.com/LeoIannacone/npm2deb/issues/15) ?

Paolo



More information about the Pkg-javascript-devel mailing list