Date: Tue, 19 Jan 2021 04:26:30 GMT From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 613fe5321f6c - main - pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases Message-ID: <202101190426.10J4QUku033387@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=613fe5321f6c18faa80f95132e457295f98b996b commit 613fe5321f6c18faa80f95132e457295f98b996b Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2021-01-14 12:56:38 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101190426.10J4QUku033387>