Make deb-installer for PVEMods (#168)
* first deb-installer workflow for PVE-mods --------- Co-authored-by: Meliox <na> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
20 files changed
+1689
-16
No files matched your search
Vendored
+70
@@ -0,0 +1,70 @@
|
||||
pve-mod (0.1.5) stable; urgency=low
|
||||
|
||||
* cfeccc2 align with main
|
||||
* 463dd66 fix startup_message
|
||||
* a6b2560 ..
|
||||
* a7d8c3b add debug to pve-mod-configure
|
||||
* 342a5b5 add debug mode to pve-mod-configure and config
|
||||
* 54dd209 test again
|
||||
* a7cef62 rework hook implementation to work on dpkg triggered
|
||||
* d9ff050 first draft for testing
|
||||
* 73567f1 Restructure git repo for installer
|
||||
* bfb078a PVE Temp mod version 2.0 (#152)
|
||||
|
||||
-- github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Sun, 07 Jun 2026 14:12:32 +0000
|
||||
|
||||
pve-mod (0.1.4) stable; urgency=low
|
||||
|
||||
* 463dd66 fix startup_message
|
||||
* a6b2560 ..
|
||||
* a7d8c3b add debug to pve-mod-configure
|
||||
* 342a5b5 add debug mode to pve-mod-configure and config
|
||||
* 54dd209 test again
|
||||
* a7cef62 rework hook implementation to work on dpkg triggered
|
||||
* d9ff050 first draft for testing
|
||||
* 73567f1 Restructure git repo for installer
|
||||
* bfb078a PVE Temp mod version 2.0 (#152)
|
||||
|
||||
-- github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Sun, 07 Jun 2026 14:05:47 +0000
|
||||
|
||||
pve-mod (0.1.3) stable; urgency=low
|
||||
|
||||
* a6b2560 ..
|
||||
* a7d8c3b add debug to pve-mod-configure
|
||||
* 342a5b5 add debug mode to pve-mod-configure and config
|
||||
* 54dd209 test again
|
||||
* a7cef62 rework hook implementation to work on dpkg triggered
|
||||
* d9ff050 first draft for testing
|
||||
* 73567f1 Restructure git repo for installer
|
||||
* bfb078a PVE Temp mod version 2.0 (#152)
|
||||
|
||||
-- github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Sun, 07 Jun 2026 13:51:51 +0000
|
||||
|
||||
pve-mod (0.1.2) stable; urgency=low
|
||||
|
||||
* a7d8c3b add debug to pve-mod-configure
|
||||
* 342a5b5 add debug mode to pve-mod-configure and config
|
||||
* 54dd209 test again
|
||||
* a7cef62 rework hook implementation to work on dpkg triggered
|
||||
* d9ff050 first draft for testing
|
||||
* 73567f1 Restructure git repo for installer
|
||||
* bfb078a PVE Temp mod version 2.0 (#152)
|
||||
|
||||
-- github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Sun, 07 Jun 2026 13:48:24 +0000
|
||||
|
||||
pve-mod (0.1.1) stable; urgency=low
|
||||
|
||||
* 342a5b5 add debug mode to pve-mod-configure and config
|
||||
* 54dd209 test again
|
||||
* a7cef62 rework hook implementation to work on dpkg triggered
|
||||
* d9ff050 first draft for testing
|
||||
* 73567f1 Restructure git repo for installer
|
||||
* bfb078a PVE Temp mod version 2.0 (#152)
|
||||
|
||||
-- github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Sun, 07 Jun 2026 13:04:56 +0000
|
||||
|
||||
pve-mod (0.1.0) beta; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Meliox <meliox@users.noreply.github.com> Sat, 07 Jun 2026 00:00:00 +0000
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
Source: pve-mod
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: Meliox <meliox@users.noreply.github.com>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://github.com/Meliox/PVE-mods
|
||||
|
||||
Package: pve-mod
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, perl, librrds-perl
|
||||
Recommends: lm-sensors, nut-client
|
||||
Suggests: igt-gpu-tools
|
||||
Description: Proxmox VE UI modifications and sensor monitoring
|
||||
Extends the Proxmox VE web interface with sensor readings including
|
||||
CPU, GPU, NVMe/HDD/SSD temperatures, fan speeds, and RAM temperatures
|
||||
via lm-sensors. Optionally adds UPS monitoring via Network UPS Tools,
|
||||
system/motherboard information via dmidecode, GPU historical data graphs,
|
||||
and removes the subscription nag screen.
|
||||
.
|
||||
After installation, run: pve-mod-configure
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/etc/pve-mod/pve-mod.conf
|
||||
Vendored
+86
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
NODES_PM="/usr/share/perl5/PVE/API2/Nodes.pm"
|
||||
DEFAULT_CONF="/usr/share/pve-mod/pve-mod.conf.default"
|
||||
USER_CONF="/etc/pve-mod/pve-mod.conf"
|
||||
|
||||
# Extracts "section.key" pairs from an INI file, one per line.
|
||||
_extract_conf_keys() {
|
||||
local file="$1" section="" line key
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
'#'*|'') continue ;;
|
||||
'['*']') section="${line#[}"; section="${section%]}"; continue ;;
|
||||
*'='*) key="${line%%=*}"; echo "${section}.${key}" ;;
|
||||
esac
|
||||
done < "$file"
|
||||
}
|
||||
|
||||
# Warns about keys present in the default config but missing from the user's config.
|
||||
_check_new_config_keys() {
|
||||
[ -f "$DEFAULT_CONF" ] || return 0
|
||||
[ -f "$USER_CONF" ] || return 0
|
||||
|
||||
local new_keys="" section="" key default_val
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
'#'*|'') continue ;;
|
||||
'['*']') section="${line#[}"; section="${section%]}"; continue ;;
|
||||
*'='*)
|
||||
key="${line%%=*}"
|
||||
if ! _extract_conf_keys "$USER_CONF" | grep -qF "${section}.${key}"; then
|
||||
new_keys="${new_keys} [${section}] ${line}\n"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < "$DEFAULT_CONF"
|
||||
|
||||
if [ -n "$new_keys" ]; then
|
||||
echo ""
|
||||
echo "pve-mod: New configuration options are available since your last install:"
|
||||
printf "%b" "$new_keys"
|
||||
echo "pve-mod: Run 'pve-mod-configure' to configure them, or add them manually to $USER_CONF"
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Apply patches for any enabled modules. Fails loudly on error.
|
||||
/usr/lib/pve-mod/apply-patches.sh
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo ""
|
||||
echo "pve-mod installed successfully."
|
||||
echo "Run 'pve-mod-configure' to enable and configure modules."
|
||||
echo ""
|
||||
else
|
||||
# Upgrading from a previous version — warn about any new config keys.
|
||||
_check_new_config_keys
|
||||
fi
|
||||
;;
|
||||
|
||||
triggered)
|
||||
# Fired by dpkg when pve-manager is upgraded. Only re-apply patches
|
||||
# if the user has opted in via 'pve-mod-configure'.
|
||||
TRIGGER_ENABLED=$(awk -F= '/^\[pve_trigger\]/{s=1} s && /^enabled=/{print $2; exit}' \
|
||||
/etc/pve-mod/pve-mod.conf 2>/dev/null || echo 0)
|
||||
if [ "${TRIGGER_ENABLED}" = "1" ]; then
|
||||
echo "pve-mod: pve-manager upgrade detected — re-applying patches."
|
||||
if ! /usr/lib/pve-mod/apply-patches.sh; then
|
||||
echo "pve-mod: WARNING: Failed to re-apply patches. Run 'pve-mod-configure' to fix." >&2
|
||||
fi
|
||||
else
|
||||
echo "pve-mod: WARNING: pve-manager was upgraded but auto re-patching is disabled." >&2
|
||||
echo "pve-mod: The Proxmox UI modifications may no longer be active." >&2
|
||||
echo "pve-mod: Run 'pve-mod-configure' to re-apply patches." >&2
|
||||
fi
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
exit 0
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
# Remove apt hook if it was installed via pve-mod-configure.
|
||||
rm -f /etc/apt/apt.conf.d/99-pve-mod
|
||||
;;
|
||||
|
||||
purge)
|
||||
rm -f /etc/apt/apt.conf.d/99-pve-mod
|
||||
rm -rf /etc/pve-mod
|
||||
rm -rf /var/lib/pve-mod
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
exit 0
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
_revert_patches() {
|
||||
if [ -x /usr/lib/pve-mod/revert-patches.sh ]; then
|
||||
/usr/lib/pve-mod/revert-patches.sh 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
remove|deconfigure)
|
||||
# 1. Revert patches before files are removed.
|
||||
_revert_patches
|
||||
|
||||
# 2. Ask whether to keep the config (only in interactive sessions).
|
||||
if [ -t 0 ] && [ -f /etc/pve-mod/pve-mod.conf ]; then
|
||||
printf '\npve-mod: Keep /etc/pve-mod/pve-mod.conf for re-use after reinstall? [Y/n] '
|
||||
read -r _keep
|
||||
case "$_keep" in
|
||||
[nN]*) rm -f /etc/pve-mod/pve-mod.conf
|
||||
echo "pve-mod: Configuration removed." ;;
|
||||
*) echo "pve-mod: Configuration kept at /etc/pve-mod/pve-mod.conf" ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
upgrade)
|
||||
# On upgrade, leave patches in place; postinst will re-apply them.
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
exit 0
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
interest pve-manager
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/make -f
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_install:
|
||||
# PVE API2 facade
|
||||
install -Dm644 src/PVENodeInfo/PveMod_SensorInfo.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/API2/PVEMod_SensorInfo.pm
|
||||
# PVEMod core modules (strip PVEMod_ prefix)
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Config.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Config.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Utils.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Utils.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Store.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Store.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_ProcessManager.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/ProcessManager.pm
|
||||
# Collector plugins
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Collectors/Intel.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Collector/Intel.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Collectors/Nvidia.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Collector/Nvidia.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Collectors/Amd.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Collector/Amd.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Collectors/LmSensors.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Collector/LmSensors.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Collectors/Ups.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Collector/Ups.pm
|
||||
install -Dm644 src/PVENodeInfo/PVEMod_Collectors/systemInformation.pm \
|
||||
debian/pve-mod/usr/share/perl5/PVE/PVEMod/Collector/SystemInformation.pm
|
||||
# JS module (rename to match loader reference)
|
||||
install -Dm644 src/PVENodeInfo/PveMod_pvemanagerlib.js \
|
||||
debian/pve-mod/usr/share/pve-manager/js/PveMod_PveNodeStatusView.js
|
||||
# Patch helpers
|
||||
install -Dm755 src/PVENodeInfo/apply-patches.sh \
|
||||
debian/pve-mod/usr/lib/pve-mod/apply-patches.sh
|
||||
install -Dm755 src/PVENodeInfo/revert-patches.sh \
|
||||
debian/pve-mod/usr/lib/pve-mod/revert-patches.sh
|
||||
# Configure tool
|
||||
install -Dm755 src/Scripts/pve-mod-configure \
|
||||
debian/pve-mod/usr/sbin/pve-mod-configure
|
||||
# Default config (conffile for user edits)
|
||||
install -Dm644 src/pve-mod.conf \
|
||||
debian/pve-mod/etc/pve-mod/pve-mod.conf
|
||||
# Reference copy for upgrade key-diff (not a conffile — always updated)
|
||||
install -Dm644 src/pve-mod.conf \
|
||||
debian/pve-mod/usr/share/pve-mod/pve-mod.conf.default
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
||||
Reference in new issue
Block a user