tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: EXTRACT_USING improvements: a concrete proposal



* On 2020-03-13 at 21:55 GMT, Greg Troxel wrote:

> Jonathan Perkin <jperkin%joyent.com@localhost> writes:
> 
> > * On 2020-03-11 at 22:11 GMT, Roland Illig wrote:
> >
> >> On 11.03.2020 18:00, Greg Troxel wrote:
> >> > I think this is ready to commit, and that if there are problems they
> >> > will be easy to spot, not mysterious.
> >> 
> >> Looks good to me. I'm always in favor of cleaning up the wrong
> >> documentation.
> >
> > FWIW (to both of you), checkperms + EXTRACT_USING is currently causing
> > complete build failure on SunOS:
> >
> >   https://us-east.manta.joyent.com/pkgsrc/public/reports/trunk/tools/20200313.2102/meta/report.html
> >
> > It's not clear to me yet what's going on, EXTRACT_USING=gtar fixes it,
> > but is that going to cause circular dependencies?
> 
> Multiple thoughts
> 
>   I don't understand why my changes would contribute to this, because
>   the value of EXTRACT_USING on SunOS should continue to be nbtar, just
>   as it was before.  And that should continue to point to base gtar.  It
>   is merely that the redundant setting in defaults.mk is gone, except
>   for NetBSD.

Yeh it's not your change, just coincidental timing.

I've kludged around it for now in our tree, but we'll need something
better long-term.  One of the issues with setting things in platform/*
is that they are parsed before tools, so you can't do something like:

  .if defined(TOOLS_PLATFORM.gtar)
  EXTRACT_USING?= gtar
  .endif

to cover any installs (mostly older releases or trimmed installs) that
do not have it.  Adding duplicate .if exists() copies of tools logic
feels wrong.

One thing that does seem to be a bug to me, or at least a slightly odd
quirk, is that TAR is only set in the environment for
mk/extract/extract if EXTRACT_USING=nbtar:

  * mk/extract/bsd.extract-vars.mk only adds USE_TOOLS+=tar if
    EXTRACT_USING is set to nbtar.

  * mk/extract/extract.mk only sets TAR=${TOOLS_TAR} if TOOLS_TAR is
    defined, which is only defined if "tar" is in USE_TOOLS.

  * mk/extract/extract uses ": ${TAR:=tar}", so unless
    EXTRACT_USING=nbtar then it will execute plain "tar" and not
    anything configured via pkgsrc.
    
On SunOS this results in plain "tar" being called, which is an old
crufty version, hence the failure.  This feels very wrong to me when
TOOLS_PLATFORM.tar is pointing to a perfectly working gtar binary.

Anyway, it's a little complicated and it's late on a Friday night and
I just need this build to start, so something to ponder for now,
hopefully we can have a decent fix in time for the branch.

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index