2850
Comment: Updated
|
3068
Updated
|
Deletions are marked like this. | Additions are marked like this. |
Line 72: | Line 72: |
Continue to fix files and then push your work into alioth collab-maint. | For more information, please read GitPackaging Continue to fix files and then push your work to [[Alioth]]. By default npm2deb set '''Vcs-*''' fields to [[Alioth/Git|git in collab-maint]]. For more information about Javascript Team Infrastracture please read the [[Javascript]] page. |
Npm2Deb
npm2deb is an automatic tool which permits to fast deploy debian/* files starting from a module downloaded via npm.
To install please clone this git repo:
git clone https://github.com/LeoIannacone/npm2deb
And then run:
python setup.py
For usage information, please refer to npm2deb man page.
Workflow example
A simple workflow is check if a node_module has all dependencies already satisfied in Debian, you can you npm2deb -s to get this info.
In this example we will check express 4.x module which at the moment is not packaged for Debian:
$ npm2deb -s express NPM Debian parseurl (1.0.1) buffer-crc32 (0.2.1) node-buffer-crc32 (0.2.1-1) qs (0.6.6) node-qs (0.6.5-1) cookie-signature (1.0.3) node-cookie-signature (1.0.1-1) methods (0.1.0) type-is (1.1.0) accepts (1.0.1) send (0.2.0) node-send (0.1.4-1) escape-html (1.0.1) cookie (0.1.1) node-cookie (0.1.0-1) merge-descriptors (0.0.2) fresh (0.2.2) node-fresh (0.2.0-1) debug (0.8.0) node-debug (0.6.0-1) range-parser (1.0.0) node-range-parser (0.0.4+git7d1cd72a-1) path-to-regexp (0.1.2) serve-static (1.0.4) utils-merge (1.0.0)
As you can see, there are many modules not packaged for debian, so you can do it by running npm2deb <module_name>, in this example we will package parseurl module:
$ npm2deb parseurl This is not a crystal ball, so please take a look at auto-generated files. You may want fix first these issues: parseurl/node-parseurl/debian/control: FIX_ME long desciption parseurl/node-parseurl/debian/copyright:Copyright: 2014 FIX_ME upstream author Use uscan to get orig source files. Fix debian/watch and then run $ uscan --download-current-version
That commands create a <module_name>/node-<module_name>/debian directory which contains the basic information about that module.
You have to fix every occurrence of FIX_ME in those files.
To get origin sources, fix (if not done by npm2deb) watch file and run:
$ uscan --download-current-version
This will download current archive file, then you can start packaging module using git, in the most cases the commands you have to run are the following:
mv debian ../ git init git import-orig ../*orig* mv ../debian .
For more information, please read GitPackaging
Continue to fix files and then push your work to Alioth. By default npm2deb set Vcs-* fields to ?git in collab-maint. For more information about Javascript Team Infrastracture please read the Javascript page.