Package cve-manager-inner-knowledge: Specfile

%define master_package cve-manager
%define lists_dist     %{_sysconfdir}/%{master_package}
%define miner          %{master_package}-knowledge-miner
%define python3_sp     /usr/lib/python3/site-packages
%define miner_sp       %{python3_sp}/cve_manager_knowledge_miner

Name: %{master_package}-inner-knowledge
Version: 2022.05.10
Release: alt1

Summary: Supplimentary data for cve-manager
License: CC-BY-SA-3.0
Group: Other
Url: https://www.altlinux.org/CVE-Manager

Packager: Alexey Appolonov <alexey@altlinux.org>

# http://git.altlinux.org/people/alexey/packages/?p=%{name}.git
Source: %{name}-%{version}.tar

BuildRequires: rpm-build-python3
Requires: %{master_package} >= 0.67

ExclusiveArch: x86_64

%description
Data used by "cve-manager" to 1) map package names to CPE products (a list of
mapping prescriptions, a list of excluded CPEs and a list of ignored mapping
pairs) and to 2) exclude vulnerabilities that have no real effect in a current
state of specified repositories.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

%package -n %{miner}
Summary: %{master_package} DB client for making specific queries
Group: Other

Requires: python3-module-ax

%description -n %{miner}
%{miner} helps to get various kinds of information from %{master_package} DB
such as used package names, used CPEs, etc.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

%prep
%setup
%build
./publisher -r

%check

%install
mkdir -p \
	%{buildroot}%{lists_dist} \
	%{buildroot}%{_bindir} \
	%{buildroot}%{miner_sp}
install -m0664 *.csv    %{buildroot}%{lists_dist}
install -m0664 *.txt    %{buildroot}%{lists_dist}
install -m0755 %{miner} %{buildroot}%{_bindir}
install -m0750 cve_manager_knowledge_miner/* %{buildroot}%{miner_sp}

%post
# cve group should be created at the post stage of cve-manager installation
chgrp cve %{lists_dist}/*.csv
chgrp cve %{lists_dist}/*.txt

%files
%{lists_dist}/cpe-excluded.csv
%{lists_dist}/cpe-mapping.csv
%{lists_dist}/cpe-mapping-ignore.csv
%{lists_dist}/cpe-relatives.txt
%{lists_dist}/excluded-issues.csv
%{lists_dist}/groups.csv

%files -n %{miner}
%{_bindir}/%{miner}
%{miner_sp}

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

%changelog
* Tue May 10 2022 Alexey Appolonov <alexey@altlinux.org> 2022.05.10-alt1
- Updated list of ignored mapping pairs.

* Wed May 04 2022 Alexey Appolonov <alexey@altlinux.org> 2022.05.04-alt1
- Updated list of ignored mapping pairs;
- A new ability to specify multiple product names of an excluded CPE in
  a single row is used;
- Updated/corrected manual.

* Mon Apr 25 2022 Alexey Appolonov <alexey@altlinux.org> 2022.04.25-alt1
- Updated lists.

* Tue Apr 19 2022 Alexey Appolonov <alexey@altlinux.org> 2022.04.19-alt1
- Updated lists.

* Mon Apr 18 2022 Alexey Appolonov <alexey@altlinux.org> 2022.04.18-alt1
- Updated lists.

* Wed Apr 13 2022 Alexey Appolonov <alexey@altlinux.org> 2022.04.13-alt1
- Updated lists;
- New lists "groups.csv" and "package-aliases.csv" instead of two previously
  existed ("package-groups.csv" and "package-name-special-prefixes.csv").

* Mon Apr 04 2022 Alexey Appolonov <alexey@altlinux.org> 2022.04.04-alt1
- Updated list of ignored mapping pairs.

* Tue Mar 15 2022 Alexey Appolonov <alexey@altlinux.org> 2022.03.14-alt2
- A new ability to detect most common prefixes and suffixes of the product names
  using the "cve-manager-knowledge-miner" utility.

* Mon Mar 14 2022 Alexey Appolonov <alexey@altlinux.org> 2022.03.14-alt1
- Updated lists.

* Wed Mar 09 2022 Alexey Appolonov <alexey@altlinux.org> 2022.03.09-alt1
- A new list that contains CPEs that are related to each other (different names
  of a same product).

* Tue Mar 01 2022 Alexey Appolonov <alexey@altlinux.org> 2022.03.03-alt1
- Updated lists (a new ability to specify branches for ignored matches is used).

* Mon Feb 28 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.28-alt1
- Updated lists.

* Fri Feb 25 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.25-alt2
- Updated list of ignored mapping pairs.

* Fri Feb 25 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.25-alt1
- Updated list of ignored mapping pairs.

* Thu Feb 24 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.24-alt1
- Updated lists.

* Mon Feb 14 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.14-alt1
- Updated list of prescribed mapping pairs.

* Fri Feb 11 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.11-alt1
- Updated lists.

* Mon Feb 07 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.07-alt2
- Updated lists.

* Mon Feb 07 2022 Alexey Appolonov <alexey@altlinux.org> 2022.02.07-alt1
- Updated list of ignored mapping pairs.

* Mon Jan 31 2022 Alexey Appolonov <alexey@altlinux.org> 2022.01.31-alt1
- Updated list of ignored mapping pairs.

* Tue Jan 25 2022 Alexey Appolonov <alexey@altlinux.org> 2022.01.25-alt1
- Updated lists.

* Mon Jan 24 2022 Alexey Appolonov <alexey@altlinux.org> 2022.01.24-alt1
- Updated lists.

* Mon Jan 17 2022 Alexey Appolonov <alexey@altlinux.org> 2022.01.17-alt1
- Updated list of ignored mapping pairs.

* Thu Dec 23 2021 Alexey Appolonov <alexey@altlinux.org> 2021.12.23-alt1
- Updated list of ignored mapping pairs.

* Mon Dec 20 2021 Alexey Appolonov <alexey@altlinux.org> 2021.12.20-alt1
- Updated lists.

* Mon Dec 06 2021 Alexey Appolonov <alexey@altlinux.org> 2021.12.06-alt1
- Updated lists;
- Enhanced cve-manager-knowledge-miner utility.

* Mon Nov 29 2021 Alexey Appolonov <alexey@altlinux.org> 2021.11.29-alt1
- Updated lists.

* Wed Nov 10 2021 Alexey Appolonov <alexey@altlinux.org> 2021.11.10-alt1
- A new list that contains special prefixes used in package names (these
  prefixes are used to improve the mapping results and were previously
  hard-coded into cve-manager).

* Tue Nov 09 2021 Alexey Appolonov <alexey@altlinux.org> 2021.11.09-alt1
- Updated lists.

* Mon Nov 08 2021 Alexey Appolonov <alexey@altlinux.org> 2021.11.08-alt1
- Updated lists.

* Mon Oct 25 2021 Alexey Appolonov <alexey@altlinux.org> 2021.10.25-alt1
- Updated lists.

* Mon Oct 11 2021 Alexey Appolonov <alexey@altlinux.org> 2021.10.12-alt1
- Updated lists;
- Ability to use package groups when editing the list of ignored issues.

* Mon Oct 11 2021 Alexey Appolonov <alexey@altlinux.org> 2021.10.04-alt2
- Enhanced cve-manager-knowledge-miner utility.

* Mon Oct 04 2021 Alexey Appolonov <alexey@altlinux.org> 2021.10.04-alt1
- Updated list of ignored mapping pairs.

* Thu Sep 30 2021 Alexey Appolonov <alexey@altlinux.org> 2021.09.30-alt1
- Updated lists;
- A new utility called "publisher" (which replaced the "checker" utility) that
  uses a list of package groups to avoid redundant entries for packages
  of a same group.

* Mon Sep 20 2021 Alexey Appolonov <alexey@altlinux.org> 2021.09.20-alt1
- First use of a new ability to specify package URLs in the list of ignored
  mapping pairs.

* Fri Sep 17 2021 Alexey Appolonov <alexey@altlinux.org> 2021.09.17-alt1
- Updated lists.

* Tue Sep 14 2021 Alexey Appolonov <alexey@altlinux.org> 2021.09.14-alt1
- Updated list of ignored mapping pairs.

* Mon Sep 13 2021 Alexey Appolonov <alexey@altlinux.org> 2021.09.13-alt1
- Updated list of ignored mapping pairs.

* Wed Sep 08 2021 Alexey Appolonov <alexey@altlinux.org> 2021.09.08-alt1
- Updated list of ignored mapping pairs.

* Wed Aug 18 2021 Alexey Appolonov <alexey@altlinux.org> 2021.08.18-alt1
- Improved cve-manager-knowledge-miner utility;
- Enhanced checker utility;
- Updated lists.

* Mon Aug 16 2021 Alexey Appolonov <alexey@altlinux.org> 2021.08.16-alt1
- Updated lists.

* Mon Aug 09 2021 Alexey Appolonov <alexey@altlinux.org> 2021.08.09-alt1
- Updated list of ignored mapping pairs.

* Mon Aug 02 2021 Alexey Appolonov <alexey@altlinux.org> 2021.08.02-alt1
- Updated list of ignored mapping pairs.

* Mon Jul 26 2021 Alexey Appolonov <alexey@altlinux.org> 2021.07.26-alt1
- Updated list of ignored mapping pairs.

* Mon Jul 19 2021 Alexey Appolonov <alexey@altlinux.org> 2021.07.19-alt1
- Updated lists.

* Tue Jul 06 2021 Alexey Appolonov <alexey@altlinux.org> 2021.07.06-alt1
- Prescribed mapping of the "jetty" package.

* Mon Jul 05 2021 Alexey Appolonov <alexey@altlinux.org> 2021.07.05-alt1
- Updated lists.

* Mon Jun 28 2021 Alexey Appolonov <alexey@altlinux.org> 2021.06.28-alt1
- Updated lists.

* Mon Jun 21 2021 Alexey Appolonov <alexey@altlinux.org> 2021.06.21-alt1
- Updated lists.

* Mon Jun 14 2021 Alexey Appolonov <alexey@altlinux.org> 2021.06.14-alt1
- Updated list of ignored mapping pairs.

* Mon Jun 07 2021 Alexey Appolonov <alexey@altlinux.org> 2021.06.07-alt1
- Updated list of ignored mapping pairs.

* Mon May 31 2021 Alexey Appolonov <alexey@altlinux.org> 2021.05.31-alt1
- Updated lists.

* Wed May 26 2021 Alexey Appolonov <alexey@altlinux.org> 2021.05.24-alt2
- A "compressed" form of records of the "excluded-issues.csv" file is used.

* Mon May 24 2021 Alexey Appolonov <alexey@altlinux.org> 2021.05.24-alt1
- Updated lists.

* Sat May 15 2021 Alexey Appolonov <alexey@altlinux.org> 2021.05.15-alt1
- Updated lists.

* Tue May 11 2021 Alexey Appolonov <alexey@altlinux.org> 2021.04.26-alt2
- Fixed "cve-manager-knowledge-miner" utility;
- Build update according with a latest modification of the build system.

* Mon Apr 26 2021 Alexey Appolonov <alexey@altlinux.org> 2021.04.26-alt1
- Updated lists.

* Mon Apr 19 2021 Alexey Appolonov <alexey@altlinux.org> 2021.04.19-alt1
- Updated lists.

* Thu Apr 15 2021 Alexey Appolonov <alexey@altlinux.org> 2021.04.15-alt1
- Updated lists.

* Mon Apr 12 2021 Alexey Appolonov <alexey@altlinux.org> 2021.04.12-alt1
- Updated lists.

* Wed Apr 07 2021 Alexey Appolonov <alexey@altlinux.org> 2021.04.07-alt1
- Updated list of ignored mapping pairs.

* Mon Mar 29 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.29-alt1
- Updated lists.

* Sat Mar 27 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.27-alt1
- Updated lists;
- Corrected script that validates the lists.

* Mon Mar 22 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.22-alt1
- Updated list of ignored mapping pairs.

* Thu Mar 18 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.18-alt1
- Updated lists.

* Mon Mar 15 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.15-alt1
- Updated list of of prescribed mapping pairs.

* Tue Mar 09 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.09-alt1
- Updated lists.

* Sun Mar 07 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.07-alt1
- Updated lists.

* Mon Mar 01 2021 Alexey Appolonov <alexey@altlinux.org> 2021.03.01-alt1
- Updated list of ignored mapping pairs.

* Mon Feb 22 2021 Alexey Appolonov <alexey@altlinux.org> 2021.02.22-alt1
- Updated list of ignored mapping pairs.

* Mon Feb 15 2021 Alexey Appolonov <alexey@altlinux.org> 2021.02.15-alt1
- Updated list of ignored mapping pairs.

* Tue Feb 09 2021 Alexey Appolonov <alexey@altlinux.org> 2021.02.09-alt1
- Updated list of ignored mapping pairs.

* Mon Jan 25 2021 Alexey Appolonov <alexey@altlinux.org> 2021.01.25-alt1
- Updated lists.

* Mon Jan 11 2021 Alexey Appolonov <alexey@altlinux.org> 2021.01.11-alt1
- Updated list of ignored mapping pairs.

* Wed Dec 09 2020 Alexey Appolonov <alexey@altlinux.org> 2020.12.09-alt1
- Updated lists.

* Mon Nov 16 2020 Alexey Appolonov <alexey@altlinux.org> 2020.11.16-alt1
- Updated lists.

* Wed Nov 11 2020 Alexey Appolonov <alexey@altlinux.org> 2020.11.11-alt1
- Updated lists.

* Fri Oct 16 2020 Alexey Appolonov <alexey@altlinux.org> 2020.10.16-alt1
- Updated lists.

* Sun Oct 11 2020 Alexey Appolonov <alexey@altlinux.org> 2020.10.11-alt1
- Updated lists.

* Mon Oct 05 2020 Alexey Appolonov <alexey@altlinux.org> 2020.10.05-alt1
- Updated lists.

* Mon Sep 14 2020 Alexey Appolonov <alexey@altlinux.org> 2020.09.14-alt1
- Updated list of ignored mapping pairs.

* Mon Sep 07 2020 Alexey Appolonov <alexey@altlinux.org> 2020.09.07-alt1
- Updated list of ignored mapping pairs.

* Fri Aug 28 2020 Alexey Appolonov <alexey@altlinux.org> 2020.08.28-alt1
- Updated lists.

* Wed Aug 26 2020 Alexey Appolonov <alexey@altlinux.org> 2020.08.26-alt1
- Updated lists.

* Tue Aug 25 2020 Alexey Appolonov <alexey@altlinux.org> 2020.08.25-alt1
- Updated lists.

* Fri Aug 21 2020 Alexey Appolonov <alexey@altlinux.org> 2020.08.21-alt1
- Updated lists.

* Mon Aug 17 2020 Alexey Appolonov <alexey@altlinux.org> 2020.08.17-alt1
- Updated list of ignored mapping pairs.

* Fri Aug 14 2020 Alexey Appolonov <alexey@altlinux.org> 2020.08.14-alt1
- Updated list of of prescribed mapping pairs.

* Thu Apr 30 2020 Alexey Appolonov <alexey@altlinux.org> 2020.04.30-alt1
- Updated list of excluded CPEs.

* Sun Apr 19 2020 Alexey Appolonov <alexey@altlinux.org> 2020.04.19-alt1
- Updated list of ignored mapping pairs.

* Mon Apr 13 2020 Alexey Appolonov <alexey@altlinux.org> 2020.04.13-alt1
- Updated lists.

* Wed Feb 19 2020 Alexey Appolonov <alexey@altlinux.org> 2020.02.19-alt1
- A tool for mining some of the knowledge;
- A new list (the list of excluded CPEs);
- Updated list of ignored mapping pairs and updated list of prescribed
  mapping pairs.

* Thu Feb 13 2020 Alexey Appolonov <alexey@altlinux.org> 2020.02.13-alt1
- Updated lists.

* Sun Feb 02 2020 Alexey Appolonov <alexey@altlinux.org> 2020.02.02-alt1
- Updated lists.

* Tue Dec 24 2019 Alexey Appolonov <alexey@altlinux.org> 2019.12.04-alt2
- Column for the comments has been added to excluded-issues.csv.

* Wed Dec 04 2019 Alexey Appolonov <alexey@altlinux.org> 2019.12.04-alt1
- New type of inner knowledge - discarded matches (matches that should not
  be saved in cve-manager DB).

* Mon Nov 25 2019 Alexey Appolonov <alexey@altlinux.org> 2019.11.23-alt2
- cve-manager users are privileged to modify the lists.

* Sat Nov 23 2019 Alexey Appolonov <alexey@altlinux.org> 2019.11.23-alt1
- Initial release.