System patches: Patch can NOT be applied cleanly
-
Hello,
I'm attempting to apply a system patch for issue #9864. Patch is 659a8a26d12b75399063dae060fa32fa23751dbf. Testing the patch gives two info notifications:
Patch can NOT be applied cleanly (detail)
Patch can NOT be reverted cleanly (detail)I've looked through the detail, but am not well versed in this to understand what is a problem.
/usr/bin/patch --directory=/ -t -p2 -i /var/patches/5de68b3122a54.patch --check --forward --ignore-whitespace Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |From 659a8a26d12b75399063dae060fa32fa23751dbf Mon Sep 17 00:00:00 2001 |From: jim-p |Date: Wed, 30 Oct 2019 13:26:15 -0400 |Subject: [PATCH] Set autocomplete=new-password for auth forms around the GUI. | Implements #9864 | |--- | src/usr/local/www/classes/Form/Section.class.php | 1 + | src/usr/local/www/diag_authentication.php | 4 ++-- | src/usr/local/www/interfaces.php | 9 ++++++--- | src/usr/local/www/interfaces_ppps_edit.php | 3 ++- | src/usr/local/www/services_captiveportal_vouchers.php | 3 ++- | src/usr/local/www/services_checkip_edit.php | 3 ++- | src/usr/local/www/services_dyndns_edit.php | 3 ++- | src/usr/local/www/services_pppoe_edit.php | 6 ++++-- | src/usr/local/www/system_advanced_misc.php | 3 ++- | src/usr/local/www/system_advanced_notifications.php | 5 +++-- | src/usr/local/www/system_hasync.php | 3 ++- | src/usr/local/www/system_usermanager.php | 11 ++++++++--- | src/usr/local/www/system_usermanager_passwordmg.php | 8 ++++++-- | src/usr/local/www/vpn_l2tp_users_edit.php | 3 ++- | src/usr/local/www/vpn_openvpn_client.php | 6 ++++-- | 15 files changed, 48 insertions(+), 23 deletions(-) | |diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php |index 0b93c9b31ab..620aabe7fbe 100644 |--- a/src/usr/local/www/classes/Form/Section.class.php |+++ b/src/usr/local/www/classes/Form/Section.class.php -------------------------- Patching file usr/local/www/classes/Form/Section.class.php using Plan A... Hunk #1 succeeded at 73 (offset -2 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/diag_authentication.php b/src/usr/local/www/diag_authentication.php |index 6bd0789441d..b652f52cae4 100644 |--- a/src/usr/local/www/diag_authentication.php |+++ b/src/usr/local/www/diag_authentication.php -------------------------- Patching file usr/local/www/diag_authentication.php using Plan A... Hunk #1 succeeded at 98 (offset -2 lines). Hunk #2 succeeded at 106 (offset -2 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php |index 59ad7311e6b..3b976286f9b 100755 |--- a/src/usr/local/www/interfaces.php |+++ b/src/usr/local/www/interfaces.php -------------------------- Patching file usr/local/www/interfaces.php using Plan A... Hunk #1 succeeded at 2716 (offset 1 line). Hunk #2 succeeded at 2784 (offset 1 line). Hunk #3 succeeded at 2910 (offset 1 line). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php |index 6276e115ecf..004b9b3df7c 100644 |--- a/src/usr/local/www/interfaces_ppps_edit.php |+++ b/src/usr/local/www/interfaces_ppps_edit.php -------------------------- Patching file usr/local/www/interfaces_ppps_edit.php using Plan A... Hunk #1 succeeded at 553 (offset -12 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php |index a065b54ef96..6200a0fe4cb 100644 |--- a/src/usr/local/www/services_captiveportal_vouchers.php |+++ b/src/usr/local/www/services_captiveportal_vouchers.php -------------------------- Patching file usr/local/www/services_captiveportal_vouchers.php using Plan A... Hunk #1 succeeded at 534 (offset -6 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_checkip_edit.php b/src/usr/local/www/services_checkip_edit.php |index 430964bc2ce..599bd3d5ee9 100644 |--- a/src/usr/local/www/services_checkip_edit.php |+++ b/src/usr/local/www/services_checkip_edit.php -------------------------- Patching file usr/local/www/services_checkip_edit.php using Plan A... Hunk #1 succeeded at 137 (offset -2 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_dyndns_edit.php b/src/usr/local/www/services_dyndns_edit.php |index 6290c8b5c52..9b0ed433c8e 100644 |--- a/src/usr/local/www/services_dyndns_edit.php |+++ b/src/usr/local/www/services_dyndns_edit.php -------------------------- Patching file usr/local/www/services_dyndns_edit.php using Plan A... Hunk #1 failed at 366. 1 out of 1 hunks failed while patching usr/local/www/services_dyndns_edit.php Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php |index f40703b4371..d36cfefc5d9 100644 |--- a/src/usr/local/www/services_pppoe_edit.php |+++ b/src/usr/local/www/services_pppoe_edit.php -------------------------- Patching file usr/local/www/services_pppoe_edit.php using Plan A... Hunk #1 succeeded at 493 (offset -2 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php |index ea09ceeebf9..2c8eef37e85 100644 |--- a/src/usr/local/www/system_advanced_misc.php |+++ b/src/usr/local/www/system_advanced_misc.php -------------------------- Patching file usr/local/www/system_advanced_misc.php using Plan A... Hunk #1 succeeded at 362 (offset -14 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php |index 66111d48e2b..a0399804755 100644 |--- a/src/usr/local/www/system_advanced_notifications.php |+++ b/src/usr/local/www/system_advanced_notifications.php -------------------------- Patching file usr/local/www/system_advanced_notifications.php using Plan A... Hunk #1 succeeded at 300 (offset 21 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/system_hasync.php b/src/usr/local/www/system_hasync.php |index cc02050d5be..c876f1bdf66 100644 |--- a/src/usr/local/www/system_hasync.php |+++ b/src/usr/local/www/system_hasync.php -------------------------- Patching file usr/local/www/system_hasync.php using Plan A... Hunk #1 succeeded at 162 (offset -1 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php |index 45f417da26e..b9846b07ca5 100644 |--- a/src/usr/local/www/system_usermanager.php |+++ b/src/usr/local/www/system_usermanager.php -------------------------- Patching file usr/local/www/system_usermanager.php using Plan A... Hunk #1 succeeded at 759 (offset -25 lines). Hunk #2 succeeded at 784 (offset -25 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/system_usermanager_passwordmg.php b/src/usr/local/www/system_usermanager_passwordmg.php |index dc3952bf407..fd86be565e5 100644 |--- a/src/usr/local/www/system_usermanager_passwordmg.php |+++ b/src/usr/local/www/system_usermanager_passwordmg.php -------------------------- Patching file usr/local/www/system_usermanager_passwordmg.php using Plan A... Hunk #1 succeeded at 101 (offset -9 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/vpn_l2tp_users_edit.php b/src/usr/local/www/vpn_l2tp_users_edit.php |index bdb7057ba0a..30f1b80433f 100644 |--- a/src/usr/local/www/vpn_l2tp_users_edit.php |+++ b/src/usr/local/www/vpn_l2tp_users_edit.php -------------------------- Patching file usr/local/www/vpn_l2tp_users_edit.php using Plan A... Hunk #1 succeeded at 149 (offset -2 lines). Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php |index 10dbcb72e1a..f954b8098c5 100644 |--- a/src/usr/local/www/vpn_openvpn_client.php |+++ b/src/usr/local/www/vpn_openvpn_client.php -------------------------- Patching file usr/local/www/vpn_openvpn_client.php using Plan A... Hunk #1 succeeded at 603 (offset -23 lines). Hunk #2 succeeded at 629 (offset -23 lines). done
-
@ndemarco said in System patches: Patch can NOT be applied cleanly:
9864
Running 2.5.0 ?
Target version changed from 2.5.0 to 2.4.5
2.4.5 isn't out or should I say yet.
-
Thansk @NogBadTheBad
That could be a problem. I'm on 2.4.4-RELEASE-p3. Is it possible to patch 2.4.4-RELEASE-p3 to add this change without updating to an unreleased version?
-
Not sure TBH, there must be a reason it's not been targeted for 2.4.4.
-
If the patch has been cherry-picked back to 2.4.4 (2.4.5) there will be two patches in the redmine. You want the cherry-picked one:
659a8a26d12b75399063dae060fa32fa23751dbf
Hmm. That's the one you're using.
-
Usually that means that some other commit that happened before it needs to also be applied. It might be a new form field, something else that changed nearby, etc.
Since the failure is in
usr/local/www/services_dyndns_edit.php
then there must be a commit that happened on that file after 2.4.4-RELEASE-p3 but before the patch you're trying to apply.Looking at the history, there were a number of changes to that file from PRs for various DynDNS changes.
You could hand edit out just the part of the patch that is touching that file.