Permalink
Browse files

Flare 1.0.17 new features and bug fixes

* New features:
  - Added support for Kyoto cabinet
  - Binary protocol implementation and input tests
  - touch/gat implementation
  - Migration from gethostbyname to getaddrinfo
  - Integrated valgrind memory tests
  - Added over 2000 unit tests

* Bug fixes:
  - Various fixes under BSD
  - Append does not reset the stored flag anymore
  - Fixes for input validation
  • Loading branch information...
1 parent 13f85d8 commit 57299afba781ba12b20697671eba90cfd5b70884 Benjamin Surma committed Feb 5, 2013
Showing with 10,797 additions and 2,099 deletions.
  1. +3 −0 .gitignore
  2. +88 −33 configure.ac
  3. 0 package/flare/{ → lenny}/debian/changelog
  4. 0 package/flare/{ → lenny}/debian/compat
  5. 0 package/flare/{ → lenny}/debian/conffiles
  6. 0 package/flare/{ → lenny}/debian/control
  7. 0 package/flare/{ → lenny}/debian/copyright
  8. 0 package/flare/{ → lenny}/debian/default
  9. 0 package/flare/{ → lenny}/debian/dirs
  10. +12 −0 package/flare/{ → lenny}/debian/init.d
  11. 0 package/flare/{ → lenny}/debian/install
  12. +137 −0 package/flare/lenny/debian/rules
  13. +108 −0 package/flare/squeeze/debian/changelog
  14. +1 −0 package/flare/squeeze/debian/compat
  15. +2 −0 package/flare/squeeze/debian/conffiles
  16. +11 −0 package/flare/squeeze/debian/control
  17. +354 −0 package/flare/squeeze/debian/copyright
  18. +6 −0 package/flare/squeeze/debian/default
  19. +1 −0 package/flare/squeeze/debian/dirs
  20. +171 −0 package/flare/squeeze/debian/init.d
  21. +2 −0 package/flare/squeeze/debian/install
  22. 0 package/flare/{ → squeeze}/debian/rules
  23. +32 −23 src/flared/flared.cc
  24. +11 −11 src/flared/handler_mysql_replication.cc
  25. +7 −4 src/flared/handler_request.cc
  26. +3 −4 src/flared/handler_request.h
  27. +5 −5 src/flared/ini_option.cc
  28. +144 −0 src/flared/op_parser_binary_node.cc
  29. +1 −0 src/flared/op_parser_binary_node.h
  30. +32 −26 src/flared/op_parser_text_node.cc
  31. +0 −2 src/flared/op_parser_text_node.h
  32. +2 −2 src/flared/op_show_node.cc
  33. +1 −1 src/flared/op_show_node.h
  34. +2 −2 src/flared/op_stats_node.cc
  35. +1 −1 src/flared/op_stats_node.h
  36. +4 −8 src/flarefs/flarefs.cc
  37. +4 −4 src/flarefs/fuse_fs_entry.cc
  38. +2 −2 src/flarefs/fuse_impl.cc
  39. +16 −19 src/flarei/flarei.cc
  40. +6 −3 src/flarei/handler_request.cc
  41. +3 −4 src/flarei/handler_request.h
  42. +1 −1 src/flarei/ini_option.cc
  43. +1 −0 src/flarei/op_parser_binary_index.h
  44. +15 −15 src/flarei/op_parser_text_index.cc
  45. +2 −2 src/flarei/op_show_index.cc
  46. +1 −1 src/flarei/op_show_index.h
  47. +2 −2 src/flarei/op_stats_index.cc
  48. +1 −1 src/flarei/op_stats_index.h
  49. +13 −3 src/lib/Makefile.am
  50. +2 −2 src/lib/app.cc
  51. +3 −1 src/lib/app.h
  52. +226 −0 src/lib/binary_header.h
  53. +141 −0 src/lib/binary_network_mapping.h
  54. +71 −0 src/lib/binary_request_header.h
  55. +71 −0 src/lib/binary_response_header.h
  56. +17 −15 src/lib/client.cc
  57. +40 −39 src/lib/cluster.cc
  58. +2 −2 src/lib/cluster.h
  59. +22 −76 src/lib/connection.h
  60. +110 −77 src/lib/{connection.cc → connection_tcp.cc}
  61. +120 −0 src/lib/connection_tcp.h
  62. +7 −7 src/lib/handler_monitor.cc
  63. +9 −9 src/lib/handler_monitor.h
  64. +4 −3 src/lib/handler_proxy.cc
  65. +2 −2 src/lib/handler_proxy.h
  66. +6 −5 src/lib/handler_reconstruction.cc
  67. +2 −2 src/lib/handler_reconstruction.h
  68. +68 −0 src/lib/htonll.h
  69. +0 −1 src/lib/ini.h
  70. +0 −1 src/lib/key_resolver.h
  71. +5 −5 src/lib/key_resolver_modular.cc
  72. +2 −2 src/lib/logger.h
  73. +0 −114 src/lib/mm.cc
  74. +0 −80 src/lib/mm.h
  75. +11 −11 src/lib/mysql_replication.cc
  76. +0 −79 src/lib/net.cc
  77. +0 −53 src/lib/net.h
  78. +99 −9 src/lib/op.cc
  79. +67 −17 src/lib/op.h
  80. +9 −1 src/lib/op_add.cc
  81. +1 −2 src/lib/op_add.h
  82. +32 −0 src/lib/op_addq.h
  83. +20 −1 src/lib/op_append.cc
  84. +5 −2 src/lib/op_append.h
  85. +32 −0 src/lib/op_appendq.h
  86. +1 −1 src/lib/op_cas.cc
  87. +9 −1 src/lib/op_decr.cc
  88. +1 −2 src/lib/op_decr.h
  89. +32 −0 src/lib/op_decrq.h
  90. +28 −11 src/lib/op_delete.cc
  91. +4 −4 src/lib/op_delete.h
  92. +32 −0 src/lib/op_deleteq.h
  93. +27 −16 src/lib/op_dump.cc
  94. +2 −2 src/lib/op_dump.h
  95. +10 −10 src/lib/op_dump_key.cc
  96. +2 −2 src/lib/op_dump_key.h
  97. +2 −2 src/lib/op_error.cc
  98. +1 −1 src/lib/op_error.h
  99. +19 −9 src/lib/op_flush_all.cc
  100. +3 −2 src/lib/op_flush_all.h
  101. +32 −0 src/lib/op_flush_allq.h
  102. +130 −0 src/lib/op_gat.cc
  103. +38 −0 src/lib/op_gat.h
  104. +32 −0 src/lib/op_gatq.h
  105. +106 −39 src/lib/op_get.cc
  106. +19 −4 src/lib/op_get.h
  107. +52 −0 src/lib/op_getk.cc
  108. +35 −0 src/lib/op_getk.h
  109. +32 −0 src/lib/op_getkq.h
  110. +32 −0 src/lib/op_getq.h
  111. +1 −1 src/lib/op_gets.cc
  112. +0 −2 src/lib/op_gets.h
  113. +72 −18 src/lib/op_incr.cc
  114. +10 −3 src/lib/op_incr.h
  115. +32 −0 src/lib/op_incrq.h
  116. +12 −12 src/lib/op_keys.cc
  117. +3 −3 src/lib/op_keys.h
  118. +3 −3 src/lib/op_kill.cc
  119. +1 −1 src/lib/op_kill.h
  120. +9 −9 src/lib/op_meta.cc
  121. +2 −2 src/lib/op_meta.h
  122. +8 −8 src/lib/op_node_add.cc
  123. +2 −2 src/lib/op_node_add.h
  124. +6 −6 src/lib/op_node_remove.cc
  125. +2 −2 src/lib/op_node_remove.h
  126. +8 −8 src/lib/op_node_role.cc
  127. +2 −2 src/lib/op_node_role.h
  128. +8 −8 src/lib/op_node_state.cc
  129. +2 −2 src/lib/op_node_state.h
  130. +9 −9 src/lib/op_node_sync.cc
  131. +2 −2 src/lib/op_node_sync.h
  132. +10 −8 src/lib/op_parser.h
  133. +11 −1 src/lib/op_parser_binary.cc
  134. +4 −2 src/lib/op_parser_binary.h
  135. +4 −4 src/lib/op_parser_text.cc
  136. +0 −2 src/lib/op_parser_text.h
  137. +6 −6 src/lib/op_ping.cc
  138. +2 −2 src/lib/op_ping.h
  139. +9 −1 src/lib/op_prepend.cc
  140. +3 −4 src/lib/op_prepend.h
  141. +32 −0 src/lib/op_prependq.h
  142. +7 −7 src/lib/op_proxy_read.cc
  143. +4 −4 src/lib/op_proxy_read.h
  144. +5 −5 src/lib/op_proxy_write.cc
  145. +3 −3 src/lib/op_proxy_write.h
  146. +12 −4 src/lib/op_quit.cc
  147. +7 −3 src/lib/op_quit.h
  148. +32 −0 src/lib/op_quitq.h
  149. +9 −1 src/lib/op_replace.cc
  150. +1 −2 src/lib/op_replace.h
  151. +32 −0 src/lib/op_replaceq.h
  152. +37 −17 src/lib/op_set.cc
  153. +7 −3 src/lib/op_set.h
  154. +32 −0 src/lib/op_setq.h
  155. +2 −2 src/lib/op_show.cc
  156. +1 −1 src/lib/op_show.h
  157. +8 −8 src/lib/op_shutdown.cc
  158. +2 −2 src/lib/op_shutdown.h
  159. +146 −94 src/lib/op_stats.cc
  160. +22 −1 src/lib/op_stats.h
  161. +103 −0 src/lib/op_touch.cc
  162. +40 −0 src/lib/op_touch.h
  163. +8 −8 src/lib/op_verbosity.cc
  164. +2 −2 src/lib/op_verbosity.h
  165. +17 −6 src/lib/op_version.cc
  166. +12 −1 src/lib/op_version.h
  167. +3 −3 src/lib/queue_node_sync.cc
  168. +16 −7 src/lib/queue_proxy_read.cc
  169. +39 −20 src/lib/queue_proxy_write.cc
  170. +0 −1 src/lib/queue_update_monitor_option.h
  171. +6 −5 src/lib/server.cc
  172. +15 −5 src/lib/server.h
  173. +159 −2 src/lib/storage.cc
  174. +28 −114 src/lib/storage.h
  175. +692 −0 src/lib/storage_kch.cc
  176. +71 −0 src/lib/storage_kch.h
  177. +97 −59 src/lib/storage_tcb.cc
  178. +3 −0 src/lib/storage_tcb.h
  179. +92 −37 src/lib/storage_tch.cc
  180. +3 −3 src/lib/thread.cc
  181. +0 −1 src/lib/thread.h
  182. +0 −1 src/lib/thread_queue.h
  183. +26 −33 src/lib/util.cc
  184. +60 −53 src/lib/util.h
  185. +16 −4 test/Makefile.am
  186. +98 −18 test/lib/Makefile.am
  187. +0 −121 test/lib/common-storage-tests.cc
  188. +0 −31 test/lib/common-storage-tests.h
  189. +92 −0 test/lib/common_connection_tests.cc
  190. +28 −0 test/lib/common_connection_tests.h
  191. +841 −0 test/lib/common_storage_tests.cc
  192. +227 −0 test/lib/common_storage_tests.h
  193. +169 −0 test/lib/connection_iostream.cc
  194. +67 −0 test/lib/connection_iostream.h
  195. +0 −59 test/lib/test-storage-tcb.cc
  196. +0 −57 test/lib/test-storage-tch.cc
  197. +0 −75 test/lib/test-storage.cc
  198. +0 −147 test/lib/test-util.cc
  199. +174 −0 test/lib/test_binary_header.cc
  200. +43 −0 test/lib/test_connection_iostream.cc
  201. +115 −0 test/lib/test_connection_tcp.cc
  202. +111 −0 test/lib/test_connection_tcp.h
  203. +5 −5 test/lib/{test-key-resolver-modular.cc → test_key_resolver_modular.cc}
  204. +115 −0 test/lib/test_op.cc
  205. +26 −0 test/lib/test_op.h
  206. +36 −0 test/lib/test_op_add.cc
  207. +75 −0 test/lib/test_op_append.cc
  208. +36 −0 test/lib/test_op_cas.cc
  209. +36 −0 test/lib/test_op_decr.cc
  210. +93 −0 test/lib/test_op_delete.cc
  211. +120 −0 test/lib/test_op_dump.cc
  212. +73 −0 test/lib/test_op_dump_key.cc
  213. +53 −0 test/lib/test_op_error.cc
  214. +90 −0 test/lib/test_op_flush_all.cc
  215. +137 −0 test/lib/test_op_gat.cc
  216. +109 −0 test/lib/test_op_get.cc
  217. +36 −0 test/lib/test_op_gets.cc
  218. +146 −0 test/lib/test_op_incr.cc
  219. +73 −0 test/lib/test_op_keys.cc
  220. +64 −0 test/lib/test_op_kill.cc
  221. +48 −0 test/lib/test_op_meta.cc
  222. +59 −0 test/lib/test_op_node_add.cc
  223. +59 −0 test/lib/test_op_node_remove.cc
  224. +116 −0 test/lib/test_op_node_role.cc
  225. +99 −0 test/lib/test_op_node_state.cc
  226. +48 −0 test/lib/test_op_node_sync.cc
  227. +57 −0 test/lib/test_op_parser.cc
  228. +38 −0 test/lib/test_op_parser.h
  229. +48 −0 test/lib/test_op_ping.cc
  230. +36 −0 test/lib/test_op_prepend.cc
  231. +48 −0 test/lib/test_op_quit.cc
  232. +36 −0 test/lib/test_op_replace.cc
  233. +101 −0 test/lib/test_op_set.cc
  234. +61 −0 test/lib/test_op_show.cc
  235. +66 −0 test/lib/test_op_shutdown.cc
  236. +131 −0 test/lib/test_op_stats.cc
  237. +166 −0 test/lib/test_op_touch.cc
  238. +86 −0 test/lib/test_op_verbosity.cc
  239. +49 −0 test/lib/test_op_version.cc
  240. +75 −0 test/lib/test_storage.cc
  241. +272 −0 test/lib/test_storage_entry.cc
  242. +71 −0 test/lib/test_storage_kch.cc
  243. +75 −0 test/lib/test_storage_tcb.cc
  244. +74 −0 test/lib/test_storage_tch.cc
  245. +251 −0 test/lib/test_util.cc
  246. +53 −0 test/run-memory-tests.sh
  247. +0 −28 test/run-test.sh
  248. +39 −0 test/run-tests.sh
View
@@ -13,3 +13,6 @@
/ltmain.sh
Makefile
Makefile.in
+/cscope.*
+/tags
+/test/log
View
@@ -1,69 +1,125 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
+
AC_PREREQ(2.59)
AC_INIT(flare, 1.0.16)
AC_CONFIG_SRCDIR(src/flared/flared.cc)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(src/config.h)
AC_CANONICAL_HOST
+
# Checks for programs.
+
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_LIBTOOL
-
AC_LANG(C++)
+# Valgrind
+AC_ARG_ENABLE(valgrind-checks,
+ AS_HELP_STRING([--disable-valgrind-checks], [valgrind memory checks]))
+AS_IF([test "x$enable_valgrind_checks" != "xno"],
+ [AC_PATH_PROGS(VALGRIND, valgrind)])
+AS_IF([test "x$ac_cv_path_VALGRIND" == "x" -a "x$enable_valgrind_checks" == "xyes"], [AC_MSG_ERROR(valgrind-checks requested but valgrind not found)])
+AC_CHECK_HEADERS([valgrind.h valgrind/valgrind.h])
+
+
# Checks for libraries.
+
+# Required libraries
AC_ARG_WITH(boost,
- [ --with-boost boost libraries],
+ AS_HELP_STRING([--with-boost], [boost libraries]),
[CXXFLAGS="${CXXFLAGS} -I${withval}/include" LDFLAGS="${LDFLAGS} -L${withval}/lib"])
AC_CHECK_LIB(boost_program_options, main, [], [AC_CHECK_LIB(boost_program_options-mt, main, [], [AC_MSG_ERROR(boost_program_options not found)])])
AC_CHECK_LIB(boost_regex, main, [], [AC_CHECK_LIB(boost_regex-mt, main, [], [AC_MSG_ERROR(boost_regex not found)])])
AC_CHECK_LIB(boost_serialization, main, [], [AC_CHECK_LIB(boost_serialization-mt, main, [], [AC_MSG_ERROR(boost_serialization not found)])])
+AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(libpthread not found)])
+AC_CHECK_LIB(z, main, [], [AC_MSG_ERROR(zlib not found)])
-AC_CHECK_LIB(pthread, pthread_create, [], [echo "libpthread not found"; exit 1])
-
+# Tokyo Cabinet
AC_ARG_WITH(tokyocabinet,
- [ --with-tokyocabinet tokyocabinet libraries],
+ AS_HELP_STRING([--with-tokyocabinet], [tokyocabinet libraries]),
[CXXFLAGS="${CXXFLAGS} -I${withval}/include -I${withval}/include/tc" LDFLAGS="${LDFLAGS} -L${withval}/lib"])
-AC_CHECK_LIB(tokyocabinet, main, [], [echo "libtokyocabinet not found"; exit 1])
-AC_CHECK_LIB(z, main, [], [echo "zlib not found"; exit 1])
+AC_CHECK_LIB(tokyocabinet, main, [], [AC_MSG_ERROR(tokyocabinet not found)])
+
+# Kyoto Cabinet
+AC_ARG_WITH(kyotocabinet,
+ AS_HELP_STRING([--with-kyotocabinet], [kyotocabinet libraries]),
+ AS_IF([test "$withval" != "no"], [CXXFLAGS="${CXXFLAGS} -I${withval}/include -I${withval}/include/kc" LDFLAGS="${LDFLAGS} -L${withval}/lib"], []))
+AS_IF([test "x$with_kyotocabinet" != "xno"],
+ [AC_CHECK_LIB(kyotocabinet, main, [], [])], [ac_cv_lib_kyotocabinet_main=no])
+AS_IF([test "x$ac_cv_lib_kyotocabinet_main" = "xyes"],
+ [],
+ [AS_IF([test "x$with_kyotocabinet" != "x" -a "x$with_kyotocabinet" != "xno"],
+ [AC_MSG_ERROR([kyotocabinet requested but not found])
+ ])
+ ])
+
# Checks for additional features
+
+# Kyoto Cabinet
+AM_CONDITIONAL(ENABLE_KYOTOCABINET, test "$ac_cv_lib_kyotocabinet_main" = "yes")
+
+# MySQL replication
AC_MSG_CHECKING(if mysql replication is enabled)
-AC_ARG_ENABLE(mysql-replication, [AC_HELP_STRING([--enable-mysql-replication], [enable mysql replication feature (very experimental) [default=no]])], [enable_mysql_replication="yes"], [enable_mysql_replication="no"])
+AC_ARG_ENABLE(mysql-replication, [AS_HELP_STRING([--enable-mysql-replication], [enable mysql replication feature (very experimental) [default=no]])], [enable_mysql_replication="yes"], [enable_mysql_replication="no"])
if test "x$enable_mysql_replication" = "xyes"
then
AC_DEFINE([ENABLE_MYSQL_REPLICATION], 1, [enable mysql replication feature or not])
fi
AC_MSG_RESULT($enable_mysql_replication)
+# FlareFS
AC_MSG_CHECKING(if flarefs is enabled)
-AC_ARG_ENABLE(flarefs, [AC_HELP_STRING([--enable-flarefs], [enable flarefs feature (very experimental) [default=no]])], [enable_flarefs="yes"], [enable_flarefs="no"])
+AC_ARG_ENABLE(flarefs, [AS_HELP_STRING([--enable-flarefs], [enable flarefs feature (very experimental) [default=no]])], [enable_flarefs="yes"], [enable_flarefs="no"])
AC_MSG_RESULT($enable_flarefs)
AM_CONDITIONAL(ENABLE_FLAREFS, test "$enable_flarefs" = "yes")
-
if test "x$enable_flarefs" = "xyes"
then
AC_ARG_WITH(fuse,
[ --with-fuse fuse libraries],
[CXXFLAGS="${CXXFLAGS} -I${withval}/include" LDFLAGS="${LDFLAGS} -L${withval}/lib"])
- AC_CHECK_LIB(fuse, main, [], [echo "libfuse not found"; exit 1])
+ AC_CHECK_LIB(fuse, main, [], [AC_MSG_ERROR(libfuse not found)])
fi
+
# Checks for header files.
+
AC_STDC_HEADERS
-AC_CHECK_HEADER(pthread.h, [], [echo "pthread.h not found"; exit1])
+AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR(pthread.h not found)])
+AC_CHECK_HEADERS(arpa/inet.h endian.h sys/endian.h sys/types.h winsock2.h byteswap.h, [], [])
+
# Checks for typedefs, structures, and compiler characteristics.
+
# Checks for library functions.
-AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE([HAVE_GETHOSTBYNAME_R], [], [have gethostbyname_r() or not])])
+
AC_CHECK_FUNC(epoll_create, [AC_DEFINE([HAVE_EPOLL], [], [have epoll functions or not])])
AC_CHECK_FUNC(kqueue, [AC_DEFINE([HAVE_KQUEUE], [], [have kqueue functions or not])])
-
+AC_CHECK_DECLS([htonll, be64toh, betoh64, bswap64, bswap_64, __bswap_64], [], [], [
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+#ifdef HAVE_ENDIAN_H
+# include <endian.h>
+#endif
+#ifdef HAVE_SYS_ENDIAN_H
+# include <sys/endian.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+#ifdef HAVE_BYTESWAP_H
+# include <byteswap.h>
+#endif
+ ])
AC_MSG_CHECKING(for gnu specific strerror_r)
AC_TRY_COMPILE([
#include <string.h>
@@ -74,11 +130,13 @@ if test $ac_strerror_r = yes; then
AC_DEFINE([HAVE_GNU_STRERROR_R], [], [have gnu specific strerror_r()])
fi
-# And others
-# debug options
+# And others...
+
+# Debug options
+
AC_MSG_CHECKING(if debug is enabled)
-AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [enable debug compile [default=no]])], [enable_debug="yes"], [enable_debug="no"])
+AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable debug compile [default=no]])], [enable_debug="yes"], [enable_debug="no"])
if test "x$enable_debug" = "xno"
then
DEBUG_DEFS=""
@@ -87,36 +145,33 @@ else
fi
AC_MSG_RESULT($enable_debug)
-AC_MSG_CHECKING(if memory allocation check is enabled)
-AC_ARG_ENABLE(memory-allocation-check, [AC_HELP_STRING([--enable-memory-allocation-check], [enable memory allocation check procs [default=no]])], [enable_memory_allocation_check="yes"], [enable_memory_allocation_check="no"])
-if test "x$enable_memory_allocation_check" = "xno"
-then
- DEBUG_DEFS="${DEBUG_DEFS}"
-else
- DEBUG_DEFS="${DEBUG_DEFS} -DMM_ALLOCATION_CHECK"
-fi
-AC_MSG_RESULT($enable_memory_allocation_check)
-
# Test
+
+# Cutter
m4_ifdef([AC_CHECK_CPPCUTTER], [
AC_CHECK_CPPCUTTER
],
[ac_cv_use_cppcutter="no"])
AM_CONDITIONAL([WITH_CUTTER], [test "$ac_cv_use_cppcutter" != "no"])
-if test "$ac_cv_use_cppcutter" != "no"; then
- AC_DEFINE(WITH_CUTTER, 1, [Define to 1 if you use Cutter])
-fi
-# pthread options
+# Valgrind
+AM_CONDITIONAL([WITH_VALGRIND], [test "x$ac_cv_path_VALGRIND" != "x" -a "$ac_cv_use_cppcutter" != "no"])
+
+# pthread options
+
PTHREAD_DEFS="-pthread -D_REENTRANT -D_THREAD_SAFE"
+
+# Setup CXXFLAGS, LDFLAGS
+
FLARE_CXXFLAGS="$DEBUG_DEFS $PTHREAD_DEFS"
FLARE_LDFLAGS=""
-
AC_SUBST(FLARE_CXXFLAGS)
AC_SUBST(FLARE_LDFLAGS)
-# Outputs
+
+# Output
+
AC_CONFIG_FILES([Makefile \
src/Makefile \
src/lib/Makefile \
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,16 @@
#! /bin/sh
+### BEGIN INIT INFO
+# Provides: flare
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Should-Start: $local_fs
+# Should-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start flare index server or node
+# Description: Start up flare, a distributed and persistent key-value storage
+### END INIT INFO
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
RUN_INDEX=yes
RUN_NODE=yes
File renamed without changes.
@@ -0,0 +1,137 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-mysql-replication --without-kyotocabinet CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+
+
+#Architecture
+build: build-arch build-indep
+
+build-arch: build-arch-stamp
+build-arch-stamp: config.status
+
+ # Add here commands to compile the arch part of the package.
+ #$(MAKE)
+ touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp: config.status
+
+ # Add here commands to compile the indep part of the package.
+ #$(MAKE) doc
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+ dh_clean
+
+install: install-indep install-arch
+install-indep:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -i
+ dh_installdirs -i
+
+ # Add here commands to install the indep part of the package into
+ # debian/<package>-doc.
+ #INSTALLDOC#
+
+ dh_install -i
+
+install-arch:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -s
+ dh_installdirs -s
+
+ # Add here commands to install the arch part of the package into
+ # debian/tmp.
+ $(MAKE) DESTDIR=$(CURDIR)/debian/flare install
+
+ dh_install -s
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+binary-common:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+ dh_installinit --no-start
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+# Build architecture independant packages using the common target.
+binary-indep: build-indep install-indep
+ $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build-arch install-arch
+ $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
Oops, something went wrong.

0 comments on commit 57299af

Please sign in to comment.