adamwill / rpms / openscap

Forked from rpms/openscap 3 years ago
Clone

Blame SPECS/openscap.spec

38e800
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
38e800
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
38e800
38e800
%define relabel_files() \
38e800
restorecon -R /usr/bin/oscap /usr/libexec/openscap; \
38e800
38e800
Name:           openscap
38e800
Version:        0.9.13
38e800
Release:        4%{?dist}
38e800
Summary:        Set of open source libraries enabling integration of the SCAP line of standards
38e800
Group:          System Environment/Libraries
38e800
License:        LGPLv2+
38e800
URL:            http://www.open-scap.org/
38e800
Source0:        http://fedorahosted.org/releases/o/p/openscap/%{name}-%{version}.tar.gz
38e800
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
38e800
BuildRequires:  swig libxml2-devel libxslt-devel perl-XML-Parser
38e800
BuildRequires:  rpm-devel
38e800
BuildRequires:  libgcrypt-devel
38e800
BuildRequires:  pcre-devel
38e800
BuildRequires:  libacl-devel
38e800
BuildRequires:  libselinux-devel libcap-devel
38e800
BuildRequires:  libblkid-devel
38e800
%if %{?_with_check:1}%{!?_with_check:0}
38e800
BuildRequires:  perl-XML-XPath
38e800
%endif
38e800
Requires(post):   /sbin/ldconfig
38e800
Requires(postun): /sbin/ldconfig
38e800
38e800
%description
38e800
OpenSCAP is a set of open source libraries providing an easier path
38e800
for integration of the SCAP line of standards. SCAP is a line of standards
38e800
managed by NIST with the goal of providing a standard language
38e800
for the expression of Computer Network Defense related information.
38e800
38e800
%package        devel
38e800
Summary:        Development files for %{name}
38e800
Group:          Development/Libraries
38e800
Requires:       %{name} = %{version}-%{release}
38e800
Requires:       %{name}-engine-sce = %{version}-%{release}
38e800
Requires:       libxml2-devel
38e800
Requires:       pkgconfig
38e800
38e800
%description    devel
38e800
The %{name}-devel package contains libraries and header files for
38e800
developing applications that use %{name}.
38e800
38e800
%package        python
38e800
Summary:        Python bindings for %{name}
38e800
Group:          Development/Libraries
38e800
Requires:       %{name} = %{version}-%{release}
38e800
BuildRequires:  python-devel
38e800
38e800
%description    python
38e800
The %{name}-python package contains the bindings so that %{name}
38e800
libraries can be used by python.
38e800
38e800
38e800
%package        utils
38e800
Summary:        Openscap utilities
38e800
Group:          Applications/System
38e800
Requires:       %{name} = %{version}-%{release}
38e800
Requires:       libcurl >= 7.12.0
38e800
Requires:       rpmdevtools rpm-build
38e800
BuildRequires:  libcurl-devel >= 7.12.0
38e800
38e800
%description    utils
38e800
The %{name}-utils package contains oscap command-line tool. The oscap
38e800
is configuration and vulnerability scanner, capable of performing
38e800
compliance checking using SCAP content.
38e800
38e800
%package        extra-probes
38e800
Summary:        SCAP probes
38e800
Group:          Applications/System
38e800
Requires:       %{name} = %{version}-%{release}
38e800
BuildRequires:  openldap-devel
38e800
BuildRequires:  GConf2-devel
38e800
#BuildRequires:  opendbx - for sql
38e800
38e800
%description    extra-probes
38e800
The %{name}-extra-probes package contains additional probes that are not
38e800
commonly used and require additional dependencies.
38e800
38e800
%package        engine-sce
38e800
Summary:	Script Check Engine plug-in for OpenSCAP
38e800
Group:          Applications/System
38e800
Requires:       %{name} = %{version}-%{release}
38e800
38e800
%description    engine-sce
38e800
The Script Check Engine is non-standard extension to SCAP protocol. This
38e800
engine allows content authors to avoid OVAL language and write their assessment
38e800
commands using a scripting language (Bash, Perl, Python, Ruby, ...).
38e800
38e800
%package        selinux
38e800
Summary:        SELinux policy module for openscap
38e800
Group:          System Environment/Base
38e800
Requires:       %{name}-utils = %{version}-%{release}
38e800
Requires:       policycoreutils, libselinux-utils
38e800
Requires(post): selinux-policy-base, policycoreutils
38e800
Requires(postun): policycoreutils
38e800
BuildRequires:  selinux-policy-devel
38e800
BuildArch:      noarch
38e800
38e800
%description    selinux
38e800
This package installs and sets up the  SELinux policy security module for openscap.
38e800
38e800
%prep
38e800
%setup -q
38e800
38e800
%build
38e800
%ifarch sparc64
38e800
#sparc64 need big PIE
38e800
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
38e800
export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
38e800
%else
38e800
export CFLAGS="$RPM_OPT_FLAGS -fpie"
38e800
export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
38e800
%endif
38e800
38e800
%configure --enable-sce --enable-selinux_policy
38e800
38e800
make %{?_smp_mflags}
38e800
# Remove shebang from bash-completion script
38e800
sed -i '/^#!.*bin/,+1 d' dist/bash_completion.d/oscap
38e800
38e800
%check
38e800
#to run make check use "--with check"
38e800
%if %{?_with_check:1}%{!?_with_check:0}
38e800
make check
38e800
%endif
38e800
38e800
%install
38e800
rm -rf $RPM_BUILD_ROOT
38e800
38e800
make install INSTALL='install -p' DESTDIR=$RPM_BUILD_ROOT
38e800
38e800
# remove content for another OS
38e800
rm $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-rhel6-oval.xml
38e800
rm $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-rhel6-xccdf.xml
38e800
rm $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-fedora14-oval.xml
38e800
rm $RPM_BUILD_ROOT/%{_datadir}/openscap/scap-fedora14-xccdf.xml
38e800
38e800
# Remove sectool SCE content which is not distributed along RHEL7
38e800
rm $RPM_BUILD_ROOT/%{_datadir}/openscap/sectool-sce/sectool-xccdf.xml
38e800
rm $RPM_BUILD_ROOT/%{_datadir}/openscap/sectool-sce/*.sh
38e800
rmdir $RPM_BUILD_ROOT/%{_datadir}/openscap/sectool-sce
38e800
38e800
# bash-completion script
38e800
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/bash_completion.d
38e800
install -pm 644 dist/bash_completion.d/oscap $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/oscap
38e800
38e800
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
38e800
38e800
%clean
38e800
rm -rf $RPM_BUILD_ROOT
38e800
38e800
%post -p /sbin/ldconfig
38e800
38e800
%post selinux
38e800
semodule -n -i %{_datadir}/selinux/packages/oscap.pp
38e800
if /usr/sbin/selinuxenabled ; then
38e800
    /usr/sbin/load_policy
38e800
    %relabel_files
38e800
fi;
38e800
exit 0
38e800
38e800
%postun -p /sbin/ldconfig
38e800
38e800
%postun selinux
38e800
if [ $1 -eq 0 ]; then
38e800
    semodule -n -r oscap
38e800
    if /usr/sbin/selinuxenabled ; then
38e800
       /usr/sbin/load_policy
38e800
       %relabel_files
38e800
    fi;
38e800
fi;
38e800
exit 0
38e800
38e800
%files
38e800
%defattr(-,root,root,-)
38e800
%doc AUTHORS COPYING ChangeLog NEWS README
38e800
%{_libdir}/libopenscap.so.*
38e800
%{_libexecdir}/openscap/probe_dnscache
38e800
%{_libexecdir}/openscap/probe_environmentvariable
38e800
%{_libexecdir}/openscap/probe_environmentvariable58
38e800
%{_libexecdir}/openscap/probe_family
38e800
%{_libexecdir}/openscap/probe_file
38e800
%{_libexecdir}/openscap/probe_fileextendedattribute
38e800
%{_libexecdir}/openscap/probe_filehash
38e800
%{_libexecdir}/openscap/probe_filehash58
38e800
%{_libexecdir}/openscap/probe_iflisteners
38e800
%{_libexecdir}/openscap/probe_inetlisteningservers
38e800
%{_libexecdir}/openscap/probe_interface
38e800
%{_libexecdir}/openscap/probe_partition
38e800
%{_libexecdir}/openscap/probe_password
38e800
%{_libexecdir}/openscap/probe_process
38e800
%{_libexecdir}/openscap/probe_process58
38e800
%{_libexecdir}/openscap/probe_routingtable
38e800
%{_libexecdir}/openscap/probe_rpminfo
38e800
%{_libexecdir}/openscap/probe_rpmverify
38e800
%{_libexecdir}/openscap/probe_rpmverifyfile
38e800
%{_libexecdir}/openscap/probe_rpmverifypackage
38e800
%{_libexecdir}/openscap/probe_runlevel
38e800
%{_libexecdir}/openscap/probe_selinuxboolean
38e800
%{_libexecdir}/openscap/probe_selinuxsecuritycontext
38e800
%{_libexecdir}/openscap/probe_shadow
38e800
%{_libexecdir}/openscap/probe_sysctl
38e800
%{_libexecdir}/openscap/probe_system_info
38e800
%{_libexecdir}/openscap/probe_textfilecontent
38e800
%{_libexecdir}/openscap/probe_textfilecontent54
38e800
%{_libexecdir}/openscap/probe_uname
38e800
%{_libexecdir}/openscap/probe_variable
38e800
%{_libexecdir}/openscap/probe_xinetd
38e800
%{_libexecdir}/openscap/probe_xmlfilecontent
38e800
%dir %{_datadir}/openscap
38e800
%dir %{_datadir}/openscap/schemas
38e800
%dir %{_datadir}/openscap/xsl
38e800
%dir %{_datadir}/openscap/cpe
38e800
%{_datadir}/openscap/schemas/*
38e800
%{_datadir}/openscap/xsl/*
38e800
%{_datadir}/openscap/cpe/*
38e800
38e800
%files python
38e800
%defattr(-,root,root,-)
38e800
%{python_sitearch}/*
38e800
38e800
%files devel
38e800
%defattr(-,root,root,-)
38e800
%doc docs/{html,examples}/
38e800
%{_includedir}/*
38e800
%{_libdir}/*.so
38e800
%{_libdir}/pkgconfig/*.pc
38e800
38e800
%files utils
38e800
%defattr(-,root,root,-)
38e800
%doc docs/oscap-scan.cron
38e800
%{_mandir}/man8/*
38e800
%{_bindir}/*
38e800
%{_sysconfdir}/bash_completion.d
38e800
38e800
%files extra-probes
38e800
%{_libexecdir}/openscap/probe_ldap57
38e800
%{_libexecdir}/openscap/probe_gconf
38e800
38e800
%files engine-sce
38e800
%{_libdir}/libopenscap_sce.so.*
38e800
38e800
%files selinux
38e800
%attr(0600,root,root) %{_datadir}/selinux/packages/oscap.pp
38e800
%{_datadir}/selinux/devel/include/contrib/oscap.if
38e800
# %{_mandir}/man8/openscap_selinux.8.*
38e800
38e800
%changelog
38e800
* Fri Nov 08 2013 Šimon Lukašík <slukasik@redhat.com> 0.9.13-4
38e800
- specify dependency between engine and devel sub-package
38e800
38e800
* Fri Nov 08 2013 Šimon Lukašík <slukasik@redhat.com> 0.9.13-3
38e800
- correct openscap-utils dependencies
38e800
38e800
* Fri Nov 08 2013 Šimon Lukašík <slukasik@redhat.com> 0.9.13-2
38e800
- drop openscap-content package (use scap-security-guide instead)
38e800
38e800
* Fri Nov 08 2013 Šimon Lukašík <slukasik@redhat.com> 0.9.13-1
38e800
- upgrade
38e800
38e800
* Thu Sep 26 2013 Šimon Lukašík <slukasik@redhat.com> 0.9.12-2
38e800
- Start building SQL probes for Fedora
38e800
38e800
* Wed Sep 11 2013 Šimon Lukašík <slukasik@redhat.com> 0.9.12-1
38e800
- upgrade
38e800
38e800
* Thu Jul 18 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.11-1
38e800
- upgrade
38e800
38e800
* Mon Jul 15 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.10-1
38e800
- upgrade
38e800
38e800
* Mon Jun 17 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.8-1
38e800
- upgrade
38e800
38e800
* Fri Apr 26 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.7-1
38e800
- upgrade
38e800
- add openscap-selinux sub-package
38e800
38e800
* Wed Apr 24 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.6-1
38e800
- upgrade
38e800
38e800
* Wed Mar 20 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.5-1
38e800
- upgrade
38e800
38e800
* Mon Mar 04 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.4.1-1
38e800
- upgrade
38e800
38e800
* Tue Feb 26 2013 Petr Lautrbach <plautrba@redhat.com> 0.9.4-1
38e800
- upgrade
38e800
38e800
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-2
38e800
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
38e800
38e800
* Mon Dec 17 2012 Petr Lautrbach <plautrba@redhat.com> 0.9.3-1
38e800
- upgrade
38e800
38e800
* Wed Nov 21 2012 Petr Lautrbach <plautrba@redhat.com> 0.9.2-1
38e800
- upgrade
38e800
38e800
* Mon Oct 22 2012 Petr Lautrbach <plautrba@redhat.com> 0.9.1-1
38e800
- upgrade
38e800
38e800
* Tue Sep 25 2012 Peter Vrabec <pvrabec@redhat.com> 0.9.0-1
38e800
- upgrade
38e800
38e800
* Mon Aug 27 2012 Petr Lautrbach <plautrba@redhat.com> 0.8.5-1
38e800
- upgrade
38e800
38e800
* Tue Aug 07 2012 Petr Lautrbach <plautrba@redhat.com> 0.8.4-1
38e800
- upgrade
38e800
38e800
* Tue Jul 31 2012 Petr Lautrbach <plautrba@redhat.com> 0.8.3-2
38e800
- fix Profile and  @hidden issue
38e800
38e800
* Mon Jul 30 2012 Petr Lautrbach <plautrba@redhat.com> 0.8.3-1
38e800
- upgrade
38e800
38e800
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-3
38e800
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
38e800
38e800
* Fri Jun 08 2012 Petr Pisar <ppisar@redhat.com> - 0.8.2-2
38e800
- Perl 5.16 rebuild
38e800
38e800
* Fri Mar 30 2012 Petr Lautrbach <plautrba@redhat.com> 0.8.2-1
38e800
- upgrade
38e800
38e800
* Tue Feb 21 2012 Peter Vrabec <pvrabec@redhat.com> 0.8.1-1
38e800
- upgrade
38e800
38e800
* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 0.8.0-3
38e800
- Rebuild against PCRE 8.30
38e800
38e800
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-2
38e800
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
38e800
38e800
* Tue Oct 11 2011 Peter Vrabec <pvrabec@redhat.com> 0.8.0-1
38e800
- upgrade
38e800
38e800
* Mon Jul 25 2011 Peter Vrabec <pvrabec@redhat.com> 0.7.4-1
38e800
- upgrade
38e800
38e800
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 0.7.3-3
38e800
- Perl mass rebuild
38e800
38e800
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 0.7.3-2
38e800
- Perl mass rebuild
38e800
38e800
* Fri Jun 24 2011 Peter Vrabec <pvrabec@redhat.com> 0.7.3-1
38e800
- upgrade
38e800
38e800
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.7.2-3
38e800
- Perl mass rebuild
38e800
38e800
* Fri Jun 10 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.7.2-2
38e800
- Perl 5.14 mass rebuild
38e800
38e800
* Wed Apr 20 2011 Peter Vrabec <pvrabec@redhat.com> 0.7.2-1
38e800
- upgrade
38e800
38e800
* Fri Mar 11 2011 Peter Vrabec <pvrabec@redhat.com> 0.7.1-1
38e800
- upgrade
38e800
38e800
* Thu Feb 10 2011 Peter Vrabec <pvrabec@redhat.com> 0.7.0-1
38e800
- upgrade
38e800
38e800
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.8-2
38e800
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
38e800
38e800
* Mon Jan 31 2011 Peter Vrabec <pvrabec@redhat.com> 0.6.8-1
38e800
- upgrade
38e800
38e800
* Fri Jan 14 2011 Peter Vrabec <pvrabec@redhat.com> 0.6.7-1
38e800
- upgrade
38e800
38e800
* Wed Oct 20 2010 Peter Vrabec <pvrabec@redhat.com> 0.6.4-1
38e800
- upgrade
38e800
38e800
* Tue Sep 14 2010 Peter Vrabec <pvrabec@redhat.com> 0.6.3-1
38e800
- upgrade
38e800
38e800
* Fri Aug 27 2010 Peter Vrabec <pvrabec@redhat.com> 0.6.2-1
38e800
- upgrade
38e800
38e800
* Wed Jul 14 2010 Peter Vrabec <pvrabec@redhat.com> 0.6.0-1
38e800
- upgrade
38e800
38e800
* Wed May 26 2010 Peter Vrabec <pvrabec@redhat.com> 0.5.11-1
38e800
- upgrade
38e800
38e800
* Fri May 07 2010 Peter Vrabec <pvrabec@redhat.com> 0.5.10-1
38e800
- upgrade
38e800
38e800
* Fri Apr 16 2010 Peter Vrabec <pvrabec@redhat.com> 0.5.9-1
38e800
- upgrade
38e800
38e800
* Fri Feb 26 2010 Peter Vrabec <pvrabec@redhat.com> 0.5.7-1
38e800
- upgrade
38e800
- new utils package
38e800
38e800
* Mon Jan 04 2010 Peter Vrabec <pvrabec@redhat.com> 0.5.6-1
38e800
- upgrade
38e800
38e800
* Tue Sep 29 2009 Peter Vrabec <pvrabec@redhat.com> 0.5.3-1
38e800
- upgrade
38e800
38e800
* Wed Aug 19 2009 Peter Vrabec <pvrabec@redhat.com> 0.5.2-1
38e800
- upgrade
38e800
38e800
* Mon Aug 03 2009 Peter Vrabec <pvrabec@redhat.com> 0.5.1-2
38e800
- add rpm-devel requirement
38e800
38e800
* Mon Aug 03 2009 Peter Vrabec <pvrabec@redhat.com> 0.5.1-1
38e800
- upgrade
38e800
38e800
* Thu Apr 30 2009 Peter Vrabec <pvrabec@redhat.com> 0.3.3-1
38e800
- upgrade
38e800
38e800
* Thu Apr 23 2009 Peter Vrabec <pvrabec@redhat.com> 0.3.2-1
38e800
- upgrade
38e800
38e800
* Sun Mar 29 2009 Peter Vrabec <pvrabec@redhat.com> 0.1.4-1
38e800
- upgrade
38e800
38e800
* Fri Mar 27 2009 Peter Vrabec <pvrabec@redhat.com> 0.1.3-2
38e800
- spec file fixes (#491892)
38e800
38e800
* Tue Mar 24 2009 Peter Vrabec <pvrabec@redhat.com> 0.1.3-1
38e800
- upgrade
38e800
38e800
* Thu Jan 15 2009 Tomas Heinrich <theinric@redhat.com> 0.1.1-1
38e800
- Initial rpm
38e800