Commit 9267664b authored by Franco Fichtner's avatar Franco Fichtner

pkg: add more manifest info and keep version history

parent 3cb0cb11
......@@ -20,6 +20,9 @@ rm -f /etc/rc.bak
echo "Writing OPNsense version"
mkdir -p /usr/local/opnsense/version
if [ -f /usr/local/opnsense/version/opnsense ]; then
mv /usr/local/opnsense/version/opnsense /usr/local/opnsense/version/opnsense.last
fi
echo "%%CORE_COMMIT%%" > /usr/local/opnsense/version/opnsense
if /usr/local/etc/rc.d/configd status > /dev/null; then
......
......@@ -10,6 +10,3 @@ echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak
tail -n +5 /etc/rc.bak > /etc/rc
rm -f /etc/rc.bak
echo "Removing OPNsense version"
rm -f /usr/local/opnsense/version/opnsense
......@@ -29,6 +29,7 @@ CORE_ORIGIN?= opnsense/${CORE_NAME}
CORE_COMMENT?= OPNsense development package
CORE_MAINTAINER?= franco@opnsense.org
CORE_WWW?= https://opnsense.org/
CORE_MESSAGE?= Follow the brave badger!
CORE_DEPENDS?= apinger \
ataidle \
beep \
......@@ -117,7 +118,11 @@ manifest: force
@echo "desc: \"${CORE_HASH}\""
@echo "maintainer: \"${CORE_MAINTAINER}\""
@echo "www: \"${CORE_WWW}\""
@echo "prefix: /"
@echo "message: \"${CORE_MESSAGE}\""
@echo "categories: [ \"sysutils\", \"www\" ]"
@echo "licenselogic: \"single\""
@echo "licenses: [ \"BSD2CLAUSE\" ]"
@echo "prefix: /usr/local"
@echo "deps: {"
@for CORE_DEPEND in ${CORE_DEPENDS}; do \
${PKG} query ' %n: { version: "%v", origin: "%o" }' \
......
......@@ -64,11 +64,13 @@ function upload_crash_report($files)
$pgtitle = array(gettext("Diagnostics"),gettext("Crash Reporter"));
include('head.inc');
$last_version = '/usr/local/opnsense/version/opnsense.last';
$crash_report_header = sprintf(
"System Information:\n%s\n%s %s (%s)\n%s\n",
"System Information:\n%s\n%s %s%s (%s)\n%s\n",
php_uname('v'),
$g['product_name'],
trim(file_get_contents('/usr/local/opnsense/version/opnsense')),
file_exists($last_version) ? sprintf(' [%s]', trim(file_get_contents($last_version))) : '',
php_uname('m'),
exec('/usr/local/bin/openssl version')
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment