From ac1cd844858d4ce9030c9ef9045aba8a169a7b25 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 17 Aug 2021 08:51:23 +0200 Subject: [PATCH] make: add a product_altabi setting if we want to split abis #5144 This way we can keep track of the underlying ABI in case a business version needs to find its way back to community ABI. In general ALTABI is just the derived ABI version, i.e. the one that shares the same build settings/packages/OS version. --- Makefile | 14 +++++++++----- Mk/defaults.mk | 1 + src/opnsense/version/core.in | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bde53c971..dd121c053 100644 --- a/Makefile +++ b/Makefile @@ -41,20 +41,24 @@ CORE_TYPE?= development .endfor _CORE_NEXT= ${CORE_ABI:C/\./ /} -.if ${_CORE_NEXT:[2]} == 7 +.if ${_CORE_NEXT:[2]} == 7 # community CORE_NEXT!= expr ${_CORE_NEXT:[1]} + 1 CORE_NEXT:= ${CORE_NEXT}.1 -.elif ${_CORE_NEXT:[2]} == 10 +CORE_ALTABI?= ${CORE_ABI} +.elif ${_CORE_NEXT:[2]} == 10 # business CORE_NEXT!= expr ${_CORE_NEXT:[1]} + 1 CORE_NEXT:= ${CORE_NEXT}.4 -.elif ${_CORE_NEXT:[2]} == 1 +CORE_ALTABI?= ${_CORE_NEXT:[1]}.7 +.elif ${_CORE_NEXT:[2]} == 1 # community CORE_NEXT= ${_CORE_NEXT:[1]} CORE_NEXT:= ${CORE_NEXT}.7 -.elif ${_CORE_NEXT:[2]} == 4 +CORE_ALTABI?= ${CORE_ABI} +.elif ${_CORE_NEXT:[2]} == 4 # business CORE_NEXT= ${_CORE_NEXT:[1]} CORE_NEXT:= ${CORE_NEXT}.10 +CORE_ALTABI?= ${_CORE_NEXT:[1]}.1 .else -.error Unknown ABI minor version: ${_CORE_NEXT:[2]} +.error Unsupported minor version for CORE_ABI=${CORE_ABI} .endif .if exists(${GIT}) && exists(${GITVERSION}) && exists(${.CURDIR}/.git) diff --git a/Mk/defaults.mk b/Mk/defaults.mk index 9c4e1190e..480808e1e 100644 --- a/Mk/defaults.mk +++ b/Mk/defaults.mk @@ -76,6 +76,7 @@ CORE_SYSLOGNG?= ${_CORE_SYSLOGNG:S/./ /g:[1..2]:tW:S/ /./g} .endif REPLACEMENTS= CORE_ABI \ + CORE_ALTABI \ CORE_ARCH \ CORE_COMMIT \ CORE_COPYRIGHT_HOLDER \ diff --git a/src/opnsense/version/core.in b/src/opnsense/version/core.in index e7aa1b5c9..2ce7bf159 100644 --- a/src/opnsense/version/core.in +++ b/src/opnsense/version/core.in @@ -1,5 +1,6 @@ { "product_abi": "%%CORE_ABI%%", + "product_altabi": "%%CORE_ALTABI%%", "product_arch": "%%CORE_ARCH%%", "product_copyright_owner": "%%CORE_COPYRIGHT_HOLDER%%", "product_copyright_url": "%%CORE_COPYRIGHT_WWW%%",