MACRO(_AddModulesForced MLIST) # Generate unique string for this build STRING(RANDOM LENGTH 8 _MODULES_ID) SET(MODULES_ID ${_MODULES_ID} CACHE INTERNAL "Modules ID" FORCE) SET(MODULES_C "${CMAKE_CURRENT_BINARY_DIR}/modules.c") FILE(WRITE "${MODULES_C}" "/* ${MODULES_ID} */\n#include \"rspamd.h\"\n") # Handle even old cmake LIST(LENGTH ${MLIST} MLIST_COUNT) MATH(EXPR MLIST_MAX ${MLIST_COUNT}-1) FOREACH(MOD_IDX RANGE ${MLIST_MAX}) LIST(GET ${MLIST} ${MOD_IDX} MOD) FILE(APPEND "${MODULES_C}" "extern module_t ${MOD}_module;\n") ENDFOREACH(MOD_IDX RANGE ${MLIST_MAX}) FILE(APPEND "${MODULES_C}" "\n\nmodule_t *modules[] = {\n") FOREACH(MOD_IDX RANGE ${MLIST_MAX}) LIST(GET ${MLIST} ${MOD_IDX} MOD) FILE(APPEND "${MODULES_C}" "&${MOD}_module,\n") ENDFOREACH(MOD_IDX RANGE ${MLIST_MAX}) FILE(APPEND "${MODULES_C}" "NULL\n};\n") ENDMACRO(_AddModulesForced MLIST) MACRO(_AddWorkersForced WLIST) SET(WORKERS_C "${CMAKE_CURRENT_BINARY_DIR}/workers.c") FILE(WRITE "${WORKERS_C}" "#include \"rspamd.h\"\n") # Handle even old cmake LIST(LENGTH ${WLIST} WLIST_COUNT) MATH(EXPR WLIST_MAX ${WLIST_COUNT}-1) FOREACH(MOD_IDX RANGE ${WLIST_MAX}) LIST(GET ${WLIST} ${MOD_IDX} WRK) FILE(APPEND "${WORKERS_C}" "extern worker_t ${WRK}_worker;\n") ENDFOREACH(MOD_IDX RANGE ${WLIST_MAX}) FILE(APPEND "${WORKERS_C}" "\n\nworker_t *workers[] = {\n") FOREACH(MOD_IDX RANGE ${WLIST_MAX}) LIST(GET ${WLIST} ${MOD_IDX} WRK) FILE(APPEND "${WORKERS_C}" "&${WRK}_worker,\n") ENDFOREACH(MOD_IDX RANGE ${WLIST_MAX}) FILE(APPEND "${WORKERS_C}" "NULL\n};\n") ENDMACRO(_AddWorkersForced WLIST) MACRO(AddModules MLIST WLIST) _AddModulesForced(${MLIST}) _AddWorkersForced(${WLIST}) #IF(NOT EXISTS "modules.c") # _AddModulesForced(${MLIST} ${WLIST}) #ELSE(NOT EXISTS "modules.c") # FILE(STRINGS "modules.c" FILE_ID_RAW REGEX "^/.*[a-zA-Z0-9]+.*/$") # STRING(REGEX MATCH "[a-zA-Z0-9]+" FILE_ID "${FILE_ID_RAW}") # IF(NOT FILE_ID STREQUAL MODULES_ID) # MESSAGE("Regenerate modules info") # _AddModulesForced(${MLIST} ${WLIST}) # ENDIF(NOT FILE_ID STREQUAL MODULES_ID) #ENDIF(NOT EXISTS "modules.c") ENDMACRO(AddModules MLIST WLIST) # Rspamd core components ADD_SUBDIRECTORY(lua) ADD_SUBDIRECTORY(libcryptobox) ADD_SUBDIRECTORY(libutil) ADD_SUBDIRECTORY(libserver) ADD_SUBDIRECTORY(libmime) ADD_SUBDIRECTORY(libstat) ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(rspamadm) SET(RSPAMDSRC controller.c fuzzy_storage.c lua_worker.c rspamd.c smtp_proxy.c worker.c http_proxy.c) SET(PLUGINSSRC plugins/surbl.c plugins/regexp.c plugins/chartable.c plugins/fuzzy_check.c plugins/spf.c plugins/dkim_check.c libutil/unix-std.h libserver/rspamd_control.c libserver/rspamd_control.h libcryptobox/curve25519/curve25519.c libcryptobox/curve25519/avx.c) SET(MODULES_LIST surbl regexp chartable fuzzy_check spf dkim) SET(WORKERS_LIST normal controller smtp_proxy fuzzy lua http_proxy) AddModules(MODULES_LIST WORKERS_LIST) LIST(LENGTH PLUGINSSRC RSPAMD_MODULES_NUM) ######################### LINK SECTION ############################### ADD_LIBRARY(rspamd-server STATIC ${RSPAMD_UTIL} ${RSPAMD_LUA} ${RSPAMD_SERVER} ${RSPAMD_STAT} ${RSPAMD_MIME} ${RSPAMD_CRYPTOBOX} ${CMAKE_CURRENT_BINARY_DIR}/modules.c ${PLUGINSSRC}) TARGET_LINK_LIBRARIES(rspamd-server rspamd-http-parser) TARGET_LINK_LIBRARIES(rspamd-server rspamd-cdb) ADD_EXECUTABLE(rspamd ${RSPAMDSRC} ${CMAKE_CURRENT_BINARY_DIR}/workers.c) SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(rspamd PROPERTIES COMPILE_FLAGS "-DRSPAMD_MAIN") IF(NOT DEBIAN_BUILD) SET_TARGET_PROPERTIES(rspamd PROPERTIES VERSION ${RSPAMD_VERSION}) ENDIF(NOT DEBIAN_BUILD) TARGET_LINK_LIBRARIES(rspamd rspamd-server) IF (ENABLE_SNOWBALL MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd stemmer) ENDIF() TARGET_LINK_LIBRARIES(rspamd rspamd-actrie) TARGET_LINK_LIBRARIES(rspamd ${RSPAMD_REQUIRED_LIBRARIES}) INSTALL(TARGETS rspamd RUNTIME DESTINATION bin) ache_during_copy_operations Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/lib/private/files/node/root.php
blob: d0cac46e5932a9b383f5dd110852b2b3ad75e9ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329