Opened 14 years ago

Closed 13 years ago

#26325 closed submission (fixed)

asused

Reported by: fclaire@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: raimue (Rainer Müller)
Port: asused

Description

Here's a port of the RIPE NCC's asused tool

Known problems:

  • I was unable to find the source package on RIPE's FTP server ftp://ftp.ripe.net/tools/ so I use a FreeBSD server to fetch the source code
  • It seems incompatible with rrdtool port. If rrdtool is installed you'll get the following message:
--->  Activating asused @3.72_whois_new_query_fix_0
Error: Target org.macports.activate returned: Image error: /opt/local/lib/perl5/5.8.9/darwin-2level/perllocal.pod is being used by the active rrdtool port.  Please deactivate this port first, or use 'port -f activate asused' to force the activation.
Error: Status 1 encountered during processing.

Any suggestion to fix them is welcomed.

Attachments (2)

Portfile (2.7 KB) - added by fclaire@… 13 years ago.
deletes perllocal.pod
patch-ipv4pack-ipv4pack.pm.diff (518 bytes) - added by fclaire@… 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

No port should install perllocal.pod; delete it in post-destroot if you can't prevent the build system from installing it in the first place.

comment:2 Changed 14 years ago by fclaire@…

Hi,

I've updated the Portfile to delete perllocal.pod in post-destroot.

The Makefile is appending text to perllocal.pod and this Makefile is generated by a perl script. As I'm not familiar with perl I didn't try to patch this script to prevent the build system to generate perllocal.pod.

comment:3 Changed 14 years ago by raimue (Rainer Müller)

Cc: raimue@… added

For a better version number:

version 3.72
...
distname ${name}-${version}_whois_new_query_fix

Using perl is too general, especially without additional dependencies. With a fallback to /usr/bin/perl this would end up in system directories.

PortGroup perl5 1.0

...

depends_lib         path:[string range ${perl5.bin} [string length ${prefix}/] end]:perl5

configure.cmd       ${perl5.bin}
configure.env       PERL_AUTOINSTALL=--skipdeps
configure.pre_args  Makefile.PL
configure.args      INSTALLDIRS=vendor

To make this more portable even when the version of perl changes (or perl5.10 are perl5.12 used):

post-destroot {
    delete [glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
}

According to FreeBSD, this also needs patching for the config file:

post-patch {
    reinplace "s|asused\\.conf|${prefix}/etc/asused\\.conf|g" ${worksrcpath}/asused.PL
}

In general, the config file should be handled as described in PortfileRecipes.

Debian has a few more patches, maybe one of them is worth porting?

All the comments above are untested, but I hope that will be enough :-)

comment:4 Changed 14 years ago by fclaire@…

Thanks for your remarks and the time spent on this. I'll work on it in the coming days.

Changed 13 years ago by fclaire@…

Attachment: Portfile added

deletes perllocal.pod

Changed 13 years ago by fclaire@…

comment:5 Changed 13 years ago by fclaire@…

Implemented your proposals in the Portfile, example config file should be properly handled now.

For the Debian patchs:

  • 01_whois_new_query_fix.dpatch, 02_typo_fix.dpatch and 03_interpreter_fix.dpatch are already implemented in asused-3.72_whois_new_query_fix.tar.gz
  • 04_drop_network_tests.dpatch's goal is to avoid execution of tests requiring a network connection. This is useful for distribs on CDs/DVDs but in the case of macports the install is online anyhow. I didn't applied this patch.
  • 05_fix_priv_range.dpatch is applied

I also fixed the livecheck.

Thanks for reviewing and comitting.

comment:6 Changed 13 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Committed in r74303.

Note: See TracTickets for help on using tickets.