sos/sos.spec
GuoCe b2f1122598 [ovirt] answer files: Filter out all password keys
Instead of hard-coding specific keys and having to maintain them over
time, replace the values of all keys that have 'password' in their name.
I think this covers all our current and hopefully future keys. It might
add "false positives" - keys that are not passwords but have 'password'
in their name - and I think that's a risk worth taking.

Sadly, the engine admin password prompt's name is
'OVESETUP_CONFIG_ADMIN_SETUP', which does not include 'password', so has
to be listed specifically.

A partial list of keys added since the replaced code was written:
- grafana-related stuff
- keycloak-related stuff
- otopi-style answer files

Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Change-Id: I416c6e4078e7c3638493eb271d08d73a0c22b5ba
2024-05-06 17:17:38 +08:00

68 lines
1.9 KiB
RPMSpec

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: sos
Version: 3.8
Release: 4
Summary: A set of tools to gather troubleshooting information from a system
License: GPLv2+
URL: https://github.com/sosreport/sos
Source0: https://github.com/sosreport/sos/archive/%{version}/%{name}-%{version}.tar.gz
Patch9000: openEuler-add-openEuler-policy.patch
Patch9001: UnionTech-add-UnionTech-policy.patch
Patch9002: backport-ovirt-answer-files-Filter-out-all-password-keys.patch
BuildRequires: python3-devel gettext python3-six
Requires: libxml2-python3 xz python3-rpm tar bzip2 python3-six
BuildArch: noarch
%description
Sos is an extensible, portable, support data collection tool primarily
aimed at Linux distributions and other UNIX-like operating systems.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%py3_build
%install
%py3_install '--install-scripts=%{_sbindir}'
install -Dm644 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf
%find_lang %{name} || echo 0
%files -f %{name}.lang
%{_sbindir}/sosreport
%{python3_sitelib}/*
%license LICENSE
%config(noreplace) %{_sysconfdir}/sos.conf
%files help
%defattr(-,root,root)
%doc AUTHORS README.md
%{_mandir}/man1/*
%{_mandir}/man5/*
%changelog
* Mon May 06 2024 GuoCe <guoce@kylinos.cn> - 3.8-4
- Fix CVE-2022-2806
* Tue Nov 30 2021 shixuantong <shixuantong@huawei.com> - 3.8-3
- fix TypeError: __init__() got an unexpected keyword argument 'init'
* Tue Oct 12 2021 wangqing <wangqing@uniontech.com> - 3.8-2
- fix sosreport exec failed
* Tue Sep 14 2021 baizhonggui <baizhonggui@huawei.com> - 3.8-1
- Update to 3.8
* Tue May 11 2021 shixuantong <shixuantong@huawei.com> - 3.6-6
- add openEuler policy and fix exception in plugin method "yum.collect()"
* Mon Feb 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.6-5
- Package init