Cleanup and build the last packages for Fedora 37
This commit is contained in:
@@ -1,55 +1,90 @@
|
||||
# Icinga Web 2 | (c) 2013-2016 Icinga Development Team | GPLv2+
|
||||
# Icinga Web 2 | (c) 2013-2017 Icinga Development Team | GPLv2+
|
||||
|
||||
%define revision 1
|
||||
|
||||
Name: icingaweb2
|
||||
Version: 2.4.1
|
||||
Version: 2.8.2
|
||||
Release: %{revision}%{?dist}
|
||||
Summary: Icinga Web 2
|
||||
Group: Applications/System
|
||||
License: GPLv2+ and MIT and BSD
|
||||
URL: https://icinga.com
|
||||
Source: icingaweb2.tar.gz
|
||||
Source0: icingaweb2-2.8.2.orig.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||
Packager: Icinga Team <info@icinga.com>
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?amzn}
|
||||
%define php php
|
||||
%define php_cli php-cli
|
||||
%if 0%{?rhel} == 7
|
||||
%define php_scl rh-php73
|
||||
%endif
|
||||
%if 0%{?rhel} == 6
|
||||
%define php_scl rh-php70
|
||||
%endif
|
||||
|
||||
%if 0%{?el5}%{?el6}%{?amzn}
|
||||
%define use_selinux 0
|
||||
%else
|
||||
%define use_selinux 1
|
||||
%endif
|
||||
|
||||
%if 0%{?php_scl:1}
|
||||
%define php_scl_prefix %{php_scl}-
|
||||
%define php_runtime %{php_scl_prefix}php-fpm
|
||||
%define php_bin /opt/rh/%{php_scl}/root/usr/bin/php
|
||||
%define php_fpm 1
|
||||
%else
|
||||
%define php_runtime %{php}
|
||||
%endif
|
||||
|
||||
%define php %{?php_scl_prefix}php
|
||||
%define php_cli %{php}-cli
|
||||
%define php_common %{php}-common
|
||||
%define wwwconfigdir %{_sysconfdir}/httpd/conf.d
|
||||
%define wwwuser apache
|
||||
|
||||
# extra requirements on RHEL
|
||||
Requires: %{php}-mysqlnd
|
||||
Requires: %{php}-pgsql
|
||||
Requires: %{php}-ldap
|
||||
%endif
|
||||
|
||||
# minimum required PHP version
|
||||
%define php_version 5.6.0
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%define wwwconfigdir %{_sysconfdir}/apache2/conf.d
|
||||
%define wwwuser wwwrun
|
||||
%if 0%{?suse_version} == 1110
|
||||
%define php php53
|
||||
Requires: apache2-mod_php53
|
||||
%else
|
||||
%define php php5
|
||||
Requires: apache2-mod_php5
|
||||
%endif
|
||||
%define php php
|
||||
%define php_runtime mod_php_any
|
||||
%define php_common %{php}
|
||||
%define php_cli %{php}
|
||||
# conflict with older PHP on SLES and openSUSE
|
||||
Conflicts: php < %{php_version}
|
||||
Conflicts: php5 < %{php_version}
|
||||
Conflicts: php53
|
||||
%endif
|
||||
|
||||
%{?amzn:Requires(pre): shadow-utils}
|
||||
%{?fedora:Requires(pre): shadow-utils}
|
||||
%{?rhel:Requires(pre): shadow-utils}
|
||||
%{?suse_version:Requires(pre): pwdutils}
|
||||
|
||||
Requires: %{php_runtime} >= %{php_version}
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
%if 0%{?suse_version}
|
||||
Requires: apache2
|
||||
%endif
|
||||
|
||||
Requires: icinga-l10n
|
||||
Requires: icingacli = %{version}-%{release}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Requires: php-Icinga = %{version}-%{release}
|
||||
Requires: %{name}-vendor-dompdf = 0.7.0-1%{?dist}
|
||||
Requires: %{name}-vendor-HTMLPurifier = 4.8.0-1%{?dist}
|
||||
Requires: %{name}-vendor-JShrink = 1.1.0-1%{?dist}
|
||||
Requires: %{name}-vendor-lessphp = 0.4.0-1%{?dist}
|
||||
Requires: %{name}-vendor-Parsedown = 1.6.0-1%{?dist}
|
||||
|
||||
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
%define selinux 1
|
||||
%define selinux_variants mls targeted
|
||||
#%{!?_selinux_policy_version: %define _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
|
||||
%endif
|
||||
Requires: %{name}-vendor-dompdf = %{version}-%{release}
|
||||
Requires: %{name}-vendor-HTMLPurifier = 1:%{version}-%{release}
|
||||
Requires: %{name}-vendor-JShrink = %{version}-%{release}
|
||||
Requires: %{name}-vendor-lessphp = %{version}-%{release}
|
||||
Requires: %{name}-vendor-Parsedown = %{version}-%{release}
|
||||
|
||||
%define basedir %{_datadir}/%{name}
|
||||
%define bindir %{_bindir}
|
||||
@@ -71,6 +106,9 @@ Group: Applications/System
|
||||
%{?fedora:Requires(pre): shadow-utils}
|
||||
%{?rhel:Requires(pre): shadow-utils}
|
||||
%{?suse_version:Requires(pre): pwdutils}
|
||||
%if 0%{?suse_version} > 1320
|
||||
Requires(pre): system-user-wwwrun
|
||||
%endif
|
||||
|
||||
%description common
|
||||
Common files for Icinga Web 2 and the Icinga CLI
|
||||
@@ -79,12 +117,15 @@ Common files for Icinga Web 2 and the Icinga CLI
|
||||
%package -n php-Icinga
|
||||
Summary: Icinga Web 2 PHP library
|
||||
Group: Development/Libraries
|
||||
Requires: %{php} >= 5.3.0
|
||||
Requires: %{php}-gd %{php}-intl
|
||||
Requires: %{name}-vendor-zf1 = 1.12.20-1%{?dist}
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Requires: %{php}-gd %{php}-intl %{php}-mbstring
|
||||
%{?rhel:Requires: %{php}-pdo %{php}-xml}
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
||||
Requires: %{php}-json
|
||||
%endif rhel >= 8 || fedora >= 30
|
||||
Requires: %{name}-vendor-zf1 = %{version}-%{release}
|
||||
%{?amzn:Requires: %{php}-pecl-imagick}
|
||||
%{?fedora:Requires: php-pecl-imagick}
|
||||
%{?rhel:Requires: php-pecl-imagick}
|
||||
%{?suse_version:Requires: %{php}-gettext %{php}-json %{php}-openssl %{php}-posix}
|
||||
|
||||
%description -n php-Icinga
|
||||
@@ -94,25 +135,29 @@ Icinga Web 2 PHP library
|
||||
%package -n icingacli
|
||||
Summary: Icinga CLI
|
||||
Group: Applications/System
|
||||
Requires: icinga-l10n
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Requires: php-Icinga = %{version}-%{release}
|
||||
%{?amzn:Requires: %{php_cli} >= 5.3.0 bash-completion}
|
||||
%{?fedora:Requires: %{php_cli} >= 5.3.0 bash-completion}
|
||||
%{?rhel:Requires: %{php_cli} >= 5.3.0 bash-completion}
|
||||
%{?suse_version:Requires: %{php} >= 5.3.0}
|
||||
Requires: bash-completion
|
||||
Requires: %{php_cli} >= %{php_version}
|
||||
%if 0%{?suse_version}
|
||||
# conflict with older PHP on SLES and openSUSE
|
||||
Conflicts: php < %{php_version}
|
||||
Conflicts: php5 < %{php_version}
|
||||
Conflicts: php53
|
||||
%endif
|
||||
|
||||
|
||||
%description -n icingacli
|
||||
Icinga CLI
|
||||
|
||||
|
||||
%if 0%{?selinux}
|
||||
%if 0%{?use_selinux}
|
||||
%define selinux_variants mls targeted
|
||||
|
||||
%package selinux
|
||||
Summary: SELinux policy for Icinga Web 2
|
||||
#BuildRequires: checkpolicy, selinux-policy-devel, /usr/share/selinux/devel/policyhelp, hardlink
|
||||
BuildRequires: checkpolicy, selinux-policy-devel, hardlink
|
||||
%if "%{_selinux_policy_version}" != ""
|
||||
Requires: selinux-policy >= %{_selinux_policy_version}
|
||||
%endif
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires(post): policycoreutils
|
||||
Requires(postun): policycoreutils
|
||||
@@ -123,87 +168,82 @@ SELinux policy for Icinga Web 2
|
||||
|
||||
|
||||
%package vendor-dompdf
|
||||
Version: 0.7.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Icinga Web 2 vendor library dompdf
|
||||
Group: Development/Libraries
|
||||
License: LGPLv2.1
|
||||
Requires: %{php} >= 5.3.0
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description vendor-dompdf
|
||||
Icinga Web 2 vendor library dompdf
|
||||
|
||||
|
||||
%package vendor-HTMLPurifier
|
||||
Version: 4.8.0
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Icinga Web 2 vendor library HTMLPurifier
|
||||
Group: Development/Libraries
|
||||
License: LGPLv2.1
|
||||
Requires: %{php} >= 5.3.0
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description vendor-HTMLPurifier
|
||||
Icinga Web 2 vendor library HTMLPurifier
|
||||
|
||||
|
||||
%package vendor-JShrink
|
||||
Version: 1.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Icinga Web 2 vendor library JShrink
|
||||
Group: Development/Libraries
|
||||
License: BSD
|
||||
Requires: %{php} >= 5.3.0
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description vendor-JShrink
|
||||
Icinga Web 2 vendor library JShrink
|
||||
|
||||
|
||||
%package vendor-lessphp
|
||||
Version: 0.4.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Icinga Web 2 vendor library lessphp
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
Requires: %{php} >= 5.3.0
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description vendor-lessphp
|
||||
Icinga Web 2 vendor library lessphp
|
||||
|
||||
|
||||
%package vendor-Parsedown
|
||||
Version: 1.6.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Icinga Web 2 vendor library Parsedown
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
Requires: %{php} >= 5.3.0
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description vendor-Parsedown
|
||||
Icinga Web 2 vendor library Parsedown
|
||||
|
||||
|
||||
%package vendor-zf1
|
||||
Version: 1.12.20
|
||||
Release: 1%{?dist}
|
||||
Summary: Icinga Web 2's fork of Zend Framework 1
|
||||
Group: Development/Libraries
|
||||
License: BSD
|
||||
Requires: %{php} >= 5.3.0
|
||||
Obsoletes: %{name}-vendor-Zend
|
||||
Requires: %{php_common} >= %{php_version}
|
||||
Obsoletes: %{name}-vendor-Zend < 1.12.20
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description vendor-zf1
|
||||
Icinga Web 2's fork of Zend Framework 1
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n icingaweb2
|
||||
%if 0%{?selinux}
|
||||
%setup -q
|
||||
%if 0%{?use_selinux}
|
||||
mkdir selinux
|
||||
cp -p packages/selinux/icingaweb2.{fc,if,te} selinux
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if 0%{?selinux}
|
||||
%if 0%{?use_selinux}
|
||||
cd selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
@@ -222,13 +262,20 @@ cp -pv etc/bash_completion.d/icingacli %{buildroot}/%{_sysconfdir}/bash_completi
|
||||
cp -prv modules/{monitoring,setup,doc,translation} %{buildroot}/%{basedir}/modules
|
||||
cp -prv library/Icinga %{buildroot}/%{phpdir}
|
||||
cp -prv library/vendor/{dompdf,HTMLPurifier*,JShrink,lessphp,Parsedown,Zend} %{buildroot}/%{basedir}/library/vendor
|
||||
cp -prv public/{css,font,img,js,error_norewrite.html} %{buildroot}/%{basedir}/public
|
||||
cp -prv public/{css,font,img,js,error_norewrite.html,error_unavailable.html} %{buildroot}/%{basedir}/public
|
||||
%if 0%{?php_fpm:1}
|
||||
cp -pv packages/files/apache/icingaweb2.fpm.conf %{buildroot}/%{wwwconfigdir}/icingaweb2.conf
|
||||
%else
|
||||
cp -pv packages/files/apache/icingaweb2.conf %{buildroot}/%{wwwconfigdir}/icingaweb2.conf
|
||||
%endif
|
||||
cp -pv packages/files/bin/icingacli %{buildroot}/%{bindir}
|
||||
%if 0%{?php_bin:1}
|
||||
sed -i '1 s~#!.*~#!%{php_bin}~' %{buildroot}/%{bindir}/icingacli
|
||||
%endif
|
||||
cp -pv packages/files/public/index.php %{buildroot}/%{basedir}/public
|
||||
cp -prv etc/schema %{buildroot}/%{docsdir}
|
||||
cp -prv packages/files/config/modules/{setup,translation} %{buildroot}/%{configdir}/modules
|
||||
%if 0%{?selinux}
|
||||
%if 0%{?use_selinux}
|
||||
cd selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
@@ -236,7 +283,8 @@ do
|
||||
install -p -m 644 icingaweb2.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/icingaweb2.pp
|
||||
done
|
||||
cd -
|
||||
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
||||
# TODO: Fix build problems on Icinga, see https://github.com/Icinga/puppet-icinga_build/issues/11
|
||||
#/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
||||
%endif
|
||||
|
||||
%pre
|
||||
@@ -262,6 +310,11 @@ rm -rf %{buildroot}
|
||||
%{basedir}/doc
|
||||
%{basedir}/modules
|
||||
%{basedir}/public
|
||||
%if 0%{?suse_version}
|
||||
# for lint on OBS
|
||||
%dir %{dirname:%{wwwconfigdir}}
|
||||
%dir %{wwwconfigdir}
|
||||
%endif
|
||||
%config(noreplace) %{wwwconfigdir}/icingaweb2.conf
|
||||
%attr(2775,root,%{icingawebgroup}) %dir %{logdir}
|
||||
%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules/setup
|
||||
@@ -278,14 +331,22 @@ exit 0
|
||||
|
||||
%files common
|
||||
%defattr(-,root,root)
|
||||
%{basedir}/application/locale
|
||||
%dir %{basedir}
|
||||
%dir %{basedir}/application
|
||||
%dir %{basedir}/library
|
||||
%dir %{basedir}/library/vendor
|
||||
%dir %{basedir}/modules
|
||||
%{basedir}/application/locale
|
||||
%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}
|
||||
%attr(2770,root,%{icingawebgroup}) %config(noreplace) %dir %{configdir}/modules
|
||||
|
||||
|
||||
%files -n php-Icinga
|
||||
%defattr(-,root,root)
|
||||
%if 0%{?suse_version}
|
||||
# for lint on OBS
|
||||
%dir %{phpdir}
|
||||
%endif
|
||||
%{phpdir}/Icinga
|
||||
|
||||
|
||||
@@ -296,7 +357,7 @@ exit 0
|
||||
%attr(0755,root,root) %{bindir}/icingacli
|
||||
|
||||
|
||||
%if 0%{?selinux}
|
||||
%if 0%{?use_selinux}
|
||||
%post selinux
|
||||
for selinuxvariant in %{selinux_variants}
|
||||
do
|
||||
@@ -354,3 +415,67 @@ fi
|
||||
%files vendor-zf1
|
||||
%defattr(-,root,root)
|
||||
%{basedir}/library/vendor/Zend
|
||||
|
||||
%changelog
|
||||
* Tue Aug 18 2020 Johannes Meyer <johannes.meyer@icinga.com> 2.8.2-1
|
||||
- Update to 2.8.2
|
||||
|
||||
* Mon Jun 29 2020 Johannes Meyer <johannes.meyer@icinga.com> 2.8.1-1
|
||||
- Update to 2.8.1
|
||||
|
||||
* Mon Jun 8 2020 Johannes Meyer <johannes.meyer@icinga.com> 2.8.0-1
|
||||
- Update to 2.8.0
|
||||
- Add new requirement for package icinga-l10n
|
||||
- [EPEL 7] We now require PHP 7.3 instead of PHP 7.1
|
||||
- Please check uprading docs at /usr/share/icingaweb2/doc/80-Upgrading.md
|
||||
|
||||
* Fri Oct 18 2019 Johannes Meyer <johannes.meyer@icinga.com> 2.7.3-1
|
||||
- Update to 2.7.3
|
||||
|
||||
* Wed Oct 16 2019 Johannes Meyer <johannes.meyer@icinga.com> 2.7.2-1
|
||||
- Update to 2.7.2
|
||||
|
||||
* Wed Aug 14 2019 Johannes Meyer <johannes.meyer@icinga.com> 2.7.1-1
|
||||
- Update to 2.7.1
|
||||
|
||||
* Tue Jul 30 2019 Johannes Meyer <johannes.meyer@icinga.com> 2.7.0-1
|
||||
- Update to 2.7.0
|
||||
|
||||
* Wed Apr 24 2019 Johannes Meyer <johannes.meyer@icinga.com> 2.6.3-1
|
||||
- Update to 2.6.3
|
||||
|
||||
* Wed Nov 21 2018 Eric Lippmann <eric.lippmann@icinga.com> 2.6.2-1
|
||||
- Update to 2.6.2
|
||||
|
||||
* Thu Aug 02 2018 Eric Lippmann <eric.lippmann@icinga.com> 2.6.1-1
|
||||
- Update to 2.6.1
|
||||
|
||||
* Thu Jul 19 2018 Blerim Sheqa <blerim.sheqa@icinga.com> 2.6.0-1
|
||||
- Update to 2.6.0
|
||||
|
||||
* Fri Apr 27 2018 Eric Lippmann <eric.lippmann@icinga.com> 2.5.3-1
|
||||
- Update to 2.5.3
|
||||
|
||||
* Thu Apr 26 2018 Eric Lippmann <eric.lippmann@icinga.com> 2.5.2-1
|
||||
- Update to 2.5.2
|
||||
|
||||
* Mon Jan 22 2018 Markus Frosch <markus.frosch@icinga.com> 2.5.1-1
|
||||
- Update to 2.5.1
|
||||
- Remove FPM patches
|
||||
|
||||
* Wed Nov 29 2017 Eric Lippmann <eric.lippmann@icinga.com> 2.5.0-2
|
||||
- FPM: Add patch to support both Apache >= 2.4 and Apache < 2.4
|
||||
|
||||
* Tue Nov 28 2017 Eric Lippmann <eric.lippmann@icinga.com> 2.5.0-1
|
||||
- Install error_unavailable.html
|
||||
- Add patch to fix Apache FPM config
|
||||
|
||||
* Mon Nov 27 2017 Markus Frosch <markus.frosch@icinga.com> 2.5.0-1
|
||||
- Update to 2.5.0
|
||||
- All packages now require PHP >= 5.6
|
||||
- [EPEL 6 + 7] We now require PHP 7 from SCL packages, php-fpm as runtime engine
|
||||
- [SUSE / openSUSE] Requirements will force the installation of php7
|
||||
- Please check upgrading docs at /usr/share/icingaweb2/doc/80-Upgrading.md
|
||||
|
||||
* Thu Sep 28 2017 Markus Frosch <markus.frosch@icinga.com> 2.4.2-1
|
||||
- Update to 2.4.2
|
||||
|
||||
Reference in New Issue
Block a user