| 1 |
# This spec file is not synchronized to the Fedora downstream. |
| 2 |
# It serves as Fedora CI configuration and as support for downstream updates. |
| 3 |
Name: openscap |
| 4 |
Release: 0%{?dist} |
| 5 |
Version: 1.3.0 |
| 6 |
Epoch: 1 |
| 7 |
Summary: Set of open source libraries enabling integration of the SCAP line of standards |
| 8 |
License: LGPLv2+ |
| 9 |
URL: http://www.open-scap.org/ |
| 10 |
Source0: https://github.com/OpenSCAP/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz |
| 11 |
BuildRequires: make |
| 12 |
BuildRequires: cmake >= 2.6 |
| 13 |
BuildRequires: gcc |
| 14 |
BuildRequires: gcc-c++ |
| 15 |
BuildRequires: swig libxml2-devel libxslt-devel perl-generators perl-XML-Parser |
| 16 |
BuildRequires: rpm-devel |
| 17 |
BuildRequires: nss-devel |
| 18 |
BuildRequires: pcre2-devel |
| 19 |
BuildRequires: libacl-devel |
| 20 |
BuildRequires: libselinux-devel |
| 21 |
BuildRequires: libcap-devel |
| 22 |
BuildRequires: libblkid-devel |
| 23 |
BuildRequires: bzip2-devel |
| 24 |
BuildRequires: asciidoc |
| 25 |
BuildRequires: openldap-devel |
| 26 |
BuildRequires: glib2-devel |
| 27 |
BuildRequires: dbus-devel |
| 28 |
BuildRequires: libyaml-devel |
| 29 |
BuildRequires: xmlsec1-devel xmlsec1-openssl-devel |
| 30 |
%if %{?_with_check:1}%{!?_with_check:0} |
| 31 |
BuildRequires: perl-XML-XPath |
| 32 |
BuildRequires: bzip2 |
| 33 |
BuildRequires: python3-dbusmock |
| 34 |
%endif |
| 35 |
Requires: bash |
| 36 |
Requires: bzip2-libs |
| 37 |
Requires: dbus |
| 38 |
Requires: glib2 |
| 39 |
Requires: libacl |
| 40 |
Requires: libblkid |
| 41 |
Requires: libcap |
| 42 |
Requires: libselinux |
| 43 |
Requires: openldap |
| 44 |
Requires: popt |
| 45 |
# Fedora has procps-ng, which provides procps |
| 46 |
Requires: procps |
| 47 |
Requires: xmlsec1 xmlsec1-openssl |
| 48 |
|
| 49 |
%description |
| 50 |
OpenSCAP is a set of open source libraries providing an easier path |
| 51 |
for integration of the SCAP line of standards. SCAP is a line of standards |
| 52 |
managed by NIST with the goal of providing a standard language |
| 53 |
for the expression of Computer Network Defense related information. |
| 54 |
|
| 55 |
%package devel |
| 56 |
Summary: Development files for %{name} |
| 57 |
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} |
| 58 |
Requires: libxml2-devel |
| 59 |
Requires: pkgconfig |
| 60 |
BuildRequires: doxygen |
| 61 |
|
| 62 |
%description devel |
| 63 |
The %{name}-devel package contains libraries and header files for |
| 64 |
developing applications that use %{name}. |
| 65 |
|
| 66 |
%package python3 |
| 67 |
Summary: Python 3 bindings for %{name} |
| 68 |
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} |
| 69 |
BuildRequires: python3-devel |
| 70 |
|
| 71 |
%description python3 |
| 72 |
The %{name}-python3 package contains the bindings so that %{name} |
| 73 |
libraries can be used by python3. |
| 74 |
|
| 75 |
%package scanner |
| 76 |
Summary: OpenSCAP Scanner Tool (oscap) |
| 77 |
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} |
| 78 |
Requires: libcurl >= 7.12.0 |
| 79 |
BuildRequires: libcurl-devel >= 7.12.0 |
| 80 |
|
| 81 |
%description scanner |
| 82 |
The %{name}-scanner package contains oscap command-line tool. The oscap |
| 83 |
is configuration and vulnerability scanner, capable of performing |
| 84 |
compliance checking using SCAP content. |
| 85 |
|
| 86 |
%package utils |
| 87 |
Summary: OpenSCAP Utilities |
| 88 |
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} |
| 89 |
Requires: rpmdevtools rpm-build |
| 90 |
Requires: %{name}-scanner%{?_isa} = %{epoch}:%{version}-%{release} |
| 91 |
|
| 92 |
%description utils |
| 93 |
The %{name}-utils package contains command-line tools build on top |
| 94 |
of OpenSCAP library. Historically, openscap-utils included oscap |
| 95 |
tool which is now separated to %{name}-scanner sub-package. |
| 96 |
|
| 97 |
%package engine-sce |
| 98 |
Summary: Script Check Engine plug-in for OpenSCAP |
| 99 |
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} |
| 100 |
|
| 101 |
%description engine-sce |
| 102 |
The Script Check Engine is non-standard extension to SCAP protocol. This |
| 103 |
engine allows content authors to avoid OVAL language and write their assessment |
| 104 |
commands using a scripting language (Bash, Perl, Python, Ruby, ...). |
| 105 |
|
| 106 |
%package engine-sce-devel |
| 107 |
Summary: Development files for %{name}-engine-sce |
| 108 |
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release} |
| 109 |
Requires: %{name}-engine-sce%{?_isa} = %{epoch}:%{version}-%{release} |
| 110 |
Requires: pkgconfig |
| 111 |
|
| 112 |
%description engine-sce-devel |
| 113 |
The %{name}-engine-sce-devel package contains libraries and header files |
| 114 |
for developing applications that use %{name}-engine-sce. |
| 115 |
|
| 116 |
%package containers |
| 117 |
Summary: Utils for scanning containers |
| 118 |
Requires: %{name} = %{epoch}:%{version}-%{release} |
| 119 |
Requires: %{name}-scanner |
| 120 |
BuildArch: noarch |
| 121 |
|
| 122 |
%description containers |
| 123 |
Tool for scanning Atomic containers. |
| 124 |
|
| 125 |
%prep |
| 126 |
%autosetup -p1 |
| 127 |
|
| 128 |
%build |
| 129 |
%undefine __cmake_in_source_build |
| 130 |
%cmake \ |
| 131 |
-DENABLE_PERL=OFF \ |
| 132 |
-DWITH_CRYPTO=nss \ |
| 133 |
-DENABLE_DOCS=ON |
| 134 |
%cmake_build |
| 135 |
make docs |
| 136 |
|
| 137 |
%check |
| 138 |
%if %{?_with_check:1}%{!?_with_check:0} |
| 139 |
ctest -V %{?_smp_mflags} |
| 140 |
%endif |
| 141 |
|
| 142 |
%install |
| 143 |
%cmake_install |
| 144 |
|
| 145 |
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' |
| 146 |
|
| 147 |
# fix python shebangs |
| 148 |
%if 0%{?rhel} >= 10 || 0%{?fedora} |
| 149 |
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} -p -n $RPM_BUILD_ROOT%{_bindir}/scap-as-rpm |
| 150 |
%else |
| 151 |
pathfix.py -i %{__python3} -p -n $RPM_BUILD_ROOT%{_bindir}/scap-as-rpm |
| 152 |
%endif |
| 153 |
|
| 154 |
%ldconfig_scriptlets |
| 155 |
|
| 156 |
%files |
| 157 |
%doc AUTHORS NEWS README.md |
| 158 |
%license COPYING |
| 159 |
%doc %{_pkgdocdir}/manual/ |
| 160 |
%dir %{_datadir}/openscap |
| 161 |
%dir %{_datadir}/openscap/schemas |
| 162 |
%dir %{_datadir}/openscap/xsl |
| 163 |
%dir %{_datadir}/openscap/cpe |
| 164 |
%{_libdir}/libopenscap.so.* |
| 165 |
%{_datadir}/openscap/schemas/* |
| 166 |
%{_datadir}/openscap/xsl/* |
| 167 |
%{_datadir}/openscap/cpe/* |
| 168 |
|
| 169 |
%files python3 |
| 170 |
%{python3_sitearch}/* |
| 171 |
|
| 172 |
%files devel |
| 173 |
%doc %{_pkgdocdir}/html/ |
| 174 |
%{_libdir}/libopenscap.so |
| 175 |
%{_libdir}/pkgconfig/*.pc |
| 176 |
%{_includedir}/openscap |
| 177 |
%exclude %{_includedir}/openscap/sce_engine_api.h |
| 178 |
|
| 179 |
%files engine-sce-devel |
| 180 |
%{_libdir}/libopenscap_sce.so |
| 181 |
%{_includedir}/openscap/sce_engine_api.h |
| 182 |
|
| 183 |
%files scanner |
| 184 |
%{_mandir}/man8/oscap.8* |
| 185 |
%{_bindir}/oscap |
| 186 |
%{_bindir}/oscap-chroot |
| 187 |
%{_sysconfdir}/bash_completion.d |
| 188 |
|
| 189 |
%files utils |
| 190 |
%doc docs/oscap-scan.cron |
| 191 |
%{_mandir}/man8/* |
| 192 |
%exclude %{_mandir}/man8/oscap.8* |
| 193 |
%exclude %{_mandir}/man8/oscap-docker.8* |
| 194 |
%{_bindir}/* |
| 195 |
%exclude %{_bindir}/oscap |
| 196 |
%exclude %{_bindir}/oscap-docker |
| 197 |
%exclude %{_bindir}/oscap-chroot |
| 198 |
|
| 199 |
%files engine-sce |
| 200 |
%{_libdir}/libopenscap_sce.so.* |
| 201 |
|
| 202 |
%files containers |
| 203 |
%{_bindir}/oscap-docker |
| 204 |
%{_mandir}/man8/oscap-docker.8* |
| 205 |
%{python3_sitelib}/oscap_docker_python/* |
| 206 |
%{_bindir}/oscap-podman |
| 207 |
%{_mandir}/man8/oscap-podman.8* |
| 208 |
|