FreeBSD Bugzilla – Attachment 70138 Details for
Bug 102406
[PATCH] Update port: net-p2p/verlihub fix plugin support, add rc(8) script, fix dependencies, modify doc set, add db_charset patch, ad installation fixes, fix portlint warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 14.96 KB, created by
Pankov Pavel
on 2006-08-22 23:10:16 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Pankov Pavel
Created:
2006-08-22 23:10:16 UTC
Size:
14.96 KB
patch
obsolete
>diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/Makefile /home/pankovpv/ports/net-p2p/verlihub/Makefile >--- /usr/ports/net-p2p/verlihub/Makefile Sun Aug 20 22:58:56 2006 >+++ /home/pankovpv/ports/net-p2p/verlihub/Makefile Mon Aug 21 02:56:50 2006 >@@ -7,7 +7,7 @@ > > PORTNAME= verlihub > PORTVERSION= 0.9.8.c >-PORTREVISION= 1 >+PORTREVISION= 2 > PORTEPOCH= 1 > CATEGORIES= net-p2p > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} >@@ -15,41 +15,39 @@ > DISTNAME= verlihub-0.9.8c-RC2 > > MAINTAINER= hurbold@yahoo.com >-COMMENT= Verlihub Linux/Unix Direct Connect Hub Software >+COMMENT= A Linux/Unix Direct Connect Hub Software > > LIB_DEPENDS= GeoIP.5:${PORTSDIR}/net/GeoIP \ > pcre.0:${PORTSDIR}/devel/pcre >+# Actually, bash isn't required for building, >+# but otherwise configure script wouldn't pick the right path >+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash2 > RUN_DEPENDS= bash:${PORTSDIR}/shells/bash2 > > WRKSRC= ${WRKDIR}/verlihub-0.9.8c > > USE_MYSQL= yes >-USE_PERL5= yes >-USE_GMAKE= yes > GNU_CONFIGURE= yes >-INSTALLS_SHLIB= yes >-CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" >+USE_LDCONFIG= yes >+USE_GCC= 3.4+ >+USE_OPENSSL= yes > >-PKGMESSAGE= ${WRKDIR}/pkg-message >-PORTDOCS= configuring.txt help.sql using.txt features.html help.html params.php verlihub.html >+SUB_FILES= pkg-message >+USE_RC_SUBR= ${PORTNAME} > >-.include <bsd.port.pre.mk> >- >-.if ${OSVERSION} < 500000 >-USE_GCC= 3.4+ >-.endif >+PORTDOCS= configuring.txt using.txt help.html verlihub.html html_manual/verlihub.css html_manual/verlihub_manual.html > > post-patch: >- @${CAT} ${PKGDIR}/pkg-message | ${SED} 's|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE} >+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/verlihub.cpp > > post-install: > .if !defined(NOPORTDOCS) >- ${MKDIR} ${DOCSDIR} >+ @${MKDIR} ${DOCSDIR} >+ @${MKDIR} ${DOCSDIR}/html_manual > .for i in ${PORTDOCS} > ${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR} > .endfor > .endif >- > @${CAT} ${PKGMESSAGE} > >-.include <bsd.port.post.mk> >+.include <bsd.port.mk> >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-cserverdc.cpp /home/pankovpv/ports/net-p2p/verlihub/files/patch-cserverdc.cpp >--- /usr/ports/net-p2p/verlihub/files/patch-cserverdc.cpp Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-cserverdc.cpp Mon Aug 21 00:30:56 2006 >@@ -0,0 +1,11 @@ >+--- src/cserverdc.cpp-orig Tue Mar 8 12:27:21 2005 >++++ src/cserverdc.cpp Mon Aug 21 00:22:10 2006 >+@@ -151,7 +151,7 @@ >+ mOpChat->mMyINFO_basic = mOpChat->mMyINFO; >+ AddRobot((cMainRobot*)mOpChat); >+ } >+- mNetOutLog.open("./net_out.log",ios::out); >++ mNetOutLog.open("/var/log/verlihub_net_out.log",ios::out); >+ mTotalShare = 0; >+ >+ mFactory = new cDCConnFactory(this); >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-db_charset /home/pankovpv/ports/net-p2p/verlihub/files/patch-db_charset >--- /usr/ports/net-p2p/verlihub/files/patch-db_charset Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-db_charset Mon Aug 21 01:40:47 2006 >@@ -0,0 +1,83 @@ >+diff -ruN src-orig/cdbconf.cpp src/cdbconf.cpp >+--- src-orig/cdbconf.cpp Thu Apr 8 02:16:21 2004 >++++ src/cdbconf.cpp Mon Aug 21 01:39:14 2006 >+@@ -20,6 +20,7 @@ >+ Add("db_data",db_data,string("verlihub")); >+ Add("config_name",config_name,string("config")); >+ Add("lang_name",lang_name,string("lang_en")); >++ Add("db_charset",db_charset,string("utf8")); >+ Load(); >+ } >+ >+diff -ruN src-orig/cdbconf.h src/cdbconf.h >+--- src-orig/cdbconf.h Thu Apr 8 02:16:21 2004 >++++ src/cdbconf.h Mon Aug 21 01:38:59 2006 >+@@ -31,6 +31,7 @@ >+ string db_user; >+ string db_pass; >+ string db_data; >++ string db_charset; >+ string config_name; >+ string lang_name; >+ >+diff -ruN src-orig/cmysql.cpp src/cmysql.cpp >+--- src-orig/cmysql.cpp Fri Oct 1 15:19:44 2004 >++++ src/cmysql.cpp Mon Aug 21 01:38:59 2006 >+@@ -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, >+ host.c_str(), >+diff -ruN src-orig/cmysql.h src/cmysql.h >+--- src-orig/cmysql.h Mon Mar 8 18:59:56 2004 >++++ src/cmysql.h Mon Aug 21 01:38:59 2006 >+@@ -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 -ruN src-orig/cserverdc.cpp src/cserverdc.cpp >+--- src-orig/cserverdc.cpp Tue Mar 8 12:27:21 2005 >++++ src/cserverdc.cpp Mon Aug 21 01:38:59 2006 >+@@ -66,7 +66,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 -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-scripts-vh_install.in /home/pankovpv/ports/net-p2p/verlihub/files/patch-scripts-vh_install.in >--- /usr/ports/net-p2p/verlihub/files/patch-scripts-vh_install.in Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-scripts-vh_install.in Sun Aug 20 20:20:30 2006 >@@ -0,0 +1,16 @@ >+--- scripts/vh_install.in-orig Sat Mar 5 04:24:59 2005 >++++ scripts/vh_install.in Sun Aug 20 20:18:09 2006 >+@@ -210,10 +210,13 @@ >+ echo "FYI: original configuration has been moved to $cfg_dir/_backup" >+ fi >+ >++ $old_umask=`umask` >++ umask 77 >+ echo "db_host = $mysql_host" > $cfg_dbconfig >+ echo "db_data = $mysql_data" >> $cfg_dbconfig >+ echo "db_user = $mysql_user" >> $cfg_dbconfig >+ echo "db_pass = $mysql_pass" >> $cfg_dbconfig >++ umask $old_umask >+ >+ echo "Written: $cfg_dbconfig" >+ >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-scripts-vh_runhub.in /home/pankovpv/ports/net-p2p/verlihub/files/patch-scripts-vh_runhub.in >--- /usr/ports/net-p2p/verlihub/files/patch-scripts-vh_runhub.in Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-scripts-vh_runhub.in Sun Aug 20 23:28:28 2006 >@@ -0,0 +1,15 @@ >+--- scripts/vh_runhub.in-orig Sat Mar 5 03:52:33 2005 >++++ scripts/vh_runhub.in Sun Aug 20 23:25:45 2006 >+@@ -14,9 +14,9 @@ >+ >+ confdir=`$bindir/vh_getcfg` || die "fix your problem with vh_getcfg, maybe just run vh_install first" >+ exepath=$bindir/ # default location for the hub config directory >+-pidfile=$confdir/pid >+-logfile=$confdir/log >+-errfile=$confdir/err >++pidfile=/var/run/verlihub.pid >++logfile=/var/log/verlihub.log >++errfile=/var/log/verlihub.err >+ psname=vh_restart >+ launcher=$bindir/$psname >+ killsig= >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-src-cpluginloader.cpp /home/pankovpv/ports/net-p2p/verlihub/files/patch-src-cpluginloader.cpp >--- /usr/ports/net-p2p/verlihub/files/patch-src-cpluginloader.cpp Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-src-cpluginloader.cpp Mon Aug 21 02:40:52 2006 >@@ -0,0 +1,28 @@ >+--- src/cpluginloader.cpp.orig Fri Oct 1 15:19:44 2004 >++++ src/cpluginloader.cpp Mon Aug 21 02:39:33 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 --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-src-tpluginbase.cpp /home/pankovpv/ports/net-p2p/verlihub/files/patch-src-tpluginbase.cpp >--- /usr/ports/net-p2p/verlihub/files/patch-src-tpluginbase.cpp Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-src-tpluginbase.cpp Mon Aug 21 01:59:54 2006 >@@ -0,0 +1,15 @@ >+--- src/tpluginbase.cpp-orig Fri Oct 1 15:19:44 2004 >++++ src/tpluginbase.cpp Mon Aug 21 01:56:22 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 -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/patch-src-verlihub.cpp /home/pankovpv/ports/net-p2p/verlihub/files/patch-src-verlihub.cpp >--- /usr/ports/net-p2p/verlihub/files/patch-src-verlihub.cpp Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/patch-src-verlihub.cpp Sun Aug 20 18:36:48 2006 >@@ -0,0 +1,11 @@ >+--- src/verlihub.cpp-orig Tue Dec 21 15:48:46 2004 >++++ src/verlihub.cpp Sun Aug 20 18:22:29 2006 >+@@ -81,6 +81,8 @@ >+ { >+ string ConfigBase; >+ const char *DirName = NULL; >++ DirName = "%%PREFIX%%/etc/verlihub"; >++ if ((DirName != NULL) && DirExists(DirName)) ConfigBase = DirName; >+ char *HomeDir = getenv("HOME"); >+ string tmp; >+ if (HomeDir) >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/pkg-message.in /home/pankovpv/ports/net-p2p/verlihub/files/pkg-message.in >--- /usr/ports/net-p2p/verlihub/files/pkg-message.in Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/pkg-message.in Mon Aug 21 02:55:50 2006 >@@ -0,0 +1,18 @@ >+-------------------------------------------------------------------- >+ >+Documentation has been installed in %%DOCSDIR%% >+ >+This port requires a working mysql server installation, either >+locally or remotely. Once you have a properly-running mysql server, >+please run the install script: >+ >+%%PREFIX%%/bin/vh_install >+ >+Follow the instructions given. After it verlihub can be controlled >+through the rc(8) script %%PREFIX%%/etc/rc.d/%%PORTNAME%%.sh >+ >+Visit http://www.verlihub.net for the project's homepage >+or http://www.verlihubforums.com for the project's forums. The verlihub >+manual is available online at http://www.danomac.org/verlihub/ >+ >+------------------------------------------------------------------- >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/files/verlihub.in /home/pankovpv/ports/net-p2p/verlihub/files/verlihub.in >--- /usr/ports/net-p2p/verlihub/files/verlihub.in Thu Jan 1 03:00:00 1970 >+++ /home/pankovpv/ports/net-p2p/verlihub/files/verlihub.in Wed Aug 23 01:43:41 2006 >@@ -0,0 +1,36 @@ >+#!/bin/sh >+ >+# PROVIDE: verlihub >+# REQUIRE: DAEMON >+# >+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf >+# to enable this service: >+# >+# verlihub_enable (bool): Set to NO by default. >+# Set it to YES to enable verlihub. >+# >+ >+. "%%RC_SUBR%%" >+ >+name="verlihub" >+rcvar=${name}_enable >+ >+command=%%PREFIX%%/bin/${name} >+pidfile=/var/run/${name}.pid >+ >+logfile=/var/log/${name}.log >+errfile=/var/log/${name}.err >+command_args="> $logfile 2> $errfile &" >+ >+: ${verlihub_configdir="`%%PREFIX%%/bin/vh_getcfg`"} >+required_dirs="$verlihub_configdir" >+required_files="$verlihub_configdir/dbconfig $verlihub_configdir/motd $verlihub_configdir/help_usr $verlihub_configdir/faq $verlihub_configdir/rules" >+ >+load_rc_config $name >+ >+: ${verlihub_enable="NO"} >+ >+start_postcmd="echo \$! > $pidfile" >+stop_postcmd="rm $pidfile" >+ >+run_rc_command "$1" >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/pkg-descr /home/pankovpv/ports/net-p2p/verlihub/pkg-descr >--- /usr/ports/net-p2p/verlihub/pkg-descr Thu Jun 24 18:54:02 2004 >+++ /home/pankovpv/ports/net-p2p/verlihub/pkg-descr Mon Aug 21 03:01:15 2006 >@@ -4,7 +4,7 @@ > Additional functionality is available through a versatile > 'plugin' system. > >-WWW: http://verlihub.sourceforge.net >+WWW: http://www.verlihub.net > > -Hurbold > hurbold@yahoo.com >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/pkg-message /home/pankovpv/ports/net-p2p/verlihub/pkg-message >--- /usr/ports/net-p2p/verlihub/pkg-message Sun Aug 29 14:42:11 2004 >+++ /home/pankovpv/ports/net-p2p/verlihub/pkg-message Thu Jan 1 03:00:00 1970 >@@ -1,21 +0,0 @@ >--------------------------------------------------------------------- >- >-Documentation has been installed in %%PREFIX%%/share/doc >- >-Scripts and the executable have been installed in %%PREFIX%%/bin >- >-This port requires a working mysql server installation, either >-locally or remotely. >- >-Once you have a properly-running mysql server, please run the install >-script: >- >-%%PREFIX%%/bin/vh_install >- >-Follow the instructions given. >- >-Visit http://verlihub.sourceforge.net for the project's homepage >-or http://verlihub.no-ip.com for the project's forums. The verlihub >-manual is available online at http://www.danomac.org/verlihub >- >-------------------------------------------------------------------- >diff -ruN --exclude=CVS /usr/ports/net-p2p/verlihub/pkg-plist /home/pankovpv/ports/net-p2p/verlihub/pkg-plist >--- /usr/ports/net-p2p/verlihub/pkg-plist Sat Oct 8 19:41:31 2005 >+++ /home/pankovpv/ports/net-p2p/verlihub/pkg-plist Mon Aug 21 01:04:35 2006 >@@ -101,21 +101,21 @@ > lib/libvhapi.la > lib/libvhapi.so > lib/libvhapi.so.0 >-share/verlihub/config/faq >-share/verlihub/config/help_admin >-share/verlihub/config/help_cheef >-share/verlihub/config/help_master >-share/verlihub/config/help_op >-share/verlihub/config/help_reg >-share/verlihub/config/help_usr >-share/verlihub/config/help_vip >-share/verlihub/config/motd >-share/verlihub/config/rules >-share/verlihub/sql/default_pi_plug.sql >-share/verlihub/sql/default_conn_types.sql >-share/verlihub/sql/default_file_trigger.sql >-share/verlihub/sql/default_reglist.sql >+%%DATADIR%%/config/faq >+%%DATADIR%%/config/help_admin >+%%DATADIR%%/config/help_cheef >+%%DATADIR%%/config/help_master >+%%DATADIR%%/config/help_op >+%%DATADIR%%/config/help_reg >+%%DATADIR%%/config/help_usr >+%%DATADIR%%/config/help_vip >+%%DATADIR%%/config/motd >+%%DATADIR%%/config/rules >+%%DATADIR%%/sql/default_pi_plug.sql >+%%DATADIR%%/sql/default_conn_types.sql >+%%DATADIR%%/sql/default_file_trigger.sql >+%%DATADIR%%/sql/default_reglist.sql > @dirrm include/verlihub >-@dirrm share/verlihub/config >-@dirrm share/verlihub/sql >-@dirrm share/verlihub >+@dirrm %%DATADIR%%/config >+@dirrm %%DATADIR%%/sql >+@dirrm %%DATADIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 102406
: 70138 |
70139
|
70140
|
70141