ASSP port testing, not getting all perl mods to work

Bryan Blackburn blb at macports.org
Fri Jan 23 13:29:14 PST 2009


On Sat, Jan 24, 2009 at 08:19:51AM +1100, Joshua Root said:
> Scott Haneda wrote:
> > port contents p5-mail-spf | grep -v opt
> > Port p5-mail-spf contains:
> >   /usr/sbin/spfd
> > 
> > So, how does not resolve this?  And I thought ports expressly prevented
> > this, or is this just the port makers job to prevent it?  Since ports
> > noticed it, I would think it would have blocked it
> 
> It's the job of the portfile author to ensure that it installs its files
> to the right place. The base code provides some defaults that make this
> easy in many cases.

The Mail::SPF Build.PL file has:

    install_path    => {
        'sbin'          => '/usr/sbin'
    },

so it sounds like it needs to be patched to install into the proper
location.  The following should do it:

post-extract {
   reinplace "s|/usr/sbin|${prefix}/sbin|" ${worksrcpath}/Build.PL
}

I don't have the dependencies to build this however, so testing will be
needed.

Scott, one thing while building new ports that should be helpful, is to
first run, not install, but destroot on the port (port -d destroot) so you
can then review what's in the destroot prior to actually installing.  This
is a very good way to catch odd install locations such as this.  When you're
sitting in the port's directory (with Portfile), when you run destroot it
should create a work symlink; under that will be the source stuff and
(assuming destroot succeeded) a destroot directory.  You can 'ls -lR
work/destroot' to see all files that will be installed.

Bryan


> 
> Some ports legitimately need to install files outside the usual places.
> They should be setting 'destroot.violate_mtree yes', but not all of them
> do yet, so making mtree violation a hard error would break things at
> this point.
> 
> - Josh


More information about the macports-users mailing list