tech-pkg archive

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

Re: dealing with odd distfile name



Robert Elz <kre%munnari.OZ.AU@localhost> writes:

>     Date:        Mon, 08 Sep 2025 17:48:14 -0400
>     From:        Greg Troxel <gdt%lexort.com@localhost>
>     Message-ID:  <rmi7by8r4yp.fsf%s1.lexort.com@localhost>
>
>   | url2pkg doesn't do magic for me, and I'm at a loss how to proceed, other
>   | than making a distfile and putting it on www.netbsd.org.
>
> Make a DIST_SUBDIR with an appropriate name (proj-9.6 seems a little
> ambiguous to me, but I have no idea what it is, it might be OK) and
> then simply allow the file fetch (into that dir) to produce whatever
> filename it produces, and use that (with a rename if essential) however
> meaningless it seems.

I ended up with the combination of

  DISTNAME=               proj-doc-${VERSION}
  MASTER_SITES=           -https://proj.org/_/downloads/en/${VERSION}/pdf/
  EXTRACT_SUFX=           .pdf

resulting in

  $ ls -l /links/distfiles/proj-doc-9.6.pdf 
  -rw-r--r--  1 gdt  users  47043406 Jul 15 03:59 /links/distfiles/proj-doc-9.6.pdf

which seems ok.  (proj is a program/library, this is a manual, and it's
for the 9.6.x series of releases.)


That seems preferable to a DIST_SUBDIR proj-doc-9.6 with a file just
called pdf, although I appreciate your point that one can use that
scheme to deal with arbitrary distfile names.  Except that the URL ends
in /, so it isn't straightforward to end up with a file called pdf;
arguably the last component of the URL is empty.  Or at least I didn't
manage to do with with EXTRACT_SUFX before I realized about - in
MASTER_SITES and a synthetic DISTNAME.  You'd have to rename it in the
extract or install step, too.

>   | And, do the assembled masses think this is an upstream bug?
>
> No - they seem to have adequately given a specific name to the file,
> including a version string - just not in the way you're expecting (or
> that is more common).   Being different isn't a bug.

I see your point.  Still, there's longstanding convention to distribute
as

  ${PKGNAME}-${VERSION}.tar.gz

which unpacks to ${PKGNAME}-${VERSION}, and what they are doing seems
likely hard to deal with for many.

And if I were to be cantankerous, I'd say that they aren't making a
named file available for download by a mechanism that happens to be
https, but instead providing a resource and giving a URL.  But that's us
with our MASTER_SITES- and DISTFILE/EXTRACT_SUFX-colored glasses on.


Home | Main Index | Thread Index | Old Index