* [gentoo-commits] repo/gentoo:master commit in: app-forensics/ovaldi/files/, app-forensics/ovaldi/
@ 2017-08-02 21:17 Patrice Clement
0 siblings, 0 replies; 2+ messages in thread
From: Patrice Clement @ 2017-08-02 21:17 UTC (permalink / raw
To: gentoo-commits
commit: 0482e94f210513d83b9b37484de2f4eb67e0e222
Author: Labbe Corentin <clabbe.montjoie <AT> gmail <DOT> com>
AuthorDate: Wed Aug 2 18:50:42 2017 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Aug 2 21:17:50 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0482e94f
app-forensics/ovaldi: remove rpm USE flag.
This commit removes the rpm USE flag.
Gentoo-Bug: https://bugs.gentoo.org/625816
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/5280
app-forensics/ovaldi/files/rpmdb.patch | 58 ------------------------
app-forensics/ovaldi/files/use_local_rpmdb.patch | 11 -----
app-forensics/ovaldi/metadata.xml | 3 --
app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild | 20 +++-----
4 files changed, 6 insertions(+), 86 deletions(-)
diff --git a/app-forensics/ovaldi/files/rpmdb.patch b/app-forensics/ovaldi/files/rpmdb.patch
deleted file mode 100644
index 0d6e62608b5..00000000000
--- a/app-forensics/ovaldi/files/rpmdb.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- src/probes/linux/rpmdb.h.old 2010-10-22 15:16:49.000000000 +0200
-+++ src/probes/linux/rpmdb.h 2010-10-22 15:22:09.000000000 +0200
-@@ -8,8 +8,8 @@
- */
-
- #include <assert.h>
--#include "rpmlib.h"
--#include "rpmsw.h"
-+/*#include <rpmlib.h>
-+#include <rpmsw.h>*/
- #include "db.h"
-
- /*@-exportlocal@*/
-@@ -508,7 +508,7 @@
- * @param opx per-rpmdb accumulator index (aka rpmtsOpX)
- * @return per-rpmdb accumulator pointer
- */
--void * dbiStatsAccumulator(dbiIndex dbi, int opx)
-+rpmop_s * dbiStatsAccumulator(dbiIndex dbi, int opx)
- /*@*/;
-
- #if !defined(SWIG)
-@@ -576,7 +576,7 @@
- /*@globals fileSystem, internalState @*/
- /*@modifies dbi, *dbcursor, fileSystem, internalState @*/
- {
-- void * sw = dbiStatsAccumulator(dbi, 16); /* RPMTS_OP_DBDEL */
-+ rpmop_s *sw = dbiStatsAccumulator(dbi, 16); /* RPMTS_OP_DBDEL */
- int rc;
- assert(key->data != NULL && key->size > 0);
- (void) rpmswEnter(sw, 0);
-@@ -600,7 +600,7 @@
- /*@globals fileSystem, internalState @*/
- /*@modifies dbi, *dbcursor, *key, *data, fileSystem, internalState @*/
- {
-- void * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
-+ rpmop_s * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
- int rc;
- assert((flags == DB_NEXT) || (key->data != NULL && key->size > 0));
- (void) rpmswEnter(sw, 0);
-@@ -625,7 +625,7 @@
- /*@globals fileSystem, internalState @*/
- /*@modifies dbi, *dbcursor, *key, *pkey, *data, fileSystem, internalState @*/
- {
-- void * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
-+ rpmop_s * sw = dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */
- int rc;
- assert((flags == DB_NEXT) || (key->data != NULL && key->size > 0));
- (void) rpmswEnter(sw, 0);
-@@ -649,7 +649,7 @@
- /*@globals fileSystem, internalState @*/
- /*@modifies dbi, *dbcursor, *key, fileSystem, internalState @*/
- {
-- void * sw = dbiStatsAccumulator(dbi, 15); /* RPMTS_OP_DBPUT */
-+ rpmop_s * sw = dbiStatsAccumulator(dbi, 15); /* RPMTS_OP_DBPUT */
- int rc;
- assert(key->data != NULL && key->size > 0 && data->data != NULL && data->size > 0);
- (void) rpmswEnter(sw, 0);
diff --git a/app-forensics/ovaldi/files/use_local_rpmdb.patch b/app-forensics/ovaldi/files/use_local_rpmdb.patch
deleted file mode 100644
index 036d35edf94..00000000000
--- a/app-forensics/ovaldi/files/use_local_rpmdb.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/probes/linux/RPMInfoProbe.h.old 2010-10-22 15:12:50.000000000 +0200
-+++ src/probes/linux/RPMInfoProbe.h 2010-10-22 15:13:02.000000000 +0200
-@@ -36,7 +36,7 @@
- #include <rpm/rpmlib.h>
- #include <rpm/rpmio.h>
- #include <rpm/rpmts.h>
--#include <rpm/rpmdb.h>
-+#include "rpmdb.h"
- #include <rpm/header.h>
- #include <rpm/rpmcli.h> // added for rpm query function
- #include <rpm/rpmds.h> // added for rpm query function
diff --git a/app-forensics/ovaldi/metadata.xml b/app-forensics/ovaldi/metadata.xml
index aa8bd2bbca0..eefcf17b60e 100644
--- a/app-forensics/ovaldi/metadata.xml
+++ b/app-forensics/ovaldi/metadata.xml
@@ -10,9 +10,6 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
- <use>
- <flag name="rpm">Enable the RPM probes</flag>
- </use>
<upstream>
<remote-id type="sourceforge">ovaldi</remote-id>
</upstream>
diff --git a/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild b/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild
index 364a0a9e774..c23af38bfe5 100644
--- a/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild
+++ b/app-forensics/ovaldi/ovaldi-5.10.1.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -12,7 +12,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="acl ldap rpm selinux"
+IUSE="acl ldap selinux"
CDEPEND="dev-libs/libgcrypt:0
dev-libs/libpcre
@@ -21,8 +21,7 @@ CDEPEND="dev-libs/libgcrypt:0
sys-apps/util-linux
sys-libs/libcap
acl? ( sys-apps/acl )
- ldap? ( net-nds/openldap )
- rpm? ( app-arch/rpm )"
+ ldap? ( net-nds/openldap )"
DEPEND="${CDEPEND}
sys-apps/sed"
RDEPEND="${CDEPEND}
@@ -54,16 +53,9 @@ src_prepare() {
sed -i 's, -lacl , ,' project/linux/Makefile || die
fi
- # rpm probes support is build dependant only on the presence of the rpm binary
- if use rpm ; then
- #Same problems as bug 274679, so i do a local copy of the header and patch it
- cp /usr/include/rpm/rpmdb.h src/probes/linux/ || die
- epatch "${FILESDIR}"/use_local_rpmdb.patch
- epatch "${FILESDIR}"/rpmdb.patch
- else
- einfo "Disabling rpm probes"
- sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
- fi
+ einfo "Disabling rpm probes"
+ sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
+
# same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree
einfo "Disabling dpkg probes"
sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-forensics/ovaldi/files/, app-forensics/ovaldi/
@ 2017-08-03 13:15 Marek Szuba
0 siblings, 0 replies; 2+ messages in thread
From: Marek Szuba @ 2017-08-03 13:15 UTC (permalink / raw
To: gentoo-commits
commit: 1e598a5c33732079211238eabcc7030dc796eb72
Author: Labbe Corentin <clabbe.montjoie <AT> gmail <DOT> com>
AuthorDate: Thu Aug 3 12:19:42 2017 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Aug 3 13:14:54 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e598a5c
app-forensics/ovaldi: bump to 5.10.1.7
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Closes: 5283
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
app-forensics/ovaldi/Manifest | 1 +
.../ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch | 23 ++++++
...10.1.7-disable_RetrieveSelinuxDomainLabel.patch | 31 ++++++++
app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild | 93 ++++++++++++++++++++++
4 files changed, 148 insertions(+)
diff --git a/app-forensics/ovaldi/Manifest b/app-forensics/ovaldi/Manifest
index f8156a1aa38..b4494a54c96 100644
--- a/app-forensics/ovaldi/Manifest
+++ b/app-forensics/ovaldi/Manifest
@@ -1 +1,2 @@
DIST ovaldi-5.10.1.4-src.tar.bz2 14868251 SHA256 92a22ad75ecdb02abb155e520cf249cc0f737c52b17380b1d58caf410f8c2560 SHA512 d7926a7416fe90013e203b333390e33d51c3eb0caa6ebba69dd593791a8377ac38f5db72fcff2d1ab2dd39a0f5d1b0d2a0d08f906d3e26740288532a27debb47 WHIRLPOOL b9e9142f3d51818c6fbdd12d036176a435bb7af4a75b39bd6bbaee9c542718f9058401ccdfb053a84bac97dfb9b5ba0acdbcf98c4085f6198ad51e94d6ea9d25
+DIST ovaldi-5.10.1.7-src.tar.bz2 20391784 SHA256 daf8061307d5f945b3fda683af2b4407ad7dea345a3c0b2d669f0fd72b9c27ad SHA512 22c373436889b03ffb5d479bd322703bbd8b5b335f116a3b38a3d206ddaaf3115961ab89597c3907b6e5d745eb302a042c135c73cde0eaae10e51f5d6e3e55ec WHIRLPOOL e7a4924eeefb0d1296504adfd6dfcbdeebf0bd9f560bbc94f8c981999e3ec7278f4cffc34e0b698d04d82d3f7ae63f58ad1828b812dbee2bdc7bdd9cedb14b3d
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
new file mode 100644
index 00000000000..6d6fbf60178
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch
@@ -0,0 +1,23 @@
+--- 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
+@@ -386,18 +386,8 @@
+ 6) If a file has an ACL, the value will be 'true'.
+ */
+
+- int hasExtendedAcl = acl_extended_file(filePath.c_str());
+- if(hasExtendedAcl > -1){ // behavior 4, 5, and 6
+- item->AppendElement(new ItemEntity("has_extended_acl",Common::ToString(hasExtendedAcl),OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_EXISTS,0));
+- }else{
+- if(errno == EOPNOTSUPP){ // behavior 3
+- item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_DOES_NOT_EXIST,0));
+- }else{ // behavior 2
+- item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_ERROR,0));
+- item->AppendMessage(new OvalMessage(string("Error reading ACL data: ") + strerror(errno)));
+- }
+- }
+-
++ // behavior 1
++ item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));
+ # else
+ // behavior 1
+ item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0));
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
new file mode 100644
index 00000000000..11d369022b0
--- /dev/null
+++ b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch
@@ -0,0 +1,31 @@
+--- 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
+@@ -743,26 +743,8 @@
+ }
+
+ bool Process58Probe::RetrieveSelinuxDomainLabel(pid_t pid, string *label, string *err) {
+- security_context_t sctx;
+- int ec = getpidcon(pid, &sctx);
+- if (ec == -1) {
+- // getpidcon man page doesn't say errno is set... so we can't get a
+- // reason for the error.
+- *err = "getpidcon() failed";
+- return false;
+- }
+-
+- SecurityContextGuard scg(sctx);
+- ContextGuard cg(sctx);
+-
+- const char *tmp = context_type_get(cg);
+- if (!tmp) {
+- *err = string("context_get_type(")+sctx+"): "+strerror(errno);
+- return false;
+- }
+-
+- *label = tmp;
+- return true;
++ *err = string("context_get_type(NotImplmented)");
++ return false;
+ }
+
+ #elif defined SUNOS
diff --git a/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild b/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild
new file mode 100644
index 00000000000..b97ac916849
--- /dev/null
+++ b/app-forensics/ovaldi/ovaldi-5.10.1.7.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Free implementation of OVAL"
+HOMEPAGE="http://oval.mitre.org/language/interpreter.html"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+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
+ sys-libs/libcap
+ acl? ( sys-apps/acl )
+ ldap? ( net-nds/openldap )"
+DEPEND="${CDEPEND}
+ sys-apps/sed"
+RDEPEND="${CDEPEND}
+ selinux? ( sys-libs/libselinux )"
+
+S="${WORKDIR}/${P}-src"
+
+src_prepare() {
+ if ! use ldap ; then
+ einfo "Disabling LDAP probes"
+ sed -i 's,.*ldap,//&,' src/linux/ProbeFactory.cpp || die
+ sed -i 's,.*LDAP,//&,' src/linux/ProbeFactory.cpp || die
+ sed -i 's/-lldap//' project/linux/Makefile || die
+ sed -i 's/-llber//' project/linux/Makefile || die
+ sed -i 's/.*LDAPProbe.h.*//' src/linux/ProbeFactory.h || die
+ rm src/probes/independent/LDAPProbe.{cpp,h} || die
+ fi
+
+ if ! use acl ; then
+ sed -i 's,.*libacl,//&,' src/probes/unix/FileProbe.h || die
+ epatch "${FILESDIR}"/${P}-disable-acl.patch
+ sed -i 's, -lacl , ,' project/linux/Makefile || die
+ fi
+
+ einfo "Disabling rpm probes"
+ sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die
+
+ # same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree
+ einfo "Disabling dpkg probes"
+ sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die
+
+ #Disabling SELinux support
+ if ! use selinux ; then
+ 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
+ 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
+ sed -i 's,.*SecurityContextGuard.h.*,//&,' src/probes/unix/Process58Probe.cpp || die
+ sed -i 's, -lselinux,,' project/linux/Makefile || die
+ fi
+
+ # missing header for realloc and free
+ 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
+
+ # no such library on linux
+ sed -i 's,-lxalanMsg,,' project/linux/Makefile || die
+ tc-export CXX
+}
+
+src_compile () {
+ emake -C project/linux
+}
+
+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/*
+ dodoc docs/{README.txt,version.txt}
+ doman docs/ovaldi.1
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-03 13:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-03 13:15 [gentoo-commits] repo/gentoo:master commit in: app-forensics/ovaldi/files/, app-forensics/ovaldi/ Marek Szuba
-- strict thread matches above, loose matches on Subject: below --
2017-08-02 21:17 Patrice Clement
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox