resolve absolut path patching

This commit is contained in:
Meliox 2026-06-11 22:20:28 +02:00
parent 43d31cab19
commit 3f10112713
7 changed files with 16 additions and 14 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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),

View File

@ -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 @@
</body>

View File

@ -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();

View File

@ -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?

View File

@ -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();
},