Skip to content

bareos-filedaemon: Debian package re-creates deleted config file during upgrade #2365

@Signum

Description

@Signum

Bareos component version

bareos-filedaemon 24.0.5-1

Steps to reproduce

  1. Install bareos-filedaemon package 24.0.4
  2. Delete the bareos/bareos-fd.d/client/myself.conf file (or rename it)
  3. Update bareos-filedaemon to 24.0.5

Expected results

As the user has deleted the myself.conf file, the update should not re-create it.

The user may have created a different .conf file and removed myself.conf for a reason. That will cause the bareos-filedaemon refuse to start after an update because there are conflicting "Client" definitions now.

Actual results

The file gets re-created.

Environment

- OS: `Debian 12`
- component: file daemon

Relevant log output

Relevant traces output

Anything else?

I took a brief look at the source package. Apparently you handle config files yourself and do not rely on Debian/dpkg's "conffile" mechanism as described in https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html#automatic-handling-of-configuration-files-by-dpkg

Quote:
However, note that dpkg will not replace a conffile that was removed by the user (or by a script). This is necessary because with some programs a missing file produces an effect hard or impossible to achieve in another way, so that a missing file needs to be kept that way if the user did it.

Not sure what the easiest fix would be. Perhaps you can check in /usr/lib/bareos/scripts/bareos-config-lib.sh whether the myself.conf file is not existing during an update and just skipt it. Or you consider adapting the "conffiles" workflow from Debian – but I think you created that library for a reason.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions