On 2025-06-20 at 11:30, tomas@tuxteam.de wrote: > On Fri, Jun 20, 2025 at 11:06:51AM -0400, Jeffrey Walton wrote: >> You will absolutely lose your sshd_config when the package is >> upgraded and you choose the maintainers version of the file. > > No. > > You will be asked, as for every conffile. That's why he said "and you choose the maintainer's version of the file". I imagine the idea is that of course people will choose the maintainer's version, because otherwise you wouldn't get the improvements (whether new option settings for new features in the new upstream version, or new comments better explaining existing options, or new wordings of existing comments), and therefore they'll lose the changes that they made on their own. Of course, it could equally be argued that of course people will choose their own version, specifically to avoid the problem of losing their own changes - even though that means they'll lose out on the improvements from the maintainer's version. Personally, what I do in response to such a prompt is to have it show me a diff of the two files, and then if the changes involve losing any settings want to retain, I have it give me a shell prompt (or use another shell I have independently) to make a copy of the existing file. I then let it install the maintainer's version, diff the old version against that separately, and immediately use that diff as the basis for editing the newly-installed maintainer's version to include the changes I want to keep. That's a bit of a pain, and the .d/ pattern avoids the need for it - but if you were expected to either always install the maintainer's version *or* always keep your locally-modified version, I don't see any reason for them to have bothered with creating the entire conffile system in the first place. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
Attachment:
signature.asc
Description: OpenPGP digital signature