Blob Blame History Raw
%define _binaries_in_noarch_packages_terminate_build 0
%global __python /usr/bin/python2

Name:                   insights-client
Summary:                Uploads Insights information to Red Hat on a periodic basis
Version:                3.1.9
Release:                1%{?dist}
Source0:                https://github.com/redhatinsights/insights-client/releases/download/v%{version}/insights-client-%{version}.tar.gz

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}
%{__rm} %{buildroot}%{_sysconfdir}/insights-client/insights-client.motd

%post
%systemd_post %{name}.timer
%systemd_post %{name}-boot.service
%systemd_post 80-insights.preset

%preun
%systemd_preun %{name}.timer
%systemd_preun %{name}.service
%systemd_preun %{name}-boot.service

%postun
%systemd_postun %{name}.timer
%systemd_postun %{name}.service
%systemd_postun %{name}-boot.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 -rf %{_localstatedir}/lib/insights
    rm -rf %{_localstatedir}/log/insights-client
    rm -f %{_sysconfdir}/insights-client/.*.etag
fi


%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(444,root,root) %{_sysconfdir}/insights-client/*.pem
%attr(444,root,root) %{_sysconfdir}/insights-client/redhattools.pub.gpg
%{python_sitelib}/insights_client/
%{_defaultdocdir}/%{name}
%{_presetdir}/*.preset

%doc
%defattr(-, root, root)
%{_mandir}/man8/*.8.gz
%{_mandir}/man5/*.5.gz


%changelog
* Tue Oct 03 2023 Alba Hita Catala <ahitacat@redhat.com> - 0:3.1.9-1
- Update RPM egg to 3.2.15 (RHBZ#2229674)
- Cleaned patches from repo

* Wed Jun 21 2023 Alba Hita Catala <ahitacat@redhat.com> - 0:3.1.8-1
- Update to 3.1.8 (RHBZ#2212325)

* Mon Sep 19 2022 Gael Chamoulaud <gchamoul@redhat.com> 0:3.1.7-2
- fix: remove PathExists condition from unit (RHBZ#2109244)

* Thu Mar 31 2022 Link Dupont <link@sub-pop.net> 0:3.1.7-1
- Update to 3.1.7 (RHBZ#2047819)

* Fri Jun 25 2021 Jeremy Crafts <jcrafts@redhat.com> - 3.1.5-1
- Fix metrics auth and connection issues (RHBZ#1916455)

* Mon Nov 30 2020 Link Dupont <link@redhat.com> - 3.1.1-1
- New upstream release (RHBZ#1899592)

* Thu Aug 20 2020 Link Dupont <link@redhat.com> - 3.0.14-3
- Backport patch to disable sleeping a systemd unit (RHBZ#1870658)

* Wed Apr 29 2020 Link Dupont <link@redhat.com> - 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 <link@redhat.com> - 3.0.13-1
- New upstream version
- Resolves: RHBZ#1795256

* Wed Mar 14 2018 Richard Brantley <rbrantle@redhat.com> - 3.0.3-8
- Resolves: rhbz#1555041

* Fri Feb 16 2018 Kyle Lape <klape@redhat.com> - 3.0.3-6
- Persist systemd timer config between reboots

* Wed Feb 7 2018 Kyle Lape <klape@redhat.com> - 3.0.3-2
- Correct the version strings in Obsoletes and Provides in RPM spec

* Thu Jan 18 2018 Kyle Lape <klape@redhat.com> - 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 <rbrantle@redhat.com> - 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 <rbrantle@redhat.com> - 3.0.1-5
- Resolves BZ1498581
- Fixes sys.path issues
- Includes Insights Core 3.0.2-6

* Wed Sep 27 2017 Richard Brantley <rbrantle@redhat.com> - 3.0.0-4
- Initial build