]> granicus.if.org Git - pdns/commitdiff
Be explicit about versions (v2)
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Thu, 9 May 2013 23:09:01 +0000 (01:09 +0200)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Thu, 9 May 2013 23:51:57 +0000 (01:51 +0200)
Caveats:
- Auth now bears additional cost for version.bind queries
- make always relinks pdns_server/pdns_recursor
- the full version string is a bit long

16 files changed:
build-scripts/jenkins-driver
build-scripts/set-version-auth
build-scripts/set-version-recursor
configure.ac
pdns/.gitignore
pdns/Makefile-recursor
pdns/Makefile.am
pdns/config-recursor.h
pdns/dist-recursor
pdns/misc.cc
pdns/packethandler.cc
pdns/pdns_recursor.cc
pdns/receiver.cc
pdns/version.cc [new file with mode: 0644]
pdns/version.hh [new file with mode: 0644]
pdns/ws.cc

index 019e80e90485cdd562c1fdd87b285928b047962f..5c56762f968bb1f098499e86156c61bf0a803c8e 100755 (executable)
@@ -25,4 +25,4 @@ then
         DESC="${DESC} (${PDNS_TAG})"
     fi
     java -jar /shared/jenkins-cli.jar set-build-display-name ${JOB_NAME} ${BUILD_NUMBER} "${DESC}"
-fi
\ No newline at end of file
+fi
index 4786ce767ad918279808d1bb7cd83258d221e5cb..addb2ef42fe20ff3cd79cc014ad869f4082160d3 100755 (executable)
@@ -1,9 +1,12 @@
-#!/bin/bash 
+#!/bin/bash
 VERSION=$1
 DEB_VERSION=$2
 RPM_VERSION=$3
 [ -z "$VERSION" -o -z "$DEB_VERSION" -o -z "$RPM_VERSION" ] && exit 1
 
+DIST_HOST="$(id -u -n)@$(hostname -f)"
+
 ssed -r "s/Version: (.*)/Version: $RPM_VERSION/" -i pdns.spec
-ssed -r "s/AC_INIT\\(\\[pdns\\],\\[(.*)\\]\\)/AC_INIT\([pdns],[$VERSION\])/" -i configure.ac
+ssed -r "s/AC_INIT\(\[pdns\],(.*)/AC_INIT([pdns], [$VERSION])/" -i configure.ac
+ssed -r "s/^(.*)AC_SUBST\(\[DIST_HOST\],(.*)/AC_SUBST([DIST_HOST], [$DIST_HOST])/" -i configure.ac
 ssed -r "1 s/^pdns \\(([^)]*)-([0-9.])\\)/pdns \\($DEB_VERSION-\\2\\)/" -i debian-pdns/changelog
index 358754016d11e14f6244e4326fa2c0e884f66b34..9593c9d7acad66e17ddcd868c3ab7d5f330360a6 100755 (executable)
@@ -4,5 +4,8 @@ DEB_VERSION=$2
 RPM_VERSION=$3
 [ -z "$VERSION" -o -z "$DEB_VERSION" -o -z "$RPM_VERSION" ] && exit 1
 
+DIST_HOST="$(id -u -n)@$(hostname -f)"
+
 ssed -r "s/^VERSION=(.*)/VERSION=$VERSION/" -i pdns/dist-recursor
+ssed -r "s/^DIST_HOST=(.*)/DIST_HOST=$DIST_HOST/" -i pdns/dist-recursor
 ssed -r "s/Version: (.*)/Version: $RPM_VERSION/" -i pdns/pdns-recursor.spec
index b7b4ae49f258e2496d372da373dff8bc182028b1..ae989b5b75dd9bdd012b99da720593984d370a22 100644 (file)
@@ -1,7 +1,10 @@
 dnl intro
-AC_INIT([pdns],[3.2])
+dnl The following lines may be patched by set-version-auth.
+AC_INIT([pdns], [git])
+dnl AC_SUBST([DIST_HOST], [TO_BE_PATCHED])
+dnl End patch area.
 AC_CONFIG_SRCDIR([pdns/receiver.cc])
-AM_INIT_AUTOMAKE([tar-ustar])
+AM_INIT_AUTOMAKE([tar-ustar -Wno-portability])
 AC_CANONICAL_HOST
 LT_INIT
 AC_CONFIG_MACRO_DIR([m4])
@@ -20,6 +23,8 @@ AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
 AC_LANG_CPLUSPLUS
 
+AM_CONDITIONAL([RELEASE_BUILD], [test "$PACKAGE_VERSION" != "git"])
+
 BOOST_REQUIRE([1.34])
 BOOST_FOREACH
 #BOOST_FILESYSTEM([mt])
index bf4b04ef0f64ec59b33f44ba7dbecccd8a98c901..4146647514e38b5f23bb65bbddcbda989054cb4a 100644 (file)
@@ -30,3 +30,4 @@
 /speedtest
 /toysdig
 /tsig-tests
+version_generated.h
index 6d87cdd40b6757b32cfcaa0f4c942ad71e0b5d9b..0eeb26790d3a757374ae025bf6132ff4d9dc66f7 100644 (file)
@@ -20,13 +20,26 @@ dnswriter.o dnsrecords.o rcpgenerator.o base64.o zoneparser-tng.o \
 rec_channel.o rec_channel_rec.o selectmplexer.o sillyrecords.o \
 dns_random.o aescrypt.o aeskey.o aes_modes.o aestab.o dnslabeltext.o \
 lua-pdns.o lua-recursor.o randomhelper.o recpacketcache.o dns.o \
-reczones.o base32.o nsecrecords.o json.o json_ws.o
+reczones.o base32.o nsecrecords.o json.o json_ws.o version.o
 
 REC_CONTROL_OBJECTS=rec_channel.o rec_control.o arguments.o misc.o \
        unix_utility.o logger.o qtype.o
 
 # what we need 
-all: message pdns_recursor rec_control 
+all: message version_generated.h pdns_recursor rec_control
+
+# Version
+build_date=$(shell LC_TIME=C date '+%Y%m%d%H%M%S')
+build_host=$(shell id -u -n)@$(shell hostname -f)
+.PHONY: version_generated.h
+version_generated.h:
+       echo '#ifndef VERSION_GENERATED_H' > $@
+       echo '#define VERSION_GENERATED_H' >> $@
+       echo '#include "config.h"' >> $@
+       echo '#define PDNS_VERSION VERSION' >> $@
+       echo '#define BUILD_DATE "$(build_date)"' >> $@
+       echo '#define BUILD_HOST "$(build_host)"' >> $@
+       echo '#endif //!VERSION_GENERATED_H' >> $@
 
 # OS specific instructions
 -include sysdeps/$(shell uname).inc
@@ -88,7 +101,7 @@ clean: binclean
 
 binclean:
        -rm -f *.o  pdns_recursor rec_control optional/*.o
-       
+
 dep:
        $(CXX) $(CXXFLAGS) -MM -MG *.cc *.c *.hh > $@
 
index f82d2d872118c8ac56d68d43f5bf9871520676a3..3c284ef5f88b96d8ab95deee023635255ae1d0a3 100644 (file)
@@ -27,7 +27,7 @@ else
 SUBDIRS= ext/polarssl-1.1.2 backends 
 endif
 
-BUILT_SOURCES=bind-dnssec.schema.sqlite3.sql.h
+BUILT_SOURCES=bind-dnssec.schema.sqlite3.sql.h version_generated.h
 
 noinst_SCRIPTS = pdns
 sysconf_DATA = pdns.conf-dist 
@@ -67,7 +67,8 @@ aes/aestab.c aes/aestab.h aes/brg_endian.h aes/brg_types.h aes/dns_random.cc \
 randomhelper.cc namespaces.hh nsecrecords.cc base32.cc dbdnsseckeeper.cc dnssecinfra.cc \
 dnsseckeeper.hh dnssecinfra.hh base32.hh dns.cc dnssecsigner.cc polarrsakeyinfra.cc md5.cc \
 md5.hh signingpipe.cc signingpipe.hh dnslabeltext.cc lua-pdns.cc lua-auth.cc lua-auth.hh serialtweaker.cc \
-ednssubnet.cc ednssubnet.hh cachecleaner.hh json.cc json.hh 
+ednssubnet.cc ednssubnet.hh cachecleaner.hh json.cc json.hh \
+version.hh version.cc
 
 #
 pdns_server_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@  $(BOOST_SERIALIZATION_LDFLAGS) -rdynamic 
@@ -95,7 +96,7 @@ endif
 if ORACLE
 pdns_server_LDADD += $(ORACLE_LIBS)
 endif
-  
+
 pdnssec_SOURCES=pdnssec.cc dbdnsseckeeper.cc sstuff.hh dnsparser.cc dnsparser.hh dnsrecords.cc dnswriter.cc dnswriter.hh \
         misc.cc misc.hh rcpgenerator.cc rcpgenerator.hh base64.cc base64.hh unix_utility.cc \
        logger.cc statbag.cc qtype.cc sillyrecords.cc nsecrecords.cc dnssecinfra.cc dnssecinfra.hh \
@@ -259,7 +260,7 @@ rec_channel_rec.cc selectmplexer.cc epollmplexer.cc sillyrecords.cc htimer.cc ht
 aes/dns_random.cc aes/aescrypt.c aes/aeskey.c aes/aestab.c aes/aes_modes.c \
 lua-pdns.cc lua-pdns.hh lua-recursor.cc lua-recursor.hh randomhelper.cc  \
 recpacketcache.cc recpacketcache.hh dns.cc nsecrecords.cc base32.cc cachecleaner.hh json_ws.cc json_ws.hh \
-json.cc json.hh
+json.cc json.hh version.hh version.cc
 
 pdns_recursor_LDFLAGS= $(LUA_LIBS)
 pdns_recursor_LDADD=
@@ -280,3 +281,26 @@ backends/bind/bindlexer.c:
 
 backends/bind/bindparser.cc:
        make -C backends/bind bindparser.cc
+
+
+build_date=$(shell LC_TIME=C date '+%Y%m%d%H%M%S')
+build_host=$(shell id -u -n)@$(shell hostname -f)
+if RELEASE_BUILD
+pdns_version=$(PACKAGE_VERSION)
+dist_host=$(DIST_HOST)
+else
+git_version=$(shell git describe --always --dirty=+ 2>/dev/null)
+# Do the test in shell, so we don't confuse automake with ifeq/ifneq.
+pdns_version=$(shell test -z "$(git_version)" && echo UNKNOWN || echo "git-$(git_version)")
+dist_host=$(build_host)
+endif
+
+.PHONY: version_generated.h
+version_generated.h:
+       echo '#ifndef VERSION_GENERATED_H' > $@
+       echo '#define VERSION_GENERATED_H' >> $@
+       echo '#define PDNS_VERSION "$(pdns_version)"' >> $@
+       echo '#define DIST_HOST "$(dist_host)"' >> $@
+       echo '#define BUILD_DATE "$(build_date)"' >> $@
+       echo '#define BUILD_HOST "$(build_host)"' >> $@
+       echo '#endif //!VERSION_GENERATED_H' >> $@
index b895f743f4a63679aaa1178b07f402379002a716..491b46c653155e14b6ea1ddeb2a0633fbc36984d 100644 (file)
@@ -1,4 +1,3 @@
 #define SYSCONFDIR "/etc/powerdns/" 
 #define LOCALSTATEDIR "/var/run/" 
-#define VERSION "3.5.1"
 #define RECURSOR
index 5b7c6b0011f81b2b3fba6470ebec68d2c883ce3f..8222263bdeec8a2ad3682afdb543ae28f2f06978 100755 (executable)
@@ -4,7 +4,20 @@ set -e
 
 ragel dnslabeltext.rl -o dnslabeltext.cc
 
-VERSION=3.5.1
+## The following lines will be patched by set-version-recursor.
+VERSION=""
+DIST_HOST=""
+## End patch area.
+
+if [ -z "$VERSION" ]; then
+  VERSION=$(git describe --always --dirty=+ 2>/dev/null)
+  if [ -z "$VERSION" ]; then
+    VERSION="UNKNOWN"
+  else
+    VERSION="git-"$VERSION
+  fi
+  DIST_HOST="$(id -u -n)@$(hostname -f)"
+fi
 
 INCLUDES="iputils.hh arguments.hh base64.hh zoneparser-tng.hh \
 rcpgenerator.hh lock.hh dnswriter.hh  dnsrecords.hh dnsparser.hh utility.hh \
@@ -12,7 +25,7 @@ recursor_cache.hh rec_channel.hh qtype.hh misc.hh dns.hh syncres.hh \
 sstuff.hh mtasker.hh mtasker.cc lwres.hh logger.hh ahuexception.hh \
 mplexer.hh win32_mtasker.hh win32_utility.cc ntservice.hh singleton.hh \
 recursorservice.hh dns_random.hh lua-pdns.hh lua-recursor.hh namespaces.hh \
-recpacketcache.hh base32.hh cachecleaner.hh json.hh"
+recpacketcache.hh base32.hh cachecleaner.hh json.hh version.hh"
 
 CFILES="syncres.cc  misc.cc unix_utility.cc qtype.cc \
 logger.cc arguments.cc  lwres.cc pdns_recursor.cc  \
@@ -22,7 +35,7 @@ selectmplexer.cc epollmplexer.cc kqueuemplexer.cc portsmplexer.cc pdns_hw.cc \
 win32_mtasker.cc win32_rec_channel.cc win32_logger.cc ntservice.cc \
 recursorservice.cc sillyrecords.cc lua-pdns.cc lua-recursor.cc randomhelper.cc \
 devpollmplexer.cc recpacketcache.cc dns.cc reczones.cc base32.cc nsecrecords.cc \
-dnslabeltext.cc json.cc json_ws.cc json_ws.hh"
+dnslabeltext.cc json.cc json_ws.cc json_ws.hh version.cc"
 
 cd docs
 make pdns_recursor.1 rec_control.1
@@ -37,6 +50,10 @@ cp Makefile-recursor.win32 $DIRNAME/Makefile.win32
 cp README-recursor $DIRNAME/README
 cp ../COPYING $DIRNAME/
 cp config-recursor.h $DIRNAME/config.h
+cat >>$DIRNAME/config.h <<EOF
+#define VERSION "$VERSION"
+#define DIST_HOST "$DIST_HOST"
+EOF
 mkdir -p $DIRNAME/ext/rapidjson/include/rapidjson/internal
 cp -a ext/rapidjson/include/rapidjson/*.h $DIRNAME/ext/rapidjson/include/rapidjson/
 cp -a ext/rapidjson/include/rapidjson/internal/*.h $DIRNAME/ext/rapidjson/include/rapidjson/internal
index 1032adaca91a6cb98593717c3082d447318201d7..74db1b846508c2ff87b1774c72e422768393c5f2 100644 (file)
@@ -43,6 +43,7 @@
 #include <sys/types.h>
 #include "utility.hh"
 #include <boost/algorithm/string.hpp>
+#include "logger.hh"
 
 bool g_singleThreaded;
 
index b5ed6a2ad0759a162b5f50448cc1e10da240166e..9a28cf660f4ba984c8df1b7a8859ef05d41d80ff 100755 (executable)
@@ -37,6 +37,7 @@
 #include "resolver.hh"
 #include "communicator.hh"
 #include "dnsproxy.hh"
+#include "version.hh"
 
 #if 0
 #undef DLOG
@@ -265,7 +266,7 @@ int PacketHandler::doVersionRequest(DNSPacket *p, DNSPacket *r, string &target)
     const static string mode=::arg()["version-string"];
   
     if(mode.empty() || mode=="full") 
-      rr.content="Served by POWERDNS "VERSION" $Id$";
+      rr.content=fullVersionString();
     else if(mode=="anonymous") {
       r->setRcode(RCode::ServFail);
       return 1;
index 7d159675aaca20e45842c38daf0248320375e520..89007c9388e9fafd9be2fe4c941f9b4cceb5e73f 100644 (file)
@@ -65,6 +65,7 @@
 #include "mplexer.hh"
 #include "config.h"
 #include "lua-recursor.hh"
+#include "version.hh"
 
 #ifndef RECURSOR
 #include "statbag.hh"
@@ -1666,20 +1667,7 @@ int serviceMain(int argc, char*argv[])
       L<<Logger::Error<<"Unknown logging facility "<<::arg().asNum("logging-facility") <<endl;
   }
 
-  L<<Logger::Warning<<"PowerDNS recursor "<<VERSION<<" (C) 2001-2013 PowerDNS.COM BV ("<<__DATE__", "__TIME__;
-#ifdef __GNUC__
-  L<<", gcc "__VERSION__;
-#endif // add other compilers here
-#ifdef _MSC_VER
-  L<<", MSVC "<<_MSC_VER;
-#endif
-  L<<") starting up"<<endl;
-  
-  L<<Logger::Warning<<"PowerDNS comes with ABSOLUTELY NO WARRANTY. "
-    "This is free software, and you are welcome to redistribute it "
-    "according to the terms of the GPL version 2."<<endl;
-  
-  L<<Logger::Warning<<"Operating in "<<(sizeof(unsigned long)*8) <<" bits mode"<<endl;
+  showProductVersion();
   
   #if 0
   unsigned int maxFDs, curFDs;
@@ -1993,6 +1981,7 @@ int main(int argc, char **argv)
   g_argc = argc;
   g_argv = argv;
   g_stats.startupTime=time(0);
+  versionSetProduct("Recursor");
   reportBasicTypes();
   reportOtherTypes();
 
@@ -2060,7 +2049,7 @@ int main(int argc, char **argv)
     ::arg().set("packetcache-servfail-ttl", "maximum number of seconds to keep a cached servfail entry in packetcache")="60";
     ::arg().set("server-id", "Returned when queried for 'server.id' TXT or NSID, defaults to hostname")="";
     ::arg().set("remotes-ringbuffer-entries", "maximum number of packets to store statistics for")="0";
-    ::arg().set("version-string", "string reported on version.pdns or version.bind")="PowerDNS Recursor "VERSION" $Id$";
+    ::arg().set("version-string", "string reported on version.pdns or version.bind")=fullVersionString();
     ::arg().set("allow-from", "If set, only allow these comma separated netmasks to recurse")=LOCAL_NETS;
     ::arg().set("allow-from-file", "If set, load allowed netmasks from this file")="";
     ::arg().set("entropy-source", "If set, read entropy from this file")="/dev/urandom";
@@ -2085,7 +2074,7 @@ int main(int argc, char **argv)
     
 
     ::arg().setCmd("help","Provide a helpful message");
-    ::arg().setCmd("version","Print version string ("VERSION")");
+    ::arg().setCmd("version","Print version string");
     ::arg().setCmd("config","Output blank configuration");
     L.toConsole(Logger::Info);
     ::arg().laxParse(argc,argv); // do a lax parse
@@ -2112,7 +2101,7 @@ int main(int argc, char **argv)
       exit(99);
     }
     if(::arg().mustDo("version")) {
-      cerr<<"version: "VERSION<<endl;
+      showProductVersion();
       exit(99);
     }
 
index 2f9563d91b67fd39589f9e8f0a97216fdc003c49..826bdd5d42a1e4c968f495801986bf83d1dcbafc 100644 (file)
@@ -62,6 +62,7 @@
 #include "utility.hh"
 #include "common_startup.hh"
 #include "dnsrecords.hh"
+#include "version.hh"
 
 
 time_t s_starttime;
@@ -369,8 +370,6 @@ static void loadModules()
   }
 }
 
-
-
 #ifdef __linux__
 #include <execinfo.h>
 static void tbhandler(int num)
@@ -396,7 +395,8 @@ static void tbhandler(int num)
 
 //! The main function of pdns, the pdns process
 int main(int argc, char **argv)
-{ 
+{
+  versionSetProduct("Authoritative Server");
   reportAllTypes(); // init MOADNSParser
 
   s_programname="pdns";
@@ -421,11 +421,7 @@ int main(int argc, char **argv)
     ::arg().laxParse(argc,argv); // do a lax parse
     
     if(::arg().mustDo("version")) {
-      cerr<<"Version: "VERSION", compiled on "<<__DATE__", "__TIME__;
-#ifdef __GNUC__ 
-      cerr<<" with gcc version "<<__VERSION__;
-#endif
-      cout<<endl;
+      showProductVersion();
       exit(99);
     }
 
@@ -584,17 +580,8 @@ int main(int argc, char **argv)
   
   declareStats();
   DLOG(L<<Logger::Warning<<"Verbose logging in effect"<<endl);
-  
-  L<<Logger::Warning<<"PowerDNS "<<VERSION<<" (C) 2001-2013 PowerDNS.COM BV ("<<__DATE__", "__TIME__;
-#ifdef __GNUC__
-  L<<", gcc "__VERSION__;
-#endif // add other compilers here
-  L<<") starting up"<<endl;
-
-  L<<Logger::Warning<<"PowerDNS comes with ABSOLUTELY NO WARRANTY. "
-    "This is free software, and you are welcome to redistribute it "
-    "according to the terms of the GPL version 2."<<endl;
 
+  showProductVersion();
 
   try {
 
diff --git a/pdns/version.cc b/pdns/version.cc
new file mode 100644 (file)
index 0000000..e46b496
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+    PowerDNS Versatile Database Driven Nameserver
+    Copyright (C) 2002 - 2013  PowerDNS.COM BV
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License version 2
+    as published by the Free Software Foundation
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#include "logger.hh"
+#include "version.hh"
+#include "version_generated.h"
+
+using namespace std;
+
+static string productName("");
+
+string compilerVersion()
+{
+#if defined(__clang__)
+  // clang defines __GNUC__ as well, so put it first.
+  return string("clang "__clang__version);
+#elif defined(__GNUC__)
+  return string("gcc "__VERSION__);
+#elif defined(_MSC_VER)
+  return string("MSVC "<<_MSC_VER);
+#endif // add other compilers here
+  return string("Unknown compiler");
+}
+
+void showProductVersion()
+{
+  theL()<<Logger::Warning<<"PowerDNS "<<productName<<" "<<PDNS_VERSION<<" ("DIST_HOST") "
+    "(C) 2001-2013 PowerDNS.COM BV" << endl;
+  theL()<<Logger::Warning<<"Using "<<(sizeof(unsigned long)*8)<<"-bits mode. "
+    "Built on "BUILD_DATE" by "BUILD_HOST", "<<compilerVersion()<<"."<<endl;
+  theL()<<Logger::Warning<<"PowerDNS comes with ABSOLUTELY NO WARRANTY. "
+    "This is free software, and you are welcome to redistribute it "
+    "according to the terms of the GPL version 2." << endl;
+}
+
+string fullVersionString()
+{
+  stringstream s;
+  s << "PowerDNS "<<productName<<" "PDNS_VERSION" ("DIST_HOST" built "BUILD_DATE" "BUILD_HOST")";
+  return s.str();
+}
+
+void versionSetProduct(string product)
+{
+  productName = product;
+}
diff --git a/pdns/version.hh b/pdns/version.hh
new file mode 100644 (file)
index 0000000..26d569a
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+    PowerDNS Versatile Database Driven Nameserver
+    Copyright (C) 2002-2013  PowerDNS.COM BV
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License version 2
+    as published by the Free Software Foundation
+    
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+#ifndef VERSION_HH
+#define VERSION_HH
+
+#include <string>
+#include <sstream>
+
+std::string compilerVersion();
+void showProductVersion();
+std::string fullVersionString();
+void versionSetProduct(std::string product);
+
+#endif //!VERSION_HH
index 3050ccedb98700c09bfe0e686509b074492c34c0..1581839bc325f4a7e6084e7522a4f3724fb6ca83 100644 (file)
@@ -32,6 +32,7 @@
 #include "rapidjson/document.h"
 #include "rapidjson/stringbuffer.h"
 #include "rapidjson/writer.h"
+#include "version.hh"
 
 using namespace rapidjson;
 
@@ -235,7 +236,7 @@ string StatWebServer::indexfunction(const string& method, const string& post, co
     printtable(ret,rvarmap["ring"],S.getRingTitle(rvarmap["ring"]),100);
 
   ret<<"</div></div>"<<endl;
-  ret<<"<footer class=\"row\">PowerDNS Authoritative Server "VERSION". &copy; 2013 <a href=\"http://www.powerdns.com/\">PowerDNS.COM BV</a>.</footer>"<<endl;
+  ret<<"<footer class=\"row\">"<<fullVersionString()<<"<br>&copy; 2013 <a href=\"http://www.powerdns.com/\">PowerDNS.COM BV</a>.</footer>"<<endl;
   ret<<"</body></html>"<<endl;
 
   return ret.str();