Longterm Targets of Ports Collection

Also known as sneaking changes.

Converting @exec install-info to INFO

Number of ports using INFO: 411

Number of ports with @exec install-info in their pkg-plist: 5

That gives us: 1.2% is rotten

find /usr/ports/ -name Makefile | xargs grep ^INFO= | wc -l
find /usr/ports/ -name pkg-plist | xargs grep -l exec.install-info | wc -l

Better use of RC_SUBR infrastructure

Number of ports with USE_RC_SUBR: 864

Number of ports that install rc script manually (bad use of RC_SUBR and non-RCng scripts): 144

Number of ports that install any rc script: 945

find /usr/ports/ -name Makefile | xargs grep ^USE_RC_SUBR | wc -l
find /usr/ports/ -name pkg-plist | xargs grep -l etc/rc.d/ | wc -l
(find /usr/ports/ -name pkg-plist | xargs grep -l etc/rc.d/ | cut -d / -f 5; find /usr/ports/ -name Makefile | xargs grep ^USE_RC_SUBR | awk -F '/' '{print $5}') | sort | uniq | wc -l

Not using :: in patchfile name

Number of patch files with : in the name: 1745

Total number of patch files: 24544

That gives us: 7.1% is rotten

find /usr/ports/ -name '*patch*:*' | wc -l
find /usr/ports/ -name '*patch*' | wc -l

BROKEN/IGNORE quoted

Number of BROKEN/IGNORE strings with quotes: 27

Total number of BROKEN/IGNORE strings: 1852

That gives us: 1.5% is rotten

find /usr/ports/ -name Makefile | xargs grep -E '^(BROKEN|IGNORE)[+]*=[^"]*"' | wc -l
find /usr/ports/ -name Makefile | xargs grep -E '^(BROKEN|IGNORE)[+]*=' | wc -l

unexec rmdir

Number of @unexec rmdir lines in plists: 102

Number of @dirrmtry in plists: 27991

That gives us: 0.4% is rotten

find /usr/ports/ -name pkg-plist* | xargs grep 'unexec.rmdir %D' | wc -l
find /usr/ports/ -name pkg-plist* | xargs grep dirrmtry | wc -l

CPAN ports that use ../../authors as SUBDIR

Number of ports that use MASTER_SITE_SUBDIR=../../authors: 5

Total number of CPAN ports: 5397

That gives us: 0.09% is rotten

find /usr/ports/ -name Makefile | xargs grep ^MASTER_SITE_SUBDIR | grep \.\./*authors | wc -l
find /usr/ports/ -name Makefile | xargs grep ^MASTER_SITE.*CPAN | wc -l

Ports which don't use USE_DOS2UNIX

See ports/87234

ports have :cntrl: in the Makefile: 4

ports have ^M's in the Makefile: 15

patch-files have ^M's in them: 252

nox-- added EXTRACT_BEFORE_ARGS+= -aq because of the ^Ms in projectx

find /usr/ports/ -name Makefile -exec grep $(printf '[\01-\010\013\014\016-\037]') -l {} '+' |wc -l
find /usr/ports/ -name Makefile -exec grep $(printf '\15') -l {} '+' | wc -l
find /usr/ports/ -name 'patch-*' -exec grep $(printf '\15') -l {} '+' | wc -l

QT/QMAKE settings

Ports which set QMAKESPEC: 67

Ports which set QTDIR: 127

find /usr/ports/ -name Makefile | xargs grep -l QMAKESPEC | wc -l
find /usr/ports/ -name Makefile | xargs grep -l QTDIR | wc -l

USERS and GROUPS

See a list along with pending PRs.

Use of SITE_PERL in dependencies

This is problematic because it means that bsd.perl.mk must be included for the port's Makefile just to make the dependency work, thus hindering efforts to make it a conditional include.

Number of ports that use ${SITE_PERL} in dependencies: 929

find /usr/ports -name Makefile | xargs grep '^\([^_]*DEPENDS=\)\?[[:space:]]*${SITE_PERL}/\([^:]*\):${PORTSDIR}/' | cut -d ':' -f 1 | uniq | wc -l

Fix: Depend on packages for perl ports, rather than the .pm file;

instead of:

${SITE_PERL}/IO/Tee.pm:${PORTSDIR}/devel/p5-IO-Tee

use instead

p5-IO-Tee>=0.64:${PORTSDIR}/devel/p5-IO-Tee

There is a script at http://www.bayofrum.net/~crees/scripts/bin/site_perl_to_packages.sh to automate this, but you MUST ensure that the dependencies are correct before committing!

Remove unnecessary dependencies (Perl core modules) from {BUILD|RUN|TEST}_DEPENDS

I (sunpoet@) am working on this issue.

You can use corelist (devel/p5-Module-CoreList) to check if the specific dependency/module has been added to Perl core modules. If so, you may either

Note that please align PERL_LEVEL checks to stable Perl releases (lang/perl5.*). If one modules has been added to Perl since 5.9.3, please use .if ${PERL_LEVEL} < 501000 instead of .if ${PERL_LEVEL} < 500903. By doing so, it has higher possibility to merge multiple PERL_LEVEL checks to one check.

Example 1:

BUILD_DEPENDS=  p5-parent>=0:${PORTSDIR}/devel/p5-parent

According to corelist (parent was first released with perl v5.10.1), the above line should be changed to

.include <bsd.port.pre.mk>

.if ${PERL_LEVEL} < 501001
BUILD_DEPENDS+= p5-parent>=0:${PORTSDIR}/devel/p5-parent
.endif

.include <bsd.port.post.mk>

Example 2:

The port requires Compress::Zlib 2.030 or above.

BUILD_DEPENDS=  p5-IO-Compress>=2.030:${PORTSDIR}/archivers/p5-IO-Compress
RUN_DEPENDS:=   ${BUILD_DEPENDS}

Accoring to corelist, Perl bundled Compress::Zlib 2.030 since 5.13.4. The above lines should be changed to

.include <bsd.port.pre.mk>

.if ${PERL_LEVEL} < 501400
BUILD_DEPENDS+= p5-IO-Compress>=2.030:${PORTSDIR}/archivers/p5-IO-Compress
RUN_DEPENDS+=   p5-IO-Compress>=2.030:${PORTSDIR}/archivers/p5-IO-Compress
.endif

.include <bsd.port.post.mk>

Ports that depend on xorg-libraries

No ports should depend on the meta port. Instead they should USE_XORG with the specific libs they care about

find /usr/ports -name Makefile -maxdepth 3 -mindepth 3 -exec grep -H USE_XLIB "{}" "+" | wc -l

Number of ports total: 3

Doc Targets

See also DocLongtermTargets

PortsLongtermTargets (last edited 2012-05-06 04:42:53 by AlexKozlov)