update to 1.2.3 [release 1.2.3-1mamba;Mon Dec 27 2021]
This commit is contained in:
parent
1f12a41f4e
commit
b56859daea
109
mon.spec
109
mon.spec
@ -1,15 +1,15 @@
|
||||
%define moncgi_version 1.52
|
||||
|
||||
Name: mon
|
||||
Version: 1.2.0
|
||||
Release: 3mamba
|
||||
Version: 1.2.3
|
||||
Release: 1mamba
|
||||
Summary: A scheduler and alert management tool used for monitoring service availability and triggering alerts upon failure detection
|
||||
Group: System/Servers
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://www.kernel.org/pub/software/admin/mon/html/
|
||||
Source0: http://www.giano.lkams.kernel.org/pub/software/admin/mon/mon-%{version}.tar.bz2
|
||||
URL: https://mirrors.edge.kernel.org/pub/software/admin/mon/html/
|
||||
Source0: https://github.com/tj/mon.git/%{version}/mon-%{version}.tar.bz2
|
||||
Source1: mon-initscript
|
||||
Source2: mon-lvs.alert
|
||||
Source3: mon-bring-ha-down.alert
|
||||
@ -22,9 +22,20 @@ Patch0: mon-1.2.0-Makefile.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libtirpc-devel
|
||||
BuildRequires: libperl
|
||||
BuildRequires: perl(SNMP_Session)
|
||||
BuildRequires: perl-Authen-Radius
|
||||
BuildRequires: perl-HTML-Parser
|
||||
BuildRequires: perl-HTTP-Cookies
|
||||
BuildRequires: perl-HTTP-Message
|
||||
BuildRequires: perl-Net-SSLeay
|
||||
BuildRequires: perl-Net-Telnet
|
||||
BuildRequires: perl-NetSNMP
|
||||
BuildRequires: perl-ParallelUserAgent
|
||||
BuildRequires: perl-URI
|
||||
BuildRequires: perl-devel
|
||||
BuildRequires: perl-libwww
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
mon is a general-purpose scheduler and alert management tool used for monitoring service availability and triggering alerts upon failure detection.
|
||||
@ -35,32 +46,29 @@ Monitors and alerts are not a part of the core mon server, even though the distr
|
||||
This means that if a new service needs monitoring, or if a new alert is necessary, the mon server does not need to be changed.
|
||||
This makes mon easily extensible.
|
||||
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
## fix an incorrect autodiscovered -Dopt dependency
|
||||
#%define __perl_requires %{_builddir}/%{name}-%{version}/perl_requires.sh
|
||||
#cat > perl_requires.sh << _EOF
|
||||
##! /bin/sh
|
||||
#%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} | grep -v "\-Dopt"
|
||||
#_EOF
|
||||
#chmod +x perl_requires.sh
|
||||
#%patch0 -p1
|
||||
|
||||
%build
|
||||
%make -C mon.d LDLIBS="-ltirpc"
|
||||
%make
|
||||
|
||||
#-C mon.d LDLIBS="-ltirpc"
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||
|
||||
make -C mon.d install MONPATH=%{buildroot}%{_libdir}/mon
|
||||
make install DESTDIR=%{buildroot}
|
||||
#make -C mon.d install MONPATH=%{buildroot}%{_libdir}/mon
|
||||
#make install DESTDIR=%{buildroot}
|
||||
install -D -m0755 mon %{buildroot}%{_bindir}/mon
|
||||
|
||||
install -m 755 %{S:1} %{buildroot}%{_initrddir}/mon
|
||||
install -m 755 %{S:2} %{buildroot}%{_libdir}/mon/alert.d/lvs.alert
|
||||
install -m 755 %{S:3} %{buildroot}%{_libdir}/mon/alert.d/bring-ha-down.alert
|
||||
install -m 755 %{S:4} %{buildroot}%{_libdir}/mon/mon.d/squid.monitor
|
||||
install -m 755 %{S:8} %{buildroot}%{_libdir}/mon/alert.d/bring-ha-up.alert
|
||||
#install -m 755 %{S:1} %{buildroot}%{_initrddir}/mon
|
||||
install -D -m0644 %{S:2} %{buildroot}%{_prefix}/lib/mon/alert.d/lvs.alert
|
||||
install -D -m0644 %{S:3} %{buildroot}%{_prefix}/lib/mon/alert.d/bring-ha-down.alert
|
||||
install -D -m0644 %{S:4} %{buildroot}%{_prefix}/lib/mon/mon.d/squid.monitor
|
||||
install -D -m0644 %{S:8} %{buildroot}%{_prefix}/lib/mon/alert.d/bring-ha-up.alert
|
||||
|
||||
#sed -i "s|/usr/lib/sendmail|/usr/sbin/sendmail|" \
|
||||
# %{buildroot}%{_libdir}/mon/alert.d/*
|
||||
@ -70,9 +78,9 @@ install -d %{buildroot}/var/log/mon
|
||||
rm -f %{buildroot}%{_sysconfdir}/mon/S99mon
|
||||
|
||||
# install additional monitors and alerts
|
||||
install -d %{buildroot}%{_libdir}/mon/examples
|
||||
install -d %{buildroot}%{_prefix}/lib/mon/examples
|
||||
|
||||
pushd %{buildroot}%{_libdir}/mon/examples
|
||||
pushd %{buildroot}%{_prefix}/lib/mon/examples
|
||||
tar xzf %{S:5}
|
||||
tar xzf %{S:6}
|
||||
sed -i "s|/usr/local/bin/perl|/usr/bin/perl|" \
|
||||
@ -84,45 +92,28 @@ popd
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
# erase
|
||||
chkconfig mon
|
||||
if [ $? -eq 0 ]; then
|
||||
service mon stop
|
||||
chkconfig --del mon
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 1 ]; then
|
||||
# upgrade
|
||||
chkconfig mon
|
||||
[ $? -eq 0 ] && service mon restart
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir %{_sysconfdir}/mon
|
||||
%config(noreplace) %{_sysconfdir}/mon/*
|
||||
%{_initrddir}/mon
|
||||
%dir %{_libdir}/mon
|
||||
%dir %{_libdir}/mon/mon.d
|
||||
%{_libdir}/mon/mon.d/*
|
||||
%dir %{_libdir}/mon/state.d
|
||||
%{_libdir}/mon/state.d/*
|
||||
%dir %{_libdir}/mon/alert.d
|
||||
%{_libdir}/mon/alert.d/*
|
||||
%{_libdir}/mon/mon
|
||||
%dir %{_libdir}/mon/examples
|
||||
%{_libdir}/mon/examples/*
|
||||
#%dir %{_sysconfdir}/mon
|
||||
#%config(noreplace) %{_sysconfdir}/mon/*
|
||||
%{_bindir}/mon
|
||||
%dir %{_prefix}/lib/mon
|
||||
%dir %{_prefix}/lib/mon/mon.d
|
||||
%{_prefix}/lib/mon/mon.d/*
|
||||
#%dir %{_prefix}/lib/mon/state.d
|
||||
#%{_prefix}/lib/mon/state.d/*
|
||||
%dir %{_prefix}/lib/mon/alert.d
|
||||
%{_prefix}/lib/mon/alert.d/*
|
||||
%dir %{_prefix}/lib/mon/examples
|
||||
%{_prefix}/lib/mon/examples/*
|
||||
%dir /var/log/mon
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/*
|
||||
#%{_mandir}/man1/*
|
||||
#%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Mon Dec 27 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.3-1mamba
|
||||
- update to 1.2.3
|
||||
|
||||
* Mon Nov 19 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.0-3mamba
|
||||
- remove monitor which requires obsoleted module perl-LWP-Parallel-UserAgent
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user