mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-25 12:47:44 +01:00
added support for separate data format versioning; set fwbuilder version to 3.0.0
This commit is contained in:
parent
2fb48ff980
commit
d3f65a6934
10
VERSION
10
VERSION
@ -1,9 +1,9 @@
|
||||
#-*- mode: shell-script; tab-width: 4; -*-
|
||||
# $Id: VERSION 1046 2007-10-21 20:27:01Z vk $
|
||||
|
||||
LIBFWBUILDER_MAJOR_VERSION=2
|
||||
LIBFWBUILDER_MINOR_VERSION=1
|
||||
LIBFWBUILDER_MICRO_VERSION=99
|
||||
LIBFWBUILDER_MAJOR_VERSION=3
|
||||
LIBFWBUILDER_MINOR_VERSION=0
|
||||
LIBFWBUILDER_MICRO_VERSION=0
|
||||
|
||||
LIBFWBUILDER_VERSION=${LIBFWBUILDER_MAJOR_VERSION}.${LIBFWBUILDER_MINOR_VERSION}.${LIBFWBUILDER_MICRO_VERSION}
|
||||
LIBFWBUILDER_LIB_VER=${LIBFWBUILDER_MAJOR_VERSION}.${LIBFWBUILDER_MINOR_VERSION}
|
||||
@ -30,6 +30,10 @@ LIBFWBUILDER_SOLIB_VERSION=${LIBFWBUILDER_CURRENT}.${LIBFWBUILDER_REVISION}.${LI
|
||||
LIBFWBUILDER_SOLIB_SYMLINK1_VERSION=${LIBFWBUILDER_CURRENT}.${LIBFWBUILDER_REVISION}
|
||||
LIBFWBUILDER_SOLIB_SYMLINK2_VERSION=${LIBFWBUILDER_CURRENT}
|
||||
|
||||
|
||||
# Data format version
|
||||
FWBUILDER_XML_VERSION=4
|
||||
|
||||
# RELEASE="1"
|
||||
RELEASE="b@BUILD_NUM@"
|
||||
|
||||
|
||||
12
configure.in
12
configure.in
@ -20,6 +20,7 @@ AC_SUBST(LIBFWBUILDER_VERSION)
|
||||
AC_SUBST(LIBFWBUILDER_LIB_VER)
|
||||
AC_SUBST(LIBFWBUILDER_SOLIB_SYMLINK1_VERSION)
|
||||
AC_SUBST(LIBFWBUILDER_SOLIB_SYMLINK2_VERSION)
|
||||
AC_SUBST(FWBUILDER_XML_VERSION)
|
||||
|
||||
if test -z ${RELEASE_NUM}; then
|
||||
RPMRELEASE="1"
|
||||
@ -28,9 +29,10 @@ else
|
||||
fi
|
||||
AC_SUBST(RPMRELEASE)
|
||||
|
||||
echo "Creating VERSION.h file..."
|
||||
echo "Creating libfwbuilder-version.h file..."
|
||||
|
||||
echo "#define LIBFWBUILDER_FORMAT_VERSION \"$LIBFWBUILDER_VERSION\"" > src/fwbuilder/libfwbuilder-version.h
|
||||
echo "#define LIBFWBUILDER_VERSION \"$LIBFWBUILDER_VERSION\"" > src/fwbuilder/libfwbuilder-version.h
|
||||
echo "#define LIBFWBUILDER_FORMAT_VERSION \"$FWBUILDER_XML_VERSION\"" >> src/fwbuilder/libfwbuilder-version.h
|
||||
|
||||
dnl try to find QT
|
||||
dnl
|
||||
@ -624,7 +626,7 @@ dnl path
|
||||
if test "x$with_templatedir" != "x"; then
|
||||
TEMPLATE_DIR="${with_templatedir}"
|
||||
else
|
||||
TEMPLATE_DIR="${PREFIX}/share/libfwbuilder21"
|
||||
TEMPLATE_DIR="${PREFIX}/share/libfwbuilder-${LIBFWBUILDER_VERSION}"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(LIBFWBUILDER_TEMPLATE_DIR, "${TEMPLATE_DIR}")
|
||||
AC_SUBST(TEMPLATE_DIR)
|
||||
@ -695,12 +697,12 @@ fi
|
||||
AC_SUBST(EXEC_PREFIX)
|
||||
|
||||
AC_OUTPUT(qmake.inc
|
||||
src/confscript/libfwbuilder-config-2.1
|
||||
src/confscript/libfwbuilder-config-3
|
||||
etc/fwbuilder.dtd )
|
||||
|
||||
dnl qmake just copies the file; we need to make it executable before that
|
||||
dnl
|
||||
chmod a+x src/confscript/libfwbuilder-config-2.1
|
||||
chmod a+x src/confscript/libfwbuilder-config-3
|
||||
|
||||
|
||||
|
||||
|
||||
@ -11,10 +11,6 @@ QMAKE_LINK = @echo
|
||||
|
||||
TARGET = etc
|
||||
|
||||
win32:target.path = $$prefix/
|
||||
unix:target.path = $$prefix/share/libfwbuilder-2.1/
|
||||
macx:target.path = $$prefix/
|
||||
|
||||
dtd.files = fwbuilder.dtd
|
||||
|
||||
INSTALLS -= target
|
||||
|
||||
@ -81,7 +81,7 @@ TODO:
|
||||
<!ELEMENT FWObjectDatabase (Library*)>
|
||||
<!ATTLIST FWObjectDatabase
|
||||
xmlns CDATA #FIXED "http://www.fwbuilder.org/1.0/"
|
||||
version %STRING; #FIXED "2.1.99"
|
||||
version %STRING; #FIXED "4"
|
||||
lastModified %NUMBER; #IMPLIED
|
||||
id ID #REQUIRED
|
||||
>
|
||||
|
||||
@ -81,7 +81,7 @@ TODO:
|
||||
<!ELEMENT FWObjectDatabase (Library*)>
|
||||
<!ATTLIST FWObjectDatabase
|
||||
xmlns CDATA #FIXED "http://www.fwbuilder.org/1.0/"
|
||||
version %STRING; #FIXED "@LIBFWBUILDER_VERSION@"
|
||||
version %STRING; #FIXED "@FWBUILDER_XML_VERSION@"
|
||||
lastModified %NUMBER; #IMPLIED
|
||||
id ID #REQUIRED
|
||||
>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<!--
|
||||
Filename: FWObjectDatabase_2.1.15.xslt
|
||||
Filename: FWObjectDatabase_2.1.16.xslt
|
||||
Author: Vadim Kurland
|
||||
Build date: 10/21/2007
|
||||
Last changed: 10/21/2007
|
||||
Build date: 01/16/2008
|
||||
Last changed: 01/16/2008
|
||||
Version: 1.0.0
|
||||
Description: translates fwbuilder object database from v2.1.15 to v2.1.99
|
||||
Description: translates fwbuilder object database from v2.1.16 to v3
|
||||
only changes version number
|
||||
-->
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<xsl:template match="*[attribute::id='root']">
|
||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/">
|
||||
<xsl:attribute name="version">2.1.99</xsl:attribute>
|
||||
<xsl:attribute name="version">3</xsl:attribute>
|
||||
<xsl:attribute name="id">root</xsl:attribute>
|
||||
<xsl:copy-of select="*"/>
|
||||
</FWObjectDatabase>
|
||||
|
||||
31
migration/FWObjectDatabase_2.1.16.xslt
Normal file
31
migration/FWObjectDatabase_2.1.16.xslt
Normal file
@ -0,0 +1,31 @@
|
||||
<!--
|
||||
Filename: FWObjectDatabase_2.1.15.xslt
|
||||
Author: Vadim Kurland
|
||||
Build date: 10/21/2007
|
||||
Last changed: 10/21/2007
|
||||
Version: 1.0.0
|
||||
Description: translates fwbuilder object database from v2.1.15 to v3
|
||||
only changes version number
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fwb="http://www.fwbuilder.org/1.0/"
|
||||
exclude-result-prefixes="fwb">
|
||||
|
||||
|
||||
<xsl:output method="xml" version="1.0"
|
||||
doctype-system="fwbuilder.dtd" indent="yes" encoding="utf-8"/>
|
||||
|
||||
|
||||
<xsl:template match="*[attribute::id='root']">
|
||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/">
|
||||
<xsl:attribute name="version">3</xsl:attribute>
|
||||
<xsl:attribute name="id">root</xsl:attribute>
|
||||
<xsl:copy-of select="*"/>
|
||||
</FWObjectDatabase>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
31
migration/FWObjectDatabase_3.xslt
Normal file
31
migration/FWObjectDatabase_3.xslt
Normal file
@ -0,0 +1,31 @@
|
||||
<!--
|
||||
Filename: FWObjectDatabase_3.xslt
|
||||
Author: Vadim Kurland
|
||||
Build date: 01/16/2008
|
||||
Last changed: 01/16/2008
|
||||
Version: 1.0.0
|
||||
Description: translates fwbuilder object database from v3 to 4
|
||||
only changes version number
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fwb="http://www.fwbuilder.org/1.0/"
|
||||
exclude-result-prefixes="fwb">
|
||||
|
||||
|
||||
<xsl:output method="xml" version="1.0"
|
||||
doctype-system="fwbuilder.dtd" indent="yes" encoding="utf-8"/>
|
||||
|
||||
|
||||
<xsl:template match="*[attribute::id='root']">
|
||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/">
|
||||
<xsl:attribute name="version">3</xsl:attribute>
|
||||
<xsl:attribute name="id">root</xsl:attribute>
|
||||
<xsl:copy-of select="*"/>
|
||||
</FWObjectDatabase>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
@ -67,7 +67,9 @@ target.files = FWObjectDatabase_0.8.7.xslt \
|
||||
FWObjectDatabase_2.1.12.xslt \
|
||||
FWObjectDatabase_2.1.13.xslt \
|
||||
FWObjectDatabase_2.1.14.xslt \
|
||||
FWObjectDatabase_2.1.15.xslt
|
||||
FWObjectDatabase_2.1.15.xslt \
|
||||
FWObjectDatabase_2.1.16.xslt \
|
||||
FWObjectDatabase_3.xslt
|
||||
|
||||
|
||||
#INSTALLS -= target
|
||||
|
||||
@ -10,7 +10,7 @@ QMAKE_LINK = @echo
|
||||
QMAKE_COPY = ../../install.sh -c -m 0755
|
||||
QMAKE_COPY_FILE = ../../install.sh -c -m 0755
|
||||
|
||||
TARGET = libfwbuilder-config-2.1
|
||||
TARGET = libfwbuilder-config-3
|
||||
|
||||
!macx {
|
||||
target.path = $$prefix/bin
|
||||
@ -18,7 +18,7 @@ TARGET = libfwbuilder-config-2.1
|
||||
|
||||
macx {
|
||||
script.path =$$prefix/bin
|
||||
script.files =libfwbuilder-config-2.1
|
||||
script.files =libfwbuilder-config-3
|
||||
|
||||
INSTALLS -= target
|
||||
INSTALLS += script
|
||||
|
||||
@ -11,7 +11,9 @@ PTHREAD_CFLAGS="@PTHREAD_CFLAGS@"
|
||||
PTHREAD_LIBS="@PTHREAD_LIBS@"
|
||||
|
||||
RANLIB="@RANLIB@"
|
||||
|
||||
VERSION="@LIBFWBUILDER_VERSION@"
|
||||
XML_VERSION="@FWBUILDER_XML_VERSION@"
|
||||
|
||||
XML_CFLAGS="@XML_CFLAGS@"
|
||||
XML_LIBS="@XML_LIBS@"
|
||||
@ -43,6 +45,7 @@ Options:
|
||||
--libpath print the path to the library directory
|
||||
--help display this help and exit
|
||||
--version output version information
|
||||
--xml_version output data format version information
|
||||
|
||||
Libraries:
|
||||
|
||||
@ -91,6 +94,11 @@ while test $# -gt 0; do
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--xml_version)
|
||||
echo ${XML_VERSION}
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--help)
|
||||
usage 0
|
||||
;;
|
||||
@ -133,7 +141,7 @@ if test "$TP" != "usr" ; then
|
||||
includedir="-I${prefix}/include/"
|
||||
fi
|
||||
|
||||
includedir="${includedir} -I${prefix}/include/fwb-2.1"
|
||||
includedir="${includedir} -I${prefix}/include/fwb-3"
|
||||
|
||||
|
||||
the_libs="$the_libs ${LIBFWBUILDER_LIBDIR} ${LIBS} ${PTHREAD_LIBS} ${XSLT_LIBS} ${XML_LIBS} ${LIBSNMP_LIBS} ${LWRES_LIBS} ${LIB_RESOLV}"
|
||||
@ -37,6 +37,11 @@ const string Constants::getLibraryDescription()
|
||||
|
||||
const string Constants::getLibraryVersion()
|
||||
{
|
||||
return string(LIBFWBUILDER_VERSION);
|
||||
}
|
||||
|
||||
const string Constants::getDataFormatVersion()
|
||||
{
|
||||
return string(LIBFWBUILDER_FORMAT_VERSION);
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +52,11 @@ class Constants
|
||||
*/
|
||||
static const std::string getLibraryVersion();
|
||||
|
||||
/**
|
||||
* Returns data format version number
|
||||
*/
|
||||
static const std::string getDataFormatVersion();
|
||||
|
||||
/**
|
||||
* Returns directory in which library stores it's data files.
|
||||
*/
|
||||
|
||||
@ -742,8 +742,19 @@ xmlDocPtr XMLTools::convert(xmlDocPtr doc,
|
||||
while(!vers.empty() && (c=version_compare(current_version,vers))!=0)
|
||||
{
|
||||
if(c<0)
|
||||
throw FWException(string("Data file '"+file_name+ "' was created by the future version of Firewall Builder."));
|
||||
|
||||
{
|
||||
string err;
|
||||
err = string("Data file '");
|
||||
err += file_name;
|
||||
err += string("' was created by the future version of Firewall Builder.\n");
|
||||
err += string(" File version: ");
|
||||
err += vers;
|
||||
err += string("\n");
|
||||
err += string(" Current libfwbuilder data format version: ");
|
||||
err += current_version;
|
||||
throw FWException(err);
|
||||
}
|
||||
|
||||
string oldversion=vers;
|
||||
|
||||
#ifdef FW_XMLTOOLS_VERBOSE
|
||||
|
||||
@ -116,7 +116,7 @@ HEADERS = Address.h \
|
||||
XMLTools.h
|
||||
|
||||
headers.files =$$HEADERS
|
||||
headers.path =$$prefix/include/fwb-2.1/fwbuilder
|
||||
headers.path =$$prefix/include/fwb-3/fwbuilder
|
||||
|
||||
TARGET = fwbuilder
|
||||
|
||||
|
||||
@ -1 +1,2 @@
|
||||
#define LIBFWBUILDER_FORMAT_VERSION "2.1.99"
|
||||
#define LIBFWBUILDER_VERSION "3.0.0"
|
||||
#define LIBFWBUILDER_FORMAT_VERSION "4"
|
||||
|
||||
@ -22,7 +22,7 @@ HEADERS = Compiler.h \
|
||||
RoutingCompiler.h
|
||||
|
||||
headers.files =$$HEADERS
|
||||
headers.path =$$prefix/include/fwb-2.1/fwcompiler
|
||||
headers.path =$$prefix/include/fwb-3/fwcompiler
|
||||
|
||||
macx {
|
||||
LIBS += -L../fwbuilder -lfwbuilder
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user