From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~...
Transcript of From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~...
![Page 1: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/1.jpg)
From Debian, with ♥
gregor herrmann
Barcelona Perl Workshop, 2014-11-08
![Page 2: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/2.jpg)
Outline
♥ About Me♥ Debian and the Debian Perl Group♥ How to make our lives even easier
♥ Maintaining Perl distributions as Debian packages
![Page 3: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/3.jpg)
Me =
♥ gregor herrmann, gregoa@{debian,cpan}.org gregoa on IRC, identi.ca, etc.♥ Innsbruck, Austria♥ member of the Debian Perl Group (since 2006)♥ Debian Developer (since 2008)
![Page 4: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/4.jpg)
Debian
♥ Free Operating System♥ a.k.a. "Linux Distribution"♥ since 1993♥ 22.000 source packages, 45.000 binary packages
Who is using Debian here?
![Page 5: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/5.jpg)
Debian Perl Group
♥ since 2004♥ Aim: We want to constantly improve the coverage of available Perl modules in Debian.♥ ~3.000 packages [of ~3.500 lib.*-perl in total]♥ 254 members [in theory]♥ 54 committers since 2014-01-01♥ We don't maintain perl itself
![Page 6: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/6.jpg)
I believe that the core, beautiful, exciting thing that wedo inside Debian, and that any other excellent Linuxdistribution does, is exactly accepting what upstream does.Not accepting in the sense of passive apathy, but in thesense of wholehearted embrace of upstream's ideas,expertise, passion, and hard work, and finding a way toincorporate that into our distribution. Acceptance in thesense of reaching out with both hands and taking hold ofthe gift we are given with a firm grasp and a gratefulheart.
Linux distributions are *all about* upstreams. Thoseupstreams are the reason why we're here.
Russ Allbery
![Page 7: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/7.jpg)
Debian Perl Group and the CPAN
My claim: we are quite similar
♥ Kinda relaxed, cooperative, helpful, friendly♥ Focus on quality and Doing It Right™♥ Solutions before ego boosting (teamwork)
Who maintains distributions on the CPAN?
![Page 8: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/8.jpg)
Some messages to the CPAN community
![Page 9: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/9.jpg)
Moltes gràcies!
¡Muchas gracias!
Thanks a lot!
![Page 10: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/10.jpg)
And what can CPAN authors do to make
our lives even easier?
![Page 11: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/11.jpg)
♥ Keep up the good work!♥ Make good, state-of-the-art CPAN distributions♥ Use current tools, follow best practices
![Page 12: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/12.jpg)
Some details …
![Page 13: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/13.jpg)
Changes
♥ Include a Changes file♥ Changes != $vcs log♥ not "fix RT#123, merge PR #456"
![Page 14: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/14.jpg)
Bugs
♥ mention CPAN ticket id / github issue id in Changes♥ mention preferred bug tracker in META.*
![Page 15: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/15.jpg)
Git
♥ Nice!♥ Please tag, (sign tags,) and: push tags!
![Page 16: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/16.jpg)
Tests
♥ variables (RELEASE_TESTING, AUTOMATED_TESTING), author tests, xt/, … (cf. Lancaster consensus)♥ in Debian: no internet access allowed / guaranteed maybe Test::RequiresInternet helps?♥ personal recommendation: use Test::Spelling♥ don't assume source directory, blib/, uid, .git/, …
![Page 17: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/17.jpg)
{Makefile,Build}.PL
♥ No prompts♥ or ExtUtils::MakerMaker::prompt()♥ Also think of the CPAN smoke testers
![Page 18: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/18.jpg)
Tarballs
♥ No debian/ directory♥ or .gitignore♥ or tempfiles / backups files
![Page 19: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/19.jpg)
System libs
♥ Including external (C) libraries might be needed for other OSes♥ but please make it easy for us to use the system libs (configure switch, env variable, ...)
![Page 20: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/20.jpg)
inc/ is evil
♥ Code duplication, and …♥ bug duplication!
♥ And embedded minified JavaScript files are evil as well (not the preferred form of modification)
![Page 21: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/21.jpg)
Requirements
♥ Minimum required versions …♥ … not what is installed locally / what is in bleadperl
♥ "47.11 → 0" ?!♥ 0 -> '0' -> 0 -> '0' -> … ?!
![Page 22: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/22.jpg)
Versions
♥ Use a consistent versioning scheme♥ CPAN: 0.10 < 0.1001 < 0.11♥ Debian: 0.10 < 0.1001 > 0.11 ✔ 0.1001 → 0.10.01 (or else:) ✔ 0.11 → 0.1100, 1:0.11
![Page 23: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/23.jpg)
Legal stuff
♥ We need copyright/licenses♥ free software licenses♥ consistent & complete
♥ Again, modern tools, like Dist::Zilla
![Page 24: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/24.jpg)
And now: our workflow / tools / …
![Page 25: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/25.jpg)
Links
https://wiki.debian.org/Teams/DebianPerlGroup/https://wiki.debian.org/Teams/DebianPerlGroup/Welcomehttps://pkg-perl.alioth.debian.org/
https://wiki.debian.org/UpstreamGuide
![Page 26: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/26.jpg)
Communication
♥ 3 mailing lists♥ IRC (#debian-perl @ OFTC)♥ meetings in meatspace (DebConf, maybe a sprint?)
![Page 27: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/27.jpg)
Code
♥ Packages are maintained in Git (svn before Summer 2011)♥ https://anonscm.debian.org/cgit/pkg-perl/♥ KGB sends notifications to IRC
![Page 28: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/28.jpg)
Tools
♥ lots of them♥ some generic Debian tools♥ some (pkg-)perl specific
![Page 29: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/29.jpg)
PET
♥ Package Entropy Tracker♥ http://pet.debian.net/pkg-perl/pet.cgi♥ VCS-centered view on packages showing what to do: new upstream release, bugs, pendings uploads, …
![Page 30: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/30.jpg)
dh-make-perl
♥ create (or update) Debian package from CPAN tarball♥ cpan2deb =~ dh-make-perl … --build
♥ Foo::Bar → libfoo-bar-perl
♥ Result: a Debian source package, i.e. an unpacked tarball + debian/ directory containing meta information and build instructions
![Page 31: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/31.jpg)
pkg-perl-tools
♥ collection of helpers♥ CLI called as `dpt …' manipulating our Git repos forwarding bug reports and patches combining upstream Git repos with ours
![Page 32: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/32.jpg)
Track your packages!
♥ Package Tracking System: https://packages.qa.debian.org/libFOO-BAR-perl https://tracker.debian.org/pkg/libFOO-BAR-perl subscription to event types available♥ Bug Tracking system: https://bugs.debian.org/libFOO-BAR-perl♥ Git repo: http://anonscm.debian.org/cgit/pkg-perl/packages/libFOO-BAR-perl.git♥ Build logs (XS modules): https://buildd.debian.org/libFOO-BAR-perl
![Page 33: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/33.jpg)
Addendum
♥ Copyright & license: © 2014, gregor herrmann CC BY-SA 4.0♥ "use Debian" logo: © 2009, ghostbar CC BY-NC-SA 2.0♥ Parts from "How to maintain 2500 Perl Modules as Debian Packages" © 2013, Axel Beckert CC SA 3.0 DE http://pkg-perl.alioth.debian.org/docs/swiss-perl-workshop-2013/♥ Download: http://pkg-perl.alioth.debian.org/docs/barcelona-perl-workshop-2014/
![Page 34: From Debian, with€¦ · ♥ create (or update) Debian package from CPAN tarball ♥ cpan2deb =~ dh-make-perl … --build ♥ Foo::Bar → libfoo-bar-perl ♥ Result: a Debian source](https://reader035.fdocuments.in/reader035/viewer/2022063002/5f2c776d0e605402603a9549/html5/thumbnails/34.jpg)
Summary:
Moltes gràcies!
¡Muchas gracias!
Thanks a lot!