diff --git a/src/Scripts/apply-patches.sh b/src/Scripts/apply-patches.sh index ae34d06..c131401 100644 --- a/src/Scripts/apply-patches.sh +++ b/src/Scripts/apply-patches.sh @@ -72,12 +72,12 @@ list_modules() { } # Patch-state helpers (all use zero fuzz for deterministic detection). -_dry_forward() { patch -p0 -F0 -f --dry-run --verbose < "$1"; } -_dry_reverse() { patch -R -p0 -F0 -f --dry-run --verbose < "$1"; } +_dry_forward() { patch -p1 -F0 -f --dry-run -s -d "$PVE_MOD_ROOT" < "$1" >/dev/null 2>&1; } +_dry_reverse() { patch -R -p1 -F0 -f --dry-run -s -d "$PVE_MOD_ROOT" < "$1" >/dev/null 2>&1; } is_applied() { _dry_reverse "$1"; } can_apply() { _dry_forward "$1"; } -do_apply() { patch -p0 -F0 -f -s < "$1"; } -do_revert() { patch -R -p0 -F0 -f -s < "$1"; } +do_apply() { patch -p1 -F0 -f -s -d "$PVE_MOD_ROOT" < "$1"; } +do_revert() { patch -R -p1 -F0 -f -s -d "$PVE_MOD_ROOT" < "$1"; } CHANGED=false FAILED=false @@ -165,6 +165,7 @@ for mod in $(list_modules); do to_apply+=("$pf") else warn " $(basename "$pf") does not apply cleanly" + patch -p1 -F0 -f --dry-run --verbose -d "$PVE_MOD_ROOT" < "$pf" >&2 || true preflight_ok=false break fi diff --git a/src/Scripts/revert-patches.sh b/src/Scripts/revert-patches.sh index 4f0ffa2..455778b 100644 --- a/src/Scripts/revert-patches.sh +++ b/src/Scripts/revert-patches.sh @@ -38,6 +38,7 @@ revert_one_patch() { return 0 fi warn " $(basename "$patch") could not be reverted cleanly; manual cleanup may be needed" + patch -R -p1 -F0 -f --dry-run --verbose -d "$PVE_MOD_ROOT" < "$patch" >&2 || true return 1 } diff --git a/src/nag_screen/patches/01-proxmoxlib-js-nagscreen.patch b/src/nag_screen/patches/01-proxmoxlib-js-nagscreen.patch index dff07b9..43d9e31 100644 --- a/src/nag_screen/patches/01-proxmoxlib-js-nagscreen.patch +++ b/src/nag_screen/patches/01-proxmoxlib-js-nagscreen.patch @@ -1,5 +1,5 @@ ---- /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2026-05-26 16:26:59.000000000 +0200 -+++ /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 2026-06-10 21:12:31.349760790 +0200 +--- a/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ++++ b/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js @@ -599,37 +599,8 @@ Ext.Msg.alert(gettext('Error'), res.htmlStatus || res.result.message), diff --git a/src/nag_screen/patches/02-index-html-tpl-mobilenag.patch b/src/nag_screen/patches/02-index-html-tpl-mobilenag.patch index 5e61fc2..2bb8512 100644 --- a/src/nag_screen/patches/02-index-html-tpl-mobilenag.patch +++ b/src/nag_screen/patches/02-index-html-tpl-mobilenag.patch @@ -1,5 +1,5 @@ ---- /usr/share/pve-yew-mobile-gui/index.html.tpl 2026-06-10 21:39:42.012286927 +0200 -+++ /usr/share/pve-yew-mobile-gui/index.html.tpl 2026-06-10 21:40:47.815781830 +0200 +--- a/usr/share/pve-yew-mobile-gui/index.html.tpl ++++ b/usr/share/pve-yew-mobile-gui/index.html.tpl @@ -59,3 +59,23 @@ diff --git a/src/node_info/patches/01-nodes-pm-sensors.patch b/src/node_info/patches/01-nodes-pm-sensors.patch index c15b945..c744077 100644 --- a/src/node_info/patches/01-nodes-pm-sensors.patch +++ b/src/node_info/patches/01-nodes-pm-sensors.patch @@ -1,5 +1,5 @@ ---- /usr/share/perl5/PVE/API2/Nodes.pm 2026-05-24 02:05:58.000000000 +0200 -+++ /usr/share/perl5/PVE/API2/Nodes.pm 2026-06-08 20:38:56.988900119 +0200 +--- a/usr/share/perl5/PVE/API2/Nodes.pm ++++ b/usr/share/perl5/PVE/API2/Nodes.pm @@ -536,6 +536,12 @@ $res->{pveversion} = PVE::pvecfg::package() . "/" . PVE::pvecfg::version_text(); diff --git a/src/node_info/patches/02-nodes-pm-GPU-RRD-history.patch b/src/node_info/patches/02-nodes-pm-GPU-RRD-history.patch index e77241a..1cfe758 100644 --- a/src/node_info/patches/02-nodes-pm-GPU-RRD-history.patch +++ b/src/node_info/patches/02-nodes-pm-GPU-RRD-history.patch @@ -1,5 +1,5 @@ ---- /usr/share/perl5/PVE/API2/Nodes.pm 2026-05-24 02:05:58.000000000 +0200 -+++ /usr/share/perl5/PVE/API2/Nodes.pm 2026-06-09 22:30:12.187854456 +0200 +--- a/usr/share/perl5/PVE/API2/Nodes.pm ++++ b/usr/share/perl5/PVE/API2/Nodes.pm @@ -251,6 +251,7 @@ { name => 'report' }, { name => 'rrd' }, # fixme: remove? diff --git a/src/node_info/patches/03-pvemanager-js-sensors.patch b/src/node_info/patches/03-pvemanager-js-sensors.patch index 5a6790e..d8f9395 100644 --- a/src/node_info/patches/03-pvemanager-js-sensors.patch +++ b/src/node_info/patches/03-pvemanager-js-sensors.patch @@ -1,5 +1,5 @@ ---- /usr/share/pve-manager/js/pvemanagerlib.js 2026-05-24 02:05:58.000000000 +0200 -+++ /usr/share/pve-manager/js/pvemanagerlib.js 2026-06-07 15:44:28.581927600 +0200 +--- a/usr/share/pve-manager/js/pvemanagerlib.js ++++ b/usr/share/pve-manager/js/pvemanagerlib.js @@ -50737,175 +50737,181 @@ me.reload(); }, diff --git a/src/test.yml b/src/test.yml index 22b816c..2a256bd 100644 --- a/src/test.yml +++ b/src/test.yml @@ -1 +1 @@ -trigger workflow test 1, 2 \ No newline at end of file +trigger workflow test 1, 2, 3 \ No newline at end of file