Cleanup httpd configuration files at removal nethserver-module

v7

(Mark Verlinde) #21

Did an implementation on SOGo for conversation:

Did you have this in mind?

After removal of nethserver-sogo zzz_SOGo.conf.rpmsave and a by a template overwritten (harmless) SOGo.conf are kept in /etc/httpd/conf.d/. Effectively disabling all apache configuration for the Application.


(Mark Verlinde) #22

Worked on this a bit more and I can not Agree. It makes no sense to keep a apache configuration file after a nethserver module is removed.

Dug in to two packages who install their own configuration, webtop-dav and rouncubemail.
webtop5-webdav.conf is completely static and roundcubemail.conf gets overwritten by templates.

If nethserver-webtop is removed and then SOGo is installed it breaks card / caldav for support SOGo due to the apache configuration staying behind.

As said before removing nethserver-roundcubemail has no effect, the service is still available after removal. Situation actually gets worse as we lose control over this configuration because it does not get updated (as example) if you change the trussed networks.

IMHO nethserver / e-smith shall be in control over the (content of) the loaded apache configuration files for nethserver modules.
This leeds me to a more radical idea:
After removal of a nethserver module no apache configuration file for this module shall be (re)loaded.
Until package removal is improved: It should be considered bad practice to keep apache configuration files installed by a package it configures (ie Roundcubemail) in the first place. They must be removed at install with metadata template.


(Stéphane de Labrusse) #23

e-smith API was made around 1999, updated and maintained since ages…it is something that NS has cleaned, maybe it is time to make something new and better.

Yes IMHO, when a template is no longer present in the rpm or of course if the RPM is no longer installed, the template should not be present anymore.

Obviously, saying that is easy, to make it possible is another game. FYI I do not like the %post way, we should try to do by another way (the esmith API)

Actually to remove a template, the official way is to expand it with a content DELETE=1 inside.