Репозиторий Sisyphus
Последнее обновление: 15 декабря 2018 | Пакетов: 18644 | Посещений: 12709753
en ru br
Репозитории ALT

Группа :: Other
Пакет: cve-manager

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define libcontrolppver 0.14
%define cve_group cve
%define import cve-import
%define map cpe-map
%define monitor cve-monitor
%define issues cve-issues
%define fixes cve-fixes
%define download cve-download
%define backup cve-backup
%define common %name-common

Name: cve-manager
Version: 0.18.1
Release: alt1

Summary: CVE-management toolkit
License: GPLv3
Group: Other
Url: https://www.altlinux.org/CVE-Manager

Packager: Alexey Appolonov <alexey at altlinux.org>

# http://git.altlinux.org/people/alexey/packages/?p=cve-manager.git

Source: %name-%version.tar

# For cve-import

BuildRequires: gcc-c++
BuildRequires: libcontrol++-devel >= %libcontrolppver
BuildRequires: libmysqlcppconn-devel
BuildRequires: libxml++2-devel
BuildRequires: libcurl-devel

# For py-modules

Requires: python3
Requires: python3-module-mysql
Requires: python3-module-Levenshtein
Requires: %common
Requires: %import
Requires: %fixes
Requires: %map
Requires: %issues
Requires: %monitor
Requires: %download
Requires: %backup

ExclusiveArch: x86_64

%description
cve-manager is a command line utilities toolkit
used to import various CVE lists (in CSV or XML formats)
into MySQL DB, getting access to and analyse formed CVE DB.

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

# cve-import

%package -n %import
Summary: Data parser and MySQL DB importer
Group: Other

Requires: %common

%description -n %import
cve-import is a command line utility that can import
various CVE lists (in CSV or XML formats) into MySQL DB.

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

# cpe-map

%package -n %map
Summary: CPE list to software packages list mapper
Group: Other

Requires: %common

%description -n %map
%map is a command line utility that can map
CPE list to software packages list.

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

# cve-monitor

%package -n %monitor
Summary: CVE database monitor
Group: Other

Requires: %common

%description -n %monitor
%monitor is a command line utility used to query CVE database.

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

# cve-issues

%package -n %issues
Summary: CVE-issues detector
Group: Other

Requires: %common

%description -n %issues
%issues is a command line utility used to detect CVE-issues.

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

# cve-fixes

%package -n %fixes
Summary: CVE-fixes entries handler
Group: Other

Requires: %common

%description -n %fixes
%fixes is a command line utility used to retrieve CVE-fixes entries
from changelogs of all the packages and push them into the CVE DB.

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

# cve-download

%package -n %download
Summary: CVE-lists and CPE dictionary downloader
Group: Other

Requires: %common

%description -n %download
%download is a command line utility used to download CVE-lists
and CPE dictionary via https.

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

# cve-backup

%package -n %backup
Summary: CVE DB backupper/restorer
Group: Other

Requires: %common

%description -n %backup
%backup is a command line utility 'used to backup/restore CVE DB.

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

# cve-manager-common

%package -n %common
Summary: Common files of the CVE manager
Group: Other

%description -n %common
Common files of the CVE manager such as config file
and common py-module.

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


%prep
%setup

%build
mkdir -p bin/Release
mkdir -p obj/Release
%make_build -C cve-import/ release

%install
mkdir -p %buildroot%_bindir
mkdir -p %buildroot%_defaultdocdir/%name/
mkdir -p %buildroot%_sysconfdir/%name
# Executables
install -m0775 %name %buildroot%_bindir
cp %name-common.py %buildroot%_bindir
install -m0775 cve-import/bin/Release/%import %buildroot%_bindir
install -m0775 %map %buildroot%_bindir
cp %monitor %buildroot%_bindir
install -m0775 %issues %buildroot%_bindir
install -m0775 %fixes %buildroot%_bindir
install -m0775 %download %buildroot%_bindir
install -m0775 %backup %buildroot%_bindir
cp gb-x-parse-vulns-from-changelog %buildroot%_bindir
# Configuration - users should be added to "cve" group to use cve-manager
cp -r samples/* %buildroot%_sysconfdir/%name
chmod 660 %buildroot%_sysconfdir/%name/%name.conf
# Documentation
cp COPYING %buildroot%_defaultdocdir/%name/
cp readme.txt %buildroot%_defaultdocdir/%name/
cp usage.txt %buildroot%_defaultdocdir/%name/%name-usage.txt

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

# Config file and modules that modify CVE DB
# belongs to the group of the cve-manager users

%post -n %common
# Creating group for cve-manager users if it doesn't exists
if ! grep -q %cve_group /etc/group; then
groupadd %cve_group
fi
chgrp cve %_sysconfdir/%name/%name.conf

%post
chgrp cve %_bindir/%name

%post -n %backup
chgrp cve %_bindir/%backup

%post -n %download
chgrp cve %_bindir/%download

%post -n %import
chgrp cve %_bindir/%import

%post -n %fixes
chgrp cve %_bindir/%fixes

%post -n %map
chgrp cve %_bindir/%map

%post -n %issues
chgrp cve %_bindir/%issues

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


%files
%_bindir/%name
%_defaultdocdir/%name/%name-usage.txt

%files -n %import
%_bindir/%import

%files -n %map
%_bindir/%map

%files -n %monitor
%_bindir/%monitor
%config(noreplace) %_sysconfdir/%name/%monitor.conf

%files -n %issues
%_bindir/%issues

%files -n %fixes
%_bindir/%fixes
%_bindir/gb-x-parse-vulns-from-changelog

%files -n %download
%_bindir/%download

%files -n %backup
%_bindir/%backup

%files -n %common
%dir %_sysconfdir/%name/
%config(noreplace) %_sysconfdir/%name/%name.conf
%dir %_defaultdocdir/%name/
%_bindir/%name-common.py

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


%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin