From 431da088c6d63b04048ac405df7297839706b180 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 20 2020 10:47:22 +0000 Subject: import insights-client-3.0.13-1.el7 --- diff --git a/.gitignore b/.gitignore index 8d4b341..aa025ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/insights-client-3.0.6.tar.gz +SOURCES/insights-client-3.0.13.tar.gz diff --git a/.insights-client.metadata b/.insights-client.metadata index 1d1539c..e9e4062 100644 --- a/.insights-client.metadata +++ b/.insights-client.metadata @@ -1 +1 @@ -9f57aabd4bd09f2ef6ba92c239442979267bd398 SOURCES/insights-client-3.0.6.tar.gz +a53e86512ca84f3b36f77bc2605135ed5ef78b89 SOURCES/insights-client-3.0.13.tar.gz diff --git a/SPECS/insights-client.spec b/SPECS/insights-client.spec index 0edacc8..43c541e 100644 --- a/SPECS/insights-client.spec +++ b/SPECS/insights-client.spec @@ -1,9 +1,12 @@ +%if 0%{?rhel} != 8 +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%endif %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.6 -Release: 2%{?dist} +Version: 3.0.13 +Release: 1%{?dist} Source0: https://github.com/redhatinsights/insights-client/archive/insights-client-%{version}.tar.gz Epoch: 0 License: GPLv2+ @@ -28,10 +31,10 @@ BuildArch: noarch Requires: platform-python-setuptools Requires: python3-requests >= 2.6 Requires: python3-PyYAML -Requires: python3-pyOpenSSL Requires: python3-magic Requires: python3-six BuildRequires: python3-devel +BuildRequires: python3-six BuildRequires: python3-setuptools # RHEL 6-7 @@ -40,11 +43,11 @@ Requires: python Requires: python-setuptools Requires: python-requests >= 2.6 Requires: PyYAML -Requires: pyOpenSSL Requires: libcgroup Requires: python-magic Requires: python-six >= 1.9.0 BuildRequires: python2-devel +BuildRequires: python-six BuildRequires: python-setuptools %endif @@ -68,11 +71,10 @@ rm -rf ${RPM_BUILD_ROOT} %if 0%{?rhel} == 8 %{__python3} setup.py install --root=${RPM_BUILD_ROOT} $PREFIX pathfix.py -pni "%{__python3}" %{buildroot}%{python3_sitelib}/insights_client/{__init__.py,major_version.py,run.py} -pathfix.py -pni "%{__python3}" %{buildroot}%{_bindir}/insights-client-run pathfix.py -pni "%{__python3}" %{buildroot}%{_bindir}/insights-client pathfix.py -pni "%{__python3}" %{buildroot}%{_bindir}/redhat-access-insights %else -%{__python2} setup.py install --root=${RPM_BUILD_ROOT} $PREFIX +%{__python} setup.py install --root=${RPM_BUILD_ROOT} $PREFIX %endif %post @@ -127,14 +129,26 @@ fi # if the logging directory isnt created then make it if ! [ -d "/var/log/insights-client" ]; then -mkdir -m 640 /var/log/insights-client +mkdir -m 750 /var/log/insights-client fi # if the library directory for eggs and such isn't present # make it if ! [ -d "/var/lib/insights" ]; then -mkdir -m 644 /var/lib/insights +mkdir -m 755 /var/lib/insights +fi + +%if 0%{?rhel} == 8 +#Link motd into place. Only do so if motd file doesn't exist and insights hasn't been used +if [ ! -e /etc/motd.d/insights-client -a ! -L /etc/motd.d/insights-client ]; then + mkdir -p /etc/motd.d + if [ -e /var/lib/insights/newest.egg ]; then + ln -sn /dev/null /etc/motd.d/insights-client + else + ln -sn /etc/insights-client/insights-client.motd /etc/motd.d/insights-client + fi fi +%endif # always perform legacy symlinks %posttrans @@ -181,6 +195,9 @@ rm -f %{_bindir}/redhat-access-insights rm -rf /etc/redhat-access-insights/ rm -f /etc/cron.daily/redhat-access-insights rm -f /etc/cron.weekly/redhat-access-insights +%if 0%{?rhel} == 8 +rm -f /etc/motd.d/insights-client +%endif fi %clean @@ -192,6 +209,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT /etc/insights-client/.fallback.json /etc/insights-client/.fallback.json.asc /etc/insights-client/.exp.sed +%if 0%{?rhel} == 8 +%config(noreplace) %attr(644,root,root) /etc/insights-client/insights-client.motd +%endif %if 0%{?rhel} != 6 %attr(644,root,root) %{_unitdir}/insights-client.service @@ -203,28 +223,28 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/insights-client %attr(755,root,root) %{_bindir}/redhat-access-insights -%attr(755,root,root) %{_bindir}/insights-client-run %if 0%{?rhel} == 6 %attr(755,root,root) /etc/insights-client/insights-client.cron +%config(noreplace) %attr(644,root,root) /etc/sysconfig/insights-client %endif %attr(644,root,root) /etc/insights-client/rpm.egg %attr(644,root,root) /etc/insights-client/rpm.egg.asc %if 0%{?rhel} == 8 -%attr(755,root,root) %dir %{python3_sitelib}/insights_client*.egg-info +%attr(755,root,root) %{python3_sitelib}/insights_client*.egg-info %attr(644,root,root) %{python3_sitelib}/insights_client*.egg-info/* %attr(644,root,root) %{python3_sitelib}/insights_client/*.py* -%attr(644,root,root) %{python3_sitelib}/insights_client/__pycache__ +%attr(744,root,root) %{python3_sitelib}/insights_client/__pycache__ %else -%attr(755,root,root) %dir %{python2_sitelib}/insights_client*.egg-info -%attr(644,root,root) %{python2_sitelib}/insights_client*.egg-info/* -%attr(644,root,root) %{python2_sitelib}/insights_client/*.py* +%attr(755,root,root) %{python_sitelib}/insights_client*.egg-info +%attr(644,root,root) %{python_sitelib}/insights_client*.egg-info/* +%attr(644,root,root) %{python_sitelib}/insights_client/*.py* %endif -%attr(640,root,root) /var/log/insights-client -%attr(644,root,root) /var/lib/insights +%attr(750,root,root) /var/log/insights-client +%attr(755,root,root) /var/lib/insights %doc %defattr(-, root, root) @@ -232,11 +252,9 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT /usr/share/man/man5/*.5.gz %changelog -* Wed Jul 10 2019 Jeremy Crafts - 3.0.6-0 -- Optimize specfile for RHEL 6, 7, 8 compatibility -- Update service URL -- Remove ACLs and insights user from installation -- Resolves: BZ1730796, BZ1730797, BZ1730798, BZ1730799, BZ1730800, BZ1730801 +* 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