diff --git a/app-forensics/scap-security-guide/Manifest b/app-forensics/scap-security-guide/Manifest index 281d94cca..9d0a42076 100644 --- a/app-forensics/scap-security-guide/Manifest +++ b/app-forensics/scap-security-guide/Manifest @@ -1 +1,2 @@ DIST scap-security-guide-0.1.50.tar.gz 9101036 BLAKE2B 083b239b01dd3a8fd9ebbf7f63abde7fee4e5c922d69cfdfa3a0e32c6525ea85995853e1fc6128b7dfbc939a1f5c4ecfb503bdb8f1fd5c61f6b238fcd522472a SHA512 679743f36dd83d802d9664e225c9de88bafe9ccb7c05784ab890cc65c1213a8b07b4ce622b2a61ddda20da56e3bf71a6f121a48a3e8de8c7ceac426f84a1877a +DIST scap-security-guide-0.1.51.tar.gz 9170386 BLAKE2B 8efdfb856af8f1ed0481a30dce659de2cac9f8c1d63b1e1e52725b2862fb1d4f5a8cdfd8d9823e4cb0e5571b3f0a87b71fdb5178619bc122eb65a4e8b99f0dee SHA512 b1bfad54c9b26d3b5e6e15436c76a5adb9108fe52717487a21e22341327f090f4f2a511069b7f52ece66a3af586242b71034564a8707721af509401cf1c3bf6f diff --git a/app-forensics/scap-security-guide/scap-security-guide-0.1.51.ebuild b/app-forensics/scap-security-guide/scap-security-guide-0.1.51.ebuild new file mode 100644 index 000000000..7053b2d10 --- /dev/null +++ b/app-forensics/scap-security-guide/scap-security-guide-0.1.51.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) + +SSG_PRODUCTS=( + +chromium +debian8 eap6 example +fedora +firefox fuse6 + jre ocp3 ol7 ol8 +opensuse rhel6 rhel7 rhel8 rhosp13 + rhv4 sle11 sle12 ubuntu1404 +ubuntu1604 +ubuntu1804 + wrlinux8 wrlinux1019 +) + +inherit cmake python-single-r1 + +DESCRIPTION="Security compliance content in SCAP, Bash, Ansible, and other formats" +HOMEPAGE="https://www.open-scap.org/security-policies/scap-security-guide" +SRC_URI="https://github.com/ComplianceAsCode/content/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="${SSG_PRODUCTS[*]} centos +jinja2 shellcheck scientific-linux test" +REQUIRED_USE="${PYTHON_REQUIRED_USE} + shellcheck? ( test )" + +DEPEND="${PYTHON_DEPS} + app-forensics/openscap + dev-libs/expat + dev-libs/libxslt + dev-libs/libxml2:2 + $(python_gen_cond_dep ' + app-admin/ansible[${PYTHON_MULTI_USEDEP}] + app-admin/ansible-lint[${PYTHON_MULTI_USEDEP}] + dev-python/json2html[${PYTHON_MULTI_USEDEP}] + dev-python/pyyaml[${PYTHON_MULTI_USEDEP}] + dev-python/yamllint[${PYTHON_MULTI_USEDEP}] + ') + jinja2? ( $(python_gen_cond_dep 'dev-python/jinja[${PYTHON_MULTI_USEDEP}]') ) + test? ( + $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_MULTI_USEDEP}]') + shellcheck? ( + || ( dev-util/shellcheck-bin dev-util/shellcheck ) + ) + )" + +S="${WORKDIR}/content-${PV}" + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + find "${S}" -name "*.py" | while read x; do + sed -i -e "/^#!/s/python\(.*\)/python/" "$x" || die + done + + python_fix_shebang -q "${S}" + + cmake_src_prepare +} + +src_configure() { + local product + local mycmakeargs=( + -DPYTHON_EXECUTABLE="${PYTHON}" + -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${PF}" + -DSSG_SVG_IN_XCCDF_ENABLED="yes" + -DSSG_SEPARATE_SCAP_FILES_ENABLED="yes" + -DSSG_JINJA2_CACHE_ENABLED="$(usex jinja2)" + -DSSG_JINJA2_CACHE_DIR="${T}/jinja2_cache" + -DSSG_CENTOS_DERIVATIVES_ENABLED="$(usex centos)" + -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED="$(usex scientific-linux)" + -DENABLE_PYTHON_COVERAGE="$(usex test)" + -DSSG_SHELLCHECK_BASH_FIXES_VALIDATION_ENABLED="$(usex shellcheck)" + -DSSG_LINKCHECKER_VALIDATION_ENABLED="no" # network is required + ) + + for x in ${SSG_PRODUCTS[@]}; do + product="${x//[[:punct:]]/}" + mycmakeargs+=( "-DSSG_PRODUCT_${product^^}=$(usex ${product})" ) + done + + # support building only in ./build directory + # do not remove it without testing + BUILD_DIR="${S}/build" + + cmake_src_configure +}