@@ -174,22 +174,6 @@ NOTE:
174
174
The tests are disabled for now because the C consumer does lose messages.
175
175
176
176
177
- Source Code Documentation
178
- -------------------------
179
-
180
- Partial implementation of Doxygen docs.
181
- to view::
182
-
183
- sudo apt install doxygen
184
- sudo apt install graphviz
185
- doxygen
186
-
187
- and run, and it will create the browseable docs/html/ subdirectory
188
- with some documentation. Although only a few files out of the total
189
- have been properly annoted so far, doxygen is configured to extract
190
- as much information from the code as possible. (We have some pretty
191
- call/caller graphs now!)
192
-
193
177
Limitations of the C implementation
194
178
-----------------------------------
195
179
@@ -205,74 +189,6 @@ Limitations of the C implementation
205
189
- The C implementation uses the libc(7) regular expression routines, which
206
190
are a little more limited than python ones.
207
191
208
- Build Dependencies
209
- ------------------
210
-
211
- The librabbitmq version needs to be > 0.8, this is newer than what is in
212
- ubuntu 16.04. So you need to git clone from https://github.com/alanxz/rabbitmq-c
213
- then built it there. The launchpad PPA has a backport included to take care of
214
- this::
215
-
216
- export RABBIT_BUILD=*directory where rabbit has been built*
217
-
218
-
219
- librabbitmq-dev - AMQP client library written in C - Dev Files
220
- libssl-dev - OpenSSL client library (used for hash algorithms.)
221
- libjson-c-dev - json-c header files.
222
-
223
- run dependencies::
224
-
225
- librabbitmq4 - AMQP client library written in C
226
- libssl - OpenSSL client library.
227
- libjson-c3 - JSON manupulation library (for v03 parsing)
228
-
229
- On RPM-based distributions::
230
-
231
- librabbitmq-devel
232
- json-c-devel
233
-
234
- This JSON library changed API multiple times in it's history. Sarrac development
235
- platform is ubuntu 18.04, where the libjson-c3 library is provided. Older linux
236
- versions may have incompatible library versions and may not build or run correctly.
237
- The Makefile includes the -DHAVE_JSONC option in CFLAGS. Removing this option
238
- disables v03 message parsing, but makes it possible to build on such systems.
239
- v03 posting will still work (dependency only required to receive messages.)
240
-
241
- BUILD OPTIONS
242
- -------------
243
-
244
- FORCE_LIBC_REGEX
245
- ~~~~~~~~~~~~~~~~
246
-
247
- This option is set by default as it is usually desired.
248
- If you see::
249
-
250
- 2018-11-21 00:08:17,315 [ERROR] invalid regular expression: .*\/tmp\/.*. Ignored
251
-
252
- and the regex is valid... the symptom we had was that the library was
253
- calling a version of the regular expresison routines included in a binary
254
- (ksh93 in this case) instead of the ones in libc that were expected.
255
- without this option being set, the shim library will compile and user
256
- Korn Shell regular expression grammar instead of the libc/posix ones.
257
- This is confusing in practice.
258
-
259
- Set the option::
260
-
261
- -DFORCE_LIBC_REGEX=\"/lib/x86_64-linux-gnu/libc.so.6\"
262
-
263
- to the file containing the regcomp and regexec routines what are to be
264
- used. The code uses dynamic library loading to force use of the specified
265
- routines. Obviously this setting is architecture dependent and would
266
- need adjustment if compiling on another platform, such as ARM or MIPS.
267
-
268
- SR_DEBUG_LOGS
269
- ~~~~~~~~~~~~~
270
-
271
- To disable all log file support, so that diagnostics messages
272
- are sent to standard error instead, include::
273
-
274
- -DSR_DEBUG_LOGS=1
275
-
276
192
277
193
Dorval Computing Centre
278
194
-----------------------
@@ -289,100 +205,13 @@ To load sr3_cpost::
289
205
290
206
or it may be installed in the system locations (/usr/bin, etc...)
291
207
208
+ Build Process
209
+ -------------
292
210
293
- Branches
294
- --------
295
-
296
- The main repository of sarrac is: https://github.com/MetPX/sarrac
297
- As of 2022/12, development is on v3 compatible version of sarrac.
298
- The customer switched to sr3, so there is no need to continue with v2.
299
- The existing git branches and their roles:
300
-
301
- * development ... the default development branch, launchpad.net daily packages built from here.
302
- * pre-release ... v03 pre-release branch, tracks development punctually. launchpad.net pre-release packages built from here.
303
- * stable ... v03 release branch, tracks pre-release punctually. launchpad.net stable packages built from here.
304
- * v2 ... v2 development branch. (legacy)
305
- * v2_stable ... v2 release branch, tracks v2 punctually. (legacy)
306
- * issueXXX ... branch developed to address a particular issue.
211
+ See `Building from Source <BUILD.rst >`_
307
212
308
213
309
214
Release Process
310
215
---------------
311
216
312
- To note changes:
313
- - Compile once with -DSR_DEBUG_LOGS to verify that no msg_log calls have errors (compiler will report)
314
- - build package (without -DSR_DEBUG_LOGS) and install.
315
- - run some ./test scripts.
316
- - make trust_but_verify
317
- examine results, which include a valgrind run.
318
- - Run through a flow test.
319
- - dch, and add your points.
320
- - when ready to release, edit UNRELEASED to an appropriate status, usually unstable.
321
- - git commit #what you need to commit...
322
- - git tag <release> -m <release>
323
- - git push
324
- - git push origin <release>
325
-
326
- - go to Launchpad, and import source `here <https://code.launchpad.net/~ssc-hpc-chp-spc/metpx-sarrac/+git/master >`_.
327
- - go to launchpad, find the recipe and Request Build `here <https://code.launchpad.net/~ssc-hpc-chp-spc/+recipe/metpx-sarrac >`_.
328
-
329
-
330
- Building RPMS
331
- -------------
332
-
333
- clone source to metpx-sr3c directory (needed by rpm build rules)::
334
-
335
- git clone https://github.com/MetPX/sarrac metpx-sr3c
336
- cd sr3c
337
-
338
- on Suse::
339
-
340
- zypper addrepo https://download.opensuse.org/repositories/network:messaging:amqp/openSUSE_Leap_15.1/network:messaging:amqp.repo
341
- zypper refresh
342
- zypper install librabbitmq4 librabbitmq-devel
343
- zypper install libopenssl-devel libjson-c-devel
344
- make rpm_suse15
345
-
346
- on Redhat/Centos::
347
-
348
- make rpm_rhel7
349
-
350
-
351
- ( notes from: https://github.com/MetPX/sarrac/issues/73 )
352
-
353
-
354
- Proposed Coding Style Guidelines
355
- --------------------------------
356
-
357
- Generally, we used `Linux Kernel C Guidelines <https://www.kernel.org/doc/html/v4.10/process/coding-style.html >`_
358
-
359
- but with one pythonic affectation: You know Rule 1? about the tabs with 8 characters? This code base is normally
360
- indented like python instead, use four spaces, and not tabs.
361
-
362
- Also, in terms of documenting code, when adding new things one should add comments
363
- keeping in minde compatbility with `doxygen <http://www.doxygen.nl/manual/docblocks.html >`_
364
- Examples::
365
-
366
- /**
367
- * descriptive comment above a struct or function declaration.
368
- */
369
-
370
- /**
371
- * sr_config_find_one() - find the name configuration file name
372
- * \param sr_cfg: The configuration to be updated with the configuration found.
373
- * \param original_one: The name provided by the user.
374
- *
375
- * Return pointer to the matching mask if there is one, NULL otherwise.
376
- * The pointer to char will hold the absolute path of the config file corresponding to original_one
377
- *
378
- * Return: pointer to a static char buffer with a path name to the corresponding configuration file.
379
- */
380
-
381
- char foo; /**< description of foo class member */
382
-
383
-
384
- The code has a mix of comments is not entirely doxygen friendly just yet. Feel free
385
- to improve. Other than that... the kernel C guidelines are the rule.
386
-
387
- FIXME: We ran a code reformatter on it once... should probably repeat from time to time, would be
388
- useful to document which one was used. I believe it undoes for the pythonic exception.
217
+ See `Releases <Release.rst >`_
0 commit comments