diff --git a/.gitignore b/.gitignore index 0091478..9f5748a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ /recap-1.2.0.tar.gz /recap-1.3.0.tar.gz /recap-1.4.0.tar.gz +/recap-2.0.0.tar.gz +/recap-2.0.1.tar.gz diff --git a/recap.rpmlintrc b/recap.rpmlintrc new file mode 100644 index 0000000..86e17a6 --- /dev/null +++ b/recap.rpmlintrc @@ -0,0 +1,3 @@ +# intentionally hardcoded per +# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_multilib_exempt_locations +addFilter(r'hardcoded-library-path in %{_prefix}/lib/') diff --git a/recap.spec b/recap.spec index 263d0e5..ebef846 100644 --- a/recap.spec +++ b/recap.spec @@ -1,15 +1,23 @@ +%if %{defined rhel} && 0%{?rhel} <= 7 || %{defined fedora} && 0%{?fedora} < 30 +%bcond_with timers +%else +%bcond_without timers +%endif + Name: recap -Version: 1.4.0 -Release: 2%{?dist} +Version: 2.0.1 +Release: 1%{?dist} Summary: Generates reports of various system information License: GPLv2 URL: https://github.com/rackerlabs/recap Source0: https://github.com/rackerlabs/recap/archive/%{version}/recap-%{version}.tar.gz BuildArch: noarch +%if %{without timers} Requires: crontabs +%endif Requires: iotop Requires: iproute -Requires: links +Requires: elinks %if 0%{?rhel} && 0%{?rhel} < 7 Requires: procps %else @@ -18,6 +26,9 @@ Requires: procps-ng Requires: psmisc Requires: sysstat >= 9 +%if %{with timers} +BuildRequires: systemd +%endif %description This program is intended to be used as a companion for the reporting provided @@ -29,13 +40,17 @@ network connections. %prep %autosetup - %install export PREFIX=%{_prefix} export DESTDIR=%{buildroot} make install-base make install-man + +%if %{with timers} +make install-systemd +%else make install-cron +%endif %posttrans @@ -55,15 +70,50 @@ fi %{_sbindir}/recap %{_sbindir}/recaplog %{_sbindir}/recaptool + +# systemd unit files +%if %{with timers} +%{_unitdir}/recap.service +%{_unitdir}/recaplog.service +%{_unitdir}/recap-onboot.service +%{_unitdir}/recap.timer +%{_unitdir}/recaplog.timer +%{_unitdir}/recap-onboot.timer +%else +# crontab %config(noreplace) %{_sysconfdir}/cron.d/recap +%endif + %config(noreplace) %{_sysconfdir}/recap.conf -%{_mandir}/man5/recap.5.gz +%{_mandir}/man5/recap.conf.5.gz %{_mandir}/man8/recap.8.gz %{_mandir}/man8/recaplog.8.gz %{_mandir}/man8/recaptool.8.gz +# core functions +%{_prefix}/lib/recap/core/fdisk +%{_prefix}/lib/recap/core/mysql +%{_prefix}/lib/recap/core/netstat +%{_prefix}/lib/recap/core/ps +%{_prefix}/lib/recap/core/pstree +%{_prefix}/lib/recap/core/resources +%{_prefix}/lib/recap/core/send_mail + +# plugins +%{_prefix}/lib/recap/plugins-available/docker_top +%{_prefix}/lib/recap/plugins-available/http_status +%{_prefix}/lib/recap/plugins-available/kernel_cmd +%{_prefix}/lib/recap/plugins-available/redis +%dir %{_prefix}/lib/recap/plugins-enabled + %changelog +* Mon Feb 11 2019 Tony Garcia - 2.0.1-1 +- Latest upstream rhbz#1669250 +- Update dependencies +- Rename man page from recap to recap.conf +- Adding systemd timers on fedora + * Sat Feb 02 2019 Fedora Release Engineering - 1.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 2cdd2a0..51fe5ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (recap-1.4.0.tar.gz) = d196ef85064dd0c15e25b873a908e3b13f194e93d42b5d162ca5e510738fc1e35626c0caedb9c569c1e4d70cab381cbfb01129b5f7fbcb776da9bb781867230a +SHA512 (recap-2.0.1.tar.gz) = b09e88ff68bab702ddfed6efcb719dea43320e002504d1502e6da9ad0aa73eb4376eacc9dfb33458e1d8f7d66c08ac8152b1b6c5d2e0526c00ece38dfc15fed9