master_sites and codeberg.org

raf macports at raf.org
Thu Jun 15 00:50:12 UTC 2023


On Wed, Jun 14, 2023 at 02:06:34PM -0600, Dave Allured - NOAA Affiliate via macports-users <macports-users at lists.macports.org> wrote:

> On Wed, Jun 14, 2023 at 2:58 AM raf via macports-users <macports-users at lists.macports.org> wrote:
> 
> > Hi,
> >
> > I have a Portfile question.
> >
> > I have the (possibly incorrect) impression that
> > values in the list of ${master_sites} need to be
> > URLs to a directory that can have a filename appended
> > to it to download the distfile. Is that correct?
> > Or can it be the URL to the distfile itself?
> >
> > I'm asking because I use the codeberg.org git repository site,
> > and when you make a "release" there, you can attach a file
> > such as your official distfile/tarball. But the URL for it
> > looks like:
> >
> >   https://codeberg.org/attachments/<UUID>
> >
> > I'd like to put that in a Portfile, but I'm worried that
> > macports will append "/${name}-${version}.tar.gz" and try
> > to download that. If it does, that won't work. But if it
> > just downloads the URL itself, it would work.
> >
> > Does macports work with URLs like this in ${master_sites}?
>
> Raf, I can not directly answer your question about the download URL.
> Recent work added a new codeberg portgroup to make this simpler.  I suggest
> you see what was done in the portfiles for other recent codeberg ports:
>  smake, star, cdrtools.  There are also a few older codeberg ports to
> examine, pre-portgroup, if you wish.

Thanks. I also asked about this on the codeberg forum,
and there's good news. The UUID-based URL isn't the
only URL that works. It's just the public one that you
can see as a user of the website. A URL just like the
ones on github (with path and filename parts) also
works. And that style of URL is going to become the
default in a future version of codeberg.

I see a clever workaround that someone's used. The
devel/leiningen port has:

  master_sites \
      https://codeberg.org/leiningen/leiningen/archive/:source \
      https://codeberg.org/attachments/${uuid}?dummy=:standalone

The first URL doesn't seem to work but the second one
does. The "?" makes it irrelevant that macports appends
the filename to it.

But luckily, that workaround doesn't seem to be necessary.

cheers,
raf



More information about the macports-users mailing list