import insights-client-3.0.8-4.el8_1
This commit is contained in:
parent
b7ee3a1798
commit
ede5b9cb66
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/insights-client-3.0.5.tar.gz
|
||||
SOURCES/insights-client-3.0.8.tar.gz
|
||||
|
||||
@ -1 +1 @@
|
||||
dc6211034ac64a7c8aa3413f8f7806f1c412afe9 SOURCES/insights-client-3.0.5.tar.gz
|
||||
ff2ad762a4a7a399223e31020862b199d4e718f3 SOURCES/insights-client-3.0.8.tar.gz
|
||||
|
||||
@ -1,47 +1,59 @@
|
||||
%define _binaries_in_noarch_packages_terminate_build 0
|
||||
|
||||
%global insights_user insights
|
||||
%global insights_group %{insights_user}
|
||||
|
||||
Name: insights-client
|
||||
Summary: Uploads Insights information to Red Hat on a periodic basis
|
||||
Version: 3.0.5
|
||||
Version: 3.0.8
|
||||
Release: 4%{?dist}
|
||||
Source0: https://github.com/redhatinsights/insights-client/archive/insights-client-%{version}.tar.gz
|
||||
Epoch: 0
|
||||
License: GPLv2+
|
||||
URL: http://access.redhat.com/insights
|
||||
URL: http://cloud.redhat.com/insights
|
||||
Group: Applications/System
|
||||
Vendor: Red Hat, Inc.
|
||||
|
||||
Provides: redhat-access-insights = 1.0.13-3
|
||||
Provides: redhat-access-insights = %{version}-%{release}%{?dist}
|
||||
|
||||
Obsoletes: redhat-access-insights <= 1.0.13-2%{?dist}
|
||||
Obsoletes: redhat-access-proactive <= 0.3.3-0%{?dist}
|
||||
Obsoletes: redhat-access-insights
|
||||
Obsoletes: redhat-access-proactive
|
||||
|
||||
# TODO: make specfile dynamic for python 2 or 3
|
||||
Requires: tar
|
||||
Requires: gpg
|
||||
Requires: pciutils
|
||||
BuildArch: noarch
|
||||
|
||||
# RHEL 8
|
||||
%if 0%{?rhel} == 8
|
||||
%{?__python3:Requires: %{__python3}}
|
||||
Requires: platform-python-setuptools
|
||||
Requires: python3-requests >= 2.6
|
||||
Requires: python3-PyYAML
|
||||
Requires: python3-pyOpenSSL
|
||||
Requires: tar
|
||||
Requires: gpg
|
||||
Requires: pciutils
|
||||
Requires: python3-magic
|
||||
Requires: python3-six
|
||||
%if 0%{?rhel} && 0%{?rhel} == 6
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
# RHEL 6-7
|
||||
%else
|
||||
Requires: python
|
||||
Requires: python-setuptools
|
||||
Requires: python-requests >= 2.6
|
||||
Requires: PyYAML
|
||||
Requires: libcgroup
|
||||
Requires: python-magic
|
||||
Requires: python-six >= 1.9.0
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-six
|
||||
BuildRequires: python-setuptools
|
||||
%endif
|
||||
|
||||
# systemd/RHEL 6 deps
|
||||
%if 0%{?rhel} == 6
|
||||
Requires: python-argparse
|
||||
%else
|
||||
%{?systemd_requires}
|
||||
Requires: systemd
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%if 0%{?rhel} != 6
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
|
||||
@ -53,14 +65,15 @@ Sends insightful information to Red Hat for automated analysis
|
||||
|
||||
%install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
%if 0%{?rhel} == 8
|
||||
%{__python3} setup.py install --root=${RPM_BUILD_ROOT} $PREFIX
|
||||
sed -i '1s=^#!/usr/bin/env python\($\|\s\)=#!%{__python3}\1=' \
|
||||
%{buildroot}%{python3_sitelib}/insights_client/{__init__.py,major_version.py,run.py}
|
||||
%pre
|
||||
getent group insights > /dev/null || /usr/sbin/groupadd -r %{insights_group}
|
||||
getent passwd insights > /dev/null || \
|
||||
/usr/sbin/useradd -g insights -r --shell /sbin/nologin %{insights_user} \
|
||||
-c "Red Hat Insights" -d /var/lib/insights
|
||||
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
|
||||
%endif
|
||||
|
||||
%post
|
||||
|
||||
@ -94,13 +107,17 @@ if [ $1 -eq 1 ]; then
|
||||
if [ -f "/etc/redhat-access-insights/.lastupload" ]; then
|
||||
cp /etc/redhat-access-insights/.lastupload /etc/insights-client/.lastupload
|
||||
fi
|
||||
#Migrate remove.conf
|
||||
if [ -f "/etc/redhat-access-insights/remove.conf" ]; then
|
||||
cp /etc/redhat-access-insights/remove.conf /etc/insights-client/remove.conf
|
||||
fi
|
||||
if ! [ -d "/etc/redhat-access-insights" ]; then
|
||||
mkdir /etc/redhat-access-insights
|
||||
fi
|
||||
# Symlink new cron job if the old one exists. Remove the old one
|
||||
if [ -f "/etc/cron.daily/redhat-access-insights" ]; then
|
||||
rm -f /etc/cron.daily/redhat-access-insights
|
||||
%if 0%{?rhel} && 0%{?rhel} == 6
|
||||
%if 0%{?rhel} == 6
|
||||
ln -sf /etc/insights-client/insights-client.cron /etc/cron.daily/insights-client
|
||||
%else
|
||||
%_bindir/systemctl start insights-client.timer
|
||||
@ -110,28 +127,26 @@ fi
|
||||
|
||||
# if the logging directory isnt created then make it
|
||||
if ! [ -d "/var/log/insights-client" ]; then
|
||||
mkdir /var/log/insights-client
|
||||
mkdir -m 640 /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 /var/lib/insights
|
||||
mkdir -m 644 /var/lib/insights
|
||||
fi
|
||||
|
||||
# if ansible is present
|
||||
# make the fact directory AND
|
||||
# the fact file AND
|
||||
if [ -d "/etc/ansible" ]; then
|
||||
if ! [ -d "/etc/ansible/facts.d" ]; then
|
||||
mkdir /etc/ansible/facts.d
|
||||
%if 0%{?rhel} != 6
|
||||
#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
|
||||
fi
|
||||
if [ -d "/etc/ansible/facts.d" ]; then
|
||||
touch /etc/ansible/facts.d/insights.fact
|
||||
touch /etc/ansible/facts.d/insights_machine_id.fact
|
||||
fi
|
||||
|
||||
%endif
|
||||
|
||||
# always perform legacy symlinks
|
||||
%posttrans
|
||||
@ -142,6 +157,10 @@ ln -sf /etc/insights-client/.registered /etc/redhat-access-insights/.registered
|
||||
ln -sf /etc/insights-client/.unregistered /etc/redhat-access-insights/.unregistered
|
||||
ln -sf /etc/insights-client/.lastupload /etc/redhat-access-insights/.lastupload
|
||||
ln -sf /etc/insights-client/machine-id /etc/redhat-access-insights/machine-id
|
||||
# remove all ACLs on upgrade, forever and always
|
||||
setfacl -Rb /var/lib/insights
|
||||
setfacl -Rb /var/log/insights-client
|
||||
setfacl -Rb /etc/insights-client
|
||||
|
||||
%preun
|
||||
%if 0%{?rhel} != 6
|
||||
@ -165,6 +184,7 @@ rm -f /etc/insights-client/rpm.egg
|
||||
rm -f /etc/insights-client/rpm.egg.asc
|
||||
rm -f /etc/insights-client/.insights-core*.etag
|
||||
rm -rf /var/lib/insights
|
||||
# keep these to remove from previous install
|
||||
rm -f /etc/ansible/facts.d/insights.fact
|
||||
rm -f /etc/ansible/facts.d/insights_machine_id.fact
|
||||
# remove symlink to old name on uninstall
|
||||
@ -173,6 +193,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} != 6
|
||||
rm -f /etc/motd.d/insights-client
|
||||
%endif
|
||||
fi
|
||||
|
||||
%clean
|
||||
@ -184,6 +207,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} != 6
|
||||
%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
|
||||
@ -197,17 +223,26 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
|
||||
%attr(755,root,root) %{_bindir}/redhat-access-insights
|
||||
%attr(755,root,root) %{_bindir}/insights-client-run
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} == 6
|
||||
%if 0%{?rhel} == 6
|
||||
%attr(755,root,root) /etc/insights-client/insights-client.cron
|
||||
%endif
|
||||
|
||||
%attr(644,root,root) /etc/insights-client/rpm.egg
|
||||
%attr(644,root,root) /etc/insights-client/rpm.egg.asc
|
||||
|
||||
%attr(755,root,root) %dir %{python3_sitelib}/insights_client*.egg-info
|
||||
%if 0%{?rhel} == 8
|
||||
%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) %{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*
|
||||
%endif
|
||||
|
||||
%attr(640,root,root) /var/log/insights-client
|
||||
%attr(644,root,root) /var/lib/insights
|
||||
|
||||
%doc
|
||||
%defattr(-, root, root)
|
||||
@ -215,6 +250,23 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/man/man5/*.5.gz
|
||||
|
||||
%changelog
|
||||
* Thu Oct 24 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.8-4
|
||||
- Resolves: BZ1760749
|
||||
|
||||
* Thu Sep 26 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.8-2
|
||||
- Resolves: BZ1753991
|
||||
|
||||
* Fri Aug 30 2019 Jeremy Crafts <jcrafts@redhat.com> - 3.0.8-0
|
||||
- Modify MOTD logic and installation
|
||||
|
||||
* Thu Aug 29 2019 Jeremy Crafts <jcrafts@redhat.com> - 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 <jcrafts@redhat.com> - 3.0.5-4
|
||||
- Update core egg with bugfixes
|
||||
- Resolves: BZ1656973
|
||||
|
||||
Loading…
Reference in New Issue
Block a user