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

Jérémy Lal kapouer at melix.org
Thu Apr 26 16:33:51 BST 2018


2018-04-26 13:40 GMT+02:00 Paolo Greppi <paolo.greppi at libpf.com>:

> 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) ?
>

indeed i knew i cut some corners hence the experimental thing. Fixed in vcs.



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

If you look closer at node-tar, you'll see it's not the case at all.


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

Read again debian/README.source:
1. debcheckout <package>
2. uscan-components

Of course, this implies
cd ../node-tar-4.4.1/
dpkg-buildpackage



>
> 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) ?
>

Not sure it is easy to streamline, anyway i added a link there.

Thank you for your intererest.

Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20180426/dd89a120/attachment.html>


More information about the Pkg-javascript-devel mailing list