summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-04-29 23:50:02 +0200
committerDavid Seifert <soap@gentoo.org>2021-04-29 23:50:02 +0200
commit99ffb10912ab4bd1eda61c24cf85f22c938e7d44 (patch)
tree79b4660f0a42c938f82357a9c1a04964a71b4944
parentwww-client/firefox: ffvpx switched from yasm to nasm (diff)
downloadgentoo-99ffb10912ab4bd1eda61c24cf85f22c938e7d44.tar.gz
gentoo-99ffb10912ab4bd1eda61c24cf85f22c938e7d44.tar.bz2
gentoo-99ffb10912ab4bd1eda61c24cf85f22c938e7d44.zip
app-forensics/ovaldi: Port to EAPI 7
* GCC 11 fixes * Respect LDFLAGS Closes: https://bugs.gentoo.org/722198 Closes: https://bugs.gentoo.org/786660 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch4
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch4
-rw-r--r--app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch72
-rw-r--r--app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild48
4 files changed, 104 insertions, 24 deletions
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch
index 6d6fbf60178e..0a8b5fa6a188 100644
--- a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch
@@ -1,5 +1,5 @@
---- src/probes/unix/FileProbe.cpp.old 2014-10-08 09:15:37.000000000 +0200
-+++ src/probes/unix/FileProbe.cpp 2014-10-08 09:15:55.000000000 +0200
+--- a/src/probes/unix/FileProbe.cpp
++++ b/src/probes/unix/FileProbe.cpp
@@ -386,18 +386,8 @@
6) If a file has an ACL, the value will be 'true'.
*/
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch
index 11d369022b03..9f0a0e05e401 100644
--- a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch
@@ -1,5 +1,5 @@
---- src/probes/unix/Process58Probe.cpp.old 2014-10-08 08:56:37.000000000 +0200
-+++ src/probes/unix/Process58Probe.cpp 2014-10-08 08:57:58.000000000 +0200
+--- a/src/probes/unix/Process58Probe.cpp
++++ b/src/probes/unix/Process58Probe.cpp
@@ -743,26 +743,8 @@
}
diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch
new file mode 100644
index 000000000000..1c71f7016d77
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch
@@ -0,0 +1,72 @@
+--- a/src/AbsProbe.cpp
++++ b/src/AbsProbe.cpp
+@@ -52,7 +52,7 @@
+ // use const wherever it makes sense, to ensure const-correctness??
+ // Or maybe I should have implemented operator<() for items and
+ // used the default std::less template...?
+- typedef set<Item*, std::less<const Item*> > ItemCache;
++ typedef set<Item*, std::less<Item*> > ItemCache;
+ ItemCache globalItemCache;
+ }
+
+--- a/src/ErrnoException.h
++++ b/src/ErrnoException.h
+@@ -49,10 +49,10 @@
+ SetErrorMessage(syscall+": "+std::strerror(errnoVal));
+ }
+
+- virtual ~ErrnoException() throw () {
++ virtual ~ErrnoException() {
+ }
+
+- virtual const char* what() const throw() {
++ virtual const char* what() const noexcept {
+ return errorMessage.c_str();
+ }
+ };
+--- a/src/OutOfMemoryException.h
++++ b/src/OutOfMemoryException.h
+@@ -47,10 +47,10 @@
+ : Exception(msg, severity, cause) {
+ }
+
+- virtual ~OutOfMemoryException() throw () {
++ virtual ~OutOfMemoryException() {
+ }
+
+- virtual const char* what() const throw() {
++ virtual const char* what() const noexcept {
+ return errorMessage.c_str();
+ }
+ };
+--- a/src/probes/unix/RunLevelProbe.cpp
++++ b/src/probes/unix/RunLevelProbe.cpp
+@@ -125,7 +125,7 @@
+
+
+ void
+-RunLevelProbe::_verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const throw( ProbeException ) {
++RunLevelProbe::_verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const {
+
+ // check datatypes - only allow string
+ if( service_name->GetDatatype() != OvalEnum::DATATYPE_STRING ){
+--- a/src/probes/unix/RunLevelProbe.h
++++ b/src/probes/unix/RunLevelProbe.h
+@@ -76,7 +76,7 @@
+ */
+ struct ltrunlevel_item_comparator
+ {
+- bool operator() ( const runlevel_item &r1, const runlevel_item &r2 )
++ bool operator() ( const runlevel_item &r1, const runlevel_item &r2 ) const
+ {
+ return r1.service_name.compare(r2.service_name) < 0;
+ }
+@@ -115,7 +115,7 @@
+ @param runlevel the runlevel runlevel_object entity
+ @throws ProbeException if invalid operations or datatypes are encountered
+ */
+- void _verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const throw( ProbeException );
++ void _verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const;
+
+ /**
+ Checks to see if the given filename is either "." or ".."
diff --git a/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild b/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild
index 5241a7f739bd..2007c6737d5a 100644
--- a/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild
+++ b/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild
@@ -1,34 +1,32 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit epatch toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="Free implementation of OVAL"
HOMEPAGE="http://oval.mitre.org/language/interpreter.html"
SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+S="${WORKDIR}/${P}-src"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="acl ldap selinux"
-CDEPEND="dev-libs/libgcrypt:0
- dev-libs/libpcre
- dev-libs/xalan-c
- dev-libs/xerces-c
- sys-apps/util-linux
+DEPEND="
+ dev-libs/libgcrypt:=
+ dev-libs/libpcre:=
+ dev-libs/xalan-c:=
+ dev-libs/xerces-c:=
+ sys-apps/util-linux:=
sys-libs/libcap
- acl? ( sys-apps/acl )
+ acl? ( sys-apps/acl:= )
ldap? ( net-nds/openldap )"
-DEPEND="${CDEPEND}
- sys-apps/sed"
-RDEPEND="${CDEPEND}
+RDEPEND="${DEPEND}
selinux? ( sys-libs/libselinux )"
-S="${WORKDIR}/${P}-src"
-
src_prepare() {
if ! use ldap ; then
einfo "Disabling LDAP probes"
@@ -42,7 +40,7 @@ src_prepare() {
if ! use acl ; then
sed -i 's,.*libacl,//&,' src/probes/unix/FileProbe.h || die
- epatch "${FILESDIR}"/${P}-disable-acl.patch
+ eapply "${FILESDIR}"/${P}-disable-acl.patch
sed -i 's, -lacl , ,' project/linux/Makefile || die
fi
@@ -58,7 +56,7 @@ src_prepare() {
rm src/probes/linux/SelinuxSecurityContextProbe.cpp || die
rm src/probes/linux/SelinuxBooleanProbe.cpp || die
rm src/probes/linux/SelinuxBooleanProbe.h || die
- epatch "${FILESDIR}"/${P}-disable_RetrieveSelinuxDomainLabel.patch
+ eapply "${FILESDIR}"/${P}-disable_RetrieveSelinuxDomainLabel.patch
sed -i 's,.*selinux.*,//&,' src/linux/ProbeFactory.cpp || die
sed -i 's,.*Selinux.*,//&,' src/linux/ProbeFactory.cpp || die
sed -i 's,.*selinux.*.h.*,//&,' src/probes/unix/Process58Probe.cpp || die
@@ -70,11 +68,19 @@ src_prepare() {
sed -i 's,#include <unistd.h>,&\n#include <stdlib.h>,' src/linux/NetworkInterfaces.cpp || die
sed -i 's,#include <unistd.h>,&\n#include <stdlib.h>,' src/linux/SystemInfo.cpp || die
- # respect CXXFLAGS and CXX
- sed -i -e '/^CPPFLAGS/s/$(INCDIRS)/$(CXXFLAGS) \0/' project/linux/Makefile || die
+ # respect CXX, CXXFLAGS and LDFLAGS
+ sed -e '/^CPPFLAGS/s/$(INCDIRS)/$(CXXFLAGS) \0/' \
+ -e 's/$(CXX) $^/$(CXX) $(LDFLAGS) $^/g' \
+ -i project/linux/Makefile || die
# no such library on linux
sed -i 's,-lxalanMsg,,' project/linux/Makefile || die
+
+ eapply "${FILESDIR}"/${P}-gcc11.patch
+ eapply_user
+}
+
+src_configure() {
tc-export CXX
}
@@ -85,9 +91,11 @@ src_compile() {
src_install() {
# no make install in Makefile
dosbin project/linux/Release/ovaldi project/linux/ovaldi.sh
- dodir /var/log/${PN}
- insinto /usr/share/${PN}
- doins xml/*
+ dodir /var/log/ovaldi
+
+ insinto /usr/share/ovaldi
+ doins -r xml/.
+
dodoc docs/{README.txt,version.txt}
doman docs/ovaldi.1
}