[Bug 248967] USE_GITLAB lacking support for tags

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 12 Jul 2023 18:58:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248967

--- Comment #8 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/ports/commit/?id=16bde072b16daca1c886116e602c94b5fa99c20f

commit 16bde072b16daca1c886116e602c94b5fa99c20f
Author:     Felix Palmen <zirias@FreeBSD.org>
AuthorDate: 2022-10-21 07:10:41 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-07-12 18:55:08 +0000

    bsd.sites.mk: Support tag names with USE_GITLAB

    Since quite some time, it's possible to download generated tarballs from
    gitlab for a tag name without knowing the corresponding git hash. This
    is preferable because you have a single source of truth about the
    software version.

    Support this by replacing GL_COMMIT with GL_TAGNAME which also accepts a
    commit hash, similar to USE_GITHUB. Unfortunately, there's a catch, the
    DISTFILE must be named exactly: ${GL_PROJECT}-${GL_TAGNAME}.tar.bz2,
    otherwise it extracts in a directory that contains the commit hash. So,
    we can't add the gitlab account or the revision suffix to make it work.

    Therefore, detect whether GL_TAGNAME contains a commit hash, and if it
    does, use the old behavior of deriving DISTNAME and DISTFILES.

    Document in CHANGES, also add a DEV_WARNING similar to USE_GITHUB when
    there's an URL in MASTER_SITES that looks like a gitlab URL. With
    support for tags, there shouldn't be any reason left to hardcode such an
    URL in MASTER_SITES.

    PR:                     248967
    Approved by:            portmgr (tcberner, mentor)
    Differential Revision:  https://reviews.freebsd.org/D37077

 CHANGES             | 16 ++++++++++++++
 Mk/Uses/kde.mk      |  2 +-
 Mk/Uses/xorg-cat.mk |  2 +-
 Mk/bsd.options.mk   |  2 +-
 Mk/bsd.port.mk      |  8 +------
 Mk/bsd.sites.mk     | 61 +++++++++++++++++++++++++++++++++++++----------------
 6 files changed, 63 insertions(+), 28 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.