Blame SPECS/insights-client.spec

22bcf5
%define _binaries_in_noarch_packages_terminate_build 0
22bcf5
22bcf5
Name:                   insights-client
22bcf5
Summary:                Uploads Insights information to Red Hat on a periodic basis
b2e7fc
Version:                3.1.7
c9096b
Release:                12%{?dist}
d6da65
Source0:                https://github.com/RedHatInsights/insights-client/releases/download/v%{version}/insights-client-%{version}.tar.gz
c9096b
Source1:                https://api.access.redhat.com/r/insights/v1/static/core/insights-core.egg
c9096b
Source2:                https://api.access.redhat.com/r/insights/v1/static/core/insights-core.egg.asc
22bcf5
Epoch:                  0
22bcf5
License:                GPLv2+
849380
URL:                    https://console.redhat.com/insights
22bcf5
Group:                  Applications/System
22bcf5
Vendor:                 Red Hat, Inc.
22bcf5
849380
#
849380
# patches_ignore=DROP-IN-RPM
849380
# patches_base=3.1.7
849380
Patch0001: 0001-fix-remove-PathExists-condition-from-unit.patch
849380
22bcf5
Provides: redhat-access-insights = %{version}-%{release}%{?dist}
22bcf5
5f7cd4
Obsoletes: redhat-access-insights <= 1.0.13-2
5f7cd4
Obsoletes: redhat-access-proactive <= 1.0.13-2
5f7cd4
5f7cd4
BuildArch: noarch
22bcf5
537cad
Requires: tar
537cad
Requires: gpg
537cad
Requires: pciutils
537cad
9e4eb4
%global __python3 /usr/libexec/platform-python
22bcf5
%{?__python3:Requires: %{__python3}}
5f7cd4
%{?systemd_requires}
22bcf5
Requires: python3-requests >= 2.6
22bcf5
Requires: python3-PyYAML
22bcf5
Requires: python3-magic
22bcf5
Requires: python3-six
5f7cd4
Requires: platform-python-setuptools
5f7cd4
Requires: coreutils
5f7cd4
BuildRequires: wget
5f7cd4
BuildRequires: binutils
537cad
BuildRequires: python3-devel
9e4eb4
BuildRequires: platform-python-devel
22bcf5
BuildRequires: systemd
5f7cd4
BuildRequires: pam
6d73d4
Requires(post): policycoreutils-python-utils
5f7cd4
22bcf5
22bcf5
%description
22bcf5
Sends insightful information to Red Hat for automated analysis
22bcf5
22bcf5
%prep
5f7cd4
%autosetup -p1
5f7cd4
5f7cd4
5f7cd4
%build
9e4eb4
%{configure} PYTHON=%{__python3}
5f7cd4
%{__make}
5f7cd4
22bcf5
22bcf5
%install
5f7cd4
%{make_install}
5f7cd4
%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/data/insights-client.motd %{buildroot}/%{_sysconfdir}/insights-client/insights-client.motd
c9096b
%{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/insights-client/rpm.egg
c9096b
%{__install} -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/insights-client/rpm.egg.asc
22bcf5
849380
# Create different insights directories in /var
849380
mkdir -p %{buildroot}%{_localstatedir}/log/insights-client/
849380
mkdir -p %{buildroot}%{_localstatedir}/lib/insights/
849380
mkdir -p %{buildroot}%{_localstatedir}/cache/insights/
c9096b
mkdir -p %{buildroot}%{_localstatedir}/cache/insights-client/
22bcf5
5f7cd4
%post
22bcf5
%systemd_post %{name}.timer
121005
%systemd_post %{name}-boot.service
5f7cd4
if [ -d %{_sysconfdir}/motd.d ]; then
5f7cd4
    if [ ! -e %{_sysconfdir}/motd.d/insights-client -a ! -L %{_sysconfdir}/motd.d/insights-client ]; then
5f7cd4
        if [ -e %{_localstatedir}/lib/insights/newest.egg ]; then
5f7cd4
            ln -sn /dev/null %{_sysconfdir}/motd.d/insights-client
5f7cd4
        else
5f7cd4
            ln -sn %{_sysconfdir}/insights-client/insights-client.motd %{_sysconfdir}/motd.d/insights-client
5f7cd4
        fi
537cad
    fi
22bcf5
fi
22bcf5
c9096b
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
c9096b
    /usr/sbin/semanage permissive --add insights_client_t || true
c9096b
fi
6d73d4
22bcf5
%preun
22bcf5
%systemd_preun %{name}.timer
22bcf5
%systemd_preun %{name}.service
121005
%systemd_preun %{name}-boot.service
22bcf5
22bcf5
%postun
5f7cd4
%systemd_postun %{name}.timer
5f7cd4
%systemd_postun %{name}.service
121005
%systemd_postun %{name}-boot.service
febc21
6d73d4
if [ $1 -eq 0 ]; then
c9096b
    if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
c9096b
        /usr/sbin/semanage permissive --delete insights_client_t || true
c9096b
    fi
6d73d4
fi
6d73d4
5f7cd4
# Clean up files created by insights-client that are unowned by the RPM
5f7cd4
if [ $1 -eq 0 ]; then
5f7cd4
    rm -f %{_sysconfdir}/cron.daily/insights-client
5f7cd4
    rm -f %{_sysconfdir}/ansible/facts.d/insights.fact
5f7cd4
    rm -f %{_sysconfdir}/ansible/facts.d/insights_machine_id.fact
5f7cd4
    rm -f %{_sysconfdir}/motd.d/insights-client
d6da65
    rm -rf %{_localstatedir}/lib/insights
d6da65
    rm -rf %{_localstatedir}/log/insights-client
febc21
    rm -f %{_sysconfdir}/insights-client/.*.etag
22bcf5
fi
22bcf5
22bcf5
%files
5f7cd4
%config(noreplace) %{_sysconfdir}/insights-client/*.conf
5f7cd4
%{_sysconfdir}/insights-client/insights-client.motd
5f7cd4
%{_sysconfdir}/insights-client/.fallback.json*
5f7cd4
%{_sysconfdir}/insights-client/.exp.sed
5f7cd4
%{_sysconfdir}/insights-client/rpm.egg*
5f7cd4
%{_bindir}/*
5f7cd4
%{_unitdir}/*
d6da65
%attr(444,root,root) %{_sysconfdir}/insights-client/*.pem
d6da65
%attr(444,root,root) %{_sysconfdir}/insights-client/redhattools.pub.gpg
5f7cd4
%{python3_sitelib}/insights_client/
5f7cd4
%{_defaultdocdir}/%{name}
121005
%{_presetdir}/*.preset
849380
%attr(700,root,root) %dir %{_localstatedir}/log/insights-client/
c9096b
%attr(700,root,root) %dir %{_localstatedir}/cache/insights-client/
849380
%attr(750,root,root) %dir %{_localstatedir}/cache/insights/
849380
%attr(750,root,root) %dir %{_localstatedir}/lib/insights/
5f7cd4
22bcf5
22bcf5
%doc
22bcf5
%defattr(-, root, root)
5f7cd4
%{_mandir}/man8/*.8.gz
5f7cd4
%{_mandir}/man5/*.5.gz
5f7cd4
22bcf5
22bcf5
%changelog
c9096b
* Mon Jan 30 2023 Link Dupont <link@redhat.com> - 3.1.7-12
c9096b
- Conditionally run semanage only when SELinux is enabled (RHBZ#2150908)
c9096b
c9096b
* Fri Nov 11 2022 Alba Hita Catala <ahitacat@redhat.com> 0:3.1.7-11
c9096b
- Set SELinux policy to permissive for rhcd_t module (RHBZ#2141444)
c9096b
c9096b
* Tue Nov 08 2022 Link Dupont <link@redhat.com> 0:3.1.7-10
c9096b
- Include insights-core.egg as RPM source (RHBZ#2029395)
c9096b
c9096b
* Mon Sep 19 2022 Gael Chamoulaud <gchamoul@redhat.com> 3.1.7-9
c9096b
- Add /var/cache/insights-client/ directory in files directives (RHBZ#2127962)
6d73d4
c431a2
* Wed Apr 13 2022 Link Dupont <link@sub-pop.net> 0:3.1.7-8
c431a2
- Ensure __python3 macro is globally set to platform-python (RHBZ#2069282)
9e4eb4
c431a2
* Thu Mar 31 2022 Gael Chamoulaud (Strider) <gchamoul@redhat.com> 0:3.1.7-7
c431a2
- Add several insights /var directories in %files directives (RHBZ#2070588)
c431a2
c431a2
* Mon Mar 14 2022 Gael Chamoulaud (Strider) <gchamoul@redhat.com> 0:3.1.7-6
c431a2
- Update patches
c431a2
c431a2
* Wed Feb 16 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 3.1.7-5
c431a2
- Add DROP-IN-RPM patches_ignore rule for rdopkg
849380
849380
* Wed Feb 16 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 3.1.7-4
849380
- Restore insights-client-boot.service preun/postun (RHBZ#2055036)
849380
849380
* Wed Feb 16 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 3.1.7-3
849380
- Remove scriptlets referencing nonexistent files (RHBZ#2055036)
849380
849380
* Thu Feb 10 2022 Gaël Chamoulaud <gchamoul@redhat.com> - 3.1.7-2
849380
- Rename "http://cloud.redhat.com" to "https://console.redhat.com" (RHBZ#2052875)
849380
- Clean superfluous %clean section - rpmlint error
849380
b2e7fc
* Wed Oct 20 2021 Link Dupont <link@redhat.com> - 3.1.7-1
849380
- New upstream version (Resolves RHBZ#2013800)
b2e7fc
- Disable client metrics collection
b2e7fc
- Create fallback.json dynamically at build time
b2e7fc
121005
* Fri Jun 25 2021 Jeremy Crafts <jcrafts@redhat.com> - 3.1.5-1
121005
- Fix metrics auth and connection issues (RHBZ#1966761)
121005
- Disallow --offline and --unregister together (RHBZ#1920946)
121005
- Do not modify motd if already set (RHBZ#1945481)
121005
- Enable insights-client-boot service on install (RHBZ#1951750)
121005
febc21
* Tue Apr 20 2021 Jeremy Crafts <jcrafts@redhat.com> - 3.1.2-1
febc21
- New upstream version
febc21
d6da65
* Thu Nov 19 2020 Link Dupont <link@redhat.com> - 3.1.1-1
d6da65
- New upstream release (RHBZ#1899590)
d6da65
5f7cd4
* Thu Aug 20 2020 Link Dupont <link@redhat.com> - 3.1.0-3
5f7cd4
- Backport patch to disable sleeping a systemd unit (RHBZ#1870656)
5f7cd4
5f7cd4
* Tue Aug 11 2020 Link Dupont <link@redhat.com> - 3.1.0-2
5f7cd4
- Disable automatic registration of insights-client (RHBZ#1868116)
5f7cd4
5f7cd4
* Thu Jul 23 2020 Link Dupont <link@redhat.com> - 3.1.0-1
5f7cd4
- First release with core collection as the default collection medium
5f7cd4
- Manpage and configuration updates for core collection parameters (RHCLOUD-4266)
5f7cd4
5f7cd4
* Fri Jul 17 2020 Link Dupont <link@redhat.com> - 3.0.15-1
5f7cd4
- Insights is automatically registered when a host is subscribed to RHSM (RHCLOUD-6538)
5f7cd4
- Disable results checking by default (RHCLOUD-6204)
5f7cd4
5f7cd4
* Thu Jun 11 2020 Link Dupont <link@redhat.com> - 3.0.14-2
5f7cd4
- Backport patch that fixes shellcheck warnings (RHCLOUD-6204)
5f7cd4
5f7cd4
* Wed Apr 29 2020 Link Dupont <link@redhat.com> - 3.0.14-1
5f7cd4
- Removed printing to stdout in cron script (RHBZ#1828778)
5f7cd4
- Add deprecation message when running legacy redhat-access-insights (RHCLOUD-5409)
5f7cd4
- Update systemd timer to use timers.target (RHBZ#1798373)
5f7cd4
- Fix an issue updating motd.d on relevant systems (RHCLOUD-6144)
5f7cd4
- Update shipped core to version 3.0.161 (RHCLOUD-4457)
5f7cd4
- Enable automatic checking for advisor results (RHCLOUD-4558)
5f7cd4
- Ensure dependency on coreutils for timeout (RHCLOUD-5131)
5f7cd4
- Build system converted to autotools (RHCLOUD-4333)
5f7cd4
213fc9
* Tue Feb 11 2020 Link Dupont <link@redhat.com> - 3.0.13-1
d5b3ab
- Resolves: RHBZ#1753991
d5b3ab
d5b3ab
* Fri Dec 20 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.12-0
d5b3ab
- Update core egg (3.0.139-1)
d5b3ab
d5b3ab
* Wed Dec 11 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.10-0
d5b3ab
- Update core egg (3.0.137-1)
d5b3ab
- Remove insights-client-run entrypoint
d5b3ab
- Enable timer persistence
d5b3ab
- Fix directory permissions
d5b3ab
- Timer/service documentation for overriding parameters
d5b3ab
- Resolves: BZ1772027
a1f885
a1f885
* Thu Sep 26 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.8-2
a1f885
- Resolves: BZ1753991
a1f885
537cad
* Fri Aug 30 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.8-0
537cad
- Modify MOTD logic and installation
537cad
537cad
* Thu Aug 29 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.7-0
537cad
- Update core egg with bugfixes (3.0.121-1)
537cad
- Remove unused PyOpenSSL dependency
537cad
- Remove ACLs from previous installations
537cad
- Update service URL
537cad
- Add MOTD information
537cad
- Resolves: BZ1740286
537cad
22bcf5
* Tue Dec 11 2018 Jeremy Crafts <jcrafts@redhat.com> - 3.0.5-4
22bcf5
- Update core egg with bugfixes
22bcf5
- Resolves: BZ1656973
22bcf5
22bcf5
* Thu Nov 15 2018 Lumír Balhar <lbalhar@redhat.com> - 3.0.5-3
22bcf5
- Require platform-python-setuptools instead of python3-setuptools
22bcf5
- Resolves: rhbz#1650111
22bcf5
22bcf5
* Thu Sep 20 2018 Tomas Orsava <torsava@redhat.com> - 3.0.5-2
22bcf5
- Require the Python interpreter directly instead of using the package name
22bcf5
- Related: rhbz#1619153
22bcf5
22bcf5
* Wed Aug 8 2018 Jeremy Crafts <jcrafts@redhat.com> - 3.0.5-1
22bcf5
- Python 3 compatibility fixes
22bcf5
- Remove libcgroup dependency
22bcf5
- Resolves: BZ1510990
22bcf5
 
22bcf5
* Tue Aug 7 2018 Jeremy Crafts <jcrafts@redhat.com> - 3.0.5-0
22bcf5
- RHEL 8 build with bugfixes
22bcf5
22bcf5
* Tue Jun 5 2018 Jeremy Crafts <jcrafts@redhat.com> - 3.0.4-0
22bcf5
- Initial RHEL 8 build
22bcf5
5f7cd4
* Wed Mar 14 2018 Richard Brantley <rbrantle@redhat.com> - 3.0.3-8
5f7cd4
- Resolves: rhbz#1555041
5f7cd4
5f7cd4
* Fri Feb 16 2018 Kyle Lape <klape@redhat.com> - 3.0.3-6
5f7cd4
- Persist systemd timer config between reboots
5f7cd4
5f7cd4
* Wed Feb 7 2018 Kyle Lape <klape@redhat.com> - 3.0.3-2
5f7cd4
- Correct the version strings in Obsoletes and Provides in RPM spec
5f7cd4
22bcf5
* Thu Jan 18 2018 Kyle Lape <klape@redhat.com> - 3.0.3-1
22bcf5
- RHEL 7 RPM now uses systemd service and timer instead of cron
22bcf5
- Addition of IO and CPU cgroup constraints
22bcf5
- Fixed memory cgroup constraint
22bcf5
22bcf5
* Wed Oct 18 2017 Richard Brantley <rbrantle@redhat.com> - 3.0.2-2
22bcf5
- Resolves BZ1498650, BZ1500008, BZ1501545, BZ1501552, BZ1501556, BZ1501561, BZ1501565, BZ1501566
22bcf5
- Fixes version migration logic
22bcf5
- Fixes symlink issues to old binary
22bcf5
- Fixes short ID analysis for images and containers
22bcf5
- Fixes Docker library detection
22bcf5
- Fixes image and container detection
22bcf5
- Fixes registration execution flow
22bcf5
- Fixes --version flag to print to stdout and include additional versioning information
22bcf5
- Includes Insights Core 3.0.3-1
22bcf5
22bcf5
* Wed Oct 4 2017 Richard Brantley <rbrantle@redhat.com> - 3.0.1-5
22bcf5
- Resolves BZ1498581
22bcf5
- Fixes sys.path issues
22bcf5
- Includes Insights Core 3.0.2-6
22bcf5
22bcf5
* Wed Sep 27 2017 Richard Brantley <rbrantle@redhat.com> - 3.0.0-4
22bcf5
- Initial build