Python Packaging at Kochi Python follow up
Follow up activities for the packaging workshop
Setup aliases and environment variables for packaging: https://wiki.debian.org/Diaspora/Packaging/gem2deb#Setup_your_environment
Steps for packaging Node.js modules: https://wiki.debian.org/Javascript/Nodejs/Npm2Deb
Some node modules available for packaging are listed below. Please reply with your selection.
is-fullwidth-code-point - @suhail
lcid - @renjiththankachan
@sadiq I had to run these command in vim to clean the outfile.
1,$g/^node.*$/d
1,$g/^und.*$/d
1,$g/^colo.*$/d
1,$s/)$/) || || ||/
Can you check for packages in NEW and which has ITP bugs? npm2deb search does these already so you can refer its code.
@praveenarimbrathod I have created ITPs for is-arrayish [1] and strip-bom[2]. Repos are at https://gitlab.com/shanavasm/node-is-arrayish and https://gitlab.com/shanavasm/node-strip-bom
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841158
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841391
There is only one branch there. You should push all branches (git push --all) and all tags (git push --tags), but remove the debian/ only when it is ready for upload.
For node-strip-bom pristine-tar branch is missing. You should run gbp import-dsc --pristine-tar so we have pristine-tar data as well. pristine-tar branch is used to create exact orig.tar ball from upstream branch.
@praveenarimbrathod Thanks, Done :)
Once a package is ready for upload, you should change UNRELEASED to unstable (you can use dch -r command).
Also you should remove the line * New upstream release from debian/changelog. This was added by uupdate, since this is the initial release, we don't need that line. (uupdate is usually run only when we update the upstream release).
Also request membership to https://alioth.debian.org/projects/pkg-javascript group after signing up. We keep all our nodejs packages there so everyone in the team can update these packages.
It would also be a good idea to use a new dedicated email account for debian work as some of the mailing lists are high volume and also the email address becomes public. I suggest a community run email service like disroot.org, autistici.org, or riseup.net
@shanavasm Congratulations! Both packages are uploaded to debian! Now it will be reviewed by ftp masters before it is added to debian. They may ask you to change something, usually if you missed any copyright notices.
Also your request to join pkg-javascript on alioth is accepted. So next time, push your packages to alioth. See https://wiki.debian.org/Alioth/SSH for using ssh with alioth.
To create a new git repo you can follow these steps:
ssh git.debian.org
cd /git/pkg-javascript
./setup-repository node-is-arrayish 'Packaging for node-is-arrayish'
You can try is-equal-shallow next. You can take any leaf module from https://wiki.debian.org/Javascript/Nodejs/Tasks/grunt but just let me know before you start working so we don't duplicate work.
@praveenarimbrathod Thanks :):) !!.
I'll try is-equal-shallow next
Update https://wiki.debian.org/Javascript/Nodejs/Npm2Deb with more details so it becomes easy for others. Add the things you learned but missing from the wiki like requesting alioth membership, final update to debian/changelog, pushing all branches etc.
@praveenarimbrathod
npm2deb create is-equal-shallow throws the following error
Warnings occured:
[error] is-primitive: dependency node-is-primitive not in debian
How to handle dependencies not added to debian ?
It is recently packaged by @sruthi (https://tracker.debian.org/pkg/node-is-primitive). You get this error because your apt cache is not updated. If you use rmadison -s sid instead of apt-cache madison we can always get the latest info. Can you try to fix this in npm2deb https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836182 ? Send a pull request to npm2deb github repo and send forwarded 836182 <pr link> to control at bugs.debian.org
My apt-cache was up to date. A little investigation shows that npm2deb searches only for 'source' packages and I don't have a source entry in my sources.list.
However rmadison seems to be perfect solution. I will try to fix it.
However rmadison seems to be perfect solution. I will try to fix it.
👍
I have fixed the package search issue [#836182]. Fix is available at https://github.com/shanavas786/npm2deb/tree/fix-package-search.
Thanks! Can you try fixing https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840929 ?
#840929 was a local issue. Can you try https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840226 ?
Fixed #840226.
Looks good! Thanks :)
#840169 forwarded to https://github.com/LeoIannacone/npm2deb/pull/25
@praveenarimbrathod - same doubt as mentioned above
$ npm2deb create string-width
Warnings occured:
[error] is-fullwidth-code-point: dependency node-is-fullwidth-code-point not in debian
[error] strip-ansi: dependency node-strip-ansi not in debian
$ npm2deb depends -b -r string-width
Dependencies:
NPM
string-width (2.0.0)
├─ is-fullwidth-code-point (2.0.0)
└─ strip-ansi (3.0.0)
└─ ansi-regex (2.0.0)
You have the same issue like @shanavasm , you have to update your apt cache with apt-get update.
$ npm2deb depends -b -r string-width
Dependencies:
NPM Debian
string-width (2.0.0) None
├─ is-fullwidth-code-point (^2.0.0) None
└─ strip-ansi (^3.0.0) node-strip-ansi (3.0.1-1)
Since is-fullwidth-code-point is not packaged, you have to do that first.
Seems is-fullwidth-code-point is very buggy https://lists.debian.org/debian-devel/2016/10/msg00743.html We have to use wcwidth.js instead. So please package that.
It has another dependency, defaults (1.0.3), which is not packaged!
ok, start with defaults then.
dpkg-buildpackage is throwing following errors. node-clone (1.0.2) is already packaged.
dpkg-gencontrol: warning: can't parse dependency node-clone (1.0.2)
dpkg-gencontrol: error: error occurred while parsing Depends field:
, nodejs
, node-clone (1.0.2)
You need to convert ^ to >=. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840207 after you complete this package, try fixing it in npm2deb so its converted automatically.
Trying to fix this[0]. Could you please check this[1]?
Testing on defaults package
CONTROL file before - [2]
CONTROL file now - [3]
[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840207
[1] https://github.com/psuhailp/npm2deb/commit/4dc756ef5849bf51ee41938f33ca4680d6a0829b
Give a space after '>=', like '>= '.
You also need to look for n.x and ~. if version is '1.x', it should be '>= 1.0'.
~1.0.0 means >= 1.0.0, << 1.1. ~1.0, means >= 1.0, << 2. You'll have to add two lines.
node-jju (~1.1.0) becomes
, node-jju (>= 1.1.0)
, node-jju (<< 1.2)
ok, i will change it.
isn't '1.x' like '>= 1.0' & '<< 2'. I am confused 😕 . Is there any documentation on that?
Congratulations @suhail . Your package node-defaults is uploaded to debian.
Thanks 😃
node-defaults is accepted into unstable, so you can package wcwidth.js now.
Ok Praveen. I shall do wcwidth.js packaging next.
@sadiq @shanavasm @suhail @balasankarchelamat @bhe shall we do another packaging session in Kochi?
ya, sure
@shanavasm You should use gbp import-dsc command to import the package as a git repo. See https://wiki.debian.org/Diaspora/Packaging/gitlab#gbp_import-dsc
Unlike gem2deb, you'll have to download orig.tar.gz, run uupdate, and dpkg-source -b . to get the dsc file.
Go ahead with the ITP.