summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-forensics/openscap/openscap-1.2.5.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-forensics/openscap/openscap-1.2.5.ebuild')
-rw-r--r--app-forensics/openscap/openscap-1.2.5.ebuild139
1 files changed, 139 insertions, 0 deletions
diff --git a/app-forensics/openscap/openscap-1.2.5.ebuild b/app-forensics/openscap/openscap-1.2.5.ebuild
new file mode 100644
index 000000000000..431878e167cb
--- /dev/null
+++ b/app-forensics/openscap/openscap-1.2.5.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit bash-completion-r1 eutils multilib python-single-r1
+
+DESCRIPTION="Framework which enables integration with the Security Content Automation Protocol (SCAP)"
+HOMEPAGE="http://www.open-scap.org/"
+SRC_URI="https://fedorahosted.org/releases/o/p/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="acl caps debug doc gconf ldap nss pcre perl python rpm selinux sce sql test xattr"
+RESTRICT="test"
+
+RDEPEND="!nss? ( dev-libs/libgcrypt:0 )
+ nss? ( dev-libs/nss )
+ acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ gconf? ( gnome-base/gconf )
+ ldap? ( net-nds/openldap )
+ pcre? ( dev-libs/libpcre )
+ rpm? ( >=app-arch/rpm-4.9 )
+ sql? ( dev-db/opendbx )
+ xattr? ( sys-apps/attr )
+ dev-libs/libpcre
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ test? (
+ app-arch/unzip
+ dev-perl/XML-XPath
+ net-misc/ipcalc
+ sys-apps/grep )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+# uncoment for debugging test
+# sed -i 's,set -e,&;set -x,' tests/API/XCCDF/unittests/test_remediate_simple.sh || die
+# sed -i 's,^ bash, LC_ALL=C bash,' tests/probes/process/test_probes_process.sh || die
+
+ sed -i 's/uname -p/uname -m/' tests/probes/uname/test_probes_uname.xml.sh || die
+
+ #probe runlevel for non-centos/redhat/fedora is not implemented
+ sed -i 's,.*runlevel_test.*,echo "runlevel test bypassed",' tests/mitre/test_mitre.sh || die
+ sed -i 's,probecheck "runlevel,probecheck "runlevellllll,' tests/probes/runlevel/test_probes_runlevel.sh || die
+
+ #According to comment of theses tests, we must modify it. For the moment disable it
+ sed -i 's,.*linux-def_inetlisteningservers_test,#&,' tests/mitre/test_mitre.sh || die
+ sed -i 's,.*ind-def_environmentvariable_test,#&,' tests/mitre/test_mitre.sh || die
+
+ # theses tests are hardcoded for checking hald process...,
+ # but no good solution for the moment, disabling them with a fake echo
+ # because encased in a if then
+# sed -i 's,ha.d,/sbin/udevd --daemon,g' tests/mitre/unix-def_process_test.xml || die
+# sed -i 's,ha.d,/sbin/udevd --daemon,g' tests/mitre/unix-def_process58_test.xml || die
+ sed -i 's,.*process_test.*,echo "process test bypassed",' tests/mitre/test_mitre.sh || die
+ sed -i 's,.*process58_test.*,echo "process58 test bypassed",' tests/mitre/test_mitre.sh || die
+
+ #This test fail
+ sed -i 's,.*generate report: xccdf,#&,' tests/API/XCCDF/unittests/all.sh || die
+
+ if ! use rpm ; then
+ sed -i 's,probe_rpminfo_req_deps_ok=yes,probe_rpminfo_req_deps_ok=no,' configure || die
+ sed -i 's,probe_rpminfo_opt_deps_ok=yes,probe_rpminfo_opt_deps_ok=no,' configure || die
+ sed -i 's,probe_rpmverify_req_deps_ok=yes,probe_rpmverify_req_deps_ok=no,' configure || die
+ sed -i 's,probe_rpmverify_opt_deps_ok=yes,probe_rpmverify_opt_deps_ok=no,' configure || die
+ sed -i 's,^probe_rpm.*_deps_missing=,&disabled_by_USE_flag,' configure || die
+ sed -i 's,.*rpm.*,#&,' tests/mitre/test_mitre.sh || die
+ fi
+ if ! use selinux ; then
+ einfo "Disabling SELinux probes"
+ sed -i 's,.*selinux.*, echo "SELinux test bypassed",' tests/mitre/test_mitre.sh || die
+ #process58 need selinux
+ sed -i 's,.*process58,#&,' tests/mitre/test_mitre.sh || die
+ fi
+ if ! use ldap; then
+ einfo "Disabling LDAP probes"
+ sed -i 's,ldap.h,ldapp.h,g' configure || die
+ fi
+
+ epatch_user
+}
+
+src_configure() {
+ python_setup
+ local myconf
+ if use debug ; then
+ myconf+=" --enable-debug"
+ fi
+ if use python ; then
+ myconf+=" --enable-python"
+ else
+ myconf+=" --enable-python=no"
+ fi
+ if use perl ; then
+ myconf+=" --enable-perl"
+ fi
+ if use nss ; then
+ myconf+=" --with-crypto=nss3"
+ else
+ myconf+=" --with-crypto=gcrypt"
+ fi
+ if use sce ; then
+ myconf+=" --enable-sce"
+ else
+ myconf+=" --enable-sce=no"
+ fi
+ econf ${myconf}
+}
+
+src_compile() {
+ emake
+ if use doc ; then
+ cd docs && doxygen Doxyfile || die
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+ prune_libtool_files --all
+ if use doc ; then
+ dohtml -r docs/html/.
+ dodoc docs/examples/.
+ fi
+ dobashcomp "${D}"/etc/bash_completion.d/oscap
+ rm -rf "${D}"/etc/bash_completion.d || die
+}