From 7366cc481e6c59b6ef899f0d1d13cba5c4407ed4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Mar 2023 10:27:43 +0000 Subject: [PATCH] import insights-client-3.1.7-12.el9 --- .gitignore | 2 + .insights-client.metadata | 2 + ...emove-PathExists-condition-from-unit.patch | 26 ++ SOURCES/insights-core.egg.asc | 17 + SPECS/insights-client.spec | 310 ++++++++++++++++++ 5 files changed, 357 insertions(+) create mode 100644 .gitignore create mode 100644 .insights-client.metadata create mode 100644 SOURCES/0001-fix-remove-PathExists-condition-from-unit.patch create mode 100644 SOURCES/insights-core.egg.asc create mode 100644 SPECS/insights-client.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc1fd79 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/insights-client-3.1.7.tar.gz +SOURCES/insights-core.egg diff --git a/.insights-client.metadata b/.insights-client.metadata new file mode 100644 index 0000000..acd34cb --- /dev/null +++ b/.insights-client.metadata @@ -0,0 +1,2 @@ +0862807b4cb4e8bcbb6bad73e4d689da8f320bf8 SOURCES/insights-client-3.1.7.tar.gz +6113b8e15d58f13779a85f1e53773da28ec63ca7 SOURCES/insights-core.egg diff --git a/SOURCES/0001-fix-remove-PathExists-condition-from-unit.patch b/SOURCES/0001-fix-remove-PathExists-condition-from-unit.patch new file mode 100644 index 0000000..e291cf0 --- /dev/null +++ b/SOURCES/0001-fix-remove-PathExists-condition-from-unit.patch @@ -0,0 +1,26 @@ +From 7caac84ed4119ff6013585d187720dff3fdd73fe Mon Sep 17 00:00:00 2001 +From: Link Dupont +Date: Mon, 31 Jan 2022 10:53:04 -0500 +Subject: [PATCH] fix: remove PathExists condition from unit + +The PathExists= directive in the Path section of the +insights-client-results.path unit is unnecessary. + +Fixes: RHBZ#2022191 +(cherry picked from commit ec3502eaef144838bec85dfed497de7a404a66bf) +--- + data/systemd/insights-client-results.path.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/data/systemd/insights-client-results.path.in b/data/systemd/insights-client-results.path.in +index be53998..928296b 100644 +--- a/data/systemd/insights-client-results.path.in ++++ b/data/systemd/insights-client-results.path.in +@@ -13,7 +13,6 @@ Documentation=man:insights-client(8) + PartOf=insights-client.timer + + [Path] +-PathExists=@pkgsysconfdir@/.lastupload + PathModified=@pkgsysconfdir@/.lastupload + + [Install] diff --git a/SOURCES/insights-core.egg.asc b/SOURCES/insights-core.egg.asc new file mode 100644 index 0000000..65a9038 --- /dev/null +++ b/SOURCES/insights-core.egg.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIVAwUAY2PHlnUU932DZrDZAQipRg//erkkOLyV++i0nhK+AqOdvYNLzjPIGSas +p33F0n5nRYjE/pP/a5bOSrlIDqhx5W0L3obAxQqJ1WNfsTpi0e/ixKJFcM+vSDQC +xzMNoHmyaE+/SqaOgzaSciHPfFme+m30G2VaUV+tKK7/GSiqbsdYpQGTV+fEC3Kp +2kmB6udN2K7BK54yHEYPdaOoB1zkBDklwi/hgdKILMZ8Zyjrihj3ExUIz5prZBTy +XoYYFq+u+TJn7Abhb1xDneMqr2Aba42DfFahL4Jqek6cBPG58m1CVZ9tp7ajof53 +dTFimJVzTEVCVYY8D6grV0KosTDLYR/A8vRo/dtYf/F6SqoBA26c77p19oBaXG1O +OTS+36t+FHxvKNY0JYcpD9TwNxGk5VSqjJVxF0pFqHZfsX8ZxiT4oGdp4l10pQ1H +zqFNRB9QDMLKN+utK0BmpycVsWvxf0WWTFmtw3ysgsLtA+w9sYaSK21Uprti178o +jQF7KBIxTwFLRvJmxIJ9JaKnKSkOTw2TJw8RF9N4oCf582V7TmFifRVTx+L/SxiJ +tJx5P+aDzTI9HVwNKwiyy2uoXob3amqxs9fedvHhbIUe65ZWA705Tj8p3Y1NvKhE +cYvrkJ/QD+aiZA3XyO5nZcGkqz5TCKRJMR6T5VslZ8nHdR/Nsa7m/m1hoONOos1N +eUib1m4rXag= +=izRE +-----END PGP SIGNATURE----- diff --git a/SPECS/insights-client.spec b/SPECS/insights-client.spec new file mode 100644 index 0000000..f46d807 --- /dev/null +++ b/SPECS/insights-client.spec @@ -0,0 +1,310 @@ +%define _binaries_in_noarch_packages_terminate_build 0 + +Name: insights-client +Summary: Uploads Insights information to Red Hat on a periodic basis +Version: 3.1.7 +Release: 12%{?dist} +Source0: https://github.com/RedHatInsights/insights-client/releases/download/v%{version}/insights-client-%{version}.tar.gz +Source1: https://api.access.redhat.com/r/insights/v1/static/core/insights-core.egg +Source2: https://api.access.redhat.com/r/insights/v1/static/core/insights-core.egg.asc +Epoch: 0 +License: GPLv2+ +URL: https://console.redhat.com/insights +Group: Applications/System +Vendor: Red Hat, Inc. + +# +# patches_ignore=DROP-IN-RPM +# patches_base=3.1.7 +Patch0001: 0001-fix-remove-PathExists-condition-from-unit.patch + +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 + +%global __python3 /usr/libexec/platform-python +%{?__python3:Requires: %{__python3}} +%{?systemd_requires} +Requires: python3-requests >= 2.6 +Requires: python3-PyYAML +Requires: python3-magic +Requires: python3-six +Requires: python3dist(setuptools) +Requires: coreutils +BuildRequires: wget +BuildRequires: binutils +BuildRequires: python3-devel +BuildRequires: platform-python-devel +BuildRequires: systemd +BuildRequires: pam +Requires(post): policycoreutils-python-utils + + +%description +Sends insightful information to Red Hat for automated analysis + +%prep +%autosetup -p1 + + +%build +%{configure} PYTHON=%{__python3} +%{__make} + + +%install +%{make_install} +%{__install} -D -m 644 %{_builddir}/%{name}-%{version}/data/insights-client.motd %{buildroot}/%{_sysconfdir}/insights-client/insights-client.motd +%{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/insights-client/rpm.egg +%{__install} -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/insights-client/rpm.egg.asc + +# Create different insights directories in /var +mkdir -p %{buildroot}%{_localstatedir}/log/insights-client/ +mkdir -p %{buildroot}%{_localstatedir}/lib/insights/ +mkdir -p %{buildroot}%{_localstatedir}/cache/insights/ +mkdir -p %{buildroot}%{_localstatedir}/cache/insights-client/ + +%post +%systemd_post %{name}.timer +%systemd_post %{name}-boot.service +if [ -d %{_sysconfdir}/motd.d ]; then + if [ ! -e %{_sysconfdir}/motd.d/insights-client -a ! -L %{_sysconfdir}/motd.d/insights-client ]; then + if [ -e %{_localstatedir}/lib/insights/newest.egg ]; then + ln -sn /dev/null %{_sysconfdir}/motd.d/insights-client + else + ln -sn %{_sysconfdir}/insights-client/insights-client.motd %{_sysconfdir}/motd.d/insights-client + fi + fi +fi + +semanage permissive --add insights_client_t + +%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 + +if [ $1 -eq 0 ]; then + %{_sbindir}/semanage permissive -d insights_client_t || true +fi + +# 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 %{_sysconfdir}/motd.d/insights-client + rm -rf %{_localstatedir}/lib/insights + rm -rf %{_localstatedir}/log/insights-client + rm -f %{_sysconfdir}/insights-client/.*.etag +fi + + +%clean +rm -rf %{buildroot} + + +%files +%config(noreplace) %{_sysconfdir}/insights-client/*.conf +%{_sysconfdir}/insights-client/insights-client.motd +%{_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 +%{python3_sitelib}/insights_client/ +%{_defaultdocdir}/%{name} +%{_presetdir}/*.preset +%attr(700,root,root) %dir %{_localstatedir}/log/insights-client/ +%attr(700,root,root) %dir %{_localstatedir}/cache/insights-client/ +%attr(750,root,root) %dir %{_localstatedir}/cache/insights/ +%attr(750,root,root) %dir %{_localstatedir}/lib/insights/ + +%doc +%defattr(-, root, root) +%{_mandir}/man8/*.8.gz +%{_mandir}/man5/*.5.gz + + +%changelog +* Thu Nov 10 2022 Alba Hita Catala 0:3.1.7-12 +- Set SELinux policy to permissive for rhcd_t module (RHBZ#2141443) + +* Wed Nov 09 2022 Link Dupont 0:3.1.7-11 +- Include insights-core.egg as RPM source (RHBZ#2141087) + +* Thu Oct 20 2022 Link Dupont 0:3.1.7-10 +- Ensure __python3 macro is globally set to platform-python (RHBZ#2075150) + +* Mon Sep 12 2022 Gael Chamoulaud 3.1.7-9 +- Add /var/cache/insights-client/ directory in files directives (RHBZ#2126105) + +* Fri Apr 08 2022 Gael Chamoulaud 0:3.1.7-8 +- Add several insights /var directories in files directives + +* Mon Mar 14 2022 Gael Chamoulaud (Strider) 0:3.1.7-7 +- Update patches + +* Mon Mar 14 2022 Gaël Chamoulaud - 3.1.7-6 +- Update patches +- Add DROP-IN-RPM patches_ignore rule for rdopkg + +* Wed Feb 16 2022 Gaël Chamoulaud - 3.1.7-5 +- Restore insights-client-boot.service preun/postun (RHBZ#2024836) + +* Wed Feb 02 2022 Gaël Chamoulaud - 3.1.7-4 +- Renaming "cloud.redhat.com" to "console.redhat.com" (RHBZ#2013799) + +* Mon Jan 31 2022 Link Dupont - 3.1.7-3 +- Patch to fix an issue where insights-client continuously launches (RHBZ#2022191) + +* Fri Jan 28 2022 Link Dupont - 3.1.7-2 +- Remove scriptlets referencing nonexistent files (RHBZ#2024836) + +* Wed Oct 20 2021 Link Dupont - 3.1.7-1 +- New upstream release (Resolves RHBZ#2013799) +- Disable client metrics collection +- Create fallback.json dynamically at build time + +* Tue Aug 24 2021 Link Dupont - 3.1.6-1 +- New upstream version + +* Mon Aug 2 2021 Jeremy Crafts - 3.1.5-1 +- New upstream version + +* Thu May 27 2021 Jeremy Crafts - 3.1.4-2 +- Replace platform-python-setuptools dependency with python3dist(setuptools) + +* Mon May 17 2021 Jeremy Crafts - 3.1.4-1 +- New upstream version + +* Tue Apr 20 2021 Jeremy Crafts - 3.1.2-1 +- New upstream version + +* Thu Nov 19 2020 Link Dupont - 3.1.1-1 +- New upstream release (RHBZ#1899590) + +* Thu Aug 20 2020 Link Dupont - 3.1.0-3 +- Backport patch to disable sleeping a systemd unit (RHBZ#1870656) + +* Tue Aug 11 2020 Link Dupont - 3.1.0-2 +- Disable automatic registration of insights-client (RHBZ#1868116) + +* Thu Jul 23 2020 Link Dupont - 3.1.0-1 +- First release with core collection as the default collection medium +- Manpage and configuration updates for core collection parameters (RHCLOUD-4266) + +* Fri Jul 17 2020 Link Dupont - 3.0.15-1 +- Insights is automatically registered when a host is subscribed to RHSM (RHCLOUD-6538) +- Disable results checking by default (RHCLOUD-6204) + +* Thu Jun 11 2020 Link Dupont - 3.0.14-2 +- Backport patch that fixes shellcheck warnings (RHCLOUD-6204) + +* 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 +- Resolves: RHBZ#1753991 + +* Fri Dec 20 2019 Jeremy Crafts - 3.0.12-0 +- Update core egg (3.0.139-1) + +* Wed Dec 11 2019 Jeremy Crafts - 3.0.10-0 +- Update core egg (3.0.137-1) +- Remove insights-client-run entrypoint +- Enable timer persistence +- Fix directory permissions +- Timer/service documentation for overriding parameters +- Resolves: BZ1772027 + +* Thu Sep 26 2019 Jeremy Crafts - 3.0.8-2 +- Resolves: BZ1753991 + +* Fri Aug 30 2019 Jeremy Crafts - 3.0.8-0 +- Modify MOTD logic and installation + +* Thu Aug 29 2019 Jeremy Crafts - 3.0.7-0 +- Update core egg with bugfixes (3.0.121-1) +- Remove unused PyOpenSSL dependency +- Remove ACLs from previous installations +- Update service URL +- Add MOTD information +- Resolves: BZ1740286 + +* Tue Dec 11 2018 Jeremy Crafts - 3.0.5-4 +- Update core egg with bugfixes +- Resolves: BZ1656973 + +* Thu Nov 15 2018 Lumír Balhar - 3.0.5-3 +- Require platform-python-setuptools instead of python3-setuptools +- Resolves: rhbz#1650111 + +* Thu Sep 20 2018 Tomas Orsava - 3.0.5-2 +- Require the Python interpreter directly instead of using the package name +- Related: rhbz#1619153 + +* Wed Aug 8 2018 Jeremy Crafts - 3.0.5-1 +- Python 3 compatibility fixes +- Remove libcgroup dependency +- Resolves: BZ1510990 + +* Tue Aug 7 2018 Jeremy Crafts - 3.0.5-0 +- RHEL 8 build with bugfixes + +* Tue Jun 5 2018 Jeremy Crafts - 3.0.4-0 +- Initial RHEL 8 build + +* 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