pkg: remove CORE_FLAVOUR handling

This commit is contained in:
Franco Fichtner 2023-02-07 09:06:05 +01:00
parent 3170c77880
commit 09b2bec389
8 changed files with 4 additions and 43 deletions

View File

@ -107,17 +107,13 @@ CORE_PKGVERSION= ${CORE_VERSION}
CORE_PYTHON_DOT= ${CORE_PYTHON:C/./&./1}
.if "${CORE_FLAVOUR}" == OpenSSL
CORE_REPOSITORY?= ${CORE_ABI}/latest
.else
CORE_REPOSITORY?= unsupported/${CORE_FLAVOUR:tl}
.endif
CORE_COMMENT?= ${CORE_PRODUCT} ${CORE_TYPE} release
CORE_MAINTAINER?= project@opnsense.org
CORE_ORIGIN?= opnsense/${CORE_NAME}
CORE_PACKAGESITE?= https://pkg.opnsense.org
CORE_PRODUCT?= OPNsense
CORE_REPOSITORY?= ${CORE_ABI}/latest
CORE_WWW?= https://opnsense.org/
CORE_COPYRIGHT_HOLDER?= Deciso B.V.

View File

@ -39,18 +39,6 @@ CORE_ARCH?= ${_CORE_ARCH}
CORE_MAKE= ${MAKE}
OPENSSL= ${LOCALBASE}/bin/openssl
.if ! defined(CORE_FLAVOUR)
.if exists(${OPENSSL})
_CORE_FLAVOUR!= ${OPENSSL} version
CORE_FLAVOUR?= ${_CORE_FLAVOUR:[1]}
.else
.warning "Detected 'Base' flavour is not currently supported"
CORE_FLAVOUR?= Base
.endif
.endif
PHPBIN= ${LOCALBASE}/bin/php
.if exists(${PHPBIN})
@ -85,7 +73,6 @@ REPLACEMENTS= CORE_ABI \
CORE_COPYRIGHT_HOLDER \
CORE_COPYRIGHT_WWW \
CORE_COPYRIGHT_YEARS \
CORE_FLAVOUR \
CORE_HASH \
CORE_MAINTAINER \
CORE_NAME \

View File

@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd January 18, 2023
.Dd February 7, 2023
.Dt OPNSENSE-VERSION 8
.Os
.Sh NAME
@ -72,11 +72,6 @@ Exit successfully if the package exists.
Otherwise, exit with an error.
.It Fl e
Return the product contact e-mail address.
.It Fl f
Return the cryptography flavour.
The correct flavour will be read from the installed OpenSSL
binary, or from package metadata if the binary could
not be found.
.It Fl H
Return the package commit hash.
.It Fl i

View File

@ -860,12 +860,6 @@
<td id="product_arch"></td>
<td></td>
</tr>
<tr>
<td style="width: 20px;"></td>
<td style="width: 150px;">{{ lang._('Flavour') }}</td>
<td id="product_crypto"></td>
<td></td>
</tr>
<tr>
<td style="width: 20px;"></td>
<td style="width: 150px;">{{ lang._('Commit') }}</td>

View File

@ -119,7 +119,6 @@ core_check()
{
echo ">>> Check for core packages consistency" | ${TEE} ${LOCKFILE}
CRYPTO=$(opnsense-version -f | tr '[[:upper:]]' '[[:lower:]]')
CORE=$(opnsense-version -n)
PROGRESS=
@ -130,7 +129,7 @@ core_check()
echo "Core package \"${CORE}\" has $(pkg query %#d ${CORE}) dependencies to check." | ${TEE} ${LOCKFILE}
for DEP in $( (echo ${CORE}; echo ${CRYPTO}; pkg query %dn ${CORE}) | sort -u); do
for DEP in $( (echo ${CORE}; pkg query %dn ${CORE}) | sort -u); do
if [ -z "${PROGRESS}" ]; then
echo -n "Checking packages: ." | ${TEE} ${LOCKFILE}
PROGRESS=1

View File

@ -34,7 +34,6 @@ $licensefile = $metafile . '.license';
$ret = json_decode(@file_get_contents($metafile), true);
if ($ret != null) {
$ret['product_crypto'] = shell_safe('opnsense-version -f');
$ret['product_latest'] = shell_safe('/usr/local/opnsense/scripts/firmware/latest.php');
$ret['product_mirror'] = preg_replace('/\/[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}\//i', '/${SUBSCRIPTION}/', shell_safe('opnsense-update -M'));
$ret['product_time'] = date('D M j H:i:s T Y', filemtime('/usr/local/opnsense/www/index.php'));

View File

@ -5,7 +5,6 @@
"product_copyright_url": "%%CORE_COPYRIGHT_WWW%%",
"product_copyright_years": "%%CORE_COPYRIGHT_YEARS%%",
"product_email": "%%CORE_MAINTAINER%%",
"product_flavour": "%%CORE_FLAVOUR%%",
"product_hash": "%%CORE_HASH%%",
"product_id": "%%CORE_NAME%%",
"product_name": "%%CORE_PRODUCT%%",

View File

@ -26,7 +26,6 @@
DEFAULTS="\${product_name} \${product_version}"
VERSIONDIR="/usr/local/opnsense/version"
PLUGINCTL="/usr/local/sbin/pluginctl"
OPENSSL="/usr/local/bin/openssl"
PKG="/usr/local/sbin/pkg-static"
TARGET="core"
OUTPUT=
@ -34,7 +33,7 @@ OUTPUT=
DO_CHECK=
DO_ORIGIN=
while getopts AacefHilNnOstVvwx OPT; do
while getopts AaceHilNnOstVvwx OPT; do
case ${OPT} in
A)
OUTPUT="${OUTPUT} \${product_arch}"
@ -48,9 +47,6 @@ while getopts AacefHilNnOstVvwx OPT; do
e)
OUTPUT="${OUTPUT} \${product_email}"
;;
f)
OUTPUT="${OUTPUT} \${product_flavour}"
;;
H)
OUTPUT="${OUTPUT} \${product_hash}"
;;
@ -136,10 +132,6 @@ core)
OUTPUT="${DEFAULTS}"
fi
if [ -z "${OUTPUT%%*product_flavour*}" -a -f ${OPENSSL} ]; then
RESULT=$(${OPENSSL} version)
product_flavour=${RESULT%% *}
fi
if [ -z "${OUTPUT%%*product_size*}" -a -f ${PKG} ]; then
RESULT=$(${PKG} info -s ${product_id})
product_size=${RESULT##* }