mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-12 08:12:33 +00:00
74d5184963
`rpm -V xCAT-server` reports /etc/httpd/conf.d/xcat-ws.conf and /etc/apache2/conf.d/xcat-ws.conf changed on every EL, openEuler and SUSE management node, for the life of the install. %install shipped the Apache 2.2 fragment as the payload, and %post replaced it with the Apache 2.4 fragment whenever httpd, apachectl or apache2ctl reported 2.4. Every supported distribution runs Apache 2.4, so the file on disk never matched the package digest. The drift is a permanent false positive for anyone who verifies an installed xCAT before trusting it. Both fragments also began with `LoadModule rewrite_module /usr/lib64/apache2-prefork/mod_rewrite.so`. That file exists only on SUSE under the prefork MPM. Apache tolerates it on EL and openEuler because conf.modules.d loaded mod_rewrite first, and logs AH01574; where the module is not loaded first, the missing file stops Apache from starting. xcat-ws.conf.apache22 and xcat-ws.conf.apache24 are replaced by one xcat-ws.conf that serves both generations: the redirect sits behind <IfModule mod_rewrite.c>, and the authorization directives behind <IfModule mod_authz_core.c> and its negation. %install copies that one file to both conf.d paths and %post no longer names them, so the payload is the final file. %post runs a2enmod rewrite where a2enmod manages modules, which is how SUSE gets the module the removed LoadModule used to pull in. xCAT-test/unit/wsapi_apache_conf_portable.t fails 22 of its 30 assertions without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>