ports/183059: [UPDATE] net/scribe
Valery Komarov
komarov at valerka.net
Thu Oct 17 14:00:01 UTC 2013
>Number: 183059
>Category: ports
>Synopsis: [UPDATE] net/scribe
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 17 14:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Valery Komarov
>Release: FreeBSD 10.0-ALPHA2
>Organization:
>Environment:
>Description:
ports:
devel/fb303
devel/php5-thrift
devel/py-thrift
devel/rubygem-thrift
net/scribe
devel/thrift-c_glib
devel/thrift-cpp
devel/thrift
must be committed together.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -ruN /usr/ports/net/scribe/Makefile scribe/Makefile
--- /usr/ports/net/scribe/Makefile 2013-09-21 02:10:23.000000000 +0400
+++ scribe/Makefile 2013-10-17 20:12:16.000000000 +0400
@@ -2,8 +2,7 @@
# $FreeBSD: net/scribe/Makefile 327755 2013-09-20 22:10:23Z bapt $
PORTNAME= scribe
-DISTVERSION= 2.2.2012.01.07
-PORTREVISION= 2
+DISTVERSION= 2.2.2013.04.15
CATEGORIES= net
MASTER_SITES= https://github.com/facebook/scribe/tarball/${GITVERSION}/
DISTNAME= facebook-scribe-${GITVERSION}
@@ -11,15 +10,14 @@
MAINTAINER= jnlin at csie.nctu.edu.tw
COMMENT= Aggregating log data streamed in real time
-BUILD_DEPENDS= fb303>0:${PORTSDIR}/devel/fb303
-LIB_DEPENDS= boost_system:${PORTSDIR}/devel/boost-libs \
- event:${PORTSDIR}/devel/libevent \
+BUILD_DEPENDS= fb303>0:${PORTSDIR}/devel/fb303 \
thrift:${PORTSDIR}/devel/thrift
+LIB_DEPENDS= thrift:${PORTSDIR}/devel/thrift-cpp
RUN_DEPENDS= p5-Class-Accessor>0:${PORTSDIR}/devel/p5-Class-Accessor \
p5-Thrift>0:${PORTSDIR}/devel/p5-Thrift \
${PYTHON_SITELIBDIR}/thrift/__init__.py:${PORTSDIR}/devel/py-thrift
-GITVERSION= 63e4824
+GITVERSION= 7359a09
FETCH_ARGS= -pRr
WRKSRC= ${WRKDIR}/${DISTNAME}
@@ -28,14 +26,28 @@
CONFIGURE_ARGS= --with-boost-filesystem=boost_filesystem \
--with-boost-system=boost_system \
PY_PREFIX="${PREFIX}"
+
PLIST_SUB+= PYTHON_VERSION_SHORTNAME="${PYTHON_VERSION_SHORTNAME}"
+
PYTHON_VERSION_SHORTNAME= ${PYTHON_VERSION:S/thon//}
-USE_AUTOTOOLS= aclocal automake autoconf
+
+USES= perl5 compiler
+
+USE_AUTOTOOLS= autoconf autoheader:env aclocal automake
USE_GMAKE= yes
USE_PYTHON= yes
+
USE_RC_SUBR= ${PORTNAME}
NO_STAGE= yes
+
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == clang
+USE_CXXSTD= c++11
+EXTRA_PATCHES+= ${FILESDIR}/extra_patch-src__Makefile.am
+.endif
+
post-build:
${LOCALBASE}/bin/thrift -o ${WRKSRC} -I ${LOCALBASE}/share --gen "perl" ${WRKSRC}/if/scribe.thrift
diff -ruN /usr/ports/net/scribe/distinfo scribe/distinfo
--- /usr/ports/net/scribe/distinfo 2012-07-14 18:29:18.000000000 +0400
+++ scribe/distinfo 2013-10-15 23:20:35.000000000 +0400
@@ -1,2 +1,2 @@
-SHA256 (facebook-scribe-63e4824.tar.gz) = e4fd56649e35b8ff508d8f915cd29bd15b888c301043a7d930acf83b9ee5aa2f
-SIZE (facebook-scribe-63e4824.tar.gz) = 97107
+SHA256 (facebook-scribe-7359a09.tar.gz) = c40168c9a77f0d95242a1142f050d6d84a5a202ce2883e0dbb93af8a7a3a9204
+SIZE (facebook-scribe-7359a09.tar.gz) = 97261
diff -ruN /usr/ports/net/scribe/files/extra_patch-src__Makefile.am scribe/files/extra_patch-src__Makefile.am
--- /usr/ports/net/scribe/files/extra_patch-src__Makefile.am 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/extra_patch-src__Makefile.am 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,11 @@
+--- ./src/Makefile.am.orig 2013-10-17 18:32:29.000000000 +0400
++++ ./src/Makefile.am 2013-10-17 19:44:17.000000000 +0400
+@@ -63,7 +63,7 @@
+ # DO NOT USE CPPFLAGS, CXXFLAGS, CFLAGS, LDFLAGS here! Set in configure.ac and|or override on command line.
+ # USE flags AM_CXXFLAGS, AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, LDADD in this section.
+
+-AM_CPPFLAGS = -I..
++AM_CPPFLAGS = -I.. -std=c++11
+ AM_CPPFLAGS += -I$(thrift_home)/include
+ AM_CPPFLAGS += -I$(thrift_home)/include/thrift
+ AM_CPPFLAGS += -I$(fb303_home)/include/thrift
diff -ruN /usr/ports/net/scribe/files/patch-configure.ac scribe/files/patch-configure.ac
--- /usr/ports/net/scribe/files/patch-configure.ac 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-configure.ac 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,11 @@
+--- ./configure.ac.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./configure.ac 2013-10-17 18:32:29.000000000 +0400
+@@ -10,7 +10,7 @@
+ AC_PREREQ(2.52)
+ AC_INIT([scribe], [1.5.0])
+ AC_CONFIG_MACRO_DIR([aclocal])
+-AM_INIT_AUTOMAKE([foreign -Wall])
++#AM_INIT_AUTOMAKE([foreign -Wall])
+ # To install locally
+ FB_INITIALIZE([localinstall])
+ AC_PREFIX_DEFAULT([/usr/local])
diff -ruN /usr/ports/net/scribe/files/patch-if__bucketupdater.thrift scribe/files/patch-if__bucketupdater.thrift
--- /usr/ports/net/scribe/files/patch-if__bucketupdater.thrift 2012-07-14 18:29:18.000000000 +0400
+++ scribe/files/patch-if__bucketupdater.thrift 2013-10-17 19:44:27.000000000 +0400
@@ -1,5 +1,5 @@
---- ./if/bucketupdater.thrift.orig 2011-06-27 09:59:22.000000000 +0400
-+++ ./if/bucketupdater.thrift 2011-10-19 18:33:32.000000000 +0400
+--- ./if/bucketupdater.thrift.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./if/bucketupdater.thrift 2013-10-17 18:32:29.000000000 +0400
@@ -19,6 +19,7 @@
namespace cpp scribe.thrift
diff -ruN /usr/ports/net/scribe/files/patch-src-file.cpp scribe/files/patch-src-file.cpp
--- /usr/ports/net/scribe/files/patch-src-file.cpp 2012-08-05 10:02:30.000000000 +0400
+++ scribe/files/patch-src-file.cpp 1970-01-01 03:00:00.000000000 +0300
@@ -1,11 +0,0 @@
---- src/file.cpp.orig 2012-06-28 12:42:20.000000000 +0800
-+++ src/file.cpp 2012-06-28 12:42:30.000000000 +0800
-@@ -245,7 +245,7 @@
- boost::filesystem::directory_iterator dir_iter(path), end_iter;
-
- for ( ; dir_iter != end_iter; ++dir_iter) {
-- _return.push_back(dir_iter->filename());
-+ _return.push_back(dir_iter->path().filename().string());
- }
- }
- } catch (const std::exception& e) {
diff -ruN /usr/ports/net/scribe/files/patch-src__Makefile.am scribe/files/patch-src__Makefile.am
--- /usr/ports/net/scribe/files/patch-src__Makefile.am 2012-07-14 18:29:18.000000000 +0400
+++ scribe/files/patch-src__Makefile.am 2013-10-17 18:32:06.000000000 +0400
@@ -1,11 +1,8 @@
---- ./src/Makefile.am.orig 2011-06-27 09:59:22.000000000 +0400
-+++ ./src/Makefile.am 2011-10-19 18:00:32.000000000 +0400
+--- ./src/Makefile.am.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/Makefile.am 2013-10-16 19:54:19.000000000 +0400
@@ -34,7 +34,7 @@
#
THRIFT = $(thrift_home)/bin/thrift
THRIFT_INCLUDES = -I $(fb303_home)/share/
-THRIFT_OPTS = $(THRIFT_INCLUDES) --gen cpp:pure_enums --gen py --gen php --gen java
+THRIFT_OPTS = $(THRIFT_INCLUDES) --gen cpp:pure_enums --gen py --gen php --gen java --gen perl
-
- # User defined conditionals and conditonal statements set up in configure.ac.
- # FACEBOOK set in configure.ac
diff -ruN /usr/ports/net/scribe/files/patch-src__conf.cpp scribe/files/patch-src__conf.cpp
--- /usr/ports/net/scribe/files/patch-src__conf.cpp 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-src__conf.cpp 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,11 @@
+--- ./src/conf.cpp.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/conf.cpp 2013-10-17 18:32:29.000000000 +0400
+@@ -27,7 +27,7 @@
+ using namespace boost;
+ using namespace std;
+
+-extern shared_ptr<scribeHandler> g_Handler;
++extern boost::shared_ptr<scribeHandler> g_Handler;
+
+ StoreConf::StoreConf() {
+ }
diff -ruN /usr/ports/net/scribe/files/patch-src__dynamic_bucket_updater.cpp scribe/files/patch-src__dynamic_bucket_updater.cpp
--- /usr/ports/net/scribe/files/patch-src__dynamic_bucket_updater.cpp 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-src__dynamic_bucket_updater.cpp 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,33 @@
+--- ./src/dynamic_bucket_updater.cpp.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/dynamic_bucket_updater.cpp 2013-10-17 18:32:29.000000000 +0400
+@@ -11,7 +11,7 @@
+ using namespace facebook::fb303;
+ using namespace scribe::thrift;
+ using boost::shared_ptr;
+-extern shared_ptr<scribeHandler> g_Handler;
++extern boost::shared_ptr<scribeHandler> g_Handler;
+
+ DynamicBucketUpdater* DynamicBucketUpdater::instance_ = NULL;
+ Mutex DynamicBucketUpdater::instanceLock_;
+@@ -341,7 +341,7 @@
+ catMap_.erase(catIter);
+ }
+
+- shared_ptr<TSocket> socket = shared_ptr<TSocket>(
++ boost::shared_ptr<TSocket> socket = boost::shared_ptr<TSocket>(
+ new TSocket(remoteHost, remotePort));
+
+ if (!socket) {
+@@ -362,10 +362,10 @@
+ socket->setRecvTimeout(recvTimeout);
+ socket->setSendTimeout(sendTimeout);
+
+- shared_ptr<TFramedTransport> framedTransport = shared_ptr<TFramedTransport>(
++ boost::shared_ptr<TFramedTransport> framedTransport = boost::shared_ptr<TFramedTransport>(
+ new TFramedTransport(socket));
+ framedTransport->open();
+- shared_ptr<TBinaryProtocol> protocol = shared_ptr<TBinaryProtocol>(
++ boost::shared_ptr<TBinaryProtocol> protocol = boost::shared_ptr<TBinaryProtocol>(
+ new TBinaryProtocol(framedTransport));
+
+ // no strict version checking
diff -ruN /usr/ports/net/scribe/files/patch-src__file.cpp scribe/files/patch-src__file.cpp
--- /usr/ports/net/scribe/files/patch-src__file.cpp 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-src__file.cpp 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,24 @@
+--- ./src/file.cpp.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/file.cpp 2013-10-17 18:32:29.000000000 +0400
+@@ -34,17 +34,17 @@
+ const std::string& name,
+ bool framed) {
+ if (0 == type.compare("std")) {
+- return shared_ptr<FileInterface>(new StdFile(name, framed));
++ return boost::shared_ptr<FileInterface>(new StdFile(name, framed));
+ } else if (0 == type.compare("hdfs")) {
+- return shared_ptr<FileInterface>(new HdfsFile(name));
++ return boost::shared_ptr<FileInterface>(new HdfsFile(name));
+ } else {
+- return shared_ptr<FileInterface>();
++ return boost::shared_ptr<FileInterface>();
+ }
+ }
+
+ std::vector<std::string> FileInterface::list(const std::string& path, const std::string &fsType) {
+ std::vector<std::string> files;
+- shared_ptr<FileInterface> concrete_file = createFileInterface(fsType, path);
++ boost::shared_ptr<FileInterface> concrete_file = createFileInterface(fsType, path);
+ if (concrete_file) {
+ concrete_file->listImpl(path, files);
+ }
diff -ruN /usr/ports/net/scribe/files/patch-src__scribe_server.cpp scribe/files/patch-src__scribe_server.cpp
--- /usr/ports/net/scribe/files/patch-src__scribe_server.cpp 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-src__scribe_server.cpp 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,228 @@
+--- ./src/scribe_server.cpp.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/scribe_server.cpp 2013-10-17 18:32:29.000000000 +0400
+@@ -34,7 +34,7 @@
+
+ using boost::shared_ptr;
+
+-shared_ptr<scribeHandler> g_Handler;
++boost::shared_ptr<scribeHandler> g_Handler;
+
+ #define DEFAULT_CHECK_PERIOD 5
+ #define DEFAULT_MAX_MSG_PER_SECOND 0
+@@ -109,7 +109,7 @@
+ // seed random number generation with something reasonably unique
+ srand(time(NULL) ^ getpid());
+
+- g_Handler = shared_ptr<scribeHandler>(new scribeHandler(port, config_file));
++ g_Handler = boost::shared_ptr<scribeHandler>(new scribeHandler(port, config_file));
+ g_Handler->initialize();
+
+ scribe::startServer(); // never returns
+@@ -242,10 +242,10 @@
+ return false;
+ }
+
+- shared_ptr<StoreQueue> pstore;
++ boost::shared_ptr<StoreQueue> pstore;
+ if (newThreadPerCategory) {
+ // Create a new thread/StoreQueue for this category
+- pstore = shared_ptr<StoreQueue>(new StoreQueue(model, category));
++ pstore = boost::shared_ptr<StoreQueue>(new StoreQueue(model, category));
+ LOG_OPER("[%s] Creating new category store from model %s",
+ category.c_str(), model->getCategoryHandled().c_str());
+
+@@ -258,10 +258,10 @@
+ category.c_str(), model->getCategoryHandled().c_str());
+ }
+
+- shared_ptr<store_list_t> pstores;
++ boost::shared_ptr<store_list_t> pstores;
+ category_map_t::iterator cat_iter = categories.find(category);
+ if (cat_iter == categories.end()) {
+- pstores = shared_ptr<store_list_t>(new store_list_t);
++ pstores = boost::shared_ptr<store_list_t>(new store_list_t);
+ categories[category] = pstores;
+ } else {
+ pstores = cat_iter->second;
+@@ -292,7 +292,7 @@
+ for (category_map_t::iterator cat_iter = categories.begin();
+ cat_iter != categories.end();
+ ++cat_iter) {
+- shared_ptr<store_list_t> pstores = cat_iter->second;
++ boost::shared_ptr<store_list_t> pstores = cat_iter->second;
+ if (!pstores) {
+ throw std::logic_error("throttle check: iterator in category map holds null pointer");
+ }
+@@ -315,10 +315,10 @@
+ }
+
+ // Should be called while holding a writeLock on scribeHandlerLock
+-shared_ptr<store_list_t> scribeHandler::createNewCategory(
++boost::shared_ptr<store_list_t> scribeHandler::createNewCategory(
+ const string& category) {
+
+- shared_ptr<store_list_t> store_list;
++ boost::shared_ptr<store_list_t> store_list;
+
+ // First, check the list of category prefixes for a model
+ category_map_t::iterator cat_prefix_iter = category_prefixes.begin();
+@@ -327,7 +327,7 @@
+ if (cat_prefix_iter->first.compare(0, len-1, category, 0, len-1) == 0) {
+ // Found a matching prefix model
+
+- shared_ptr<store_list_t> pstores = cat_prefix_iter->second;
++ boost::shared_ptr<store_list_t> pstores = cat_prefix_iter->second;
+ for (store_list_t::iterator store_iter = pstores->begin();
+ store_iter != pstores->end(); ++store_iter) {
+ createCategoryFromModel(category, *store_iter);
+@@ -368,7 +368,7 @@
+ // Add this message to every store in list
+ void scribeHandler::addMessage(
+ const LogEntry& entry,
+- const shared_ptr<store_list_t>& store_list) {
++ const boost::shared_ptr<store_list_t>& store_list) {
+
+ int numstores = 0;
+
+@@ -416,7 +416,7 @@
+ continue;
+ }
+
+- shared_ptr<store_list_t> store_list;
++ boost::shared_ptr<store_list_t> store_list;
+ string category = (*msg_iter).category;
+
+ category_map_t::iterator cat_iter;
+@@ -496,7 +496,7 @@
+
+ void scribeHandler::stopStores() {
+ setStatus(STOPPING);
+- shared_ptr<store_list_t> store_list;
++ boost::shared_ptr<store_list_t> store_list;
+ for (store_list_t::iterator store_iter = defaultStores.begin();
+ store_iter != defaultStores.end(); ++store_iter) {
+ if (!(*store_iter)->isModelStore()) {
+@@ -652,9 +652,9 @@
+ // Configures the store specified by the store configuration. Returns false if failed.
+ bool scribeHandler::configureStore(pStoreConf store_conf, int *numstores) {
+ string category;
+- shared_ptr<StoreQueue> pstore;
++ boost::shared_ptr<StoreQueue> pstore;
+ vector<string> category_list;
+- shared_ptr<StoreQueue> model;
++ boost::shared_ptr<StoreQueue> model;
+ bool single_category = true;
+
+
+@@ -685,7 +685,7 @@
+ }
+ else if (single_category) {
+ // configure single store
+- shared_ptr<StoreQueue> result =
++ boost::shared_ptr<StoreQueue> result =
+ configureStoreCategory(store_conf, category_list[0], model);
+
+ if (result == NULL) {
+@@ -718,7 +718,7 @@
+ // create a store for each category
+ vector<string>::iterator iter;
+ for (iter = category_list.begin(); iter < category_list.end(); iter++) {
+- shared_ptr<StoreQueue> result =
++ boost::shared_ptr<StoreQueue> result =
+ configureStoreCategory(store_conf, *iter, model);
+
+ if (!result) {
+@@ -734,7 +734,7 @@
+
+
+ // Configures the store specified by the store configuration and category.
+-shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
++boost::shared_ptr<StoreQueue> scribeHandler::configureStoreCategory(
+ pStoreConf store_conf, //configuration for store
+ const string &category, //category name
+ const boost::shared_ptr<StoreQueue> &model, //model to use (optional)
+@@ -745,7 +745,7 @@
+
+ if (category.empty()) {
+ setStatusDetails("Bad config - store with blank category");
+- return shared_ptr<StoreQueue>();
++ return boost::shared_ptr<StoreQueue>();
+ }
+
+ LOG_OPER("CATEGORY : %s", category.c_str());
+@@ -763,17 +763,17 @@
+ string errormsg("Bad config - no type for store with category: ");
+ errormsg += category;
+ setStatusDetails(errormsg);
+- return shared_ptr<StoreQueue>();
++ return boost::shared_ptr<StoreQueue>();
+ }
+
+ // look for the store in the current list
+- shared_ptr<StoreQueue> pstore;
++ boost::shared_ptr<StoreQueue> pstore;
+
+ try {
+ if (model != NULL) {
+ // Create a copy of the model if we want a new thread per category
+ if (newThreadPerCategory && !is_default && !is_prefix_category) {
+- pstore = shared_ptr<StoreQueue>(new StoreQueue(model, category));
++ pstore = boost::shared_ptr<StoreQueue>(new StoreQueue(model, category));
+ } else {
+ pstore = model;
+ already_created = true;
+@@ -798,7 +798,7 @@
+ is_model = newThreadPerCategory && categories;
+
+ pstore =
+- shared_ptr<StoreQueue>(new StoreQueue(type, store_name, checkPeriod,
++ boost::shared_ptr<StoreQueue>(new StoreQueue(type, store_name, checkPeriod,
+ is_model, multi_category));
+ }
+ } catch (...) {
+@@ -809,7 +809,7 @@
+ string errormsg("Bad config - can't create a store of type: ");
+ errormsg += type;
+ setStatusDetails(errormsg);
+- return shared_ptr<StoreQueue>();
++ return boost::shared_ptr<StoreQueue>();
+ }
+
+ // open store. and configure it if not copied from a model
+@@ -826,23 +826,23 @@
+ LOG_OPER("Creating default store");
+ defaultStores.push_back(pstore);
+ } else if (is_prefix_category) {
+- shared_ptr<store_list_t> pstores;
++ boost::shared_ptr<store_list_t> pstores;
+ category_map_t::iterator category_iter = category_prefixes.find(category);
+ if (category_iter != category_prefixes.end()) {
+ pstores = category_iter->second;
+ } else {
+- pstores = shared_ptr<store_list_t>(new store_list_t);
++ pstores = boost::shared_ptr<store_list_t>(new store_list_t);
+ category_prefixes[category] = pstores;
+ }
+ pstores->push_back(pstore);
+ } else if (!pstore->isModelStore()) {
+ // push the new store onto the new map if it's not just a model
+- shared_ptr<store_list_t> pstores;
++ boost::shared_ptr<store_list_t> pstores;
+ category_map_t::iterator category_iter = categories.find(category);
+ if (category_iter != categories.end()) {
+ pstores = category_iter->second;
+ } else {
+- pstores = shared_ptr<store_list_t>(new store_list_t);
++ pstores = boost::shared_ptr<store_list_t>(new store_list_t);
+ categories[category] = pstores;
+ }
+ pstores->push_back(pstore);
+@@ -857,7 +857,7 @@
+ for (category_map_t::iterator cat_iter = cats.begin();
+ cat_iter != cats.end();
+ ++cat_iter) {
+- shared_ptr<store_list_t> pstores = cat_iter->second;
++ boost::shared_ptr<store_list_t> pstores = cat_iter->second;
+ if (!pstores) {
+ throw std::logic_error("deleteCategoryMap: "
+ "iterator in category map holds null pointer");
diff -ruN /usr/ports/net/scribe/files/patch-src__store.cpp scribe/files/patch-src__store.cpp
--- /usr/ports/net/scribe/files/patch-src__store.cpp 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-src__store.cpp 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,350 @@
+--- ./src/store.cpp.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/store.cpp 2013-10-17 18:32:29.000000000 +0400
+@@ -83,34 +83,34 @@
+ const string& category, bool readable,
+ bool multi_category) {
+ if (0 == type.compare("file")) {
+- return shared_ptr<Store>(new FileStore(storeq, category, multi_category,
++ return boost::shared_ptr<Store>(new FileStore(storeq, category, multi_category,
+ readable));
+ } else if (0 == type.compare("buffer")) {
+- return shared_ptr<Store>(new BufferStore(storeq,category, multi_category));
++ return boost::shared_ptr<Store>(new BufferStore(storeq,category, multi_category));
+ } else if (0 == type.compare("network")) {
+- return shared_ptr<Store>(new NetworkStore(storeq, category,
++ return boost::shared_ptr<Store>(new NetworkStore(storeq, category,
+ multi_category));
+ } else if (0 == type.compare("bucket")) {
+- return shared_ptr<Store>(new BucketStore(storeq, category,
++ return boost::shared_ptr<Store>(new BucketStore(storeq, category,
+ multi_category));
+ } else if (0 == type.compare("thriftfile")) {
+- return shared_ptr<Store>(new ThriftFileStore(storeq, category,
++ return boost::shared_ptr<Store>(new ThriftFileStore(storeq, category,
+ multi_category));
+ } else if (0 == type.compare("null")) {
+- return shared_ptr<Store>(new NullStore(storeq, category, multi_category));
++ return boost::shared_ptr<Store>(new NullStore(storeq, category, multi_category));
+ } else if (0 == type.compare("multi")) {
+- return shared_ptr<Store>(new MultiStore(storeq, category, multi_category));
++ return boost::shared_ptr<Store>(new MultiStore(storeq, category, multi_category));
+ } else if (0 == type.compare("category")) {
+- return shared_ptr<Store>(new CategoryStore(storeq, category,
++ return boost::shared_ptr<Store>(new CategoryStore(storeq, category,
+ multi_category));
+ } else if (0 == type.compare("multifile")) {
+- return shared_ptr<Store>(new MultiFileStore(storeq, category,
++ return boost::shared_ptr<Store>(new MultiFileStore(storeq, category,
+ multi_category));
+ } else if (0 == type.compare("thriftmultifile")) {
+- return shared_ptr<Store>(new ThriftMultiFileStore(storeq, category,
++ return boost::shared_ptr<Store>(new ThriftMultiFileStore(storeq, category,
+ multi_category));
+ } else {
+- return shared_ptr<Store>();
++ return boost::shared_ptr<Store>();
+ }
+ }
+
+@@ -763,10 +763,10 @@
+ }
+ }
+
+-shared_ptr<Store> FileStore::copy(const std::string &category) {
++boost::shared_ptr<Store> FileStore::copy(const std::string &category) {
+ FileStore *store = new FileStore(storeQueue, category, multiCategory,
+ isBufferFile);
+- shared_ptr<Store> copied = shared_ptr<Store>(store);
++ boost::shared_ptr<Store> copied = boost::shared_ptr<Store>(store);
+
+ store->addNewlines = addNewlines;
+ store->copyCommon(this);
+@@ -915,7 +915,7 @@
+ if (index < 0) {
+ return;
+ }
+- shared_ptr<FileInterface> deletefile = FileInterface::createFileInterface(fsType,
++ boost::shared_ptr<FileInterface> deletefile = FileInterface::createFileInterface(fsType,
+ makeFullFilename(index, now));
+ if (lostBytes_) {
+ g_Handler->incCounter(categoryHandled, "bytes lost", lostBytes_);
+@@ -939,7 +939,7 @@
+ // Need to close and reopen store in case we already have this file open
+ close();
+
+- shared_ptr<FileInterface> infile = FileInterface::createFileInterface(fsType,
++ boost::shared_ptr<FileInterface> infile = FileInterface::createFileInterface(fsType,
+ filename, isBufferFile);
+
+ // overwrite the old contents of the file
+@@ -973,7 +973,7 @@
+ }
+ std::string filename = makeFullFilename(index, now);
+
+- shared_ptr<FileInterface> infile = FileInterface::createFileInterface(fsType,
++ boost::shared_ptr<FileInterface> infile = FileInterface::createFileInterface(fsType,
+ filename, isBufferFile);
+
+ if (!infile->openRead()) {
+@@ -1032,7 +1032,7 @@
+ int suffix = getFileSuffix(*iter, base_filename);
+ if (-1 != suffix) {
+ std::string fullname = makeFullFilename(suffix, now);
+- shared_ptr<FileInterface> file = FileInterface::createFileInterface(fsType,
++ boost::shared_ptr<FileInterface> file = FileInterface::createFileInterface(fsType,
+ fullname);
+ if (file->fileSize()) {
+ return false;
+@@ -1056,9 +1056,9 @@
+ ThriftFileStore::~ThriftFileStore() {
+ }
+
+-shared_ptr<Store> ThriftFileStore::copy(const std::string &category) {
++boost::shared_ptr<Store> ThriftFileStore::copy(const std::string &category) {
+ ThriftFileStore *store = new ThriftFileStore(storeQueue, category, multiCategory);
+- shared_ptr<Store> copied = shared_ptr<Store>(store);
++ boost::shared_ptr<Store> copied = boost::shared_ptr<Store>(store);
+
+ store->flushFrequencyMs = flushFrequencyMs;
+ store->msgBufferSize = msgBufferSize;
+@@ -1433,9 +1433,9 @@
+ }
+ }
+
+-shared_ptr<Store> BufferStore::copy(const std::string &category) {
++boost::shared_ptr<Store> BufferStore::copy(const std::string &category) {
+ BufferStore *store = new BufferStore(storeQueue, category, multiCategory);
+- shared_ptr<Store> copied = shared_ptr<Store>(store);
++ boost::shared_ptr<Store> copied = boost::shared_ptr<Store>(store);
+
+ store->bufferSendRate = bufferSendRate;
+ store->avgRetryInterval = avgRetryInterval;
+@@ -1874,7 +1874,7 @@
+ LOG_OPER("Logic error: NetworkStore::open unpooledConn is not NULL"
+ " service = %s", serviceName.c_str());
+ }
+- unpooledConn = shared_ptr<scribeConn>(new scribeConn(serviceName,
++ unpooledConn = boost::shared_ptr<scribeConn>(new scribeConn(serviceName,
+ servers, static_cast<int>(timeout)));
+ opened = unpooledConn->open();
+ if (!opened) {
+@@ -1897,7 +1897,7 @@
+ LOG_OPER("Logic error: NetworkStore::open unpooledConn is not NULL"
+ " %s:%lu", remoteHost.c_str(), remotePort);
+ }
+- unpooledConn = shared_ptr<scribeConn>(new scribeConn(remoteHost,
++ unpooledConn = boost::shared_ptr<scribeConn>(new scribeConn(remoteHost,
+ remotePort, static_cast<int>(timeout)));
+ opened = unpooledConn->open();
+ if (!opened) {
+@@ -1938,9 +1938,9 @@
+ return opened;
+ }
+
+-shared_ptr<Store> NetworkStore::copy(const std::string &category) {
++boost::shared_ptr<Store> NetworkStore::copy(const std::string &category) {
+ NetworkStore *store = new NetworkStore(storeQueue, category, multiCategory);
+- shared_ptr<Store> copied = shared_ptr<Store>(store);
++ boost::shared_ptr<Store> copied = boost::shared_ptr<Store>(store);
+
+ store->useConnPool = useConnPool;
+ store->serviceBased = serviceBased;
+@@ -2065,7 +2065,7 @@
+
+ for (unsigned int i = 0; i <= numBuckets; ++i) {
+
+- shared_ptr<Store> newstore =
++ boost::shared_ptr<Store> newstore =
+ createStore(storeQueue, type, categoryHandled, false, multiCategory);
+
+ if (!newstore) {
+@@ -2144,7 +2144,7 @@
+ goto handle_error;
+ }
+
+- shared_ptr<Store> bucket =
++ boost::shared_ptr<Store> bucket =
+ createStore(storeQueue, type, categoryHandled, false, multiCategory);
+
+ buckets.push_back(bucket);
+@@ -2293,7 +2293,7 @@
+ return false;
+ }
+
+- for (std::vector<shared_ptr<Store> >::iterator iter = buckets.begin();
++ for (std::vector<boost::shared_ptr<Store> >::iterator iter = buckets.begin();
+ iter != buckets.end();
+ ++iter) {
+
+@@ -2315,7 +2315,7 @@
+ // don't check opened, because we can call this when some, but
+ // not all, contained stores are opened. Calling close on a contained
+ // store that's already closed shouldn't hurt anything.
+- for (std::vector<shared_ptr<Store> >::iterator iter = buckets.begin();
++ for (std::vector<boost::shared_ptr<Store> >::iterator iter = buckets.begin();
+ iter != buckets.end();
+ ++iter) {
+ (*iter)->close();
+@@ -2324,7 +2324,7 @@
+ }
+
+ void BucketStore::flush() {
+- for (std::vector<shared_ptr<Store> >::iterator iter = buckets.begin();
++ for (std::vector<boost::shared_ptr<Store> >::iterator iter = buckets.begin();
+ iter != buckets.end();
+ ++iter) {
+ (*iter)->flush();
+@@ -2335,7 +2335,7 @@
+
+ string retval = Store::getStatus();
+
+- std::vector<shared_ptr<Store> >::iterator iter = buckets.begin();
++ std::vector<boost::shared_ptr<Store> >::iterator iter = buckets.begin();
+ while (retval.empty() && iter != buckets.end()) {
+ retval = (*iter)->getStatus();
+ ++iter;
+@@ -2359,15 +2359,15 @@
+ }
+ }
+
+-shared_ptr<Store> BucketStore::copy(const std::string &category) {
++boost::shared_ptr<Store> BucketStore::copy(const std::string &category) {
+ BucketStore *store = new BucketStore(storeQueue, category, multiCategory);
+- shared_ptr<Store> copied = shared_ptr<Store>(store);
++ boost::shared_ptr<Store> copied = boost::shared_ptr<Store>(store);
+
+ store->numBuckets = numBuckets;
+ store->bucketType = bucketType;
+ store->delimiter = delimiter;
+
+- for (std::vector<shared_ptr<Store> >::iterator iter = buckets.begin();
++ for (std::vector<boost::shared_ptr<Store> >::iterator iter = buckets.begin();
+ iter != buckets.end();
+ ++iter) {
+ store->buckets.push_back((*iter)->copy(category));
+@@ -2386,7 +2386,7 @@
+ bool success = true;
+
+ boost::shared_ptr<logentry_vector_t> failed_messages(new logentry_vector_t);
+- vector<shared_ptr<logentry_vector_t> > bucketed_messages;
++ vector<boost::shared_ptr<logentry_vector_t> > bucketed_messages;
+ bucketed_messages.resize(numBuckets + 1);
+
+ if (numBuckets == 0) {
+@@ -2404,7 +2404,7 @@
+
+ if (!bucketed_messages[bucket]) {
+ bucketed_messages[bucket] =
+- shared_ptr<logentry_vector_t> (new logentry_vector_t);
++ boost::shared_ptr<logentry_vector_t> (new logentry_vector_t);
+ }
+
+ bucketed_messages[bucket]->push_back(*iter);
+@@ -2412,14 +2412,14 @@
+
+ // handle all batches of messages
+ for (unsigned long i = 0; i <= numBuckets; i++) {
+- shared_ptr<logentry_vector_t> batch = bucketed_messages[i];
++ boost::shared_ptr<logentry_vector_t> batch = bucketed_messages[i];
+
+ if (batch) {
+
+ if (removeKey) {
+ // Create new set of messages with keys removed
+- shared_ptr<logentry_vector_t> key_removed =
+- shared_ptr<logentry_vector_t> (new logentry_vector_t);
++ boost::shared_ptr<logentry_vector_t> key_removed =
++ boost::shared_ptr<logentry_vector_t> (new logentry_vector_t);
+
+ for (logentry_vector_t::iterator iter = batch->begin();
+ iter != batch->end();
+@@ -2549,7 +2549,7 @@
+
+ boost::shared_ptr<Store> NullStore::copy(const std::string &category) {
+ NullStore *store = new NullStore(storeQueue, category, multiCategory);
+- shared_ptr<Store> copied = shared_ptr<Store>(store);
++ boost::shared_ptr<Store> copied = boost::shared_ptr<Store>(store);
+ return copied;
+ }
+
+@@ -2613,7 +2613,7 @@
+ store->stores.push_back(tmp_copy);
+ }
+
+- return shared_ptr<Store>(store);
++ return boost::shared_ptr<Store>(store);
+ }
+
+ bool MultiStore::open() {
+@@ -2785,13 +2785,13 @@
+
+ store->modelStore = modelStore->copy(category);
+
+- return shared_ptr<Store>(store);
++ return boost::shared_ptr<Store>(store);
+ }
+
+ bool CategoryStore::open() {
+ bool result = true;
+
+- for (map<string, shared_ptr<Store> >::iterator iter = stores.begin();
++ for (map<string, boost::shared_ptr<Store> >::iterator iter = stores.begin();
+ iter != stores.end();
+ ++iter) {
+ result &= iter->second->open();
+@@ -2802,7 +2802,7 @@
+
+ bool CategoryStore::isOpen() {
+
+- for (map<string, shared_ptr<Store> >::iterator iter = stores.begin();
++ for (map<string, boost::shared_ptr<Store> >::iterator iter = stores.begin();
+ iter != stores.end();
+ ++iter) {
+ if (!iter->second->isOpen()) {
+@@ -2859,7 +2859,7 @@
+ }
+
+ void CategoryStore::close() {
+- for (map<string, shared_ptr<Store> >::iterator iter = stores.begin();
++ for (map<string, boost::shared_ptr<Store> >::iterator iter = stores.begin();
+ iter != stores.end();
+ ++iter) {
+ iter->second->close();
+@@ -2867,15 +2867,15 @@
+ }
+
+ bool CategoryStore::handleMessages(boost::shared_ptr<logentry_vector_t> messages) {
+- shared_ptr<logentry_vector_t> singleMessage(new logentry_vector_t);
+- shared_ptr<logentry_vector_t> failed_messages(new logentry_vector_t);
++ boost::shared_ptr<logentry_vector_t> singleMessage(new logentry_vector_t);
++ boost::shared_ptr<logentry_vector_t> failed_messages(new logentry_vector_t);
+ logentry_vector_t::iterator message_iter;
+
+ for (message_iter = messages->begin();
+ message_iter != messages->end();
+ ++message_iter) {
+- map<string, shared_ptr<Store> >::iterator store_iter;
+- shared_ptr<Store> store;
++ map<string, boost::shared_ptr<Store> >::iterator store_iter;
++ boost::shared_ptr<Store> store;
+ string category = (*message_iter)->category;
+
+ store_iter = stores.find(category);
+@@ -2918,7 +2918,7 @@
+ }
+
+ void CategoryStore::periodicCheck() {
+- for (map<string, shared_ptr<Store> >::iterator iter = stores.begin();
++ for (map<string, boost::shared_ptr<Store> >::iterator iter = stores.begin();
+ iter != stores.end();
+ ++iter) {
+ iter->second->periodicCheck();
+@@ -2926,7 +2926,7 @@
+ }
+
+ void CategoryStore::flush() {
+- for (map<string, shared_ptr<Store> >::iterator iter = stores.begin();
++ for (map<string, boost::shared_ptr<Store> >::iterator iter = stores.begin();
+ iter != stores.end();
+ ++iter) {
+ iter->second->flush();
diff -ruN /usr/ports/net/scribe/files/patch-src__store_queue.cpp scribe/files/patch-src__store_queue.cpp
--- /usr/ports/net/scribe/files/patch-src__store_queue.cpp 1970-01-01 03:00:00.000000000 +0300
+++ scribe/files/patch-src__store_queue.cpp 2013-10-17 19:44:27.000000000 +0400
@@ -0,0 +1,20 @@
+--- ./src/store_queue.cpp.orig 2013-04-16 06:56:56.000000000 +0400
++++ ./src/store_queue.cpp 2013-10-17 18:32:29.000000000 +0400
+@@ -175,7 +175,7 @@
+ }
+ }
+
+-shared_ptr<Store> StoreQueue::copyStore(const std::string &category) {
++boost::shared_ptr<Store> StoreQueue::copyStore(const std::string &category) {
+ return store->copy(category);
+ }
+
+@@ -306,7 +306,7 @@
+ store->close();
+ }
+
+-void StoreQueue::processFailedMessages(shared_ptr<logentry_vector_t> messages) {
++void StoreQueue::processFailedMessages(boost::shared_ptr<logentry_vector_t> messages) {
+ // If the store was not able to process these messages, we will either
+ // requeue them or give up depending on the value of mustSucceed
+
diff -ruN /usr/ports/net/scribe/pkg-plist scribe/pkg-plist
--- /usr/ports/net/scribe/pkg-plist 2012-07-14 18:29:18.000000000 +0400
+++ scribe/pkg-plist 2013-10-17 20:39:36.000000000 +0400
@@ -4,7 +4,7 @@
%%SITE_PERL%%/Scribe/Thrift/Constants.pm
%%SITE_PERL%%/Scribe/Thrift/Types.pm
%%SITE_PERL%%/Scribe/Thrift/scribe.pm
-%%PYTHON_SITELIBDIR%%/scribe-2.0-py2.7.egg-info
+%%PYTHON_SITELIBDIR%%/scribe-2.0-py%%PYTHON_VER%%.egg-info
%%PYTHON_SITELIBDIR%%/scribe/__init__.py
%%PYTHON_SITELIBDIR%%/scribe/__init__.pyc
%%PYTHON_SITELIBDIR%%/scribe/constants.py
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list