15 Commits

Author SHA1 Message Date
Ilia Ross dde9d46b1e Fix patch command to restart Webmin instead of reloading 2026-08-17 23:30:17 +02:00
Ilia Ross c76fda35ce Add support for applying multiple patches with patch command
ⓘ Allow passing several patch URLs or files at once, e.g. webmin patch url1 url2 url3. Patches are applied in the given order, stopping at the first failure, and Webmin is reloaded only once after all of them are applied.
2026-08-17 21:43:28 +02:00
Ilia Ross 77f78cdb75 Fix patch command to not leave .orig backup files
ⓘ GNU patch keeps a .orig copy of the original file whenever a hunk applies with fuzz or offset, which is common when patching an installed release with a commit from the master branch. Pass --no-backup-if-mismatch, since backups are not needed.
2026-08-17 19:11:18 +02:00
Ilia Ross aa3db4ddbf Fix patch command to apply with git inside another repository
ⓘ When GNU patch is not installed, git apply was run inside the module directory, and if the Webmin root itself was a git repository, git resolved paths relative to that root and silently skipped the patched files.

Limit repository discovery to the current directory and allow reduced context, similar to the default fuzz used by patch, so slightly drifted context lines no longer cause a rejection.
2026-08-17 19:06:25 +02:00
Ilia Ross 5760fc98ba Fix patch sub-command to reload Webmin instead of restarting
https://forum.virtualmin.com/t/usermin-2-550-login-from-the-virtualmin-edit-users-page-stopped-working/137491/29?u=ilia
2026-06-30 22:03:39 +02:00
Ilia Ross b2e0db9db9 Add support to apply the patch from the raw link
https://forum.virtualmin.com/t/re-moving-sites-from-directadmin-to-virtualmin/128503/33?u=ilia
2024-08-28 15:20:20 +03:00
Ilia Ross 11ae39081c Fix to try more simple patch command at first 2024-07-22 14:18:51 +03:00
Ilia Ross 7507433bf1 Fix to drop dependency from Term::ANSIColor 2024-06-30 11:41:41 +03:00
Ilia Ross 248cb719c0 Fix restart command depend on config dir 2024-06-29 23:32:15 +03:00
Ilia Ross 94b7fdf0ec Fix to escape params 2024-06-29 23:29:55 +03:00
Ilia Ross d89f6411b6 Fix to use has_command API 2024-06-29 20:34:29 +03:00
Ilia Ross 01d08a3605 Fix to make patch API work directly from URL 2024-06-28 19:48:51 +03:00
Ilia Ross 3d9497ff45 Fix command example 2024-06-28 01:51:02 +03:00
Ilia Ross a6832450d1 Fix to restart Webmin when done 2024-06-28 01:38:28 +03:00
Ilia Ross e41037388c Apply a patch to Webmin core or its modules from GitHub or a local file 2024-06-28 01:35:10 +03:00