Package from CPAN for the Debian Perl team
Become a contributor
Create an Alioth account
Go to on the register page of Alioth, and create a new account. After have confirmed by e-mail, you will have a username ended by -guest.
Introduce yourself on the mailing list
First, register you to the debian-perl mailing list.
Then, simply send an e-mail to debian-perl@lists.debian.org:
Hi all,
I'm a perl user and Debian fan since a long time.
I'm a French - my English is not perfect - engineering student in IT.
I never have the opportunity to contribute directly to Debian, but I'm a local
active militant of the free software, and free - and neutral and decentralized -
Internet. I'm the president of Lorraine Data Network[0], a french ISP.
[0] http://ldn-fai.net
Since a few years, I'm looking for contribute to Debian. Some of my friends are
Debian developer or maintainer - use is cool, contribute is better. The author
of the young - but very active - Curses::Toolkit library [1] wishes I package
his work.
[1] http://search.cpan.org/dist/Curses-Toolkit
I'm not currently a Debian maintainer, but it's an opportunity for me to start,
with you.
The author announced a near important release, and with your agreement, I would
offer a first package on the subversion.
My username in Alioth is ju-guest.
Cheers,
ju.
After some "Welcome aboard" from nice contributors:
Welcome! I've added you to the pkg-perl project on alioth now. Please
take a look on the docs about our packaging guidelines and policies,
if not done already [1].
[1] http://wiki.debian.org/Teams/DebianPerlGroup/Welcome
And don't hesitate to ask any questions here on the list or on IRC (#debian-
perl @ irc.debian.org/OFTC)
On your Alioth profile, below Project Info:
This developer is a member of the following projects:
Debian Perl Group (Junior Developer)
Congratulations ;).
How to package
We'll try to package the fake module Eatmytux::Demo (this one is not available from CPAN, but should be). So, the corresponding Debian name is libeatmytux-demo-perl (according the rule ^lib + s/::/-/g + -perl$).
Create an ITP
A new package must close an ITP (Intent To Package) bug, so you need to create one.
Install reportbug and devscripts:
# apt-get install reportbug devscripts
First checks if your lib is really not in Debian:
$ rmadison libeatmytux-demo-perl
Then, checks if there isn't already an ITP for it with the unofficial WNPP web frontend.
If it's okay, retrieve the short description from the CPAN page:
NAME ^
Eatmytux::Demo - a demonstration lib
Then use reportbug, with a personnal SMTP:
reportbug\
--email=julien@vaubourg.com\
--realname="Julien Vaubourg"\
--smtphost=mail.eatmytux.com\
--smtpuser=ju\
--tls\
--list-cc debian-perl@lists.debian.org\
wnpp
Choose ITP, enter the package name, then a short description:
[...]
1 ITP This is an `Intent To Package'. [...]
2 O The package has been `Orphaned'. [...]
3 RFA This is a `Request for Adoption'. [...]
4 RFH This is a `Request For Help'. [...]
5 RFP This is a `Request For Package'. [...]
Choose the request type: 1
Please enter the proposed package name: libeatmytux-demo-perl
Checking status database...
Please briefly describe this package; [...]: Eatmytux::Demo - A demonstration lib
Your report will be carbon-copied to debian-devel, per Debian policy.
Querying Debian BTS for reports on wnpp (source)...
^CUnable to connect to Debian BTS; continue [y|N|?]? y
When reportbug displays Querying Debian BTS, use Ctrl+c to stop it. Otherwise, it's a very long step since it download a huge index file in order to check if there are any similar ITP existing (the BTS would be better to use bunny).
So, answer y to the continue? question, and complete some fields with using the CPAN module page:
Subject: ITP: libeatmytux-demo-perl -- A demonstration lib
Package: wnpp
Owner: Julien Vaubourg <julien@vaubourg.com>
Severity: wishlist
*** Please type your report below this line ***
* Package name : libeatmytux-demo-perl
Version : 0.1
Upstream Author : Julien Vaubourg <julien@vaubourg.com>
* URL : http://search.cpan.org/~ju/Eatmytux-Demo-0.1/
* License : Artistic 1, GPL 1
Programming Lang: Perl
Description : Eatmytux::Demo - A demonstration lib
Eatmytux::Demo module tries to be a good demonstration, based on the real life.
It's a meta package, used by eatmytux.com as part of a tutorial.
When you find "you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.", the license is Artistic 1, GPL 1.
Save your document and close it:
Spawning sensible-editor...
Report will be sent to "Debian Bug Tracking System" <submit@bugs.debian.org>
Submit this report on wnpp (e to edit) [Y|n|a|c|e|i|l|m|p|q|d|t|s|?]? Y
Answer Y.
Enter your SMTP password, and it's ok:
Connecting to mail.eatmytux.com via SMTP...
Enter SMTP password for ju@mail.eatmytux.com:
Bug report submitted to: "Debian Bug Tracking System" <submit@bugs.debian.org>
Copies sent to:
Debian Bug Tracking System <submit@bugs.debian.org>
Julien Vaubourg <julien@vaubourg.com>
Copies will be sent after processing to:
debian-devel@lists.debian.org
debian-perl@lists.debian.org
[...]
You will receive an e-mail directly:
ITP: libeatmytux-demo-perl -- Eatmytux::Demo - A demonstration lib
And the same, but with a bug number, on the list:
Bug#637200: ITP: libeatmytux-demo-perl -- Eatmytux::Demo - A demonstration lib
Package it from CPAN
You will need some tools;
# apt-get install git git-buildpackage pristine-tar build-essential dh-make-perl pbuilder quilt apt-file
Be careful to have a recent version of dh-make-perl (>= 0.74).
The first time, think to configure correctly Git:
$ git config --global user.name "Julien Vaubourg"
$ git config --global user.email julien@vaubourg.com
Then import the sources and configure automatically the debian files (change the DEBFULLNAME and the three last values):
DEBFULLNAME='Julien Vaubourg' dh-make-perl\
--requiredeps\
-dh 8 --pkg-perl\
--source-format '3.0 (quilt)'\
--dist sid\
--vcs git\
-e julien@vaubourg.com\
--cpan Eatmytux::Demo\
--closes 637200
The value of closes is the bug number that was retrieved in the last ITP e-mail.
If your cpan command is not already configured, choose the default for all questions, and choose a cpan miror.
And in order to avoid to respond these questions the next time, you can save it:
$ cpan
[ same questions ]
cpan[1]> o conf commit
cpan[2]> exit
Then:
$ cd Eatmytux-Demo-0.1/
Checking
Your friend dh-make-perl you really helped. But, there are a lot of checks to be done: this is the tricky part.
Please, read the official Perl team policy.
Here are all the comments that I've ever had (as a standard, d/ represents debian/).
d/copyright:
- Replace the Format field content with a URL like http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=248 (find the last version of rev)
- Remove the DISCLAIMER paragraph at the top
- Missing year(s) of upstream copyright
- If the license is unknown from the CPAN, you can use the default copyright statement (as in e.g. libweb-scraper-perl/debian/copyright)
- Missing inc/* (if there are special files in the upstream, add the corresponding copyright section)
d/control:
- Remove perl-modules from D-B-I (Build-Depends-Indep), perl is enough
- Move perl a the top of the D-B-I list (purely esthetic)
- Don't indicate version for libtemplate-perl
- Use the last debhelper version (currently 8, defined directly with the call of dh-make-perl), and in d/compat
- Checks if the standards-version is the last (currently 3.9.2, it's already done if you have a recent dh-make-perl, and lintian will tell you if it's wrong)
- The short description (the part on the same line than Description:) should be used with: "$package is a $sortdescription". So, no capitalize the first letter, and use an noun syntaxe ("module for *-ing...")
- Replace all this module by the module name
- Remove POD styles from short and long description (e.g. "C
" => "foobar", Eatmytux::Demo|Eatmytux::Demo => Eatmytux::Demo) - The module name must be mentioned at least once in the long description
- Shorten the size of the short and long descriptions if it too long or these lines are too long (lintian will tell you if it's wrong)
- Remove the dh-make-perl boilerplate from the bottom
Checks if there are not dependencies missing, if so add it in Build-Depends-Indep and/or Depends:
$ grep -r 'use ' .
Some nice tools for that:
- apt-file search -l Eatmytux/Demo.pm : find out the corresponding package
- corelist -a Eatmytux::Demo to find out when a dual-lifed module was integrated into perl core
- rmadison libeatmytux-demo-perl to find out in which sources is the package
others:
- Remove all .docs
- Remove debian.bak/ if exists
- Sometimes, there are some errors in the upstream (like manual spelling), if so create a patch
(these lists will be regularly updated)
Build your package
The first time:
# pbuilder --create --distribution sid
# apt-file update
Build, and monitor possible errors (from the source directory, above d/):
$ pdebuild
When it's finished, checks your package with lintian:
$ cd /var/cache/pbuilder/result
$ lintian -i -I --show-overrides --pedantic --color auto libeatmytux-demo-perl_0.1-1.dsc
If there are some messages, fix your debian files, use pdebuild again, and rechecks it (e.g. an outdated version of a file, a renamed field, etc.).
Try your package:
# dpkg -i libeatmytux-demo-perl_0.1-1_all.deb
Nice work :).
You can change UNRELEASED by unstable in d/changelog.
Commit your work
SSH key
In your Alitoh account (on the top-right), choose Edit Keys at the bottom, and add a public key.
Warning: DSA doesn't work, use a RSA key.
Then, add to your ~/.ssh/config:
Host git.debian.org
User ju-guest
IdentityFile /home/ju/.ssh/id_rsa
Create the repo
Log you directly to the git server (doc), and create a new repo:
$ ssh git.debian.org
$ cd /git/pkg-perl/packages/
$ ../setup-repository libdevel-hide-perl 'Packaging of Eatmytux::Demo in Debian'
Commit it
From your local folder:
$ git commit -am 'Initial Release'
$ git push --all --set-upstream
It's not a problem if there are three "remote: fatal: Invalid revision range".
Verification and validation
Regularly, update your local repo:
$ git pull
It's likely that d/changelog will update with a TODO.
Applied it, rechange UNRELEASED by unstable, and commit:
$ git commit -am "Applied TODO (thx gregor)"
$ git push
When it's okay
You will receive some e-mails as:
- Processed: tagging as pending bugs that are closed by packages in NEW
- libeatmytux-demo-perl_0.1-1_i386.changes ACCEPTED into unstable
- Bug#637200 closed by Julien Vaubourg < julien@vaubourg.com > (Bug#637200: fixed in libeatmytux-demo-perl 0.1-1)
- Bug#637200: marked as done (ITP: libeatmytux-demo-perl -- Eatmytux::Demo - A demonstration lib)
Misc
- Last update in January 2012