diff options
author | wen <wen@FreeBSD.org> | 2009-11-13 17:32:39 +0800 |
---|---|---|
committer | wen <wen@FreeBSD.org> | 2009-11-13 17:32:39 +0800 |
commit | 2e197fe92e1942be948063bd8a83567b776c49b1 (patch) | |
tree | 7fd76973c90b11dd0267086d0fbdcf44261f49d9 | |
parent | b16283630d08cf0bb16782bbec1b2f1aaf505392 (diff) | |
download | freebsd-ports-gnome-2e197fe92e1942be948063bd8a83567b776c49b1.tar.gz freebsd-ports-gnome-2e197fe92e1942be948063bd8a83567b776c49b1.tar.zst freebsd-ports-gnome-2e197fe92e1942be948063bd8a83567b776c49b1.zip |
- Update to 0.9.8e-r1
- Database charset is utf8 by default now - according to new version
changes. Message to user after install added.
- Fix GeoIP prefix handling.
- This version uses gcc 4.2+
- Some clean up
- Mantainer e-mail change
PR: ports/137220
Submitted by: Mikle Davidkin <me@skylord.ru> (maintainer)
-rw-r--r-- | net-p2p/verlihub/Makefile | 24 | ||||
-rw-r--r-- | net-p2p/verlihub/distinfo | 6 | ||||
-rw-r--r-- | net-p2p/verlihub/files/patch-CVE-2008-5706 | 82 | ||||
-rw-r--r-- | net-p2p/verlihub/files/patch-db_charset | 83 | ||||
-rw-r--r-- | net-p2p/verlihub/files/patch-plugins | 45 | ||||
-rw-r--r-- | net-p2p/verlihub/files/patch-thublink | 29 | ||||
-rw-r--r-- | net-p2p/verlihub/files/pkg-message.in | 20 | ||||
-rw-r--r-- | net-p2p/verlihub/pkg-plist | 6 |
8 files changed, 32 insertions, 263 deletions
diff --git a/net-p2p/verlihub/Makefile b/net-p2p/verlihub/Makefile index 70b3d58e4b91..282ac94efe85 100644 --- a/net-p2p/verlihub/Makefile +++ b/net-p2p/verlihub/Makefile @@ -6,13 +6,12 @@ # PORTNAME= verlihub -DISTVERSION= 0.9.8d-RC2 -PORTREVISION= 3 +DISTVERSION= 0.9.8e-r1 PORTEPOCH= 1 CATEGORIES= net-p2p MASTER_SITES= SF/${PORTNAME}/Verlihub/${DISTVERSION} -MAINTAINER= skylord@vt.net.ru +MAINTAINER= me@skylord.ru COMMENT= A Direct Connect protocol server (Hub) # XXX: Actually, bash isn't required for building, @@ -23,7 +22,7 @@ LIB_DEPENDS= GeoIP.5:${PORTSDIR}/net/GeoIP \ RUN_DEPENDS= bash:${PORTSDIR}/shells/bash USE_RC_SUBR= verlihub - +USE_GCC= 4.2+ USE_AUTOTOOLS= libtool:22 USE_MYSQL= yes GNU_CONFIGURE= yes @@ -31,23 +30,10 @@ USE_LDCONFIG= yes USE_OPENSSL= yes SUB_FILES+= pkg-message -DOCS= configuring.txt using.txt help.html verlihub.html -MANUAL_DOCS= verlihub.css verlihub_manual.html -PORTDOCS= ${DOCS} ${MANUAL_DOCS} - -post-extract: - @${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC} +post-patch: + @${REINPLACE_CMD} -e 's|for libpath in /|for libpath in ${PREFIX} /|g' ${WRKSRC}/config_geoip post-install: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for i in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR} -.endfor -.for i in ${MANUAL_DOCS} - ${INSTALL_DATA} ${WRKSRC}/docs/html_manual/${i} ${DOCSDIR} -.endfor -.endif @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/net-p2p/verlihub/distinfo b/net-p2p/verlihub/distinfo index 40c14a1d02d8..cf5ea56e4504 100644 --- a/net-p2p/verlihub/distinfo +++ b/net-p2p/verlihub/distinfo @@ -1,3 +1,3 @@ -MD5 (verlihub-0.9.8d-RC2.tar.gz) = 0824be2cf3af08ccda1638c5d5d0bc4e -SHA256 (verlihub-0.9.8d-RC2.tar.gz) = baf64574d0ed89324b6b2da35d32ebb5fd9af164c83b10bdf45a49b8a8f0fc59 -SIZE (verlihub-0.9.8d-RC2.tar.gz) = 1095383 +MD5 (verlihub-0.9.8e-r1.tar.gz) = 663ef7254b79d382c3943e5c0409b640 +SHA256 (verlihub-0.9.8e-r1.tar.gz) = 1b3e981717f5e0c972778f48918ba54cb1a4b833426854c8e3eb295effc2c01d +SIZE (verlihub-0.9.8e-r1.tar.gz) = 729317 diff --git a/net-p2p/verlihub/files/patch-CVE-2008-5706 b/net-p2p/verlihub/files/patch-CVE-2008-5706 deleted file mode 100644 index 61dc4ca9bef6..000000000000 --- a/net-p2p/verlihub/files/patch-CVE-2008-5706 +++ /dev/null @@ -1,82 +0,0 @@ ---- src/ctrigger.cpp.orig 2005-04-11 19:18:38.000000000 +0400 -+++ src/ctrigger.cpp 2008-12-27 23:28:14.000000000 +0300 -@@ -7,6 +7,9 @@ - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ -+#include <errno.h> -+#include <stdio.h> -+#include <string.h> - #include "cserverdc.h" - #include "ctrigger.h" - #include "cconndc.h" -@@ -44,16 +47,33 @@ - { - string buf, filename, sender; - string par1, end1, parall; -+ string cmdl; -+ - if (conn && conn->mpUser) - { -+ cmd_line >> cmdl; -+ /* Sanitise user input if we're going to exec anything */ -+ if (mFlags & eTF_EXECUTE && server.mDBConf.allow_exec) { -+ string cleaned = string(); -+ const string toclean = string(";\"'\\`:!${}[]&><|~/"); -+ -+ for (string::iterator i = cmdl.begin(); -+ i < cmdl.end(); -+ i++) { -+ if (toclean.find(*i) == string::npos) -+ cleaned.append(1, *i); -+ } -+ cmdl = cleaned; -+ } -+ - int uclass = conn->mpUser->mClass; - if ((uclass >= this->mMinClass) &&(uclass <= this->mMaxClass)) { - -- if(cmd_line.str().size() > mCommand.size()) { -- parall.assign(cmd_line.str(),mCommand.size()+1,string::npos); -+ if(cmdl.size() > mCommand.size()) { -+ parall.assign(cmdl,mCommand.size()+1,string::npos); - } -- cmd_line >> par1; -- end1 = cmd_line.str(); -+ par1 = cmdl; -+ end1 = cmdl; - - sender = server.mC.hub_security; - if (mSendAs.size()) sender = mSendAs; -@@ -104,14 +124,25 @@ - - if (mFlags & eTF_EXECUTE && server.mDBConf.allow_exec) { - string command(buf); -- filename = server.mConfigBaseDir; -- filename.append("/tmp/trigger.tmp"); -- command.append(" > "); -- command.append(filename); -+ char buffer[1024]; -+ FILE *stream; -+ - cout << command << endl; -- system(command.c_str()); - buf = ""; -- if (!LoadFileInString(filename,buf)) return 0; -+ stream = popen(command.c_str(), "r"); -+ if (stream == NULL) { -+ cout << strerror(errno) << std::endl; -+ return 0; -+ } else { -+ while (fgets(buffer, sizeof(buffer), -+ stream) != NULL) -+ buf.append(buffer); -+ if (pclose(stream) == -1) { -+ cout << strerror(errno) << -+ std::endl; -+ return 0; -+ } -+ } - } - - // @CHANGED by dReiska +BEGINS+ diff --git a/net-p2p/verlihub/files/patch-db_charset b/net-p2p/verlihub/files/patch-db_charset deleted file mode 100644 index 447a33bc147c..000000000000 --- a/net-p2p/verlihub/files/patch-db_charset +++ /dev/null @@ -1,83 +0,0 @@ ---- src/cdbconf.cpp Thu Apr 8 02:16:21 2004 -+++ src/cdbconf.cpp Thu Oct 12 16:57:43 2006 -@@ -18,6 +18,7 @@ - Add("db_user",db_user,string("verlihub")); - Add("db_pass",db_pass,string("")); - Add("db_data",db_data,string("verlihub")); -+ Add("db_charset",db_charset,string("latin1")); - Add("config_name",config_name,string("config")); - Add("lang_name",lang_name,string("lang_en")); - Load(); - -diff -Nur verlihub-orig/src/cdbconf.h verlihub/src/cdbconf.h ---- src/cdbconf.h 2006-07-15 18:42:52.000000000 +0400 -+++ src/cdbconf.h 2006-07-15 18:43:50.000000000 +0400 -@@ -31,6 +31,7 @@ - string db_user; - string db_pass; - string db_data; -+ string db_charset; - string config_name; - string lang_name; - bool allow_exec; -diff -Nur verlihub-orig/src/cmysql.cpp verlihub/src/cmysql.cpp ---- src/cmysql.cpp.orig Sun Jun 24 00:11:33 2007 -+++ src/cmysql.cpp Tue Jan 29 16:39:29 2008 -@@ -19,10 +19,10 @@ - /*! - \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data) - */ --cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL") -+cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL") - { - Init(); -- if(!Connect(host,user,pass,data)) -+ if(!Connect(host,user,pass,data,charset)) - { - throw "Mysql connection error."; - } -@@ -40,12 +40,13 @@ - if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: ")); - } - --bool cMySQL::Connect(string &host, string &user, string &pass, string &data) -+bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset) - { - if(Log(1)) LogStream() << "Connecting to mysql server: " -- << user << "@" << host << "/" << data << endl; -+ << user << "@" << host << "/" << data << "with charset " << charset << endl; - - mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0); -+ mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str()); - - if(!mysql_real_connect( - mDBHandle, -diff -Nur verlihub-orig/src/cmysql.h verlihub/src/cmysql.h ---- src/cmysql.h 2006-07-15 18:42:52.000000000 +0400 -+++ src/cmysql.h 2006-07-15 18:43:50.000000000 +0400 -@@ -34,10 +34,10 @@ - friend class cQuery; - public: - cMySQL(); -- cMySQL(string&host,string&user,string&pass,string&data); -+ cMySQL(string&host,string&user,string&pass,string&data,string&charset); - ~cMySQL(); - void Init(); -- bool Connect(string &host, string &user, string &passwd, string &db); -+ bool Connect(string &host, string &user, string &passwd, string &db, string &charset); - public: void Error(int level, string text); - - private: -diff -Nur verlihub-orig/src/cserverdc.cpp verlihub/src/cserverdc.cpp ---- src/cserverdc.cpp 2006-07-15 18:42:52.000000000 +0400 -+++ src/cserverdc.cpp 2006-07-15 18:43:50.000000000 +0400 -@@ -72,7 +72,8 @@ - mDBConf.db_host, - mDBConf.db_user, - mDBConf.db_pass, -- mDBConf.db_data), // connect to mysql -+ mDBConf.db_data, -+ mDBConf.db_charset), // connect to mysql - mC(*this), // create the config object - mL(*this), - mSetupList(mMySQL), diff --git a/net-p2p/verlihub/files/patch-plugins b/net-p2p/verlihub/files/patch-plugins deleted file mode 100644 index d8a1436dd5c5..000000000000 --- a/net-p2p/verlihub/files/patch-plugins +++ /dev/null @@ -1,45 +0,0 @@ -diff -ruN src-orig/cpluginloader.cpp src/cpluginloader.cpp ---- src-orig/cpluginloader.cpp Fri Oct 1 15:19:44 2004 -+++ src/cpluginloader.cpp Thu Oct 12 17:16:22 2006 -@@ -40,6 +40,12 @@ - */ - bool nPlugin::cPluginLoader::Open() - { -+ /* -+ * Reset dlerror() since it can contain error from previous -+ * call to dlopen()/dlsym(). -+ */ -+ dlerror(); -+ - mHandle = dlopen(mFileName.c_str(), RTLD_NOW); - if(!mHandle || IsError()) // NOTE hte OR (||) operator evaluates only the first statement if that one is true - { -@@ -99,6 +105,12 @@ - */ - void * nPlugin::cPluginLoader::LoadSym(const char *name) - { -+ /* -+ * Reset dlerror() since it can contain error from previous -+ * call to dlopen()/dlsym(). -+ */ -+ dlerror(); -+ - void *func = dlsym( mHandle, name); - if(IsError()) - { -diff -ruN src-orig/tpluginbase.cpp src/tpluginbase.cpp ---- src-orig/tpluginbase.cpp Fri Oct 1 15:19:44 2004 -+++ src/tpluginbase.cpp Thu Oct 12 17:16:39 2006 -@@ -34,6 +34,12 @@ - */ - bool nPlugin::tPluginBase::Open() - { -+ /* -+ * Reset dlerror() since it can contain error from previous -+ * call to dlopen()/dlsym(). -+ */ -+ dlerror(); -+ - mHandle = dlopen(mFileName.c_str(), RTLD_NOW); - if(!mHandle) - { diff --git a/net-p2p/verlihub/files/patch-thublink b/net-p2p/verlihub/files/patch-thublink index 77dce37bb7c0..6ac4036c56b7 100644 --- a/net-p2p/verlihub/files/patch-thublink +++ b/net-p2p/verlihub/files/patch-thublink @@ -100,21 +100,6 @@ diff -u -r1.89 casyncconn.cpp cMessageParser *cAsyncConn::CreateParser() { if (this->mxProtocol != NULL) -Index: casyncsocketserver.cpp -=================================================================== -RCS file: /cvsroot/verlihub/verlihub/src/casyncsocketserver.cpp,v -retrieving revision 1.70 -diff -u -r1.70 casyncsocketserver.cpp ---- src/casyncsocketserver.cpp 27 Mar 2006 13:37:32 -0000 1.70 -+++ src/casyncsocketserver.cpp 17 Jun 2006 21:27:43 -0000 -@@ -198,6 +198,7 @@ - return; - } - tCLIt it = old_conn->mIterator;//find(mConnList.begin(), mConnList.end(), old_conn); -+ - cAsyncConn *found=(*it); - if( (it == mConnList.end()) || (found != old_conn) ) - { Index: cconndc.cpp =================================================================== RCS file: /cvsroot/verlihub/verlihub/src/cconndc.cpp,v @@ -164,7 +149,7 @@ retrieving revision 1.235 diff -u -r1.235 cserverdc.cpp --- src/cserverdc.cpp 8 Nov 2005 07:51:23 -0000 1.235 +++ src/cserverdc.cpp 17 Jun 2006 21:27:44 -0000 -@@ -492,7 +492,7 @@ +@@ -505,7 +505,7 @@ } int count=0; @@ -173,7 +158,7 @@ diff -u -r1.235 cserverdc.cpp { conn=(cConnDC *)(*i); if(conn && conn->ok && conn->mWritable && conn->mpUser && conn->mpUser->mInList) -@@ -516,7 +516,7 @@ +@@ -529,7 +529,7 @@ cConnDC *conn; tCLIt i; int counter = 0; @@ -182,16 +167,16 @@ diff -u -r1.235 cserverdc.cpp { conn=(cConnDC *)(*i); if( -@@ -541,7 +541,7 @@ - static string str; +@@ -555,7 +555,7 @@ cConnDC *conn; tCLIt i; + int counter = 0; - for(i=mConnList.begin(); i!= mConnList.end(); i++) + for(i=mDCConnList.begin(); i!= mDCConnList.end(); i++) { conn=(cConnDC *)(*i); if( -@@ -563,6 +563,9 @@ +@@ -579,6 +579,9 @@ /** return negative if conn should be removed */ int cServerDC::OnNewConn(cAsyncConn *nc) { @@ -201,7 +186,7 @@ diff -u -r1.235 cserverdc.cpp cConnDC *conn = (cConnDC *)nc; stringstream errmsg,os; if(!conn) return -1; -@@ -909,7 +912,7 @@ +@@ -925,7 +928,7 @@ /** return true if accept is allowed - override */ bool cServerDC::AllowNewConn() { @@ -210,7 +195,7 @@ diff -u -r1.235 cserverdc.cpp } int cServerDC::SaveFile(const string &file, const string &text) -@@ -1268,6 +1271,7 @@ +@@ -1280,6 +1283,7 @@ delete work; return 0; } diff --git a/net-p2p/verlihub/files/pkg-message.in b/net-p2p/verlihub/files/pkg-message.in index 99cfd77e13d3..4d95422f6067 100644 --- a/net-p2p/verlihub/files/pkg-message.in +++ b/net-p2p/verlihub/files/pkg-message.in @@ -1,12 +1,15 @@ -------------------------------------------------------------------- -Documentation has been installed in %%DOCSDIR%%/. - Scripts and the executable have been installed in %%PREFIX%%/bin/. This port requires a working MySQL server installation, either locally or remotely. +Visit http://www.verlihub-project.org/ for the project's homepage, +manual, forums, scripts and etc. + +INSTALLATION + Once you have a properly-running MySQL server, please run install script: @@ -14,8 +17,15 @@ script: and follow the instructions given. -Visit http://www.verlihub-project.org/ for the project's homepage -or http://www.verlihubforums.com/ for the project's forums. The -verlihub manual is available at http://www.danomac.org/verlihub/. +UPGRADE + +If you upgrade from version prior to 0.9.8e please note the +following: + + - Database charset is now set explicitly to UTF8 - velihub + will alter all tables during the first run. So if you have + used custom charset you should deal with it (backup, i.e.) + before the first run! + - You need to rerun vh_install as during the first installation ------------------------------------------------------------------- diff --git a/net-p2p/verlihub/pkg-plist b/net-p2p/verlihub/pkg-plist index 9f4a5892f46b..170d68427eba 100644 --- a/net-p2p/verlihub/pkg-plist +++ b/net-p2p/verlihub/pkg-plist @@ -27,6 +27,8 @@ include/verlihub/cconndc.h include/verlihub/cconnpoll.h include/verlihub/cconnselect.h include/verlihub/cconntypes.h +include/verlihub/ccustomredirect.h +include/verlihub/ccustomredirects.h include/verlihub/cdbconf.h include/verlihub/cdcclients.h include/verlihub/cdccommand.h @@ -85,10 +87,6 @@ include/verlihub/tmysqlmemoryhash.h include/verlihub/tmysqlmemorylist.h include/verlihub/tmysqlmemoryordlist.h include/verlihub/tpluginbase.h -lib/libdiakritika_pi.a -lib/libdiakritika_pi.la -lib/libdiakritika_pi.so -lib/libdiakritika_pi.so.0 lib/libplug_pi.a lib/libplug_pi.la lib/libplug_pi.so |