openscap updates and some doxygen move fixes

This commit is contained in:
Rick Farina (Zero_Chaos) 2024-01-17 12:27:08 -05:00
parent 9e3a44fe93
commit 30d35405a7
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
6 changed files with 19 additions and 152 deletions

View file

@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -35,7 +35,7 @@ DEPEND="${RDEPEND}
dev-libs/boost
dev-libs/openssl:0=
dev-libs/libxml2
doc? ( app-doc/doxygen )
doc? ( app-text/doxygen )
virtual/man"
BDEPEND="

View file

@ -1,2 +1 @@
DIST openscap-1.3.5.tar.gz 14119168 BLAKE2B 9c1b309a4789f882ac2b8ff4e65b7d4a6e9fc1f023f956da6bb4d26f47592da0e4fea29de71203498a48b7157f177dc28e54dfbe28c199d660fd72c01e4768f1 SHA512 896d7b1e4552cba936dba70f186c3e3c5696d9ccb020ab5f18d8ac08de403f236b1651682da9711ed4721c365db9de7dacd3fce5d0fa467c15c16addef1055db
DIST openscap-1.3.6.tar.gz 14149628 BLAKE2B 18cb854a955f6e197ba9cf7e4175d2c26cc77f4de8898c263724084f2c148ef729474be5d3f34179152cc0dd3c67e9918572bf453c4725239bc836df2828b2d6 SHA512 5e4d6c4addc15b2a0245b5caef80fda3020f1cac83ed4aa436ef3f1703d1d761060c931c2536fa68de7ad5bab002b79c8b2d1e5f7695d46249f4562f5a1569a0

View file

@ -6,7 +6,6 @@
<name>Yury Martynov</name>
</maintainer>
<use>
<flag name="gconf">Build the gconf independant probes</flag>
<flag name="nss">Prefer NSS over libgcrypt as the crypto engine</flag>
<flag name="rpm">Compiles the RPM probes</flag>
<flag name="sce">Enables Script Check Engine (SCE) support</flag>

View file

@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
@ -11,11 +11,11 @@ DESCRIPTION="Framework which enables integration with Security Content Automatio
HOMEPAGE="https://www.open-scap.org/"
SRC_URI="https://github.com/OpenSCAP/openscap/releases/download/${PV}/${P}.tar.gz"
KEYWORDS="~amd64" # app-emulation/podman — is not support '~x86' keyword
KEYWORDS="~amd64" # app-containers/podman — is not support '~x86' keyword
LICENSE="LGPL-2.1+"
SLOT="0"
IUSE="acl caps chroot doc docker gconf ldap nss dbus pcre perl podman python rpm selinux sce ssh sql test vm xattr"
IUSE="acl caps chroot doc docker ldap nss dbus pcre perl podman python rpm selinux sce ssh sql test vm xattr"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
test? ( perl python )
@ -23,28 +23,29 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
RDEPEND="
app-arch/bzip2
dev-libs/libyaml
sys-apps/util-linux
acl? ( virtual/acl )
dbus? ( sys-apps/dbus )
caps? ( sys-libs/libcap )
dev-libs/libxslt
dev-libs/libxml2:2=
dev-libs/popt
dev-libs/xmlsec
gconf? ( gnome-base/gconf )
dev-libs/xmlsec:=
ldap? ( net-nds/openldap )
net-misc/curl
nss? ( dev-libs/nss )
!nss? ( dev-libs/libgcrypt:0 )
!nss? ( dev-libs/libgcrypt:0= )
pcre? ( dev-libs/libpcre:3=[unicode] )
podman? ( app-emulation/podman )
podman? ( app-containers/podman )
perl? (
dev-lang/perl
dev-lang/perl:=
dev-perl/XML-Parser
dev-perl/XML-XPath
)
python? ( ${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/docker-py[${PYTHON_USEDEP}]
dev-python/docker[${PYTHON_USEDEP}]
docker? ( dev-python/requests[${PYTHON_USEDEP}] )
')
)
@ -52,12 +53,12 @@ RDEPEND="
selinux? ( sys-libs/libselinux )
ssh? ( virtual/ssh )
sql? ( dev-db/opendbx )
sys-process/procps
sys-process/procps:=
xattr? ( sys-apps/attr )"
DEPEND="${RDEPEND}
doc? (
app-doc/doxygen
app-text/doxygen
app-text/asciidoc
)
test? ( net-misc/ipcalc )"
@ -84,8 +85,10 @@ src_prepare() {
sed -i 's,.*test_run ,#&,' tests/probes/sysctl/all.sh || die
# update paths for valgrind
#sed -i "s:valgrind_output=/tmp/valgrind_\$$.log:valgrind_output=${T}/valgrind_\$$.log:" tests/valgrind_test.sh || die
#sed -i 's:oscap_program=$actualdir/utils/.libs/oscap:oscap_program=$actualdir/utils/oscap:' tests/valgrind_test.sh || die
#sed -i "s:valgrind_output=/tmp/valgrind_\$$.log:valgrind_output=${T}/valgrind_\$$.log:" \
# tests/valgrind_test.sh || die
#sed -i 's:oscap_program=$actualdir/utils/.libs/oscap:oscap_program=$actualdir/utils/oscap:' \
# tests/valgrind_test.sh || die
# https://github.com/OpenSCAP/openscap/blob/52be17e064df72d8453c7b484bd6224f3f3263b6/src/OVAL/probes/SEAP/seap-packet.c#L845
:

View file

@ -1,134 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{10..12} )
inherit cmake python-single-r1
DESCRIPTION="Framework which enables integration with Security Content Automation Protocol"
HOMEPAGE="https://www.open-scap.org/"
SRC_URI="https://github.com/OpenSCAP/openscap/releases/download/${PV}/${P}.tar.gz"
KEYWORDS="~amd64" # app-emulation/podman — is not support '~x86' keyword
LICENSE="LGPL-2.1+"
SLOT="0"
IUSE="acl caps chroot doc docker gconf ldap nss dbus pcre perl podman python rpm selinux sce ssh sql test vm xattr"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
test? ( perl python )
docker? ( python )"
RDEPEND="
app-arch/bzip2
acl? ( virtual/acl )
dbus? ( sys-apps/dbus )
caps? ( sys-libs/libcap )
dev-libs/libxslt
dev-libs/libxml2:2=
dev-libs/popt
dev-libs/xmlsec
gconf? ( gnome-base/gconf )
ldap? ( net-nds/openldap )
net-misc/curl
nss? ( dev-libs/nss )
!nss? ( dev-libs/libgcrypt:0 )
pcre? ( dev-libs/libpcre:3=[unicode] )
podman? ( app-emulation/podman )
perl? (
dev-lang/perl
dev-perl/XML-Parser
dev-perl/XML-XPath
)
python? ( ${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/docker-py[${PYTHON_USEDEP}]
docker? ( dev-python/requests[${PYTHON_USEDEP}] )
')
)
rpm? ( app-arch/rpm )
selinux? ( sys-libs/libselinux )
ssh? ( virtual/ssh )
sql? ( dev-db/opendbx )
sys-process/procps
xattr? ( sys-apps/attr )"
DEPEND="${RDEPEND}
doc? (
app-doc/doxygen
app-text/asciidoc
)
test? ( net-misc/ipcalc )"
BDEPEND="python? ( dev-lang/swig )"
pkg_setup() {
#if use python; then
python-single-r1_pkg_setup
#fi
}
src_prepare() {
if use test; then
# modify/disable not gentoo specific tests
sed -i 's,.*test_run ,#&,' tests/API/XCCDF/default_cpe/test_default_cpe.sh || die
sed -i 's,.*assert_exists ,#&,' tests/API/XCCDF/unittests/test_deriving_xccdf_result_from_oval.sh || die
sed -i '/\[ $ret -eq 2 \]/d;s,.*assert_exists ,#&,' tests/API/XCCDF/unittests/test_remediate_unresolved.sh || die
sed -i 's/uname -p/uname -m/' tests/probes/uname/test_probes_uname.xml.sh || die
#sed -i 's,.*test_run ,#&,' tests/probes/rpminfo/test_probes_rpminfo.xml.sh || die
#sed -i 's,.*test_run ,#&,' tests/probes/rpmverify/all.sh || die
#sed -i 's,.*test_run ,#&,' tests/probes/rpmverifyfile/all.sh || die
#sed -i 's,.*test_run ,#&,' tests/probes/rpmverifypackage/test_probes_rpmverifypackage.sh || die
sed -i 's,.*test_run ,#&,' tests/probes/sysctl/all.sh || die
# update paths for valgrind
#sed -i "s:valgrind_output=/tmp/valgrind_\$$.log:valgrind_output=${T}/valgrind_\$$.log:" tests/valgrind_test.sh || die
#sed -i 's:oscap_program=$actualdir/utils/.libs/oscap:oscap_program=$actualdir/utils/oscap:' tests/valgrind_test.sh || die
# https://github.com/OpenSCAP/openscap/blob/52be17e064df72d8453c7b484bd6224f3f3263b6/src/OVAL/probes/SEAP/seap-packet.c#L845
:
fi
python_fix_shebang -q "${S}"
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DENABLE_SCE="$(usex sce)"
-DENABLE_PERL="$(usex perl)"
-DENABLE_PYTHON3="$(usex python)"
-DPYTHON_EXECUTABLE="${PYTHON}"
-DENABLE_DOCS="$(usex doc)"
-DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${PF}"
-DENABLE_OSCAP_UTIL="ON"
-DENABLE_OSCAP_UTIL_AS_RPM="$(usex rpm)" # scap-as-rpm — is a py3 script
-DENABLE_OSCAP_UTIL_PODMAN="$(usex podman)"
-DENABLE_OSCAP_UTIL_SSH="$(usex ssh)"
-DENABLE_OSCAP_UTIL_CHROOT="$(usex chroot)"
-DENABLE_OSCAP_UTIL_VM="$(usex vm)" # req: ENABLE_OSCAP_UTIL=yes
-DENABLE_OSCAP_UTIL_DOCKER="$(usex docker)" # req: python flag (python bindings)
-DENABLE_TESTS="$(usex test)"
-DENABLE_MITRE="OFF" # mitre testing requires specific environment support — fuck it
-DENABLE_VALGRIND="OFF" # fuck it because it's not completely with sandbox too
)
# upstream wants to building it only in ${S}/build directory
# do not remove it without testing.
#
# see more:
# * https://github.com/OpenSCAP/openscap/blob/2c04d939b93b7394f76adb86bf0b24ff0d76d963/CMakeLists.txt#L50-L54
BUILD_DIR="${S}/build"
cmake_src_configure
}
src_install() {
cmake_src_install
use python && python_optimize "${D}$(python_get_sitedir)"
}