diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | po/POTFILES.in | 16 | ||||
-rw-r--r-- | src/plugin/Makefile.am | 2 | ||||
-rw-r--r-- | src/plugin/datacache/Makefile.am | 76 | ||||
-rw-r--r-- | src/plugin/datacache/datacache-0001.sql (renamed from src/service/datacache/datacache-0001.sql) | 0 | ||||
-rw-r--r-- | src/plugin/datacache/datacache-drop.sql (renamed from src/service/datacache/datacache-drop.sql) | 0 | ||||
-rw-r--r-- | src/plugin/datacache/meson.build | 30 | ||||
-rw-r--r-- | src/plugin/datacache/plugin_datacache_heap.c (renamed from src/service/datacache/plugin_datacache_heap.c) | 0 | ||||
-rw-r--r-- | src/plugin/datacache/plugin_datacache_postgres.c (renamed from src/service/datacache/plugin_datacache_postgres.c) | 0 | ||||
-rw-r--r-- | src/plugin/datacache/plugin_datacache_sqlite.c (renamed from src/service/datacache/plugin_datacache_sqlite.c) | 0 | ||||
-rw-r--r-- | src/plugin/datacache/plugin_datacache_template.c (renamed from src/service/datacache/plugin_datacache_template.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/Makefile.am | 150 | ||||
-rw-r--r-- | src/plugin/datastore/datastore-0001.sql (renamed from src/service/datastore/datastore-0001.sql) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/datastore-drop.sql (renamed from src/service/datastore/datastore-drop.sql) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/meson.build | 75 | ||||
-rw-r--r-- | src/plugin/datastore/perf_plugin_datastore.c (renamed from src/service/datastore/perf_plugin_datastore.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/perf_plugin_datastore_data_heap.conf (renamed from src/service/datastore/perf_plugin_datastore_data_heap.conf) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/perf_plugin_datastore_data_postgres.conf (renamed from src/service/datastore/perf_plugin_datastore_data_postgres.conf) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/perf_plugin_datastore_data_sqlite.conf (renamed from src/service/datastore/perf_plugin_datastore_data_sqlite.conf) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/plugin_datastore_heap.c (renamed from src/service/datastore/plugin_datastore_heap.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/plugin_datastore_postgres.c (renamed from src/service/datastore/plugin_datastore_postgres.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/plugin_datastore_sqlite.c (renamed from src/service/datastore/plugin_datastore_sqlite.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/plugin_datastore_template.c (renamed from src/service/datastore/plugin_datastore_template.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/test_plugin_datastore.c (renamed from src/service/datastore/test_plugin_datastore.c) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/test_plugin_datastore_data_heap.conf (renamed from src/service/datastore/test_plugin_datastore_data_heap.conf) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/test_plugin_datastore_data_postgres.conf (renamed from src/service/datastore/test_plugin_datastore_data_postgres.conf) | 0 | ||||
-rw-r--r-- | src/plugin/datastore/test_plugin_datastore_data_sqlite.conf (renamed from src/service/datastore/test_plugin_datastore_data_sqlite.conf) | 0 | ||||
-rw-r--r-- | src/plugin/meson.build | 2 | ||||
-rw-r--r-- | src/service/datacache/Makefile.am | 68 | ||||
-rw-r--r-- | src/service/datacache/meson.build | 33 | ||||
-rw-r--r-- | src/service/datastore/Makefile.am | 117 | ||||
-rw-r--r-- | src/service/datastore/meson.build | 70 |
32 files changed, 349 insertions, 292 deletions
diff --git a/configure.ac b/configure.ac index aa96b55d5..d0d165f4e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1238,6 +1238,8 @@ src/lib/pq/Makefile | |||
1238 | src/lib/sq/Makefile | 1238 | src/lib/sq/Makefile |
1239 | src/plugin/Makefile | 1239 | src/plugin/Makefile |
1240 | src/plugin/block/Makefile | 1240 | src/plugin/block/Makefile |
1241 | src/plugin/datacache/Makefile | ||
1242 | src/plugin/datastore/Makefile | ||
1241 | src/plugin/fs/Makefile | 1243 | src/plugin/fs/Makefile |
1242 | src/plugin/gns/Makefile | 1244 | src/plugin/gns/Makefile |
1243 | src/plugin/gnsrecord/Makefile | 1245 | src/plugin/gnsrecord/Makefile |
diff --git a/po/POTFILES.in b/po/POTFILES.in index 88eaf10da..fbf8a8477 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -208,6 +208,14 @@ src/lib/util/tun.c | |||
208 | src/lib/util/uri.c | 208 | src/lib/util/uri.c |
209 | src/plugin/block/plugin_block_template.c | 209 | src/plugin/block/plugin_block_template.c |
210 | src/plugin/block/plugin_block_test.c | 210 | src/plugin/block/plugin_block_test.c |
211 | src/plugin/datacache/plugin_datacache_heap.c | ||
212 | src/plugin/datacache/plugin_datacache_postgres.c | ||
213 | src/plugin/datacache/plugin_datacache_sqlite.c | ||
214 | src/plugin/datacache/plugin_datacache_template.c | ||
215 | src/plugin/datastore/plugin_datastore_heap.c | ||
216 | src/plugin/datastore/plugin_datastore_postgres.c | ||
217 | src/plugin/datastore/plugin_datastore_sqlite.c | ||
218 | src/plugin/datastore/plugin_datastore_template.c | ||
211 | src/plugin/fs/plugin_block_fs.c | 219 | src/plugin/fs/plugin_block_fs.c |
212 | src/plugin/gns/plugin_block_gns.c | 220 | src/plugin/gns/plugin_block_gns.c |
213 | src/plugin/gns/plugin_gnsrecord_gns.c | 221 | src/plugin/gns/plugin_gnsrecord_gns.c |
@@ -254,16 +262,8 @@ src/service/core/gnunet-service-core_kx.c | |||
254 | src/service/core/gnunet-service-core_sessions.c | 262 | src/service/core/gnunet-service-core_sessions.c |
255 | src/service/core/gnunet-service-core_typemap.c | 263 | src/service/core/gnunet-service-core_typemap.c |
256 | src/service/datacache/datacache.c | 264 | src/service/datacache/datacache.c |
257 | src/service/datacache/plugin_datacache_heap.c | ||
258 | src/service/datacache/plugin_datacache_postgres.c | ||
259 | src/service/datacache/plugin_datacache_sqlite.c | ||
260 | src/service/datacache/plugin_datacache_template.c | ||
261 | src/service/datastore/datastore_api.c | 265 | src/service/datastore/datastore_api.c |
262 | src/service/datastore/gnunet-service-datastore.c | 266 | src/service/datastore/gnunet-service-datastore.c |
263 | src/service/datastore/plugin_datastore_heap.c | ||
264 | src/service/datastore/plugin_datastore_postgres.c | ||
265 | src/service/datastore/plugin_datastore_sqlite.c | ||
266 | src/service/datastore/plugin_datastore_template.c | ||
267 | src/service/dht/dht_api.c | 267 | src/service/dht/dht_api.c |
268 | src/service/dht/dht_test_lib.c | 268 | src/service/dht/dht_test_lib.c |
269 | src/service/dht/gnunet-service-dht.c | 269 | src/service/dht/gnunet-service-dht.c |
diff --git a/src/plugin/Makefile.am b/src/plugin/Makefile.am index c04ecd5a6..cc07120b3 100644 --- a/src/plugin/Makefile.am +++ b/src/plugin/Makefile.am | |||
@@ -1,6 +1,8 @@ | |||
1 | SUBDIRS = \ | 1 | SUBDIRS = \ |
2 | block \ | 2 | block \ |
3 | gnsrecord \ | 3 | gnsrecord \ |
4 | datacache \ | ||
5 | datastore \ | ||
4 | namecache \ | 6 | namecache \ |
5 | namestore \ | 7 | namestore \ |
6 | revocation \ | 8 | revocation \ |
diff --git a/src/plugin/datacache/Makefile.am b/src/plugin/datacache/Makefile.am new file mode 100644 index 000000000..b9ae06975 --- /dev/null +++ b/src/plugin/datacache/Makefile.am | |||
@@ -0,0 +1,76 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | ||
3 | |||
4 | plugindir = $(libdir)/gnunet | ||
5 | |||
6 | pkgcfgdir= $(pkgdatadir)/config.d/ | ||
7 | |||
8 | sqldir = $(prefix)/share/gnunet/sql/ | ||
9 | |||
10 | sql_DATA = \ | ||
11 | datacache-0001.sql \ | ||
12 | datacache-drop.sql | ||
13 | |||
14 | |||
15 | if USE_COVERAGE | ||
16 | AM_CFLAGS = --coverage -O0 | ||
17 | XLIBS = -lgcov | ||
18 | endif | ||
19 | |||
20 | if HAVE_SQLITE | ||
21 | SQLITE_PLUGIN = libgnunet_plugin_datacache_sqlite.la | ||
22 | endif | ||
23 | if HAVE_POSTGRESQL | ||
24 | POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la | ||
25 | endif | ||
26 | |||
27 | plugin_LTLIBRARIES = \ | ||
28 | $(SQLITE_PLUGIN) \ | ||
29 | $(POSTGRES_PLUGIN) \ | ||
30 | libgnunet_plugin_datacache_heap.la | ||
31 | |||
32 | # Real plugins should of course go into | ||
33 | # plugin_LTLIBRARIES | ||
34 | noinst_LTLIBRARIES = \ | ||
35 | libgnunet_plugin_datacache_template.la | ||
36 | |||
37 | |||
38 | libgnunet_plugin_datacache_sqlite_la_SOURCES = \ | ||
39 | plugin_datacache_sqlite.c | ||
40 | libgnunet_plugin_datacache_sqlite_la_LIBADD = \ | ||
41 | $(top_builddir)/src/lib/sq/libgnunetsq.la \ | ||
42 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lsqlite3 \ | ||
43 | $(LTLIBINTL) | ||
44 | libgnunet_plugin_datacache_sqlite_la_LDFLAGS = \ | ||
45 | $(GN_PLUGIN_LDFLAGS) | ||
46 | |||
47 | libgnunet_plugin_datacache_heap_la_SOURCES = \ | ||
48 | plugin_datacache_heap.c | ||
49 | libgnunet_plugin_datacache_heap_la_LIBADD = \ | ||
50 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
51 | $(LTLIBINTL) | ||
52 | libgnunet_plugin_datacache_heap_la_LDFLAGS = \ | ||
53 | $(GN_PLUGIN_LDFLAGS) | ||
54 | |||
55 | libgnunet_plugin_datacache_postgres_la_SOURCES = \ | ||
56 | plugin_datacache_postgres.c | ||
57 | libgnunet_plugin_datacache_postgres_la_LIBADD = \ | ||
58 | $(top_builddir)/src/lib/pq/libgnunetpq.la \ | ||
59 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
60 | $(GN_PLUGIN_LDFLAGS) -lpq | ||
61 | libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \ | ||
62 | $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS) | ||
63 | libgnunet_plugin_datacache_postgres_la_LDFLAGS = \ | ||
64 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) | ||
65 | |||
66 | libgnunet_plugin_datacache_template_la_SOURCES = \ | ||
67 | plugin_datacache_template.c | ||
68 | libgnunet_plugin_datacache_template_la_LIBADD = \ | ||
69 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
70 | $(LTLIBINTL) | ||
71 | libgnunet_plugin_datacache_template_la_LDFLAGS = \ | ||
72 | $(GN_PLUGIN_LDFLAGS) | ||
73 | |||
74 | |||
75 | EXTRA_DIST = \ | ||
76 | $(sql_DATA) | ||
diff --git a/src/service/datacache/datacache-0001.sql b/src/plugin/datacache/datacache-0001.sql index 6567de3c2..6567de3c2 100644 --- a/src/service/datacache/datacache-0001.sql +++ b/src/plugin/datacache/datacache-0001.sql | |||
diff --git a/src/service/datacache/datacache-drop.sql b/src/plugin/datacache/datacache-drop.sql index 2dd84bca8..2dd84bca8 100644 --- a/src/service/datacache/datacache-drop.sql +++ b/src/plugin/datacache/datacache-drop.sql | |||
diff --git a/src/plugin/datacache/meson.build b/src/plugin/datacache/meson.build new file mode 100644 index 000000000..3c9e7d330 --- /dev/null +++ b/src/plugin/datacache/meson.build | |||
@@ -0,0 +1,30 @@ | |||
1 | install_data ('datacache-0001.sql', | ||
2 | 'datacache-drop.sql', | ||
3 | install_dir: get_option('datadir')/'gnunet'/'sql') | ||
4 | |||
5 | shared_module('gnunet_plugin_datacache_sqlite', | ||
6 | ['plugin_datacache_sqlite.c'], | ||
7 | dependencies: [libgnunetutil_dep, | ||
8 | sqlite_dep, | ||
9 | libgnunetsq_dep], | ||
10 | include_directories: [incdir, configuration_inc], | ||
11 | install: true, | ||
12 | install_dir: get_option('libdir')/'gnunet') | ||
13 | |||
14 | shared_module('gnunet_plugin_datacache_heap', | ||
15 | ['plugin_datacache_heap.c'], | ||
16 | dependencies: [libgnunetutil_dep], | ||
17 | include_directories: [incdir, configuration_inc], | ||
18 | install: true, | ||
19 | install_dir: get_option('libdir')/'gnunet') | ||
20 | |||
21 | if pq_dep.found() | ||
22 | shared_module('gnunet_plugin_datacache_postgres', | ||
23 | ['plugin_datacache_postgres.c'], | ||
24 | dependencies: [libgnunetutil_dep, | ||
25 | pq_dep, | ||
26 | libgnunetpq_dep], | ||
27 | include_directories: [incdir, configuration_inc], | ||
28 | install: true, | ||
29 | install_dir: get_option('libdir')/'gnunet') | ||
30 | endif | ||
diff --git a/src/service/datacache/plugin_datacache_heap.c b/src/plugin/datacache/plugin_datacache_heap.c index 0dd8e47f8..0dd8e47f8 100644 --- a/src/service/datacache/plugin_datacache_heap.c +++ b/src/plugin/datacache/plugin_datacache_heap.c | |||
diff --git a/src/service/datacache/plugin_datacache_postgres.c b/src/plugin/datacache/plugin_datacache_postgres.c index 8bfd04aea..8bfd04aea 100644 --- a/src/service/datacache/plugin_datacache_postgres.c +++ b/src/plugin/datacache/plugin_datacache_postgres.c | |||
diff --git a/src/service/datacache/plugin_datacache_sqlite.c b/src/plugin/datacache/plugin_datacache_sqlite.c index 1c6f24a82..1c6f24a82 100644 --- a/src/service/datacache/plugin_datacache_sqlite.c +++ b/src/plugin/datacache/plugin_datacache_sqlite.c | |||
diff --git a/src/service/datacache/plugin_datacache_template.c b/src/plugin/datacache/plugin_datacache_template.c index 1bd712d39..1bd712d39 100644 --- a/src/service/datacache/plugin_datacache_template.c +++ b/src/plugin/datacache/plugin_datacache_template.c | |||
diff --git a/src/plugin/datastore/Makefile.am b/src/plugin/datastore/Makefile.am new file mode 100644 index 000000000..1f4ab59c8 --- /dev/null +++ b/src/plugin/datastore/Makefile.am | |||
@@ -0,0 +1,150 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | ||
3 | |||
4 | plugindir = $(libdir)/gnunet | ||
5 | |||
6 | pkgcfgdir= $(pkgdatadir)/config.d/ | ||
7 | |||
8 | libexecdir= $(pkglibdir)/libexec/ | ||
9 | |||
10 | sqldir = $(prefix)/share/gnunet/sql/ | ||
11 | |||
12 | sql_DATA = \ | ||
13 | datastore-0001.sql \ | ||
14 | datastore-drop.sql | ||
15 | |||
16 | if USE_COVERAGE | ||
17 | AM_CFLAGS = --coverage -O0 | ||
18 | XLIBS = -lgcov | ||
19 | endif | ||
20 | |||
21 | |||
22 | if HAVE_SQLITE | ||
23 | SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la | ||
24 | if HAVE_BENCHMARKS | ||
25 | SQLITE_BENCHMARKS = \ | ||
26 | perf_plugin_datastore_sqlite | ||
27 | endif | ||
28 | SQLITE_TESTS = \ | ||
29 | test_plugin_datastore_sqlite \ | ||
30 | $(SQLITE_BENCHMARKS) | ||
31 | endif | ||
32 | if HAVE_POSTGRESQL | ||
33 | POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la | ||
34 | if HAVE_BENCHMARKS | ||
35 | POSTGRES_BENCHMARKS = \ | ||
36 | perf_plugin_datastore_postgres | ||
37 | endif | ||
38 | POSTGRES_TESTS = \ | ||
39 | test_plugin_datastore_postgres \ | ||
40 | $(POSTGRES_BENCHMARKS) | ||
41 | endif | ||
42 | |||
43 | plugin_LTLIBRARIES = \ | ||
44 | $(SQLITE_PLUGIN) \ | ||
45 | $(POSTGRES_PLUGIN) \ | ||
46 | libgnunet_plugin_datastore_heap.la | ||
47 | |||
48 | # Real plugins should of course go into | ||
49 | # plugin_LTLIBRARIES | ||
50 | noinst_LTLIBRARIES = \ | ||
51 | libgnunet_plugin_datastore_template.la | ||
52 | |||
53 | |||
54 | libgnunet_plugin_datastore_sqlite_la_SOURCES = \ | ||
55 | plugin_datastore_sqlite.c | ||
56 | libgnunet_plugin_datastore_sqlite_la_LIBADD = \ | ||
57 | $(top_builddir)/src/lib/sq/libgnunetsq.la \ | ||
58 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lsqlite3 \ | ||
59 | $(LTLIBINTL) | ||
60 | libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \ | ||
61 | $(GN_PLUGIN_LDFLAGS) | ||
62 | |||
63 | |||
64 | libgnunet_plugin_datastore_heap_la_SOURCES = \ | ||
65 | plugin_datastore_heap.c | ||
66 | libgnunet_plugin_datastore_heap_la_LIBADD = \ | ||
67 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
68 | $(LTLIBINTL) | ||
69 | libgnunet_plugin_datastore_heap_la_LDFLAGS = \ | ||
70 | $(GN_PLUGIN_LDFLAGS) | ||
71 | |||
72 | |||
73 | libgnunet_plugin_datastore_postgres_la_SOURCES = \ | ||
74 | plugin_datastore_postgres.c | ||
75 | libgnunet_plugin_datastore_postgres_la_LIBADD = \ | ||
76 | $(top_builddir)/src/lib/pq/libgnunetpq.la \ | ||
77 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lpq | ||
78 | libgnunet_plugin_datastore_postgres_la_LDFLAGS = \ | ||
79 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) | ||
80 | libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \ | ||
81 | $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS) | ||
82 | |||
83 | |||
84 | libgnunet_plugin_datastore_template_la_SOURCES = \ | ||
85 | plugin_datastore_template.c | ||
86 | libgnunet_plugin_datastore_template_la_LIBADD = \ | ||
87 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
88 | $(LTLIBINTL) | ||
89 | libgnunet_plugin_datastore_template_la_LDFLAGS = \ | ||
90 | $(GN_PLUGIN_LDFLAGS) | ||
91 | |||
92 | check_PROGRAMS = \ | ||
93 | perf_plugin_datastore_heap \ | ||
94 | test_plugin_datastore_heap \ | ||
95 | $(SQLITE_TESTS) \ | ||
96 | $(POSTGRES_TESTS) | ||
97 | |||
98 | if ENABLE_TEST_RUN | ||
99 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; | ||
100 | TESTS = $(check_PROGRAMS) | ||
101 | endif | ||
102 | |||
103 | perf_plugin_datastore_heap_SOURCES = \ | ||
104 | perf_plugin_datastore.c | ||
105 | perf_plugin_datastore_heap_LDADD = \ | ||
106 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
107 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
108 | |||
109 | test_plugin_datastore_heap_SOURCES = \ | ||
110 | test_plugin_datastore.c | ||
111 | test_plugin_datastore_heap_LDADD = \ | ||
112 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
113 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
114 | |||
115 | |||
116 | perf_plugin_datastore_sqlite_SOURCES = \ | ||
117 | perf_plugin_datastore.c | ||
118 | perf_plugin_datastore_sqlite_LDADD = \ | ||
119 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
120 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
121 | |||
122 | test_plugin_datastore_sqlite_SOURCES = \ | ||
123 | test_plugin_datastore.c | ||
124 | test_plugin_datastore_sqlite_LDADD = \ | ||
125 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
126 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
127 | |||
128 | |||
129 | test_plugin_datastore_postgres_SOURCES = \ | ||
130 | test_plugin_datastore.c | ||
131 | test_plugin_datastore_postgres_LDADD = \ | ||
132 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
133 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
134 | |||
135 | perf_plugin_datastore_postgres_SOURCES = \ | ||
136 | perf_plugin_datastore.c | ||
137 | perf_plugin_datastore_postgres_LDADD = \ | ||
138 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
139 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
140 | |||
141 | |||
142 | EXTRA_DIST = \ | ||
143 | test_defaults.conf \ | ||
144 | perf_plugin_datastore_data_sqlite.conf \ | ||
145 | test_plugin_datastore_data_sqlite.conf \ | ||
146 | perf_plugin_datastore_data_heap.conf \ | ||
147 | test_plugin_datastore_data_heap.conf \ | ||
148 | perf_plugin_datastore_data_postgres.conf \ | ||
149 | test_plugin_datastore_data_postgres.conf \ | ||
150 | $(sql_DATA) | ||
diff --git a/src/service/datastore/datastore-0001.sql b/src/plugin/datastore/datastore-0001.sql index 0d4758be2..0d4758be2 100644 --- a/src/service/datastore/datastore-0001.sql +++ b/src/plugin/datastore/datastore-0001.sql | |||
diff --git a/src/service/datastore/datastore-drop.sql b/src/plugin/datastore/datastore-drop.sql index 67fee303d..67fee303d 100644 --- a/src/service/datastore/datastore-drop.sql +++ b/src/plugin/datastore/datastore-drop.sql | |||
diff --git a/src/plugin/datastore/meson.build b/src/plugin/datastore/meson.build new file mode 100644 index 000000000..6769cb78b --- /dev/null +++ b/src/plugin/datastore/meson.build | |||
@@ -0,0 +1,75 @@ | |||
1 | install_data ('datastore-0001.sql', | ||
2 | 'datastore-drop.sql', | ||
3 | install_dir: get_option('datadir')/'gnunet'/'sql') | ||
4 | |||
5 | shared_module('gnunet_plugin_datastore_sqlite', | ||
6 | ['plugin_datastore_sqlite.c'], | ||
7 | dependencies: [libgnunetutil_dep, | ||
8 | sqlite_dep, | ||
9 | libgnunetsq_dep], | ||
10 | include_directories: [incdir, configuration_inc], | ||
11 | install: true, | ||
12 | install_dir: get_option('libdir')/'gnunet') | ||
13 | |||
14 | shared_module('gnunet_plugin_datastore_heap', | ||
15 | ['plugin_datastore_heap.c'], | ||
16 | dependencies: [libgnunetutil_dep], | ||
17 | include_directories: [incdir, configuration_inc], | ||
18 | install: true, | ||
19 | install_dir: get_option('libdir')/'gnunet') | ||
20 | |||
21 | if pq_dep.found() | ||
22 | shared_module('gnunet_plugin_datastore_postgres', | ||
23 | ['plugin_datastore_postgres.c'], | ||
24 | dependencies: [libgnunetutil_dep, | ||
25 | pq_dep, | ||
26 | libgnunetpq_dep], | ||
27 | include_directories: [incdir, configuration_inc], | ||
28 | install: true, | ||
29 | install_dir: get_option('libdir')/'gnunet') | ||
30 | endif | ||
31 | |||
32 | testds_plugin_sqlite = executable ('test_plugin_datastore_sqlite', | ||
33 | ['test_plugin_datastore.c'], | ||
34 | dependencies: [ | ||
35 | libgnunetutil_dep, | ||
36 | ], | ||
37 | include_directories: [incdir, configuration_inc], | ||
38 | install: false) | ||
39 | |||
40 | testds_plugin_heap = executable ('test_plugin_datastore_heap', | ||
41 | ['test_plugin_datastore.c'], | ||
42 | dependencies: [ | ||
43 | libgnunetutil_dep, | ||
44 | ], | ||
45 | include_directories: [incdir, configuration_inc], | ||
46 | install: false) | ||
47 | |||
48 | testds_plugin_pq = executable ('test_plugin_datastore_postgres', | ||
49 | ['test_plugin_datastore.c'], | ||
50 | dependencies: [ | ||
51 | libgnunetutil_dep, | ||
52 | ], | ||
53 | include_directories: [incdir, configuration_inc], | ||
54 | install: false) | ||
55 | |||
56 | configure_file(input : 'test_defaults.conf', | ||
57 | output : 'test_defaults.conf', | ||
58 | copy: true) | ||
59 | configure_file(input : 'test_plugin_datastore_data_sqlite.conf', | ||
60 | output : 'test_plugin_datastore_data_sqlite.conf', | ||
61 | copy: true) | ||
62 | configure_file(input : 'test_plugin_datastore_data_heap.conf', | ||
63 | output : 'test_plugin_datastore_data_heap.conf', | ||
64 | copy: true) | ||
65 | configure_file(input : 'test_plugin_datastore_data_postgres.conf', | ||
66 | output : 'test_plugin_datastore_data_postgres.conf', | ||
67 | copy: true) | ||
68 | |||
69 | test('test_plugin_datastore_sqlite', testds_plugin_sqlite, | ||
70 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
71 | test('test_plugin_datastore_heap', testds_plugin_heap, | ||
72 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
73 | test('test_plugin_datastore_postgres', testds_plugin_pq, | ||
74 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
75 | |||
diff --git a/src/service/datastore/perf_plugin_datastore.c b/src/plugin/datastore/perf_plugin_datastore.c index 8e63b08e6..8e63b08e6 100644 --- a/src/service/datastore/perf_plugin_datastore.c +++ b/src/plugin/datastore/perf_plugin_datastore.c | |||
diff --git a/src/service/datastore/perf_plugin_datastore_data_heap.conf b/src/plugin/datastore/perf_plugin_datastore_data_heap.conf index 873cf9606..873cf9606 100644 --- a/src/service/datastore/perf_plugin_datastore_data_heap.conf +++ b/src/plugin/datastore/perf_plugin_datastore_data_heap.conf | |||
diff --git a/src/service/datastore/perf_plugin_datastore_data_postgres.conf b/src/plugin/datastore/perf_plugin_datastore_data_postgres.conf index 7683887a8..7683887a8 100644 --- a/src/service/datastore/perf_plugin_datastore_data_postgres.conf +++ b/src/plugin/datastore/perf_plugin_datastore_data_postgres.conf | |||
diff --git a/src/service/datastore/perf_plugin_datastore_data_sqlite.conf b/src/plugin/datastore/perf_plugin_datastore_data_sqlite.conf index 888e020a6..888e020a6 100644 --- a/src/service/datastore/perf_plugin_datastore_data_sqlite.conf +++ b/src/plugin/datastore/perf_plugin_datastore_data_sqlite.conf | |||
diff --git a/src/service/datastore/plugin_datastore_heap.c b/src/plugin/datastore/plugin_datastore_heap.c index a827a2763..a827a2763 100644 --- a/src/service/datastore/plugin_datastore_heap.c +++ b/src/plugin/datastore/plugin_datastore_heap.c | |||
diff --git a/src/service/datastore/plugin_datastore_postgres.c b/src/plugin/datastore/plugin_datastore_postgres.c index 5fcacc17b..5fcacc17b 100644 --- a/src/service/datastore/plugin_datastore_postgres.c +++ b/src/plugin/datastore/plugin_datastore_postgres.c | |||
diff --git a/src/service/datastore/plugin_datastore_sqlite.c b/src/plugin/datastore/plugin_datastore_sqlite.c index 5ea9da4cb..5ea9da4cb 100644 --- a/src/service/datastore/plugin_datastore_sqlite.c +++ b/src/plugin/datastore/plugin_datastore_sqlite.c | |||
diff --git a/src/service/datastore/plugin_datastore_template.c b/src/plugin/datastore/plugin_datastore_template.c index 2b455f8cb..2b455f8cb 100644 --- a/src/service/datastore/plugin_datastore_template.c +++ b/src/plugin/datastore/plugin_datastore_template.c | |||
diff --git a/src/service/datastore/test_plugin_datastore.c b/src/plugin/datastore/test_plugin_datastore.c index 7de1acf2d..7de1acf2d 100644 --- a/src/service/datastore/test_plugin_datastore.c +++ b/src/plugin/datastore/test_plugin_datastore.c | |||
diff --git a/src/service/datastore/test_plugin_datastore_data_heap.conf b/src/plugin/datastore/test_plugin_datastore_data_heap.conf index b1ea8ff67..b1ea8ff67 100644 --- a/src/service/datastore/test_plugin_datastore_data_heap.conf +++ b/src/plugin/datastore/test_plugin_datastore_data_heap.conf | |||
diff --git a/src/service/datastore/test_plugin_datastore_data_postgres.conf b/src/plugin/datastore/test_plugin_datastore_data_postgres.conf index d0e29437f..d0e29437f 100644 --- a/src/service/datastore/test_plugin_datastore_data_postgres.conf +++ b/src/plugin/datastore/test_plugin_datastore_data_postgres.conf | |||
diff --git a/src/service/datastore/test_plugin_datastore_data_sqlite.conf b/src/plugin/datastore/test_plugin_datastore_data_sqlite.conf index ca837c77a..ca837c77a 100644 --- a/src/service/datastore/test_plugin_datastore_data_sqlite.conf +++ b/src/plugin/datastore/test_plugin_datastore_data_sqlite.conf | |||
diff --git a/src/plugin/meson.build b/src/plugin/meson.build index d0e0806da..81366b016 100644 --- a/src/plugin/meson.build +++ b/src/plugin/meson.build | |||
@@ -1,5 +1,7 @@ | |||
1 | subdir('block') | 1 | subdir('block') |
2 | subdir('gnsrecord') | 2 | subdir('gnsrecord') |
3 | subdir('datacache') | ||
4 | subdir('datastore') | ||
3 | subdir('namecache') | 5 | subdir('namecache') |
4 | subdir('namestore') | 6 | subdir('namestore') |
5 | subdir('revocation') | 7 | subdir('revocation') |
diff --git a/src/service/datacache/Makefile.am b/src/service/datacache/Makefile.am index 9caeac543..022b45253 100644 --- a/src/service/datacache/Makefile.am +++ b/src/service/datacache/Makefile.am | |||
@@ -8,25 +8,11 @@ pkgcfgdir= $(pkgdatadir)/config.d/ | |||
8 | dist_pkgcfg_DATA = \ | 8 | dist_pkgcfg_DATA = \ |
9 | datacache.conf | 9 | datacache.conf |
10 | 10 | ||
11 | sqldir = $(prefix)/share/gnunet/sql/ | ||
12 | |||
13 | sql_DATA = \ | ||
14 | datacache-0001.sql \ | ||
15 | datacache-drop.sql | ||
16 | |||
17 | |||
18 | if USE_COVERAGE | 11 | if USE_COVERAGE |
19 | AM_CFLAGS = --coverage -O0 | 12 | AM_CFLAGS = --coverage -O0 |
20 | XLIBS = -lgcov | 13 | XLIBS = -lgcov |
21 | endif | 14 | endif |
22 | 15 | ||
23 | if HAVE_SQLITE | ||
24 | SQLITE_PLUGIN = libgnunet_plugin_datacache_sqlite.la | ||
25 | endif | ||
26 | if HAVE_POSTGRESQL | ||
27 | POSTGRES_PLUGIN = libgnunet_plugin_datacache_postgres.la | ||
28 | endif | ||
29 | |||
30 | lib_LTLIBRARIES = \ | 16 | lib_LTLIBRARIES = \ |
31 | libgnunetdatacache.la | 17 | libgnunetdatacache.la |
32 | 18 | ||
@@ -41,57 +27,6 @@ libgnunetdatacache_la_LDFLAGS = \ | |||
41 | -version-info 0:1:0 | 27 | -version-info 0:1:0 |
42 | 28 | ||
43 | 29 | ||
44 | plugin_LTLIBRARIES = \ | ||
45 | $(SQLITE_PLUGIN) \ | ||
46 | $(POSTGRES_PLUGIN) \ | ||
47 | libgnunet_plugin_datacache_heap.la | ||
48 | |||
49 | # Real plugins should of course go into | ||
50 | # plugin_LTLIBRARIES | ||
51 | noinst_LTLIBRARIES = \ | ||
52 | libgnunet_plugin_datacache_template.la | ||
53 | |||
54 | |||
55 | libgnunet_plugin_datacache_sqlite_la_SOURCES = \ | ||
56 | plugin_datacache_sqlite.c | ||
57 | libgnunet_plugin_datacache_sqlite_la_LIBADD = \ | ||
58 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ | ||
59 | $(top_builddir)/src/lib/sq/libgnunetsq.la \ | ||
60 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lsqlite3 \ | ||
61 | $(LTLIBINTL) | ||
62 | libgnunet_plugin_datacache_sqlite_la_LDFLAGS = \ | ||
63 | $(GN_PLUGIN_LDFLAGS) | ||
64 | |||
65 | libgnunet_plugin_datacache_heap_la_SOURCES = \ | ||
66 | plugin_datacache_heap.c | ||
67 | libgnunet_plugin_datacache_heap_la_LIBADD = \ | ||
68 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ | ||
69 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
70 | $(LTLIBINTL) | ||
71 | libgnunet_plugin_datacache_heap_la_LDFLAGS = \ | ||
72 | $(GN_PLUGIN_LDFLAGS) | ||
73 | |||
74 | libgnunet_plugin_datacache_postgres_la_SOURCES = \ | ||
75 | plugin_datacache_postgres.c | ||
76 | libgnunet_plugin_datacache_postgres_la_LIBADD = \ | ||
77 | $(top_builddir)/src/lib/pq/libgnunetpq.la \ | ||
78 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ | ||
79 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
80 | $(GN_PLUGIN_LDFLAGS) -lpq | ||
81 | libgnunet_plugin_datacache_postgres_la_CPPFLAGS = \ | ||
82 | $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS) | ||
83 | libgnunet_plugin_datacache_postgres_la_LDFLAGS = \ | ||
84 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) | ||
85 | |||
86 | libgnunet_plugin_datacache_template_la_SOURCES = \ | ||
87 | plugin_datacache_template.c | ||
88 | libgnunet_plugin_datacache_template_la_LIBADD = \ | ||
89 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
90 | $(LTLIBINTL) | ||
91 | libgnunet_plugin_datacache_template_la_LDFLAGS = \ | ||
92 | $(GN_PLUGIN_LDFLAGS) | ||
93 | |||
94 | |||
95 | if HAVE_SQLITE | 30 | if HAVE_SQLITE |
96 | SQLITE_TESTS = \ | 31 | SQLITE_TESTS = \ |
97 | test_datacache_sqlite \ | 32 | test_datacache_sqlite \ |
@@ -166,5 +101,4 @@ test_datacache_quota_postgres_LDADD = \ | |||
166 | EXTRA_DIST = \ | 101 | EXTRA_DIST = \ |
167 | test_datacache_data_sqlite.conf \ | 102 | test_datacache_data_sqlite.conf \ |
168 | test_datacache_data_heap.conf \ | 103 | test_datacache_data_heap.conf \ |
169 | test_datacache_data_postgres.conf \ | 104 | test_datacache_data_postgres.conf |
170 | $(sql_DATA) | ||
diff --git a/src/service/datacache/meson.build b/src/service/datacache/meson.build index 528885c0d..f50036c03 100644 --- a/src/service/datacache/meson.build +++ b/src/service/datacache/meson.build | |||
@@ -5,9 +5,6 @@ configure_file(input : 'datacache.conf', | |||
5 | configuration : cdata, | 5 | configuration : cdata, |
6 | install: true, | 6 | install: true, |
7 | install_dir: pkgcfgdir) | 7 | install_dir: pkgcfgdir) |
8 | install_data ('datacache-0001.sql', | ||
9 | 'datacache-drop.sql', | ||
10 | install_dir: get_option('datadir')/'gnunet'/'sql') | ||
11 | 8 | ||
12 | if get_option('monolith') | 9 | if get_option('monolith') |
13 | foreach p : libgnunetdatacache_src | 10 | foreach p : libgnunetdatacache_src |
@@ -27,36 +24,6 @@ libgnunetdatacache_dep = declare_dependency(link_with : libgnunetdatacache) | |||
27 | pkg.generate(libgnunetdatacache, url: 'https://www.gnunet.org', | 24 | pkg.generate(libgnunetdatacache, url: 'https://www.gnunet.org', |
28 | description : 'Provides datacache API for temporary storage to disk') | 25 | description : 'Provides datacache API for temporary storage to disk') |
29 | 26 | ||
30 | shared_module('gnunet_plugin_datacache_sqlite', | ||
31 | ['plugin_datacache_sqlite.c'], | ||
32 | dependencies: [libgnunetutil_dep, | ||
33 | libgnunetdatacache_dep, | ||
34 | sqlite_dep, | ||
35 | libgnunetsq_dep], | ||
36 | include_directories: [incdir, configuration_inc], | ||
37 | install: true, | ||
38 | install_dir: get_option('libdir')/'gnunet') | ||
39 | |||
40 | shared_module('gnunet_plugin_datacache_heap', | ||
41 | ['plugin_datacache_heap.c'], | ||
42 | dependencies: [libgnunetutil_dep, | ||
43 | libgnunetdatacache_dep], | ||
44 | include_directories: [incdir, configuration_inc], | ||
45 | install: true, | ||
46 | install_dir: get_option('libdir')/'gnunet') | ||
47 | |||
48 | if pq_dep.found() | ||
49 | shared_module('gnunet_plugin_datacache_postgres', | ||
50 | ['plugin_datacache_postgres.c'], | ||
51 | dependencies: [libgnunetutil_dep, | ||
52 | libgnunetdatacache_dep, | ||
53 | pq_dep, | ||
54 | libgnunetpq_dep], | ||
55 | include_directories: [incdir, configuration_inc], | ||
56 | install: true, | ||
57 | install_dir: get_option('libdir')/'gnunet') | ||
58 | endif | ||
59 | |||
60 | testdc_sqlite = executable ('test_datacache_sqlite', | 27 | testdc_sqlite = executable ('test_datacache_sqlite', |
61 | ['test_datacache.c'], | 28 | ['test_datacache.c'], |
62 | dependencies: [ | 29 | dependencies: [ |
diff --git a/src/service/datastore/Makefile.am b/src/service/datastore/Makefile.am index 9ae5004c6..22f98482a 100644 --- a/src/service/datastore/Makefile.am +++ b/src/service/datastore/Makefile.am | |||
@@ -10,12 +10,6 @@ libexecdir= $(pkglibdir)/libexec/ | |||
10 | pkgcfg_DATA = \ | 10 | pkgcfg_DATA = \ |
11 | datastore.conf | 11 | datastore.conf |
12 | 12 | ||
13 | sqldir = $(prefix)/share/gnunet/sql/ | ||
14 | |||
15 | sql_DATA = \ | ||
16 | datastore-0001.sql \ | ||
17 | datastore-drop.sql | ||
18 | |||
19 | if USE_COVERAGE | 13 | if USE_COVERAGE |
20 | AM_CFLAGS = --coverage -O0 | 14 | AM_CFLAGS = --coverage -O0 |
21 | XLIBS = -lgcov | 15 | XLIBS = -lgcov |
@@ -46,89 +40,30 @@ gnunet_service_datastore_LDADD = \ | |||
46 | $(GN_LIBINTL) | 40 | $(GN_LIBINTL) |
47 | 41 | ||
48 | if HAVE_SQLITE | 42 | if HAVE_SQLITE |
49 | SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la | ||
50 | if HAVE_BENCHMARKS | 43 | if HAVE_BENCHMARKS |
51 | SQLITE_BENCHMARKS = \ | 44 | SQLITE_BENCHMARKS = \ |
52 | perf_datastore_api_sqlite \ | 45 | perf_datastore_api_sqlite |
53 | perf_plugin_datastore_sqlite | ||
54 | endif | 46 | endif |
55 | SQLITE_TESTS = \ | 47 | SQLITE_TESTS = \ |
56 | test_datastore_api_sqlite \ | 48 | test_datastore_api_sqlite \ |
57 | test_datastore_api_management_sqlite \ | 49 | test_datastore_api_management_sqlite \ |
58 | test_plugin_datastore_sqlite \ | ||
59 | $(SQLITE_BENCHMARKS) | 50 | $(SQLITE_BENCHMARKS) |
60 | endif | 51 | endif |
61 | if HAVE_POSTGRESQL | 52 | if HAVE_POSTGRESQL |
62 | POSTGRES_PLUGIN = libgnunet_plugin_datastore_postgres.la | ||
63 | if HAVE_BENCHMARKS | 53 | if HAVE_BENCHMARKS |
64 | POSTGRES_BENCHMARKS = \ | 54 | POSTGRES_BENCHMARKS = \ |
65 | perf_datastore_api_postgres \ | 55 | perf_datastore_api_postgres |
66 | perf_plugin_datastore_postgres | ||
67 | endif | 56 | endif |
68 | POSTGRES_TESTS = \ | 57 | POSTGRES_TESTS = \ |
69 | test_datastore_api_postgres \ | 58 | test_datastore_api_postgres \ |
70 | test_datastore_api_management_postgres \ | 59 | test_datastore_api_management_postgres \ |
71 | test_plugin_datastore_postgres \ | ||
72 | $(POSTGRES_BENCHMARKS) | 60 | $(POSTGRES_BENCHMARKS) |
73 | endif | 61 | endif |
74 | 62 | ||
75 | plugin_LTLIBRARIES = \ | ||
76 | $(SQLITE_PLUGIN) \ | ||
77 | $(POSTGRES_PLUGIN) \ | ||
78 | libgnunet_plugin_datastore_heap.la | ||
79 | |||
80 | # Real plugins should of course go into | ||
81 | # plugin_LTLIBRARIES | ||
82 | noinst_LTLIBRARIES = \ | ||
83 | libgnunet_plugin_datastore_template.la | ||
84 | |||
85 | |||
86 | libgnunet_plugin_datastore_sqlite_la_SOURCES = \ | ||
87 | plugin_datastore_sqlite.c | ||
88 | libgnunet_plugin_datastore_sqlite_la_LIBADD = \ | ||
89 | $(top_builddir)/src/lib/sq/libgnunetsq.la \ | ||
90 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ | ||
91 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lsqlite3 \ | ||
92 | $(LTLIBINTL) | ||
93 | libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \ | ||
94 | $(GN_PLUGIN_LDFLAGS) | ||
95 | |||
96 | |||
97 | libgnunet_plugin_datastore_heap_la_SOURCES = \ | ||
98 | plugin_datastore_heap.c | ||
99 | libgnunet_plugin_datastore_heap_la_LIBADD = \ | ||
100 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
101 | $(LTLIBINTL) | ||
102 | libgnunet_plugin_datastore_heap_la_LDFLAGS = \ | ||
103 | $(GN_PLUGIN_LDFLAGS) | ||
104 | |||
105 | |||
106 | libgnunet_plugin_datastore_postgres_la_SOURCES = \ | ||
107 | plugin_datastore_postgres.c | ||
108 | libgnunet_plugin_datastore_postgres_la_LIBADD = \ | ||
109 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ | ||
110 | $(top_builddir)/src/lib/pq/libgnunetpq.la \ | ||
111 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lpq | ||
112 | libgnunet_plugin_datastore_postgres_la_LDFLAGS = \ | ||
113 | $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS) | ||
114 | libgnunet_plugin_datastore_postgres_la_CPPFLAGS = \ | ||
115 | $(POSTGRESQL_CPPFLAGS) $(AM_CPPFLAGS) | ||
116 | |||
117 | |||
118 | libgnunet_plugin_datastore_template_la_SOURCES = \ | ||
119 | plugin_datastore_template.c | ||
120 | libgnunet_plugin_datastore_template_la_LIBADD = \ | ||
121 | $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) \ | ||
122 | $(LTLIBINTL) | ||
123 | libgnunet_plugin_datastore_template_la_LDFLAGS = \ | ||
124 | $(GN_PLUGIN_LDFLAGS) | ||
125 | |||
126 | check_PROGRAMS = \ | 63 | check_PROGRAMS = \ |
127 | test_datastore_api_heap \ | 64 | test_datastore_api_heap \ |
128 | test_datastore_api_management_heap \ | 65 | test_datastore_api_management_heap \ |
129 | perf_datastore_api_heap \ | 66 | perf_datastore_api_heap \ |
130 | perf_plugin_datastore_heap \ | ||
131 | test_plugin_datastore_heap \ | ||
132 | $(SQLITE_TESTS) \ | 67 | $(SQLITE_TESTS) \ |
133 | $(POSTGRES_TESTS) | 68 | $(POSTGRES_TESTS) |
134 | 69 | ||
@@ -158,19 +93,6 @@ perf_datastore_api_heap_LDADD = \ | |||
158 | libgnunetdatastore.la \ | 93 | libgnunetdatastore.la \ |
159 | $(top_builddir)/src/lib/util/libgnunetutil.la | 94 | $(top_builddir)/src/lib/util/libgnunetutil.la |
160 | 95 | ||
161 | perf_plugin_datastore_heap_SOURCES = \ | ||
162 | perf_plugin_datastore.c | ||
163 | perf_plugin_datastore_heap_LDADD = \ | ||
164 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
165 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
166 | |||
167 | test_plugin_datastore_heap_SOURCES = \ | ||
168 | test_plugin_datastore.c | ||
169 | test_plugin_datastore_heap_LDADD = \ | ||
170 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
171 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
172 | |||
173 | |||
174 | test_datastore_api_sqlite_SOURCES = \ | 96 | test_datastore_api_sqlite_SOURCES = \ |
175 | test_datastore_api.c | 97 | test_datastore_api.c |
176 | test_datastore_api_sqlite_LDADD = \ | 98 | test_datastore_api_sqlite_LDADD = \ |
@@ -192,19 +114,6 @@ perf_datastore_api_sqlite_LDADD = \ | |||
192 | libgnunetdatastore.la \ | 114 | libgnunetdatastore.la \ |
193 | $(top_builddir)/src/lib/util/libgnunetutil.la | 115 | $(top_builddir)/src/lib/util/libgnunetutil.la |
194 | 116 | ||
195 | perf_plugin_datastore_sqlite_SOURCES = \ | ||
196 | perf_plugin_datastore.c | ||
197 | perf_plugin_datastore_sqlite_LDADD = \ | ||
198 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
199 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
200 | |||
201 | test_plugin_datastore_sqlite_SOURCES = \ | ||
202 | test_plugin_datastore.c | ||
203 | test_plugin_datastore_sqlite_LDADD = \ | ||
204 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
205 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
206 | |||
207 | |||
208 | test_datastore_api_postgres_SOURCES = \ | 117 | test_datastore_api_postgres_SOURCES = \ |
209 | test_datastore_api.c | 118 | test_datastore_api.c |
210 | test_datastore_api_postgres_LDADD = \ | 119 | test_datastore_api_postgres_LDADD = \ |
@@ -226,28 +135,8 @@ perf_datastore_api_postgres_LDADD = \ | |||
226 | libgnunetdatastore.la \ | 135 | libgnunetdatastore.la \ |
227 | $(top_builddir)/src/lib/util/libgnunetutil.la | 136 | $(top_builddir)/src/lib/util/libgnunetutil.la |
228 | 137 | ||
229 | test_plugin_datastore_postgres_SOURCES = \ | ||
230 | test_plugin_datastore.c | ||
231 | test_plugin_datastore_postgres_LDADD = \ | ||
232 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
233 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
234 | |||
235 | perf_plugin_datastore_postgres_SOURCES = \ | ||
236 | perf_plugin_datastore.c | ||
237 | perf_plugin_datastore_postgres_LDADD = \ | ||
238 | $(top_builddir)/src/service/testing/libgnunettesting.la \ | ||
239 | $(top_builddir)/src/lib/util/libgnunetutil.la | ||
240 | |||
241 | |||
242 | EXTRA_DIST = \ | 138 | EXTRA_DIST = \ |
243 | test_defaults.conf \ | 139 | test_defaults.conf \ |
244 | test_datastore_api_data_sqlite.conf \ | 140 | test_datastore_api_data_sqlite.conf \ |
245 | perf_plugin_datastore_data_sqlite.conf \ | ||
246 | test_plugin_datastore_data_sqlite.conf \ | ||
247 | test_datastore_api_data_heap.conf \ | 141 | test_datastore_api_data_heap.conf \ |
248 | perf_plugin_datastore_data_heap.conf \ | 142 | test_datastore_api_data_postgres.conf |
249 | test_plugin_datastore_data_heap.conf \ | ||
250 | test_datastore_api_data_postgres.conf \ | ||
251 | perf_plugin_datastore_data_postgres.conf \ | ||
252 | test_plugin_datastore_data_postgres.conf \ | ||
253 | $(sql_DATA) | ||
diff --git a/src/service/datastore/meson.build b/src/service/datastore/meson.build index 9dde488a0..b81d8bb86 100644 --- a/src/service/datastore/meson.build +++ b/src/service/datastore/meson.build | |||
@@ -8,10 +8,6 @@ configure_file(input : 'datastore.conf.in', | |||
8 | install: true, | 8 | install: true, |
9 | install_dir: pkgcfgdir) | 9 | install_dir: pkgcfgdir) |
10 | 10 | ||
11 | install_data ('datastore-0001.sql', | ||
12 | 'datastore-drop.sql', | ||
13 | install_dir: get_option('datadir')/'gnunet'/'sql') | ||
14 | |||
15 | if get_option('monolith') | 11 | if get_option('monolith') |
16 | foreach p : libgnunetdatastore_src + gnunetservicedatastore_src | 12 | foreach p : libgnunetdatastore_src + gnunetservicedatastore_src |
17 | gnunet_src += 'datastore/' + p | 13 | gnunet_src += 'datastore/' + p |
@@ -32,36 +28,6 @@ libgnunetdatastore_dep = declare_dependency(link_with : libgnunetdatastore) | |||
32 | pkg.generate(libgnunetdatastore, url: 'https://www.gnunet.org', | 28 | pkg.generate(libgnunetdatastore, url: 'https://www.gnunet.org', |
33 | description : 'Management API for the datastore for persistent storage to disk') | 29 | description : 'Management API for the datastore for persistent storage to disk') |
34 | 30 | ||
35 | shared_module('gnunet_plugin_datastore_sqlite', | ||
36 | ['plugin_datastore_sqlite.c'], | ||
37 | dependencies: [libgnunetutil_dep, | ||
38 | libgnunetdatastore_dep, | ||
39 | sqlite_dep, | ||
40 | libgnunetsq_dep], | ||
41 | include_directories: [incdir, configuration_inc], | ||
42 | install: true, | ||
43 | install_dir: get_option('libdir')/'gnunet') | ||
44 | |||
45 | shared_module('gnunet_plugin_datastore_heap', | ||
46 | ['plugin_datastore_heap.c'], | ||
47 | dependencies: [libgnunetutil_dep, | ||
48 | libgnunetdatacache_dep], | ||
49 | include_directories: [incdir, configuration_inc], | ||
50 | install: true, | ||
51 | install_dir: get_option('libdir')/'gnunet') | ||
52 | |||
53 | if pq_dep.found() | ||
54 | shared_module('gnunet_plugin_datastore_postgres', | ||
55 | ['plugin_datastore_postgres.c'], | ||
56 | dependencies: [libgnunetutil_dep, | ||
57 | libgnunetdatastore_dep, | ||
58 | pq_dep, | ||
59 | libgnunetpq_dep], | ||
60 | include_directories: [incdir, configuration_inc], | ||
61 | install: true, | ||
62 | install_dir: get_option('libdir')/'gnunet') | ||
63 | endif | ||
64 | |||
65 | executable ('gnunet-service-datastore', | 31 | executable ('gnunet-service-datastore', |
66 | gnunetservicedatastore_src, | 32 | gnunetservicedatastore_src, |
67 | dependencies: [libgnunetdatastore_dep, | 33 | dependencies: [libgnunetdatastore_dep, |
@@ -92,16 +58,6 @@ testds_mgmt_sqlite = executable ('test_datastore_api_management_sqlite', | |||
92 | include_directories: [incdir, configuration_inc], | 58 | include_directories: [incdir, configuration_inc], |
93 | install: false) | 59 | install: false) |
94 | 60 | ||
95 | testds_plugin_sqlite = executable ('test_plugin_datastore_sqlite', | ||
96 | ['test_plugin_datastore.c'], | ||
97 | dependencies: [ | ||
98 | libgnunetdatastore_dep, | ||
99 | libgnunetutil_dep, | ||
100 | libgnunettesting_dep | ||
101 | ], | ||
102 | include_directories: [incdir, configuration_inc], | ||
103 | install: false) | ||
104 | |||
105 | testds_heap = executable ('test_datastore_api_heap', | 61 | testds_heap = executable ('test_datastore_api_heap', |
106 | ['test_datastore_api.c'], | 62 | ['test_datastore_api.c'], |
107 | dependencies: [ | 63 | dependencies: [ |
@@ -122,16 +78,6 @@ testds_mgmt_heap = executable ('test_datastore_api_management_heap', | |||
122 | include_directories: [incdir, configuration_inc], | 78 | include_directories: [incdir, configuration_inc], |
123 | install: false) | 79 | install: false) |
124 | 80 | ||
125 | testds_plugin_heap = executable ('test_plugin_datastore_heap', | ||
126 | ['test_plugin_datastore.c'], | ||
127 | dependencies: [ | ||
128 | libgnunetdatastore_dep, | ||
129 | libgnunetutil_dep, | ||
130 | libgnunettesting_dep | ||
131 | ], | ||
132 | include_directories: [incdir, configuration_inc], | ||
133 | install: false) | ||
134 | |||
135 | testds_pq = executable ('test_datastore_api_postgres', | 81 | testds_pq = executable ('test_datastore_api_postgres', |
136 | ['test_datastore_api.c'], | 82 | ['test_datastore_api.c'], |
137 | dependencies: [ | 83 | dependencies: [ |
@@ -142,16 +88,6 @@ testds_pq = executable ('test_datastore_api_postgres', | |||
142 | include_directories: [incdir, configuration_inc], | 88 | include_directories: [incdir, configuration_inc], |
143 | install: false) | 89 | install: false) |
144 | 90 | ||
145 | testds_plugin_pq = executable ('test_plugin_datastore_postgres', | ||
146 | ['test_plugin_datastore.c'], | ||
147 | dependencies: [ | ||
148 | libgnunetdatastore_dep, | ||
149 | libgnunetutil_dep, | ||
150 | libgnunettesting_dep | ||
151 | ], | ||
152 | include_directories: [incdir, configuration_inc], | ||
153 | install: false) | ||
154 | |||
155 | testds_mgmt_pq = executable ('test_datastore_api_management_postgres', | 91 | testds_mgmt_pq = executable ('test_datastore_api_management_postgres', |
156 | ['test_datastore_api_management.c'], | 92 | ['test_datastore_api_management.c'], |
157 | dependencies: [ | 93 | dependencies: [ |
@@ -179,18 +115,12 @@ test('test_datastore_api_sqlite', testds_sqlite, | |||
179 | suite: 'datastore', workdir: meson.current_build_dir()) | 115 | suite: 'datastore', workdir: meson.current_build_dir()) |
180 | test('test_datastore_api_management_sqlite', testds_mgmt_sqlite, | 116 | test('test_datastore_api_management_sqlite', testds_mgmt_sqlite, |
181 | suite: 'datastore', workdir: meson.current_build_dir()) | 117 | suite: 'datastore', workdir: meson.current_build_dir()) |
182 | test('test_plugin_datastore_sqlite', testds_plugin_sqlite, | ||
183 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
184 | test('test_datastore_api_heap', testds_heap, | 118 | test('test_datastore_api_heap', testds_heap, |
185 | suite: 'datastore', workdir: meson.current_build_dir()) | 119 | suite: 'datastore', workdir: meson.current_build_dir()) |
186 | test('test_datastore_api_management_heap', testds_mgmt_heap, | 120 | test('test_datastore_api_management_heap', testds_mgmt_heap, |
187 | suite: 'datastore', workdir: meson.current_build_dir()) | 121 | suite: 'datastore', workdir: meson.current_build_dir()) |
188 | test('test_plugin_datastore_heap', testds_plugin_heap, | ||
189 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
190 | test('test_datastore_api_postgres', testds_pq, | 122 | test('test_datastore_api_postgres', testds_pq, |
191 | suite: 'datastore', workdir: meson.current_build_dir()) | 123 | suite: 'datastore', workdir: meson.current_build_dir()) |
192 | test('test_datastore_api_management_postgres', testds_mgmt_pq, | 124 | test('test_datastore_api_management_postgres', testds_mgmt_pq, |
193 | suite: 'datastore', workdir: meson.current_build_dir()) | 125 | suite: 'datastore', workdir: meson.current_build_dir()) |
194 | test('test_plugin_datastore_postgres', testds_plugin_pq, | ||
195 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
196 | 126 | ||