This is an old revision of the document!
This page describes stuff relating to perl and p5-* ports in tree for perl@
perl@ PRs
OLD: Gnats PR
Current list of people in perl@
committers
- adamw
- bapt
- chinsan
- clsung
- crees
- culot
- dinoex
- eadler
- ehaupt
- gabor
- jadawin
- kuriyama
- leeym
- lth
- mat
- miwi
- mm
- pgollucci
- pi
- sahil
- sem
- skreuzer
- sunpoet
- swills
- tobez
- wen
- zi
contributors
- Aliaksandr Zahatski <zahatski@gmail.com> [perl 6 related]
How to commit for perl@?
Actually, it's not definitive, but tobez@ submitted this idea:
- the committer made at least 10 commits for unique perl@-maintained port
- the committer maintains at least 10 p5-ports on his own
IRC
You can find some of perl@ people on #bsdperl on IRC MagNet. Feel free to connect and ask questions or discuss a future of perl ports on FreeBSD.
Tips and Tricks
Testing Perl Ports
To test whether a port is missing dependencies, Perl ports often can and should be tested using “make test” from within ${WRKSRC} once the build is finished. An easy way to do this is to use “poudriere testport -i” to perform interactive testing after the port has been built. Refer to the Porter's Handbook for further details.
# poudriere testport -j JAILNAME -i CATEGORY/PORT
Once the build is complete and you are provided with a shell prompt within the jail:
# cd /wrkdirs/***/CATEGORY/PORT/work/WRKSRC # make test
If this produces an error similar to “Makefile not found”, then you can run the following command from ${WRKSRC}:
# ./Build.PL test
It should however be noted that CPAN is not canonical; it is very easy to write the Makefile in such a way that CPAN misses dependencies entirely. Look in the file ${WRKSRC}/META.yml; it should provide a clearer picture of the dependencies, though it too can easily be wrong as it's generated automatically.
Test Dependencies
I (tobez@) found it useful recently to add TEST_DEPENDS clause to the ports I commit to. It has exactly the same syntax as old good BUILD_DEPENDS and RUN_DEPENDS (which almost always means listing versioned package dependencies). It is not currently supported in any way by bsd.{port,perl}.mk framework, and portlint will produce a warning (which I happily ignore) about it. But it is immediately useful:
- It is clear at a glance what ports needs to be installed in order for make test to have a chance to be successful.
- In the future someone might implement support for it in the ports framework.
- My own pre-commit test scripts understand this clause, which increases my productivity quite a bit.
So, in brief, I'd like to see this practice expanding.
I (swills@) have been adding quite a few TEST_DEPENDS and have added some support to the ports tinderbox for TEST_DEPENDS as well. There is also a patch:
http://people.freebsd.org/~swills/bsd.perl.mk_add_test.diff.txt
which adds some logic for it. With this patch, you can add:
export USE_PERL_TEST=yes
to your tinderbox/scripts/etc/env/GLOBAL file and tinderbox will run the tests for you.
You may also want this patch:
http://people.freebsd.org/~swills/tinderbox_test_deps_add_run_deps.diff
As it makes tinderbox add the RUN_DEPENDS to the TEST_DEPENDS.
If you wish to make tinderbox fail the build if the tests fail, you can change this line of tinderbox/scripts/lib/buildscript:
/pnohang $TIMEOUT /tmp/make.log5 ${pkgname} make -k regression-test
to this:
/pnohang $TIMEOUT /tmp/make.log5 ${pkgname} make regression-test || cleanup 5
I've been using this to test and fix all the p5- ports that don't pass their tests, but there are many and help is welcome. I hope to add support to ports proper for testing eventually.
CPAN shortcut for expanding author/id/X/XX/XXX
I (az@) found it useful recently to add
CPAN:CPANID clause to the ports I commit to.
It happened that CPAN modules /by-module symlink is no longer available for new modules versions. CPAN /modules/by-author is still available but maybe it will have the same fate. Therefore to properly use the only correct method of /author/id.
Examples of replacement:
| BEFORE | AFTER |
|---|---|
| MASTER_SITES= CPAN MASTER_SITE_SUBDIR= ../by-authors/id/J/JP/JPEACOCK | MASTER_SITES= CPAN MASTER_SITE_SUBDIR= CPAN:JPEACOCK |
| MASTER_SITES= CPAN../by-authors/id/J/JP/JPEACOCK | MASTER_SITES= CPAN MASTER_SITE_SUBDIR= CPAN:JPEACOCK |
| MASTER_SITES= CPAN MASTER_SITE_SUBDIR= ../by-authors/id/J/JP/JPEACOCK/DIRECTORY | MASTER_SITES= CPAN MASTER_SITE_SUBDIR= CPAN:JPEACOCK/DIRECTORY |
In this examples CPAN:JPEACOCK will be expanded to
authors/id/J/JPEACOCK and this magic works only while you using
CPAN keywork inside MASTER_SITES.
I think this is a transitional solution, and when all p5-ports will have the
current syntax, I would like to see such syntax:
<CPAN>/<AUTHORID>/<ANYTHING INSIDE AUTOR DIRECTORY>.
| EXAMPLE OF FUTURE SYNTAX |
|---|
| MASTER_SITES= CPAN MASTER_SITE_SUBDIR= JPEACOCK |
| MASTER_SITES= CPAN/JPEACOCK |
| MASTER_SITES= CPAN MASTER_SITE_SUBDIR= JPEACOCK/DIRECTORY |
| MASTER_SITES= CPAN/JPEACOCK/DIRECTORY |
| Patches | Comment |
|---|---|
| http://people.freebsd.org/~az/perl/bsd.sites.mk.diff | Allow also use new syntax with overloaded MASTER_SITE_PERL_CPAN inside /etc/make.conf |