Closed olahaye74 closed 6 years ago
Found the problems: 1/ Missing build require for web server. The thruk/Makefile requires this (it assumes one is installed): HTTPDCONF=$(shell if [ -d "/etc/apache2/conf-available" ]; then echo "/etc/apache2/conf-available"; elif [ -d "/etc/httpd/conf.d" ]; then echo "/etc/httpd/conf.d"; elif [ -d "/etc/httpd/conf-available" ]; then echo "/etc/httpd/conf-available"; else echo "/etc/apache2/conf.d"; fi ) If no web server is installed (typically on a docker container used for build), you default to debian location which is wrong. Either use autotools to set correct httpd conf dir in Makefile or add a buildrequire in rpm (httpd package for all rpm distro except suse which still call it apache2)
Patch provided in issue #223 fixes the issue Added the following line in the %{__make} install \ HTTPDCONF="/etc/%{apachedir}/conf.d" \
HTTPDCONF should not be required in the future. The will be a spec for naemon-core, one for naemon-livestatus and one for thruk. naemon.spec itself will be a meta package only requiring all components.
Should be better now. There is no httpd related stuff in naemon-core anymore.
building rpm using rpmbuild -tb naemon-1.0.6.tar.gz fails at end because file not found. [...] make[1]: Entering directory `/root/rpmbuild/BUILD/naemon-1.0.6/thruk' mkdir -p /root/rpmbuild/BUILDROOT/naemon-1.0.6-1.el7.centos.x86_64/etc/apache2/conf.d/ install -m 0644 apache2.conf /root/rpmbuild/BUILDROOT/naemon-1.0.6-1.el7.centos.x86_64/etc/apache2/conf.d/naemon.conf [...] Processing files: naemon-thruk-1.0.6-1.el7.centos.x86_64 error: File not found: /root/rpmbuild/BUILDROOT/naemon-1.0.6-1.el7.centos.x86_64/etc/httpd/conf.d/naemon.conf RPM build errors: File not found: /root/rpmbuild/BUILDROOT/naemon-1.0.6-1.el7.centos.x86_64/etc/httpd/conf.d/naemon.conf
how to reproduce on CentOS-7 latest update export RPMBUILDOPTS= --target x86_64 --define 'debug_package %{nil}' rpmbuild -tb naemon-1.0.6.tar.gz