2009-11-19 13:51:01 +01:00
|
|
|
#
|
2012-03-01 11:47:23 +01:00
|
|
|
# spec file for package openscap
|
2009-11-19 13:51:01 +01:00
|
|
|
#
|
2012-03-01 11:47:23 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2009-11-19 13:51:01 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%define soname 1
|
|
|
|
%define with_bindings 0
|
2009-11-19 13:51:01 +01:00
|
|
|
|
|
|
|
Name: openscap
|
2012-08-01 11:43:26 +02:00
|
|
|
Version: 0.8.3
|
2010-07-05 02:18:40 +02:00
|
|
|
Release: 1.0
|
2012-03-01 17:20:51 +01:00
|
|
|
Source: http://www.open-scap.org/download/%name-%version.tar.gz
|
2012-02-28 23:36:15 +01:00
|
|
|
Source1: oscap-scan.init
|
|
|
|
Source2: sysconfig.oscap-scan
|
2012-07-28 16:30:29 +02:00
|
|
|
Patch1: openscap-stdio.h.patch
|
2012-03-01 11:47:23 +01:00
|
|
|
Url: http://www.open-scap.org/
|
2009-11-19 13:51:01 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-03-01 11:47:23 +01:00
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libcurl-devel
|
|
|
|
BuildRequires: libgcrypt-devel
|
2012-03-26 11:33:19 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <=1140
|
|
|
|
BuildRequires: libnl-devel
|
|
|
|
%else
|
2012-03-01 11:47:23 +01:00
|
|
|
BuildRequires: libnl-1_1-devel
|
2012-03-26 11:33:19 +02:00
|
|
|
%endif
|
2012-03-01 11:47:23 +01:00
|
|
|
BuildRequires: libxml2-devel
|
2010-07-05 02:18:40 +02:00
|
|
|
# Use package name cause of "have choice for perl(XML::Parser): brp-check-suse perl-XML-Parser"
|
2012-03-01 11:55:49 +01:00
|
|
|
BuildRequires: gconf2-devel
|
|
|
|
BuildRequires: libblkid-devel
|
2012-03-26 11:33:19 +02:00
|
|
|
BuildRequires: libcap-devel
|
2012-03-01 11:55:49 +01:00
|
|
|
BuildRequires: libselinux-devel
|
2012-03-01 11:47:23 +01:00
|
|
|
BuildRequires: libxslt-devel
|
2012-03-01 10:27:11 +01:00
|
|
|
BuildRequires: openldap2-devel
|
2012-03-01 11:47:23 +01:00
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: perl-XML-Parser
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: rpm-devel
|
|
|
|
BuildRequires: swig
|
2012-03-26 11:33:19 +02:00
|
|
|
BuildRequires: unixODBC-devel
|
2010-07-05 02:18:40 +02:00
|
|
|
Summary: A Set of Libraries for Integration with SCAP
|
2012-03-20 13:49:59 +01:00
|
|
|
License: LGPL-2.1+
|
2012-03-01 11:47:23 +01:00
|
|
|
Group: Development/Tools/Other
|
2009-11-19 13:51:01 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
OpenSCAP is a set of open source libraries providing an easier path for
|
|
|
|
integration of the SCAP line of standards.
|
|
|
|
|
|
|
|
SCAP is a line of standards managed by NIST with the goal of providing
|
|
|
|
a standard language for the expression of Computer Network Defense
|
|
|
|
related information.
|
|
|
|
|
|
|
|
More information about SCAP can be found at nvd.nist.gov.
|
|
|
|
|
2010-07-05 02:18:40 +02:00
|
|
|
|
|
|
|
%package -n libopenscap%{soname}
|
|
|
|
Summary: OpenSCAP C Library
|
2012-03-01 11:47:23 +01:00
|
|
|
Group: System/Libraries
|
2010-07-05 02:18:40 +02:00
|
|
|
|
|
|
|
%description -n libopenscap%{soname}
|
|
|
|
The OpenSCAP C Library for easy integration with SCAP.
|
|
|
|
|
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%package devel
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2012-03-01 11:47:23 +01:00
|
|
|
Requires: libopenscap%{soname} = %{version}
|
2010-07-05 02:18:40 +02:00
|
|
|
Summary: Development Files for OpenSCAP
|
2012-03-01 11:47:23 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2010-07-05 02:18:40 +02:00
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%description devel
|
2010-07-05 02:18:40 +02:00
|
|
|
This package contains the development files (mainly C header files) for the
|
|
|
|
OpenSCAP C library.
|
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%if 0%{?with_bindings}
|
2010-07-05 02:18:40 +02:00
|
|
|
%package -n python-openscap
|
|
|
|
%py_requires
|
2012-02-28 23:36:15 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Provides: openscap-python = %{version}-%{release}
|
2010-07-05 02:18:40 +02:00
|
|
|
Summary: OpenSCAP Python Library
|
2012-03-01 11:47:23 +01:00
|
|
|
Group: Development/Libraries/Python
|
2010-07-05 02:18:40 +02:00
|
|
|
|
|
|
|
%description -n python-openscap
|
|
|
|
The OpenSCAP Python Library for easy integration with SCAP.
|
|
|
|
|
|
|
|
%package -n perl-openscap
|
2012-02-28 23:36:15 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2012-03-01 11:47:23 +01:00
|
|
|
Requires: perl = %{perl_version}
|
2012-02-28 23:36:15 +01:00
|
|
|
Provides: openscap-perl = %{version}-%{release}
|
2010-07-05 02:18:40 +02:00
|
|
|
Summary: OpenSCAP Perl Library
|
2012-03-01 11:47:23 +01:00
|
|
|
Group: Development/Libraries/Perl
|
2010-07-05 02:18:40 +02:00
|
|
|
|
|
|
|
%description -n perl-openscap
|
|
|
|
The OpenSCAP Perl Library for easy integration with SCAP.
|
2012-02-28 23:36:15 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%package utils
|
|
|
|
Summary: Openscap utilities
|
2012-03-01 10:27:11 +01:00
|
|
|
Group: System/Monitoring
|
2012-02-28 23:36:15 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
PreReq: %insserv_prereq %fillup_prereq
|
|
|
|
|
|
|
|
%description utils
|
|
|
|
The %{name}-utils package contains various utilities based on %{name} library.
|
|
|
|
|
|
|
|
|
|
|
|
%package content
|
|
|
|
Summary: SCAP content
|
2012-03-01 10:27:11 +01:00
|
|
|
Group: System/Monitoring
|
2012-02-28 23:36:15 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description content
|
|
|
|
SCAP content for Fedora delivered by Open-SCAP project.
|
|
|
|
|
|
|
|
|
|
|
|
%package extra-probes
|
|
|
|
Summary: SCAP probes
|
2012-03-01 10:27:11 +01:00
|
|
|
Group: System/Monitoring
|
2012-02-28 23:36:15 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
#BuildRequires: opendbx - for sql
|
|
|
|
|
|
|
|
%description extra-probes
|
|
|
|
The %{name}-extra-probes package contains additional probes that are not
|
|
|
|
commonly used and require additional dependencies.
|
2010-07-05 02:18:40 +02:00
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
2010-07-05 02:18:40 +02:00
|
|
|
|
2009-11-19 13:51:01 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2012-07-28 16:30:29 +02:00
|
|
|
%patch1 -p1
|
2009-11-19 13:51:01 +01:00
|
|
|
|
|
|
|
%build
|
2012-02-28 23:36:15 +01:00
|
|
|
|
|
|
|
%if 0%{?with_bindings}
|
2011-05-02 17:28:19 +02:00
|
|
|
%configure --disable-silent-rules
|
2012-02-28 23:36:15 +01:00
|
|
|
%else
|
|
|
|
%configure --disable-silent-rules --disable-bindings
|
|
|
|
%endif
|
2011-05-02 16:17:42 +02:00
|
|
|
%__make %{?_smp_mflags}
|
2009-11-19 13:51:01 +01:00
|
|
|
|
|
|
|
%check
|
2012-02-28 23:36:15 +01:00
|
|
|
# #%__make check %{?_smp_mflags} ||:
|
2009-11-19 13:51:01 +01:00
|
|
|
|
|
|
|
%install
|
2010-07-05 02:18:40 +02:00
|
|
|
%__make install DESTDIR=%{buildroot}
|
|
|
|
find %{buildroot} -name "*.la" -delete
|
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_initrddir}
|
|
|
|
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/oscap-scan
|
|
|
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
|
|
|
|
# create symlinks to default content
|
|
|
|
ln -s %{_datadir}/openscap/scap-fedora14-oval.xml $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-oval.xml
|
|
|
|
ln -s %{_datadir}/openscap/scap-fedora14-xccdf.xml $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-xccdf.xml
|
|
|
|
|
2010-07-05 02:18:40 +02:00
|
|
|
%post -n libopenscap%{soname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libopenscap%{soname} -p /sbin/ldconfig
|
2009-11-19 13:51:01 +01:00
|
|
|
|
2012-03-01 11:03:45 +01:00
|
|
|
%preun utils
|
|
|
|
%{stop_on_removal oscap-scan}
|
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%post utils
|
|
|
|
%{fillup_and_insserv -n oscap-scan}
|
|
|
|
|
|
|
|
%postun utils
|
2012-03-01 11:31:24 +01:00
|
|
|
%{restart_on_update oscap-scan}
|
2012-02-28 23:36:15 +01:00
|
|
|
%{insserv_cleanup}
|
|
|
|
|
2009-11-19 13:51:01 +01:00
|
|
|
%clean
|
2010-07-05 02:18:40 +02:00
|
|
|
%__rm -rf %{buildroot}
|
2009-11-19 13:51:01 +01:00
|
|
|
|
2009-11-19 17:22:37 +01:00
|
|
|
%files
|
2009-11-19 13:51:01 +01:00
|
|
|
%defattr(-, root, root)
|
2012-02-28 23:36:15 +01:00
|
|
|
%doc AUTHORS COPYING ChangeLog NEWS README
|
|
|
|
%dir %{_libexecdir}/openscap
|
|
|
|
%{_libexecdir}/openscap/probe_dnscache
|
|
|
|
%{_libexecdir}/openscap/probe_environmentvariable
|
|
|
|
%{_libexecdir}/openscap/probe_environmentvariable58
|
|
|
|
%{_libexecdir}/openscap/probe_family
|
|
|
|
%{_libexecdir}/openscap/probe_file
|
2012-03-01 15:08:33 +01:00
|
|
|
%{_libexecdir}/openscap/probe_fileextendedattribute
|
2012-02-28 23:36:15 +01:00
|
|
|
%{_libexecdir}/openscap/probe_filehash
|
|
|
|
%{_libexecdir}/openscap/probe_filehash58
|
2012-03-01 15:08:33 +01:00
|
|
|
%{_libexecdir}/openscap/probe_gconf
|
|
|
|
%{_libexecdir}/openscap/probe_iflisteners
|
2012-02-28 23:36:15 +01:00
|
|
|
%{_libexecdir}/openscap/probe_inetlisteningservers
|
|
|
|
%{_libexecdir}/openscap/probe_interface
|
|
|
|
%{_libexecdir}/openscap/probe_partition
|
|
|
|
%{_libexecdir}/openscap/probe_password
|
|
|
|
%{_libexecdir}/openscap/probe_process
|
2012-03-01 15:08:33 +01:00
|
|
|
%{_libexecdir}/openscap/probe_process58
|
|
|
|
%{_libexecdir}/openscap/probe_routingtable
|
2012-02-28 23:36:15 +01:00
|
|
|
%{_libexecdir}/openscap/probe_rpminfo
|
2012-03-01 15:08:33 +01:00
|
|
|
%{_libexecdir}/openscap/probe_rpmverify
|
2012-02-28 23:36:15 +01:00
|
|
|
%{_libexecdir}/openscap/probe_runlevel
|
2012-03-01 15:08:33 +01:00
|
|
|
%{_libexecdir}/openscap/probe_selinuxboolean
|
|
|
|
%{_libexecdir}/openscap/probe_selinuxsecuritycontext
|
2012-02-28 23:36:15 +01:00
|
|
|
%{_libexecdir}/openscap/probe_shadow
|
|
|
|
%{_libexecdir}/openscap/probe_sysctl
|
|
|
|
%{_libexecdir}/openscap/probe_system_info
|
|
|
|
%{_libexecdir}/openscap/probe_textfilecontent
|
|
|
|
%{_libexecdir}/openscap/probe_textfilecontent54
|
|
|
|
%{_libexecdir}/openscap/probe_uname
|
|
|
|
%{_libexecdir}/openscap/probe_variable
|
|
|
|
%{_libexecdir}/openscap/probe_xinetd
|
|
|
|
%{_libexecdir}/openscap/probe_xmlfilecontent
|
2012-03-01 13:24:10 +01:00
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%dir %{_datadir}/openscap
|
|
|
|
%dir %{_datadir}/openscap/schemas
|
|
|
|
%dir %{_datadir}/openscap/xsl
|
|
|
|
%{_datadir}/openscap/schemas/*
|
|
|
|
%{_datadir}/openscap/xsl/*
|
2010-07-05 02:18:40 +02:00
|
|
|
|
|
|
|
%files -n libopenscap%{soname}
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/libopenscap.so.%{soname}*
|
2009-11-19 13:51:01 +01:00
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%files devel
|
2010-07-05 02:18:40 +02:00
|
|
|
%defattr(-, root, root)
|
2012-02-28 23:36:15 +01:00
|
|
|
%doc docs/{html,examples}/
|
|
|
|
%{_includedir}/*
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2010-07-05 02:18:40 +02:00
|
|
|
|
2012-02-28 23:36:15 +01:00
|
|
|
%if 0%{?with_bindings}
|
2010-07-05 02:18:40 +02:00
|
|
|
%files -n python-openscap
|
|
|
|
%defattr(-, root, root)
|
2012-02-28 23:36:15 +01:00
|
|
|
%{python_sitearch}/*
|
2010-07-05 02:18:40 +02:00
|
|
|
|
|
|
|
%files -n perl-openscap
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{perl_vendorlib}/openscap.pm
|
|
|
|
%{perl_vendorarch}/_openscap_pm.so
|
2012-02-28 23:36:15 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files utils
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
/var/adm/fillup-templates/sysconfig.oscap-scan
|
|
|
|
%doc docs/oscap-scan.cron
|
|
|
|
%{_initrddir}/oscap-scan
|
|
|
|
%{_mandir}/man8/*
|
|
|
|
%{_bindir}/*
|
|
|
|
%config %{_sysconfdir}/bash_completion.d/*
|
|
|
|
|
|
|
|
%files content
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_datadir}/openscap/scap*.xml
|
|
|
|
|
|
|
|
%files extra-probes
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libexecdir}/openscap/probe_ldap57
|
|
|
|
|
2012-03-01 10:27:11 +01:00
|
|
|
%changelog
|