From owner-dev-commits-src-all@freebsd.org Tue Jan 19 04:26:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A7C64E442E; Tue, 19 Jan 2021 04:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DKbFj2CK6z4VbL; Tue, 19 Jan 2021 04:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BBA1203A7; Tue, 19 Jan 2021 04:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10J4QUSR033388; Tue, 19 Jan 2021 04:26:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10J4QUku033387; Tue, 19 Jan 2021 04:26:30 GMT (envelope-from git) Date: Tue, 19 Jan 2021 04:26:30 GMT Message-Id: <202101190426.10J4QUku033387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 613fe5321f6c - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 613fe5321f6c18faa80f95132e457295f98b996b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2021 04:26:33 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=613fe5321f6c18faa80f95132e457295f98b996b commit 613fe5321f6c18faa80f95132e457295f98b996b Author: Emmanuel Vadot AuthorDate: 2021-01-14 12:56:38 +0000 Commit: Kyle Evans CommitDate: 2021-01-19 04:26:22 +0000 pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases The current postfix conversions are: CURRENT / STABLE / PRERELEASE, 12.x-CURRENT becomes 12.snapYYYYMMDDhhmmss ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1.YYYYMMDDhhmmss BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2.YYYYMMDDhhmmss RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3.YYYYMMDDhhmmss RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1 RELEASE-pX -> pX, so 12.1-RELEASE-p1 becomes 12.1p1 Note that for development branches we will start to drop the minor version component entirely, which more closely matches how these branches are physically named (stable/NN). snap is a new prefix that was added to pkg in [0], which is simply a more verbose version of the current ".s" used. As noted, build timestamps are also added to ALPHA/BETA/RC versions. This is largely irrelevant for re@ snapshots because they will only produce one set of snapshots for each alpha/beta/rc, but external folks may produce multiple in that timeframe -- at least for alpha. For them, it is imperative that the builds have a differentiating characteristic like this rather than multiple builds across multiple revisions being versioned identically. [0] https://github.com/freebsd/pkg/pull/1929 Reviewed by: gjb, manu Submitted by: rene (original, original version) Differential Revision: https://reviews.freebsd.org/D28167 --- Makefile.inc1 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index bb3d2f98f4a3..969e3d67cd05 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -557,19 +557,21 @@ VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDA .endif .if !defined(PKG_VERSION) -.if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*} || ${_BRANCH:MPRERELEASE*} -TIMENOW= %Y%m%d%H%M%S -EXTRA_REVISION= .s${TIMENOW:gmtime} +_STRTIMENOW= %Y%m%d%H%M%S +_TIMENOW= ${_STRTIMENOW:gmtime} +.if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} +_REVISION:= ${_REVISION:R} +EXTRA_REVISION= .snap${_TIMENOW} .elif ${_BRANCH:MALPHA*} -EXTRA_REVISION= _${_BRANCH:C/-ALPHA/.a/} +EXTRA_REVISION= .a${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:MBETA*} -EXTRA_REVISION= _${_BRANCH:C/-BETA/.b/} +EXTRA_REVISION= .b${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:MRC*} -EXTRA_REVISION= _${_BRANCH:C/-RC/.r/} +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:M*-p*} -EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif -PKG_VERSION:= ${_REVISION}${EXTRA_REVISION} +PKG_VERSION:= ${_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif .endif # !defined(PKG_VERSION)