%define _binaries_in_noarch_packages_terminate_build 0
Name: insights-client
Summary: Uploads Insights information to Red Hat on a periodic basis
Version: 3.0.14
Release: 3%{?dist}
Source0: https://github.com/redhatinsights/insights-client/archive/insights-client-%{version}.tar.gz
Patch0: 0001-systemd-don-t-sleep-when-running-check-results.patch
Epoch: 0
License: GPLv2+
URL: http://cloud.redhat.com/insights
Group: Applications/System
Vendor: Red Hat, Inc.
Provides: redhat-access-insights = %{version}-%{release}%{?dist}
Obsoletes: redhat-access-insights <= 1.0.13-2
Obsoletes: redhat-access-proactive <= 1.0.13-2
BuildArch: noarch
Requires: tar
Requires: gpg
Requires: pciutils
Requires: python
Requires: python-setuptools
Requires: python-requests >= 2.6
Requires: PyYAML
Requires: libcgroup
Requires: python-magic
Requires: python-six >= 1.9.0
Requires: systemd
Requires: coreutils
BuildRequires: python-devel
BuildRequires: systemd
BuildRequires: wget
BuildRequires: binutils
%description
Sends insightful information to Red Hat for automated analysis
%prep
%autosetup -p1
%build
%{configure}
%{__make}
%install
%{make_install}
%{__install} -d -m 755 %{buildroot}/%{_localstatedir}/log/insights-client
%{__install} -d -m 755 %{buildroot}/%{_localstatedir}/lib/insights
%post
%systemd_post %{name}.timer
%preun
%systemd_preun %{name}.timer
%systemd_preun %{name}.service
%postun
%systemd_postun %{name}.timer
%systemd_postun %{name}.service
# Clean up files created by insights-client that are unowned by the RPM
if [ $1 -eq 0 ]; then
rm -f %{_sysconfdir}/cron.daily/insights-client
rm -f %{_sysconfdir}/ansible/facts.d/insights.fact
rm -f %{_sysconfdir}/ansible/facts.d/insights_machine_id.fact
rm -f %{_localstatedir}/lib/insights/*
fi
%clean
rm -rf %{buildroot}
%files
%config(noreplace) %{_sysconfdir}/insights-client/*.conf
%{_sysconfdir}/insights-client/.fallback.json*
%{_sysconfdir}/insights-client/.exp.sed
%{_sysconfdir}/insights-client/rpm.egg*
%{_bindir}/*
%{_unitdir}/*
%attr(440,root,root) %{_sysconfdir}/insights-client/*.pem
%attr(440,root,root) %{_sysconfdir}/insights-client/redhattools.pub.gpg
%{python_sitelib}/insights_client/
%{_localstatedir}/log/insights-client
%{_localstatedir}/lib/insights
%{_defaultdocdir}/%{name}
%doc
%defattr(-, root, root)
%{_mandir}/man8/*.8.gz
%{_mandir}/man5/*.5.gz
%changelog
* Thu Aug 20 2020 Link Dupont - 3.0.14-3
- Backport patch to disable sleeping a systemd unit (RHBZ#1870658)
* Wed Apr 29 2020 Link Dupont - 3.0.14-1
- Removed printing to stdout in cron script (RHBZ#1828778)
- Add deprecation message when running legacy redhat-access-insights (RHCLOUD-5409)
- Update systemd timer to use timers.target (RHBZ#1798373)
- Fix an issue updating motd.d on relevant systems (RHCLOUD-6144)
- Update shipped core to version 3.0.161 (RHCLOUD-4457)
- Enable automatic checking for advisor results (RHCLOUD-4558)
- Ensure dependency on coreutils for timeout (RHCLOUD-5131)
- Build system converted to autotools (RHCLOUD-4333)
* Tue Feb 11 2020 Link Dupont - 3.0.13-1
- New upstream version
- Resolves: RHBZ#1795256
* Wed Mar 14 2018 Richard Brantley - 3.0.3-8
- Resolves: rhbz#1555041
* Fri Feb 16 2018 Kyle Lape - 3.0.3-6
- Persist systemd timer config between reboots
* Wed Feb 7 2018 Kyle Lape - 3.0.3-2
- Correct the version strings in Obsoletes and Provides in RPM spec
* Thu Jan 18 2018 Kyle Lape - 3.0.3-1
- RHEL 7 RPM now uses systemd service and timer instead of cron
- Addition of IO and CPU cgroup constraints
- Fixed memory cgroup constraint
* Wed Oct 18 2017 Richard Brantley - 3.0.2-2
- Resolves BZ1498650, BZ1500008, BZ1501545, BZ1501552, BZ1501556, BZ1501561, BZ1501565, BZ1501566
- Fixes version migration logic
- Fixes symlink issues to old binary
- Fixes short ID analysis for images and containers
- Fixes Docker library detection
- Fixes image and container detection
- Fixes registration execution flow
- Fixes --version flag to print to stdout and include additional versioning information
- Includes Insights Core 3.0.3-1
* Wed Oct 4 2017 Richard Brantley - 3.0.1-5
- Resolves BZ1498581
- Fixes sys.path issues
- Includes Insights Core 3.0.2-6
* Wed Sep 27 2017 Richard Brantley - 3.0.0-4
- Initial build