New Reinstall when patches are applied
-
When reinstalling from scratch, with an existing config file.
What to do if one has applied patches.
I'm still a bit confused about patches, when reinstalling (from scratch).
I'm think i saw rcoleman mention that one should revert the patches, before saving the config. Else the patch system could be out of "sync".Did i get that correct ?
My take would prob. be to save the config , then:
Open the config in an editor , and erase everything between<patches> </patches>
Maybe there should be a "Save wo. patches" or "Restore wo. patches" option in backup.
How does pfSense keep track on the patches applied ?
On my current 22.01 i have appled these
But my 22.01 config shows this (empty patch section) :
<patches></patches>How does it know what Recommended patches i have applied/activated ?
My old 2.5.2-p1, where manually (patch-id) pointed to some patches Netgate recommended.
Had sections like this in the config:
<patches> <item> <descr><![CDATA[pscd mem lek]]></descr> <location>https://github.com/pfsense/pfsense/commit/afcc0e9c97c1993ae6b95f886665fcb4375d26c7.patch</location> <pathstrip>2</pathstrip> <basedir>/</basedir> <ignorewhitespace></ignorewhitespace> <uniqid>6200c0676fd4b</uniqid> <patch>RnJv ...... </patch>
Is "Manually pointed to" patches kept in the config , and Recommended patches kept in another place ??
/Bingo
-
-
@bingo600 said in New Reinstall when patches are applied:
What to do if one has applied patches.
In most cases you should do nothing. The only thing you might need to worry about is if you have "auto apply" set on something and you might want to unset that if what you're patching is fixed. Though in most cases that's a no-op if the fix is in the new release.
I'm still a bit confused about patches, when reinstalling (from scratch).
I'm think i saw rcoleman mention that one should revert the patches, before saving the config. Else the patch system could be out of "sync".You should never manually revert a patch unless you no longer want the changes involved there. Reverting before upgrade is unnecessary, reverting after upgrade is potentially dangerous. If you revert after upgrade you're essentially removing the fix in question.
My take would prob. be to save the config , then:
Open the config in an editor , and erase everything betweenNo need to do that in most cases. You could remove things you no longer need but depending on the nature of the patches you may still want something in the list after release. For example if it's a fix that didn't get included in that release.
Maybe there should be a "Save wo. patches" or "Restore wo. patches" option in backup.
Again, unnecessary.
How does pfSense keep track on the patches applied ?
It looks to see if the changes in the patch are already applied -- it tests with the patch command to see if it either applies cleanly (not applied) or reverts cleanly (applied), and shows the appropriate buttons.
If neither button shows then the patch doesn't apply or revert cleanly, usually because other code changes happened in or near the code in the patch.
The recommended patches list is automatically included and not a part of your patches section of
config.xml
.How does it know what Recommended patches i have applied/activated ?
Same as for custom patches. It tests the patch to see if it applies or reverts cleanly.
Is "Manually pointed to" patches kept in the config , and Recommended patches kept in another place ??
Yes, the custom patches you added are in
config.xml
and the recommended patches are a built-in part of the package.