Patches that make into base code, how to handle in patches screen.


  • So I just checked on my home unit the patches screen, lots of old patches, removed the obsolete ones that were disabled.

    But I also have some that I know were pushed into the code, and they show up as applied with auto apply off, if I was to delete the patches would it reverse the patch, or just delete the patch file leaving the code as is?


  • Hi,

    If the patches are from the 'original' pfsense github, it really doesn't matter actually.
    In the future, the patched (updated) files on github will overwrite your local files so you wind up having the correct file : the patch your created just won't apply any more as the code is already being updated.

    If it actually removes the patch from the code before you remove the patch, then that's also ok.

    Keep in mind that code that evolves on github, right now, is stamped as the future "2.5.0" as the next version. If needed, a 2.4.5-p2 could be created, or a 2.4.6 or whatever Netgate decides.
    It's rather rare that 2.the 4.5-p1 is 'patched' as it is frozen code now. What mostly happens is that people clone the frozen 2.4.5-p1, write a patch for it, and publish this patch so you can patch locally the easy way. Just keep in mind that these patches are not from Netgate.

  • Netgate Administrator

    Deleting a patch from the package does not revert it.

    If that is code that is now in base it may show as revertable even if you have not applied it from the package.

    If they are all old patches you should be safe to just delete them. The only thing you should have there are patches against 2.4.5p1, if you need any.

    Steve

  • Rebel Alliance Developer Netgate

    If you are looking at the patches screen while already on the latest version, and you have not manually applied the patches, just delete them.

    If you revert them you'd actually be removing the code, which isn't what you want, since that code is now a part of the release.

    The only times you would want to revert before removing are: (a) The patch wasn't working as expected, or (b) you are reverting/removing a patch before upgrading.

    Generally speaking, (b) isn't necessary as the files will be replaced during upgrade, the main exception would be patches with auto-apply checked.

    In some rare cases, depending on the contents of a patch, it could be applied multiple times which could lead to unintended behavior. So when in doubt, don't apply or revert after a release, just remove. Unless the patch still isn't in a release.


  • Thanks guys, these are quite old patches, that are now included in the build I currently have which is 2.4.5-p1, I will make a backup of the files, then click the delete button, and run a diff afterwards to verify its ok. :)

    A patch I will still have on has already been accepted and pushed in to 2.5 so that will be one I remove in future as well.