firmware: rename "opnsense" version file to "core"

We already have "kernel" and "base" and plugins also follow this
pattern by only registering its name once per devel or release
version.  This kills ambiguity for "opnsense" vs. "opnsense-version"
and makes it more branding friendly.  Suffice to say "core", "kernel"
and "base" are reserved names and also align with tools.git.
This commit is contained in:
Franco Fichtner 2018-11-28 09:30:09 +01:00
parent 4e5d3b6ccc
commit 0eb1f10095
8 changed files with 9 additions and 9 deletions

2
.gitignore vendored
View File

@ -13,6 +13,6 @@
/src/opnsense/changelog
/src/www/wpad.dat
/src/opnsense/version/*
!/src/opnsense/version/opnsense.in
!/src/opnsense/version/core.in
.idea/
/src/opnsense/www/.htrouter.php

View File

@ -154,8 +154,8 @@ want-${WANT}:
mount:
@if [ ! -f ${WRKDIR}/.mount_done ]; then \
echo -n "Enabling core.git live mount..."; \
sed ${SED_REPLACE} ${.CURDIR}/src/opnsense/version/opnsense.in > \
${.CURDIR}/src/opnsense/version/opnsense; \
sed ${SED_REPLACE} ${.CURDIR}/src/opnsense/version/core.in > \
${.CURDIR}/src/opnsense/version/core; \
mount_unionfs ${.CURDIR}/src ${LOCALBASE}; \
touch ${WRKDIR}/.mount_done; \
echo "done"; \

2
plist
View File

@ -862,7 +862,7 @@
/usr/local/opnsense/site-python/sqlite3_helper.py
/usr/local/opnsense/site-python/watchers/__init__.py
/usr/local/opnsense/site-python/watchers/dhcpd.py
/usr/local/opnsense/version/opnsense
/usr/local/opnsense/version/core
/usr/local/opnsense/www/api.php
/usr/local/opnsense/www/css/bootstrap-datepicker3.min.css
/usr/local/opnsense/www/css/bootstrap-select-1.13.3.css

View File

@ -30,7 +30,7 @@
*/
/* XXX make this a getter function for traceability */
$g = json_decode(file_get_contents('/usr/local/opnsense/version/opnsense'), true);
$g = json_decode(file_get_contents('/usr/local/opnsense/version/core'), true);
openlog($g['product_id'], LOG_ODELAY, LOG_USER);
register_shutdown_function('closelog');

View File

@ -74,7 +74,7 @@ Return the product version website.
.El
.Sh FILES
.Bl -tag -width Ds
.It Pa /usr/local/opnsense/version/opnsense
.It Pa /usr/local/opnsense/version/core
The version metadata file of the release package.
.El
.Sh EXIT STATUS

View File

@ -191,7 +191,7 @@ class ControllerBase extends ControllerRoot
}
// parse product properties, use template (.in) when not found
$firmware_product_fn = __DIR__.'/../../../../../version/opnsense';
$firmware_product_fn = __DIR__.'/../../../../../version/core';
$firmware_product_fn = !is_file($firmware_product_fn) ? $firmware_product_fn .".in" : $firmware_product_fn;
$product_vars = json_decode(file_get_contents($firmware_product_fn), true);
foreach ($product_vars as $product_key => $product_var) {

View File

@ -27,7 +27,7 @@ VERSIONDIR="/usr/local/opnsense/version"
OPENSSL="/usr/local/bin/openssl"
OUTPUT=
DO_PKG="-p opnsense"
DO_PKG="-p core"
DO_SIZE=
while getopts p:s OPT; do
@ -64,7 +64,7 @@ if [ ! -f ${VERSION} ]; then
exit 1
fi
if [ "${DO_PKG}" != "-p opnsense" ]; then
if [ "${DO_PKG}" != "-p core" ]; then
cat ${VERSION}
exit 0
fi