]> granicus.if.org Git - icinga2/blobdiff - icinga2.spec
Cli: Add blacklist/whitelist commands for agent commands
[icinga2] / icinga2.spec
index 09ec10d4ac8ee765437b2cfc3afb73c059e82b37..ba32fa4a5bf57b3c0f795eb3a259fced81ced3c8 100644 (file)
 %endif
 %endif
 
-%{!?__python2: %global __python2 /usr/bin/python2}
-%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-
 %define icinga_user icinga
 %define icinga_group icinga
 %define icingacmd_group icingacmd
 
 Summary: Network monitoring application
 Name: icinga2
-Version: 2.0.2
+Version: 2.1.1
 Release: %{revision}%{?dist}
 License: GPL-2.0+
 Group: Applications/System
 Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
 URL: http://www.icinga.org/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Requires: %{name}-bin = %{version}
+Requires: %{name}-bin = %{version}-%{release}
 
 %description
 Meta package for Icinga 2 Core, DB IDO and Web.
@@ -81,7 +77,6 @@ Meta package for Icinga 2 Core, DB IDO and Web.
 Summary:      Icinga 2 binaries and libraries
 Group:        Applications/System
 
-Requires: python-%{name} = %{version}
 %if "%{_vendor}" == "suse"
 PreReq:        permissions
 Provides:      monitoring_daemon
@@ -107,7 +102,7 @@ BuildRequires: systemd
 Requires: systemd
 %endif
 
-Requires: %{name}-common = %{version}
+Requires: %{name}-common = %{version}-%{release}
 
 %description bin
 Icinga 2 is a general-purpose network monitoring application.
@@ -180,17 +175,6 @@ Icinga 1.x Classic UI Standalone configuration with locations
 for Icinga 2.
 
 
-%package -n python-icinga2
-Summary:      Python module for Icinga 2
-Group:        Application/System
-BuildRequires: python
-BuildRequires: python-devel
-BuildRequires: python-setuptools
-Requires:     python-setuptools
-
-%description -n python-icinga2
-Python module for Icinga 2.
-
 %prep
 %setup -q -n %{name}-%{version}
 
@@ -202,8 +186,8 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
          -DICINGA2_RUNDIR=%{_rundir} \
          -DICINGA2_USER=%{icinga_user} \
          -DICINGA2_GROUP=%{icinga_group} \
-         -DICINGA2_COMMAND_USER=%{icinga_user} \
-         -DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
+         -DICINGA2_COMMAND_GROUP=%{icingacmd_group} \
+         -DICINGA2_UNITY_BUILD=TRUE"
 %if "%{_vendor}" == "redhat"
 %if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5"
 # Boost_VERSION 1.41.0 vs 101400 - disable build tests
@@ -221,7 +205,6 @@ CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost141 \
 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_libdir}/nagios/plugins"
 %else
 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins"
-sed -i "s|@CMAKE_INSTALL_FULL_LIBDIR@|/usr/lib|" etc/icinga/icinga-classic-apache.conf.cmake
 %endif
 
 %if 0%{?use_systemd}
@@ -234,7 +217,6 @@ make %{?_smp_mflags}
 
 
 %install
-[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
 make install \
        DESTDIR="%{buildroot}"
 
@@ -280,6 +262,8 @@ exit 0
 %endif
 %endif
 
+%post common
+/usr/share/icinga2/migrate-hosts
 
 # all restart/feature actions belong to icinga2-bin
 %post bin
@@ -296,7 +280,7 @@ exit 0
 %endif
 
 # initial installation, enable default features
-%{_sbindir}/icinga2-enable-feature checker notification mainlog
+%{_sbindir}/icinga2 feature enable checker notification mainlog
 
 exit 0
 
@@ -312,7 +296,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
        # initial installation, enable default features
-       %{_sbindir}/icinga2-enable-feature checker notification mainlog
+       %{_sbindir}/icinga2 feature enable checker notification mainlog
 fi
 
 exit 0
@@ -384,7 +368,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
        # initial installation, enable ido-mysql feature
-       %{_sbindir}/icinga2-enable-feature ido-mysql
+       %{_sbindir}/icinga2 feature enable ido-mysql
 fi
 
 exit 0
@@ -392,7 +376,7 @@ exit 0
 %postun ido-mysql
 if [ "$1" = "0" ]; then
        # deinstallation of the package - remove feature
-       test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature ido-mysql
+       test -x %{_sbindir}/icinga2 && %{_sbindir}/icinga2 feature disable ido-mysql
 fi
 
 exit 0
@@ -401,7 +385,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
        # initial installation, enable ido-pgsql feature
-       %{_sbindir}/icinga2-enable-feature ido-pgsql
+       %{_sbindir}/icinga2 feature enable ido-pgsql
 fi
 
 exit 0
@@ -409,7 +393,7 @@ exit 0
 %postun ido-pgsql
 if [ "$1" = "0" ]; then
        # deinstallation of the package - remove feature
-       test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature ido-pgsql
+       test -x %{_sbindir}/icinga2 && %{_sbindir}/icinga2 feature disable ido-pgsql
 fi
 
 exit 0
@@ -418,7 +402,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
         # initial installation, enable features
-        %{_sbindir}/icinga2-enable-feature statusdata compatlog command
+        %{_sbindir}/icinga2 feature enable statusdata compatlog command
 fi
 
 exit 0
@@ -426,9 +410,9 @@ exit 0
 %postun classicui-config
 if [ "$1" = "0" ]; then
         # deinstallation of the package - remove feature
-        test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature statusdata
-        test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature compatlog
-        test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature command
+        test -x %{_sbindir}/icinga2 && %{_sbindir}/icinga2 feature disable statusdata
+        test -x %{_sbindir}/icinga2 && %{_sbindir}/icinga2 feature disable compatlog
+        test -x %{_sbindir}/icinga2 && %{_sbindir}/icinga2 feature disable command
 fi
 
 exit 0
@@ -457,36 +441,30 @@ exit 0
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/conf.d/hosts/localhost
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-available
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-enabled
+%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/scripts
+%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/zones.d
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/%{name}.conf
+%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/init.conf
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/constants.conf
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.conf
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/*.conf
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/hosts/*.conf
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/hosts/localhost/*.conf
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/*.conf
+%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/repository.d/*
 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/*
 %config(noreplace) %{_sysconfdir}/%{name}/scripts/*
 %{_sbindir}/%{name}
-%{_bindir}/%{name}-build-ca
-%{_bindir}/%{name}-build-key
-%{_bindir}/%{name}-sign-key
-%{_sbindir}/%{name}-list-objects
-%{_sbindir}/%{name}-enable-feature
-%{_sbindir}/%{name}-disable-feature
 %{_sbindir}/%{name}-prepare-dirs
 %exclude %{_libdir}/%{name}/libdb_ido_mysql*
 %exclude %{_libdir}/%{name}/libdb_ido_pgsql*
 %{_libdir}/%{name}
 %{_datadir}/%{name}
 %exclude %{_datadir}/%{name}/include
+%exclude %{_datadir}/%{name}/migrate-hosts
 %{_mandir}/man8/%{name}.8.gz
-%{_mandir}/man8/%{name}-enable-feature.8.gz
-%{_mandir}/man8/%{name}-disable-feature.8.gz
-%{_mandir}/man8/%{name}-build-ca.8.gz
-%{_mandir}/man8/%{name}-build-key.8.gz
-%{_mandir}/man8/%{name}-sign-key.8.gz
 %{_mandir}/man8/%{name}-prepare-dirs.8.gz
 
 %attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
@@ -503,11 +481,13 @@ exit 0
 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog tools/syntax
 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+%{_sysconfdir}/bash_completion.d/%{name}
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
 %{_datadir}/%{name}/include
+%{_datadir}/%{name}/migrate-hosts
 
 %files doc
 %defattr(-,root,root,-)
@@ -533,8 +513,4 @@ exit 0
 %config(noreplace) %{apacheconfdir}/icinga.conf
 %config(noreplace) %attr(0640,root,%{apachegroup}) %{icingaclassicconfdir}/passwd
 
-%files -n python-icinga2
-%{python2_sitelib}/icinga2*
-
-
 %changelog