fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 23 forks source link

rpm: User is removed at uninstalling, which can cause error at reinstalling #597

Closed daipom closed 8 months ago

daipom commented 8 months ago

fluent-package v5.0.0 and v5.0.1try to remove User and Group at uninstalling.

the codes in %postun:

https://github.com/fluent/fluent-package-builder/blob/bf661105fa0f024aa83c94d1ceaec71b9f75a982/fluent-package/yum/fluent-package.spec.in#L287-L305

This behavior is added in the following fix:

It looks like it was influenced by the implementation of apt purge .

For dnf/yum remove, we can't remove User and Group. The files in /var/log/fluent/ and /etc/fluent/ remain, and they will be used after reinstalling.

If the previous Use or Group is removed, fluent-package creates a new one, and it causes errors in accessing those files.