[ovaldi] update to 5.9.1, fix build
Tom Callaway
spot at fedoraproject.org
Wed May 11 19:07:23 UTC 2011
commit a0165d720b03e001dd16a68f23d1579558337b40
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date: Wed May 11 15:07:14 2011 -0400
update to 5.9.1, fix build
ovaldi-5.9.1-build.patch | 24 ++++
ovaldi-5.9.1-optflags.patch | 13 ++
ovaldi-5.9.1-rpm46.patch | 68 ++++++++++
ovaldi-5.9.1-rpm49.patch | 21 +++
ovaldi-5.9.1-xerces.patch | 294 +++++++++++++++++++++++++++++++++++++++++++
ovaldi.spec | 33 +++---
sources | 2 +-
7 files changed, 438 insertions(+), 17 deletions(-)
---
diff --git a/ovaldi-5.9.1-build.patch b/ovaldi-5.9.1-build.patch
new file mode 100644
index 0000000..4071808
--- /dev/null
+++ b/ovaldi-5.9.1-build.patch
@@ -0,0 +1,24 @@
+diff -up ovaldi-5.9.1-src/project/linux/Makefile.build ovaldi-5.9.1-src/project/linux/Makefile
+--- ovaldi-5.9.1-src/project/linux/Makefile.build 2011-05-11 09:42:14.000000000 -0400
++++ ovaldi-5.9.1-src/project/linux/Makefile 2011-05-11 09:43:25.023598214 -0400
+@@ -49,7 +49,7 @@ CPPFLAGS = -Wall -O -DLINUX $(INCDIRS)
+ LIBDIR = -L/usr/local/lib -L/usr/lib
+
+ # What libraries do we need?
+-LIBS = -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt -lldap
++LIBS = -lxerces-c -lxalan-c -lpcre -lpopt -lgcrypt -lldap -llber
+
+ # Determine what package management system is being used
+ PACKAGE_RPM = $(shell /usr/bin/env rpm --version 2>/dev/null)
+diff -up ovaldi-5.9.1-src/src/Main.h.build ovaldi-5.9.1-src/src/Main.h
+--- ovaldi-5.9.1-src/src/Main.h.build 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/Main.h 2011-05-11 09:45:35.084006207 -0400
+@@ -38,7 +38,7 @@
+ #endif
+
+ #ifdef LINUX
+-# define STRNICMP strnicmp
++# define STRNICMP strncasecmp
+ #elif defined SUNOS
+ # define STRNICMP strncasecmp
+ #elif defined DARWIN
diff --git a/ovaldi-5.9.1-optflags.patch b/ovaldi-5.9.1-optflags.patch
new file mode 100644
index 0000000..97a2f2f
--- /dev/null
+++ b/ovaldi-5.9.1-optflags.patch
@@ -0,0 +1,13 @@
+diff -up ovaldi-5.9.1-src/project/linux/Makefile.optflags ovaldi-5.9.1-src/project/linux/Makefile
+--- ovaldi-5.9.1-src/project/linux/Makefile.optflags 2011-05-11 10:12:51.883486771 -0400
++++ ovaldi-5.9.1-src/project/linux/Makefile 2011-05-11 10:13:41.349881277 -0400
+@@ -44,7 +44,8 @@ INCDIRS = -I/usr/local/include -I/usr/in
+ EXECUTABLE = $(OUTDIR)/ovaldi
+
+ # General options that should be used by g++.
+-CPPFLAGS = -Wall -O -DLINUX $(INCDIRS)
++OPTFLAGS = -Wall -O
++CPPFLAGS = $(OPTFLAGS) -DLINUX $(INCDIRS)
+
+ LIBDIR = -L/usr/local/lib -L/usr/lib
+
diff --git a/ovaldi-5.9.1-rpm46.patch b/ovaldi-5.9.1-rpm46.patch
new file mode 100644
index 0000000..cb1986a
--- /dev/null
+++ b/ovaldi-5.9.1-rpm46.patch
@@ -0,0 +1,68 @@
+diff -up ovaldi-5.9.1-src/project/linux/Makefile.rpm46 ovaldi-5.9.1-src/project/linux/Makefile
+--- ovaldi-5.9.1-src/project/linux/Makefile.rpm46 2010-08-27 15:23:41.000000000 -0400
++++ ovaldi-5.9.1-src/project/linux/Makefile 2011-05-11 09:40:47.217529843 -0400
+@@ -59,7 +59,7 @@ SRC_DIRS = $(SRCDIR) $(LINUXDIR) $(UNIXP
+ CPP_FILES := $(foreach d,$(SRC_DIRS),$(wildcard $(d)/*.cpp))
+
+ ifneq (${PACKAGE_RPM}, )
+- LIBS += -lrpm -lrpmdb -lrpmio
++ LIBS += -lrpm -lrpmio
+ CPPFLAGS += -DPACKAGE_RPM
+ CPP_FILES := $(filter-out %DPKGInfoProbe.cpp, $(CPP_FILES))
+ else ifneq (${PACKAGE_DPKG}, )
+diff -up ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp.rpm46 ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp
+--- ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp.rpm46 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp 2011-05-11 09:39:11.855697122 -0400
+@@ -378,11 +378,11 @@ void RPMInfoProbe::GetRPMInfo(string nam
+ rpmtsFree(ts);
+ }
+
+-char* RPMInfoProbe::readHeaderString(Header header, int_32 tag_id) {
++char* RPMInfoProbe::readHeaderString(Header header, rpmTag tag_id) {
+ // This function is from the Red Hat RPM Guide //
+- int_32 type;
++ rpmTagType type;
+ void *pointer;
+- int_32 data_size;
++ rpm_count_t data_size;
+
+ int header_status = headerGetEntry(header,
+ tag_id,
+@@ -400,11 +400,11 @@ char* RPMInfoProbe::readHeaderString(Hea
+ return (NULL);
+ }
+
+-int_32 RPMInfoProbe::readHeaderInt32(Header header, int_32 tag_id) {
++int_32 RPMInfoProbe::readHeaderInt32(Header header, rpmTag tag_id) {
+ // This function is from the Red Hat RPM Guide //
+- int_32 type;
++ rpmTagType type;
+ void *pointer;
+- int_32 data_size;
++ rpm_count_t data_size;
+
+ int header_status = headerGetEntry(header,
+ tag_id,
+@@ -495,7 +495,7 @@ void RPMInfoProbe::ChildGetSigKeyId(int
+ fprintf(stderr, "no arguments given for --query");
+ exit(EXIT_FAILURE);
+ }
+- ec = rpmcliQuery(ts, qva, (const char **) poptGetArgs(context));
++ ec = rpmcliQuery(ts, qva, (char * const *) poptGetArgs(context));
+
+ } else {
+ cerr << "Unable to get sig key id for rpm: " << rpmName << endl;
+diff -up ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.h.rpm46 ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.h
+--- ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.h.rpm46 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.h 2011-05-11 09:39:11.855697122 -0400
+@@ -110,8 +110,8 @@ private:
+ string GetSigKeyId(string rpmName);
+
+ string readHeaderBinary(Header header, int_32 tag_id);
+- char *readHeaderString(Header header, int_32 tag_id);
+- int_32 readHeaderInt32(Header header, int_32 tag_id);
++ char *readHeaderString(Header header, rpmTag tag_id);
++ int_32 readHeaderInt32(Header header, rpmTag tag_id);
+
+ static RPMInfoProbe *instance;
+ };
diff --git a/ovaldi-5.9.1-rpm49.patch b/ovaldi-5.9.1-rpm49.patch
new file mode 100644
index 0000000..9125325
--- /dev/null
+++ b/ovaldi-5.9.1-rpm49.patch
@@ -0,0 +1,21 @@
+diff -up ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp.rpm49 ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp
+--- ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp.rpm49 2011-05-11 10:21:18.800281843 -0400
++++ ovaldi-5.9.1-src/src/probes/linux/RPMInfoProbe.cpp 2011-05-11 10:21:51.131886088 -0400
+@@ -380,7 +380,7 @@ void RPMInfoProbe::GetRPMInfo(string nam
+
+ char* RPMInfoProbe::readHeaderString(Header header, rpmTag tag_id) {
+ // This function is from the Red Hat RPM Guide //
+- rpmTagType type;
++ rpm_tagtype_t type;
+ void *pointer;
+ rpm_count_t data_size;
+
+@@ -402,7 +402,7 @@ char* RPMInfoProbe::readHeaderString(Hea
+
+ int_32 RPMInfoProbe::readHeaderInt32(Header header, rpmTag tag_id) {
+ // This function is from the Red Hat RPM Guide //
+- rpmTagType type;
++ rpm_tagtype_t type;
+ void *pointer;
+ rpm_count_t data_size;
+
diff --git a/ovaldi-5.9.1-xerces.patch b/ovaldi-5.9.1-xerces.patch
new file mode 100644
index 0000000..d38e220
--- /dev/null
+++ b/ovaldi-5.9.1-xerces.patch
@@ -0,0 +1,294 @@
+diff -up ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.cpp.xerces ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.cpp
+--- ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.cpp.xerces 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.cpp 2011-05-11 09:55:31.705703243 -0400
+@@ -419,12 +419,25 @@ BinInputStream* DummyEntityResolver::NoO
+ return new DummyEntityResolver::DoNothingBinInputStream();
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#else
++const XMLCh* DummyEntityResolver::DoNothingBinInputStream::getContentType() const
++{
++ return NULL;
++}
++
++XMLFilePos DummyEntityResolver::DoNothingBinInputStream::curPos() const
++#endif
+ {
+ return 0;
+ }
+
++#if XERCES_VERSION_MAJOR < 3
+ unsigned int DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const /*toFill*/, const unsigned int /*maxToRead*/)
++#else
++XMLSize_t DummyEntityResolver::DoNothingBinInputStream::readBytes(XMLByte *const toFill, XMLSize_t maxToRead)
++#endif
+ {
+ return 0;
+ }
+diff -up ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.h.xerces ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.h
+--- ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.h.xerces 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/probes/independent/XmlFileContentProbe.h 2011-05-11 09:46:13.496536017 -0400
+@@ -134,8 +134,14 @@ private:
+ class DoNothingBinInputStream : public BinInputStream
+ {
+ public:
++#if XERCES_VERSION_MAJOR < 3
+ virtual unsigned int curPos() const;
+ virtual unsigned int readBytes(XMLByte *const toFill, const unsigned int maxToRead);
++#else
++ virtual XMLFilePos curPos() const;
++ virtual const XMLCh* getContentType() const;
++ virtual XMLSize_t readBytes(XMLByte *const toFill, XMLSize_t maxToRead);
++#endif
+ };
+ };
+
+diff -up ovaldi-5.9.1-src/src/XmlCommon.cpp.xerces ovaldi-5.9.1-src/src/XmlCommon.cpp
+--- ovaldi-5.9.1-src/src/XmlCommon.cpp.xerces 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/XmlCommon.cpp 2011-05-11 09:46:13.494536041 -0400
+@@ -587,7 +587,11 @@ void XmlCommon::AddSchemaLocation(XERCES
+ string XmlCommon::GetNamespace(DOMElement *element) {
+
+ string xmlns = "";
++#if XERCES_VERSION_MAJOR < 3
+ xmlns = XmlCommon::ToString(element->getTypeInfo()->getNamespace());
++#else
++ xmlns = XmlCommon::ToString(element->getSchemaTypeInfo()->getTypeNamespace());
++#endif
+ if (xmlns.compare("") == 0) {
+ xmlns = "";
+ }
+diff -up ovaldi-5.9.1-src/src/XmlProcessor.cpp.xerces ovaldi-5.9.1-src/src/XmlProcessor.cpp
+--- ovaldi-5.9.1-src/src/XmlProcessor.cpp.xerces 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/XmlProcessor.cpp 2011-05-11 09:53:00.382555517 -0400
+@@ -35,7 +35,18 @@ using namespace std;
+ // DataDirResolver Class //
+ //****************************************************************************************//
+
++#if XERCES_VERSION_MAJOR < 3
+ DOMInputSource* DataDirResolver::resolveEntity (const XMLCh *const /*publicId*/, const XMLCh *const systemId, const XMLCh *const /*baseURI*/) {
++#else
++InputSource* DataDirResolver::resolveEntity(const XMLCh* publicId, const XMLCh* systemId)
++{
++ return NULL;
++ //return DataDirResolver::resolveEntity (publicId, systemId, NULL);
++}
++
++DOMLSInput* DataDirResolver::resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI) {
++#endif
++
+ string path = "";
+ size_t last;
+ string schemapath = Common::GetSchemaPath();
+@@ -111,21 +122,36 @@ XERCES_CPP_NAMESPACE_QUALIFIER DOMDocume
+ // Instantiate the DOM parser.
+ static const XMLCh gLS[] = { chLatin_L, chLatin_S, chNull };
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(gLS);
++#if XERCES_VERSION_MAJOR < 3
+ parser = ((DOMImplementationLS*)impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#else
++ parser = ((DOMImplementationLS*)impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
++#endif
+
+ ///////////////////////////////////////////////////////
+ // Set fetuares on the builder
+ ///////////////////////////////////////////////////////
+
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(parser,n,v) parser->setFeature(n,v)
++#else
++#define SetParameter(parser,n,v) parser->getDomConfig()->setParameter(n,v)
++#endif
++
++ SetParameter(parser, XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
++ SetParameter(parser, XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
++ SetParameter(parser, XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
++#if XERCES_VERSION_MAJOR < 3
++ SetParameter(parser, XMLUni::fgDOMValidation, true); // Report all validation errors.
++#else
++ SetParameter(parser, XMLUni::fgDOMValidate, true); // Report all validation errors.
++#endif
++ SetParameter(parser, XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
++ SetParameter(parser, XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
++ SetParameter(parser, XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
++ SetParameter(parser, XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
+
+- parser->setFeature(XMLUni::fgDOMComments, false); // Discard Comment nodes in the document.
+- parser->setFeature(XMLUni::fgDOMDatatypeNormalization, true); // Let the validation process do its datatype normalization that is defined in the used schema language.
+- parser->setFeature(XMLUni::fgDOMNamespaces, true); // Perform Namespace processing
+- parser->setFeature(XMLUni::fgDOMValidation, true); // Report all validation errors.
+- parser->setFeature(XMLUni::fgXercesSchema, true); // Enable the parser's schema support.
+- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true); // Enable full schema constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
+- parser->setFeature(XMLUni::fgXercesValidationErrorAsFatal, true); // The parser will treat validation error as fatal and will exit
+- parser->setFeature(XMLUni::fgXercesDOMHasPSVIInfo, true); // Enable storing of PSVI information in element and attribute nodes.
++#undef SetParameter
+
+ ///////////////////////////////////////////////////////
+ //****************************************************************************************//
+@@ -133,7 +159,11 @@ XERCES_CPP_NAMESPACE_QUALIFIER DOMDocume
+ //****************************************************************************************//
+ /* Look for XML schemas in local directory instead of Internet */
+ DataDirResolver resolver;
++#if XERCES_VERSION_MAJOR < 3
+ parser->setEntityResolver (&resolver);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgXercesEntityResolver, &resolver);
++#endif
+ //****************************************************************************************//
+ // End of air-gap code //
+ //****************************************************************************************//
+@@ -144,7 +174,11 @@ XERCES_CPP_NAMESPACE_QUALIFIER DOMDocume
+ // Create a new DOMErrorHandler
+ // and set it to the builder
+ XmlProcessorErrorHandler *errHandler = new XmlProcessorErrorHandler();
++#if XERCES_VERSION_MAJOR < 3
+ parser->setErrorHandler(errHandler);
++#else
++ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, errHandler);
++#endif
+
+ try {
+ // reset document pool
+@@ -215,23 +249,27 @@ void XmlProcessor::WriteDOMDocument(XERC
+ XMLCh tempStr[100];
+ XMLString::transcode("LS", tempStr, 99);
+ DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
++#if XERCES_VERSION_MAJOR < 3
+ DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
+-
++#else
++ DOMLSSerializer *theSerializer = ((DOMImplementationLS*)impl)->createLSSerializer();
++#endif
++
++#if XERCES_VERSION_MAJOR < 3
++#define SetParameter(serializer,n,v) if (serializer->canSetFeature(n,v)) \
++ serializer->setFeature(n,v)
++#else
++#define SetParameter(serializer,n,v) if (serializer->getDomConfig()->canSetParameter(n,v)) \
++ serializer->getDomConfig()->setParameter(n,v)
++#endif
+ // set feature if the serializer supports the feature/mode
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTSplitCdataSections, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTSplitCdataSections, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
+- theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
+-
+- if (theSerializer->canSetFeature(XMLUni::fgDOMWRTBOM, false))
+- theSerializer->setFeature(XMLUni::fgDOMWRTBOM, false);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTSplitCdataSections, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTDiscardDefaultContent, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTFormatPrettyPrint, true);
++ SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, false);
++ //SetParameter(theSerializer, XMLUni::fgDOMWRTBOM, true);
+
+- //if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent, true))
+- // theSerializer->setFeature(XMLUni::fgDOMWRTBOM, true);
++#undef SetParameter
+
+ //
+ // Plug in a format target to receive the resultant
+@@ -249,7 +287,13 @@ void XmlProcessor::WriteDOMDocument(XERC
+ //
+ // do the serialization through DOMWriter::writeNode();
+ //
++#if XERCES_VERSION_MAJOR < 3
+ theSerializer->writeNode(myFormTarget, *doc);
++#else
++ DOMLSOutput *output = ((DOMImplementationLS*)impl)->createLSOutput();
++ output->setByteStream(myFormTarget);
++ theSerializer->write(doc, output);
++#endif
+
+ delete theSerializer;
+ delete myFormTarget;
+diff -up ovaldi-5.9.1-src/src/XmlProcessor.h.xerces ovaldi-5.9.1-src/src/XmlProcessor.h
+--- ovaldi-5.9.1-src/src/XmlProcessor.h.xerces 2011-02-04 22:41:10.000000000 -0500
++++ ovaldi-5.9.1-src/src/XmlProcessor.h 2011-05-11 09:46:13.495536029 -0400
+@@ -39,8 +39,11 @@
+ #include "Common.h"
+
+ // required xerces includes
+-#include <xercesc/dom/DOMImplementationRegistry.hpp>
++#if XERCES_VERSION_MAJOR < 3
+ #include <xercesc/dom/DOMBuilder.hpp>
++#else
++#endif
++#include <xercesc/dom/DOMImplementationRegistry.hpp>
+ #include <xercesc/dom/DOMException.hpp>
+ #include <xercesc/dom/DOMErrorHandler.hpp>
+ #include <xercesc/dom/DOMError.hpp>
+@@ -48,17 +51,26 @@
+ #include <xercesc/dom/DOMNamedNodeMap.hpp>
+
+ // for dom Writer
++#if XERCES_VERSION_MAJOR < 3
++#include <xercesc/dom/DOMWriter.hpp>
++#else
++#endif
+ #include <xercesc/dom/DOMImplementation.hpp>
+ #include <xercesc/dom/DOMImplementationLS.hpp>
+-#include <xercesc/dom/DOMWriter.hpp>
+ #include <xercesc/framework/StdOutFormatTarget.hpp>
+ #include <xercesc/framework/LocalFileFormatTarget.hpp>
+ #include <xercesc/parsers/XercesDOMParser.hpp>
+ #include <xercesc/util/XMLUni.hpp>
+
+ // for entity resolver
++#if XERCES_VERSION_MAJOR < 3
+ #include <xercesc/dom/DOMEntityResolver.hpp>
+ #include <xercesc/dom/DOMInputSource.hpp>
++#else
++#include <xercesc/sax/EntityResolver.hpp>
++#include <xercesc/sax/InputSource.hpp>
++#include <xercesc/sax2/SAX2XMLReader.hpp>
++#endif
+ #include <xercesc/framework/LocalFileInputSource.hpp>
+ #include <xercesc/framework/Wrapper4InputSource.hpp>
+
+@@ -67,15 +79,24 @@ XERCES_CPP_NAMESPACE_USE
+
+
+ /**
+- This class extends the default DOMEntityResolver and implments the resolve entity method
++ This class extends the default EntityResolver and implments the resolve entity method
+ to support
+ */
++#if XERCES_VERSION_MAJOR < 3
+ class DataDirResolver : public DOMEntityResolver {
++#else
++class DataDirResolver : public EntityResolver {
++#endif
+ public:
+ /**
+ *
+ */
++#if XERCES_VERSION_MAJOR < 3
+ DOMInputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++#else
++ InputSource *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId);
++ DOMLSInput *resolveEntity (const XMLCh *const publicId, const XMLCh *const systemId, const XMLCh *const baseURI);
++#endif
+ };
+
+ /**
+@@ -114,8 +135,13 @@ private:
+ XmlProcessor();
+
+ static XmlProcessor* instance;
+-
++
++#if XERCES_VERSION_MAJOR < 3
+ DOMBuilder *parser;
++#else
++ //SAX2XMLReader *parser;
++ DOMLSParser *parser;
++#endif
+ };
+
+ /**
diff --git a/ovaldi.spec b/ovaldi.spec
index bd825af..3b54d48 100644
--- a/ovaldi.spec
+++ b/ovaldi.spec
@@ -1,19 +1,20 @@
Name: ovaldi
-Version: 5.6.4
-Release: 3%{?dist}
+Version: 5.9.1
+Release: 1%{?dist}
Summary: Reference implementation of the OVAL interpreter
Group: Applications/System
License: BSD
URL: http://oval.mitre.org/language/download/interpreter/index.html
-Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}-src.zip
-Patch0: ovaldi-5.4.2-rpm46.patch
-Patch1: ovaldi-5.6.4-build.patch
-Patch2: ovaldi-5.6.4-xerces.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}-src.tar.bz2
+Patch0: ovaldi-5.9.1-rpm46.patch
+Patch1: ovaldi-5.9.1-build.patch
+Patch2: ovaldi-5.9.1-xerces.patch
+Patch3: ovaldi-5.9.1-optflags.patch
+Patch4: ovaldi-5.9.1-rpm49.patch
BuildRequires: pcre-devel xerces-c-devel xalan-c-devel rpm-devel > 4.4
-BuildRequires: openldap-devel openssl-devel
+BuildRequires: openldap-devel openssl-devel libgcrypt-devel
BuildRequires: dos2unix
%description
@@ -28,6 +29,8 @@ report the results of the tests.
%patch0 -p1 -b .rpm46
%patch1 -p1 -b .build
%patch2 -p1 -b .xerces
+%patch3 -p1 -b .optflags
+%patch4 -p1 -b .rpm49
# Nuke non-utf8 character
sed 's/[^ ] USEFUL LINKS/- USEFUL LINKS/' -i docs/README.txt
# Convert CRLF
@@ -39,12 +42,10 @@ dos2unix -k -q docs/terms.txt
%build
mkdir -p project/linux/Release/obj
# %{?_smp_mflags} can not be used
-make -C project/linux CPPFLAGS='%{optflags} -D_RPM_4_4_COMPAT'
+make -C project/linux OPTFLAGS='%{optflags} -D_RPM_4_4_COMPAT'
%install
-rm -rf $RPM_BUILD_ROOT
-
# Directory structure
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_datadir}/ovaldi
@@ -60,12 +61,7 @@ install -m 644 xml/* $RPM_BUILD_ROOT%{_datadir}/ovaldi
ln -sf . $RPM_BUILD_ROOT%{_datadir}/ovaldi/xml
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%files
-%defattr(-,root,root,-)
%{_bindir}/ovaldi
%{_datadir}/ovaldi
%{_mandir}/man1/ovaldi.1*
@@ -73,6 +69,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed May 11 2011 Tom Callaway <spot at fedoraproject.org> - 5.9.1-1
+- update to 5.9.1
+- add patch to allow optflags override without losing include dirs
+- add patch to build against rpm 4.9
+
* Thu Mar 10 2011 Kalev Lember <kalev at smartlink.ee> - 5.6.4-3
- Rebuilt with xerces-c 3.1
diff --git a/sources b/sources
index 201beb3..3a0176e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8ad52c3e270c48fff846d265fb638781 ovaldi-5.6.4-src.zip
+6f474a50fb0a6d7dd9f11ce19d6e2024 ovaldi-5.9.1-src.tar.bz2
More information about the scm-commits
mailing list