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..812e89e --- /dev/null +++ b/SOURCES/0001-fix-remove-PathExists-condition-from-unit.patch @@ -0,0 +1,26 @@ +From 844a3294541fb84bd742826ca8c110c05ad9b4fd 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/SPECS/insights-client.spec b/SPECS/insights-client.spec index 76a7e8c..6762f0c 100644 --- a/SPECS/insights-client.spec +++ b/SPECS/insights-client.spec @@ -3,14 +3,19 @@ Name: insights-client Summary: Uploads Insights information to Red Hat on a periodic basis Version: 3.1.7 -Release: 1%{?dist} +Release: 8%{?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 +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 @@ -22,6 +27,7 @@ Requires: tar Requires: gpg Requires: pciutils +%global __python3 /usr/libexec/platform-python %{?__python3:Requires: %{__python3}} %{?systemd_requires} Requires: python3-requests >= 2.6 @@ -33,6 +39,7 @@ Requires: coreutils BuildRequires: wget BuildRequires: binutils BuildRequires: python3-devel +BuildRequires: platform-python-devel BuildRequires: systemd BuildRequires: pam @@ -45,7 +52,7 @@ Sends insightful information to Red Hat for automated analysis %build -%{configure} PYTHON=%{_libexecdir}/platform-python +%{configure} PYTHON=%{__python3} %{__make} @@ -53,6 +60,10 @@ Sends insightful information to Red Hat for automated analysis %{make_install} %{__install} -D -m 644 %{_builddir}/%{name}-%{version}/data/insights-client.motd %{buildroot}/%{_sysconfdir}/insights-client/insights-client.motd +# 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/ %post %systemd_post %{name}.timer @@ -67,27 +78,18 @@ if [ -d %{_sysconfdir}/motd.d ]; then fi fi -%systemd_post insights-register.path -%systemd_post insights-unregister.path -%systemd_post 80-insights.preset - %preun %systemd_preun %{name}.timer %systemd_preun %{name}.service -%systemd_preun insights-register.path -%systemd_preun insights-unregister.path %systemd_preun %{name}-boot.service %postun %systemd_postun %{name}.timer %systemd_postun %{name}.service -%systemd_postun insights-register.path -%systemd_postun insights-unregister.path %systemd_postun %{name}-boot.service # Clean up files created by insights-client that are unowned by the RPM if [ $1 -eq 0 ]; then - systemctl unmask insights-register.path 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 @@ -97,11 +99,6 @@ if [ $1 -eq 0 ]; then rm -f %{_sysconfdir}/insights-client/.*.etag fi - -%clean -rm -rf %{buildroot} - - %files %config(noreplace) %{_sysconfdir}/insights-client/*.conf %{_sysconfdir}/insights-client/insights-client.motd @@ -115,6 +112,9 @@ rm -rf %{buildroot} %{python3_sitelib}/insights_client/ %{_defaultdocdir}/%{name} %{_presetdir}/*.preset +%attr(700,root,root) %dir %{_localstatedir}/log/insights-client/ +%attr(750,root,root) %dir %{_localstatedir}/cache/insights/ +%attr(750,root,root) %dir %{_localstatedir}/lib/insights/ %doc @@ -124,6 +124,28 @@ rm -rf %{buildroot} %changelog +* Wed Apr 13 2022 Link Dupont 0:3.1.7-8 +- Ensure __python3 macro is globally set to platform-python (RHBZ#2069282) + +* Thu Mar 31 2022 Gael Chamoulaud (Strider) 0:3.1.7-7 +- Add several insights /var directories in %files directives (RHBZ#2070588) + +* Mon Mar 14 2022 Gael Chamoulaud (Strider) 0:3.1.7-6 +- Update patches + +* Wed Feb 16 2022 Gaël Chamoulaud - 3.1.7-5 +- Add DROP-IN-RPM patches_ignore rule for rdopkg + +* Wed Feb 16 2022 Gaël Chamoulaud - 3.1.7-4 +- Restore insights-client-boot.service preun/postun (RHBZ#2055036) + +* Wed Feb 16 2022 Gaël Chamoulaud - 3.1.7-3 +- Remove scriptlets referencing nonexistent files (RHBZ#2055036) + +* Thu Feb 10 2022 Gaël Chamoulaud - 3.1.7-2 +- Rename "http://cloud.redhat.com" to "https://console.redhat.com" (RHBZ#2052875) +- Clean superfluous %clean section - rpmlint error + * Wed Oct 20 2021 Link Dupont - 3.1.7-1 - New upstream version (Resolves RHBZ#2013800) - Disable client metrics collection