[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging my first Debian module



Dear Andrew,

As someone who's also recently started packaging Perl modules, I though you might find my personal notes below helpful. Please note, as they're just things I've noted down as I go along, they would definitely benefit from some editing / testing / correction. Hopefully they may be of some use?

Christopher


Useful links
============

http://pkg-perl.alioth.debian.org/docs/pkg-perl-for-users/pkg-perl-for-users.pdf

https://wiki.debian.org/Teams/DebianPerlGroup/Welcome

http://pkg-perl.alioth.debian.org/howto/quilt.html

http://pkg-perl.alioth.debian.org/copyright.html

Packaging
=========

Check if someone is already packaging lib*-*-perl:

Try package name on https://tracker.debian.org/

Check if a bug report exists: http://wnpp.debian.net/ (make sure ITP is selected)

Start packaging:

cd ~/src/pkg-perl/packages

dh-make-perl --pkg-perl --cpan Catalyst::Authentication::Store::Htpasswd

I find it useful to have shortcuts to the packages I am workin on e.g.

ln -s ~/src/pkg-perl/packages/libcatalyst-authentication-store-htpasswd-perl/ ~/mypackages/libcatalyst-authentication-store-htpasswd-perl/

cd ~/src/pkg-perl/packages/libcatalyst-authentication-store-htpasswd-perl/

Visit https://metacpan.org/pod/Catalyst::Authentication::Store::Htpasswd to get description, upstream contact and copyright info

Search for copyrights:

grep -r -i copyright *

edit debian/control to add the description and debian/copyright to add the upstream contact, copyright statement and copyright holders.

dpt gen-itp

sudo dpt gen-itp | /usr/sbin/sendmail -t

A few minutes later the bug e-mail comes in with the bug number

Add “Closes: #******” to debian/changelog

git add debian/changelog debian/control debian/copyright

git commit

Filled in required info in debian/control, debian/copyright and debian/changelog

dpt alioth-repo

At this point, the package appears under ‘New Packages’ at http://pet.debian.net/pkg-perl/pet.cgi

(not in a chroot, run sbuild)

lintian -EviIL +pedantic

Make any changes as required. If the source needs to be modified then

quilt new name.patch

quilt edit file

quilt refresh

quilt pop

Or, if you’ve already edited:

dpkg-source --commit

Create/add a .gitignore file with the line .pc/

git add .gitignore debian/patches/

Edit debian/patches/name.patch and add DEP-3 headers to the top

Description: ***

Author: Christopher Hoskin <christopher.hoskin@gmail.com>

Forwarded:

Last-Update: 20XX-YY-ZZ

dpt forward-patch debian/patches/name.patch

Look in https://rt.cpan.org/ to get a URL to the forwarded patch

When done,

git status

git add

git commit

git push --all

Check install:



Checklist
=========

Before submitting for review, check:

quilt patches unapplied

patches have DEP-3 headers (head debian/patches/*.patch)

grep -r -i copyright *

Check copyrights is year-year, Author <email>

Add copyrights for inc/Module if present

Check debian/control for unnecessary version numbers (i.e. no older package exists) using

cme check dpkg

In debian/control, short Description should begin with lowercase letter (unless proper noun?) be a “noun phrase”. No full stop at end.

Long description needs to mention module name

debuild -S

lintian -EviIL +pedantic ~/src/pkg-perl/packages/<package>_source.changes

sbuild

lintian -EviIL +pedantic (run in the package folder)

adt-run --setup-commands="apt-get update" -B ~/src/pkg-perl/packages/libapache-ssllookup-perl_2.00-04-1_amd64.deb  ~/src/pkg-perl/packages/libapache-ssllookup-perl_2.00-04-1.dsc --- schroot adt-amd64

Submitting for Review
=====================

dch -r

git add debian/changelog

git commit -m 'dch -r; ready for review'

git push --all

Sometime later the package will appear in the “ready for upload” section of http://pet.debian.net/pkg-perl/pet.cgi



Post review
===========

After a review, if corrections are needed, these are added into debian/changelog as TODO, and the distro is changed from unstable back to UNRELEASED, The package is moved from “ready for upload” back to “New Packages”.

To get the changes locally (without applying them):

git fetch

See what has changed:

git diff master origin/master

Accept the changes:

git pull





Reply to: