Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    System patches: Patch can NOT be applied cleanly

    Scheduled Pinned Locked Moved Firewalling
    6 Posts 4 Posters 511 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      NickyDoes
      last edited by NickyDoes

      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
      
      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by NogBadTheBad

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

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        N 1 Reply Last reply Reply Quote 0
        • N
          NickyDoes @NogBadTheBad
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad
            last edited by

            Not sure TBH, there must be a reason it's not been targeted for 2.4.4.

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

            1 Reply Last reply Reply Quote 0
            • DerelictD
              Derelict LAYER 8 Netgate
              last edited by Derelict

              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.

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                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.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.