mirror of https://github.com/Icinga/icinga2.git
RPM: Fix builds on Amazon Linux
This also disables the deprecated classicui-config packages on Amazon Linux. The major fix is to disable Systemd just like CentOS6 provides.
This commit is contained in:
parent
3ad1527024
commit
29a9c4564f
36
icinga2.spec
36
icinga2.spec
|
@ -31,7 +31,7 @@
|
||||||
%define apacheconfdir %{_sysconfdir}/httpd/conf.d
|
%define apacheconfdir %{_sysconfdir}/httpd/conf.d
|
||||||
%define apacheuser apache
|
%define apacheuser apache
|
||||||
%define apachegroup apache
|
%define apachegroup apache
|
||||||
%if 0%{?el5}%{?el6}
|
%if 0%{?el5}%{?el6}%{?amzn}
|
||||||
%define use_systemd 0
|
%define use_systemd 0
|
||||||
%if %(uname -m) != "x86_64"
|
%if %(uname -m) != "x86_64"
|
||||||
%define march_flag -march=i686
|
%define march_flag -march=i686
|
||||||
|
@ -148,10 +148,10 @@ Provides binaries for Icinga 2 Core.
|
||||||
%package common
|
%package common
|
||||||
Summary: Common Icinga 2 configuration
|
Summary: Common Icinga 2 configuration
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
%if "%{_vendor}" == "redhat"
|
%{?amzn:Requires(pre): shadow-utils}
|
||||||
Requires(pre): shadow-utils
|
%{?fedora:Requires(pre): shadow-utils}
|
||||||
Requires(post): shadow-utils
|
%{?rhel:Requires(pre): shadow-utils}
|
||||||
%endif
|
%{?suse_version:Requires(pre): pwdutils}
|
||||||
%if "%{_vendor}" == "suse"
|
%if "%{_vendor}" == "suse"
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
%endif
|
%endif
|
||||||
|
@ -213,6 +213,8 @@ Requires: %{name} = %{version}-%{release}
|
||||||
Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
|
Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
|
||||||
IDOUtils schema >= 1.12
|
IDOUtils schema >= 1.12
|
||||||
|
|
||||||
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%if !(0%{?amzn})
|
||||||
|
|
||||||
# DEPRECATED
|
# DEPRECATED
|
||||||
%package classicui-config
|
%package classicui-config
|
||||||
|
@ -232,6 +234,9 @@ Conflicts: icinga-gui-config
|
||||||
Icinga 1.x Classic UI Standalone configuration with locations
|
Icinga 1.x Classic UI Standalone configuration with locations
|
||||||
for Icinga 2.
|
for Icinga 2.
|
||||||
|
|
||||||
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%endif
|
||||||
|
|
||||||
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||||
%global selinux_variants mls targeted
|
%global selinux_variants mls targeted
|
||||||
%{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
|
%{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
|
||||||
|
@ -367,12 +372,17 @@ cd -
|
||||||
make install \
|
make install \
|
||||||
DESTDIR="%{buildroot}"
|
DESTDIR="%{buildroot}"
|
||||||
|
|
||||||
# DEPRECATED
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%if !(0%{?amzn})
|
||||||
|
|
||||||
# install classicui config
|
# install classicui config
|
||||||
install -D -m 0644 etc/icinga/icinga-classic.htpasswd %{buildroot}%{icingaclassicconfdir}/passwd
|
install -D -m 0644 etc/icinga/icinga-classic.htpasswd %{buildroot}%{icingaclassicconfdir}/passwd
|
||||||
install -D -m 0644 etc/icinga/cgi.cfg %{buildroot}%{icingaclassicconfdir}/cgi.cfg
|
install -D -m 0644 etc/icinga/cgi.cfg %{buildroot}%{icingaclassicconfdir}/cgi.cfg
|
||||||
install -D -m 0644 etc/icinga/icinga-classic-apache.conf %{buildroot}%{apacheconfdir}/icinga.conf
|
install -D -m 0644 etc/icinga/icinga-classic-apache.conf %{buildroot}%{apacheconfdir}/icinga.conf
|
||||||
|
|
||||||
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%endif
|
||||||
|
|
||||||
# remove features-enabled symlinks
|
# remove features-enabled symlinks
|
||||||
rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
|
rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
|
||||||
|
|
||||||
|
@ -600,7 +610,9 @@ fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
# DEPRECATED
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%if !(0%{?amzn})
|
||||||
|
|
||||||
%post classicui-config
|
%post classicui-config
|
||||||
if [ ${1:-0} -eq 1 ]
|
if [ ${1:-0} -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -625,6 +637,9 @@ fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%endif
|
||||||
|
|
||||||
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||||
%post selinux
|
%post selinux
|
||||||
for selinuxvariant in %{selinux_variants}
|
for selinuxvariant in %{selinux_variants}
|
||||||
|
@ -744,7 +759,9 @@ fi
|
||||||
%{_libdir}/%{name}/libdb_ido_pgsql*
|
%{_libdir}/%{name}/libdb_ido_pgsql*
|
||||||
%{_datadir}/icinga2-ido-pgsql
|
%{_datadir}/icinga2-ido-pgsql
|
||||||
|
|
||||||
# DEPRECATED
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%if !(0%{?amzn})
|
||||||
|
|
||||||
%files classicui-config
|
%files classicui-config
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%attr(0751,%{icinga_user},%{icinga_group}) %dir %{icingaclassicconfdir}
|
%attr(0751,%{icinga_user},%{icinga_group}) %dir %{icingaclassicconfdir}
|
||||||
|
@ -752,6 +769,9 @@ fi
|
||||||
%config(noreplace) %{apacheconfdir}/icinga.conf
|
%config(noreplace) %{apacheconfdir}/icinga.conf
|
||||||
%config(noreplace) %attr(0640,root,%{apachegroup}) %{icingaclassicconfdir}/passwd
|
%config(noreplace) %attr(0640,root,%{apachegroup}) %{icingaclassicconfdir}/passwd
|
||||||
|
|
||||||
|
# DEPRECATED, disable builds on Amazon
|
||||||
|
%endif
|
||||||
|
|
||||||
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||||
%files selinux
|
%files selinux
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
|
|
Loading…
Reference in New Issue