fangfrisch 1.9.0.dev3__tar.gz → 1.9.0.dev6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {fangfrisch-1.9.0.dev3/fangfrisch.egg-info → fangfrisch-1.9.0.dev6}/PKG-INFO +1 -1
  2. fangfrisch-1.9.0.dev6/docs/Makefile +32 -0
  3. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/combined.conf +4 -4
  4. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/fangfrisch.adoc +3 -3
  5. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/fangfrisch.pdf +138 -138
  6. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/index.html +14 -14
  7. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/internal.conf +4 -4
  8. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/__init__.py +4 -2
  9. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/fangfrischnews.py +4 -4
  10. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/refresh.py +44 -16
  11. fangfrisch-1.9.0.dev6/fangfrisch/task.py +57 -0
  12. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6/fangfrisch.egg-info}/PKG-INFO +1 -1
  13. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch.egg-info/SOURCES.txt +6 -1
  14. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch.egg-info/top_level.txt +1 -0
  15. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/setup.cfg +7 -4
  16. fangfrisch-1.9.0.dev6/tests/__init__.py +80 -0
  17. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_refresh.py +7 -3
  18. fangfrisch-1.9.0.dev6/tests/test_task.py +53 -0
  19. fangfrisch-1.9.0.dev6/tests/tests.conf +39 -0
  20. fangfrisch-1.9.0.dev6/tests/tests.sql +16 -0
  21. fangfrisch-1.9.0.dev3/docs/Makefile +0 -33
  22. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/LICENSE +0 -0
  23. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/MANIFEST.in +0 -0
  24. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/README.rst +0 -0
  25. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/example.conf +0 -0
  26. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/docs/usage.txt +0 -0
  27. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/__main__.py +0 -0
  28. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/__init__.py +0 -0
  29. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/config.py +0 -0
  30. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/interserver.py +0 -0
  31. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/malwarepatrol.py +0 -0
  32. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/sanesecurity.py +0 -0
  33. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/securiteinfo.py +0 -0
  34. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/config/urlhaus.py +0 -0
  35. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/db.py +0 -0
  36. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/download.py +0 -0
  37. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/dump.py +0 -0
  38. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/log.py +0 -0
  39. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch/util.py +0 -0
  40. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch.egg-info/dependency_links.txt +0 -0
  41. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch.egg-info/entry_points.txt +0 -0
  42. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/fangfrisch.egg-info/requires.txt +0 -0
  43. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/pyproject.toml +0 -0
  44. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_config.py +0 -0
  45. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_db.py +0 -0
  46. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_download.py +0 -0
  47. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_dump.py +0 -0
  48. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_log.py +0 -0
  49. {fangfrisch-1.9.0.dev3 → fangfrisch-1.9.0.dev6}/tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fangfrisch
3
- Version: 1.9.0.dev3
3
+ Version: 1.9.0.dev6
4
4
  Summary: Update and verify unofficial Clam Anti-Virus signatures
5
5
  Home-page: https://github.com/rseichter/fangfrisch
6
6
  Author: Ralph Seichter
@@ -0,0 +1,32 @@
1
+ # vim: ts=4 sw=4 noet
2
+ adoc_opts = -o $@
3
+ cf_combined = combined.conf
4
+ cf_example = example.conf
5
+ cf_internal = internal.conf
6
+ fangfrisch = ../local/fangfrisch
7
+ out_html = index.html
8
+ out_pdf = fangfrisch.pdf
9
+ sources = fangfrisch.adoc $(cf_combined) $(cf_example) $(cf_internal) ../contrib/fangfrisch-has-news.sh usage.txt
10
+
11
+ .PHONY: all clean force
12
+
13
+ all: $(out_html) $(out_pdf)
14
+
15
+ $(cf_combined): $(cf_example)
16
+ $(fangfrisch) -c $< dumpconf > $@
17
+
18
+ $(cf_internal):
19
+ $(fangfrisch) -c /dev/null dumpconf > $@
20
+
21
+ $(out_html): $(sources)
22
+ asciidoctor -a toc=right $(adoc_opts) $<
23
+
24
+ $(out_pdf): $(sources)
25
+ asciidoctor-pdf -a toc=preamble $(adoc_opts) $<
26
+
27
+ clean:
28
+ /bin/rm $(out_html) $(out_pdf) || true
29
+
30
+ force:
31
+ rm -f $(cf_combined) $(cf_internal)
32
+ make
@@ -13,10 +13,10 @@ on_update_timeout = 42
13
13
  [fangfrischnews]
14
14
  interval = 12h
15
15
  local_directory = /tmp
16
- max_size = 50KB
17
- script = /path/to/script/fangfrisch-has-news.sh
18
- on_update_exec = sh -c "[ ! -r ${script} ] || ${script} ${local_directory}"
19
- prefix = http://mirror.sentries.org/fangfrisch/
16
+ max_size = 100KB
17
+ script = /path/to/fangfrisch-has-news.sh
18
+ on_update_exec = [ ! -x ${script} ] || ${script} ${local_directory}
19
+ prefix = https://www.seichter.de/fangfrisch/
20
20
  url_alerts = ${prefix}fangfrisch_alerts.txt
21
21
  url_news = ${prefix}fangfrisch_news.txt
22
22
 
@@ -1,6 +1,6 @@
1
1
  # Fangfrisch
2
2
  Ralph Seichter <fangfrisch@seichter.de>
3
- v1.9.0.dev3, {docdate}
3
+ v1.9.0.dev6, {docdate}
4
4
  :copyright: © 2020-2024 Ralph Seichter
5
5
  :encoding: UTF-8
6
6
  :hyphens: en
@@ -377,9 +377,9 @@ This will only enable Fangfrisch to occasionally download small text files, noth
377
377
  You will not need to read the content, nor will anything else happen, unless you modify the `script` option.
378
378
  Here is an example script which you could use to have downloaded news items mailed to you.
379
379
  It needs to be readable for the user account running Fangfrisch, and the sender/recipient addresses obviously have to be adapted.
380
- For your convenience, the latest version of the script can be downloaded https://github.com/rseichter/fangfrisch/blob/master/contrib/process-news.sh[here].
380
+ For your convenience, the latest version of the script can be downloaded https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh[here].
381
381
  ----
382
- include::../contrib/process-news.sh[]
382
+ include::../contrib/fangfrisch-has-news.sh[]
383
383
  ----
384
384
 
385
385
  [[dbstructure]]
@@ -7,8 +7,8 @@
7
7
  /Keywords (antivirus, clamav, fangfrisch, freshclam, refresh, update)
8
8
  /Creator (Asciidoctor PDF 2.3.11, based on Prawn 2.4.0)
9
9
  /Producer (Ralph Seichter)
10
- /ModDate (D:20240229171436+01'00')
11
- /CreationDate (D:20240229171553+01'00')
10
+ /ModDate (D:20240301205503+01'00')
11
+ /CreationDate (D:20240302003350+01'00')
12
12
  >>
13
13
  endobj
14
14
  2 0 obj
@@ -8744,7 +8744,7 @@ endobj
8744
8744
  [72 0 R /XYZ 0 151.43 null]
8745
8745
  endobj
8746
8746
  79 0 obj
8747
- << /Length 10760
8747
+ << /Length 10726
8748
8748
  >>
8749
8749
  stream
8750
8750
  q
@@ -9398,7 +9398,7 @@ ET
9398
9398
  BT
9399
9399
  59.24 139.505 Td
9400
9400
  /F3.0 11 Tf
9401
- <6d61785f73697a65203d2035304b42> Tj
9401
+ <6d61785f73697a65203d203130304b42> Tj
9402
9402
  ET
9403
9403
 
9404
9404
  0.0 0.0 0.0 SCN
@@ -9409,7 +9409,7 @@ ET
9409
9409
  BT
9410
9410
  59.24 124.765 Td
9411
9411
  /F3.0 11 Tf
9412
- <736372697074203d202f706174682f746f2f7363726970742f66616e676672697363682d6861732d6e6577732e7368> Tj
9412
+ <736372697074203d202f706174682f746f2f66616e676672697363682d6861732d6e6577732e7368> Tj
9413
9413
  ET
9414
9414
 
9415
9415
  0.0 0.0 0.0 SCN
@@ -9420,7 +9420,7 @@ ET
9420
9420
  BT
9421
9421
  59.24 110.025 Td
9422
9422
  /F3.0 11 Tf
9423
- <6f6e5f7570646174655f65786563203d207368202d6320225b2021202d7220247b7363726970747d205d207c7c20247b7363726970747d20247b6c6f63616c5f6469726563746f72797d22> Tj
9423
+ <6f6e5f7570646174655f65786563203d205b2021202d7820247b7363726970747d205d207c7c20247b7363726970747d20247b6c6f63616c5f6469726563746f72797d> Tj
9424
9424
  ET
9425
9425
 
9426
9426
  0.0 0.0 0.0 SCN
@@ -9431,7 +9431,7 @@ ET
9431
9431
  BT
9432
9432
  59.24 95.285 Td
9433
9433
  /F3.0 11 Tf
9434
- <707265666978203d20687474703a2f2f6d6972726f722e73656e74726965732e6f72672f66616e676672697363682f> Tj
9434
+ <707265666978203d2068747470733a2f2f7777772e73656963687465722e64652f66616e676672697363682f> Tj
9435
9435
  ET
9436
9436
 
9437
9437
  0.0 0.0 0.0 SCN
@@ -10762,7 +10762,7 @@ endobj
10762
10762
  >>
10763
10763
  endobj
10764
10764
  91 0 obj
10765
- << /Length 8617
10765
+ << /Length 8583
10766
10766
  >>
10767
10767
  stream
10768
10768
  q
@@ -10996,7 +10996,7 @@ ET
10996
10996
  BT
10997
10997
  59.24 534.185 Td
10998
10998
  /F3.0 11 Tf
10999
- <6d61785f73697a65203d2035304b42> Tj
10999
+ <6d61785f73697a65203d203130304b42> Tj
11000
11000
  ET
11001
11001
 
11002
11002
  0.0 0.0 0.0 SCN
@@ -11007,7 +11007,7 @@ ET
11007
11007
  BT
11008
11008
  59.24 519.445 Td
11009
11009
  /F3.0 11 Tf
11010
- <736372697074203d202f706174682f746f2f7363726970742f66616e676672697363682d6861732d6e6577732e7368> Tj
11010
+ <736372697074203d202f706174682f746f2f66616e676672697363682d6861732d6e6577732e7368> Tj
11011
11011
  ET
11012
11012
 
11013
11013
  0.0 0.0 0.0 SCN
@@ -11018,7 +11018,7 @@ ET
11018
11018
  BT
11019
11019
  59.24 504.705 Td
11020
11020
  /F3.0 11 Tf
11021
- <6f6e5f7570646174655f65786563203d207368202d6320225b2021202d7220247b7363726970747d205d207c7c20247b7363726970747d20247b6c6f63616c5f6469726563746f72797d22> Tj
11021
+ <6f6e5f7570646174655f65786563203d205b2021202d7820247b7363726970747d205d207c7c20247b7363726970747d20247b6c6f63616c5f6469726563746f72797d> Tj
11022
11022
  ET
11023
11023
 
11024
11024
  0.0 0.0 0.0 SCN
@@ -11029,7 +11029,7 @@ ET
11029
11029
  BT
11030
11030
  59.24 489.965 Td
11031
11031
  /F3.0 11 Tf
11032
- <707265666978203d20687474703a2f2f6d6972726f722e73656e74726965732e6f72672f66616e676672697363682f> Tj
11032
+ <707265666978203d2068747470733a2f2f7777772e73656963687465722e64652f66616e676672697363682f> Tj
11033
11033
  ET
11034
11034
 
11035
11035
  0.0 0.0 0.0 SCN
@@ -12690,7 +12690,7 @@ endobj
12690
12690
  << /Border [0 0 0]
12691
12691
  /A << /Type /Action
12692
12692
  /S /URI
12693
- /URI (https://github.com/rseichter/fangfrisch/blob/master/contrib/process-news.sh)
12693
+ /URI (https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh)
12694
12694
  >>
12695
12695
  /Subtype /Link
12696
12696
  /Rect [112.9725 91.08 135.81 105.36]
@@ -12698,7 +12698,7 @@ endobj
12698
12698
  >>
12699
12699
  endobj
12700
12700
  102 0 obj
12701
- << /Length 7774
12701
+ << /Length 7798
12702
12702
  >>
12703
12703
  stream
12704
12704
  q
@@ -13175,7 +13175,7 @@ ET
13175
13175
  BT
13176
13176
  59.24 130.765 Td
13177
13177
  /F3.0 11 Tf
13178
- <ca20202020202020646f6e65203c203c2866696e6420222464697222202d747970652066202d6e616d65202266616e676672697363682a2e74787422202d7072696e743029> Tj
13178
+ <ca20202020202020646f6e65203c203c2866696e6420222464697222202d6d617864657074682031202d747970652066202d6e616d65202266616e676672697363682a2e74787422202d7072696e743029> Tj
13179
13179
  ET
13180
13180
 
13181
13181
  0.0 0.0 0.0 SCN
@@ -14916,133 +14916,133 @@ xref
14916
14916
  0000125491 00000 n
14917
14917
  0000125535 00000 n
14918
14918
  0000125579 00000 n
14919
- 0000136393 00000 n
14920
- 0000136784 00000 n
14921
- 0000136828 00000 n
14922
- 0000137032 00000 n
14923
- 0000137233 00000 n
14924
- 0000137277 00000 n
14925
- 0000147219 00000 n
14926
- 0000147549 00000 n
14927
- 0000157492 00000 n
14928
- 0000157863 00000 n
14929
- 0000157907 00000 n
14930
- 0000158032 00000 n
14931
- 0000166702 00000 n
14932
- 0000167061 00000 n
14933
- 0000167189 00000 n
14934
- 0000177731 00000 n
14935
- 0000178061 00000 n
14936
- 0000189375 00000 n
14937
- 0000189747 00000 n
14938
- 0000189791 00000 n
14939
- 0000190223 00000 n
14940
- 0000190560 00000 n
14941
- 0000190778 00000 n
14942
- 0000198606 00000 n
14943
- 0000198938 00000 n
14944
- 0000208494 00000 n
14945
- 0000208863 00000 n
14946
- 0000208909 00000 n
14947
- 0000208955 00000 n
14948
- 0000209080 00000 n
14949
- 0000209208 00000 n
14950
- 0000209344 00000 n
14951
- 0000209480 00000 n
14952
- 0000209609 00000 n
14953
- 0000209742 00000 n
14954
- 0000209883 00000 n
14955
- 0000210025 00000 n
14956
- 0000210169 00000 n
14957
- 0000210315 00000 n
14958
- 0000210450 00000 n
14959
- 0000210637 00000 n
14960
- 0000210775 00000 n
14961
- 0000210912 00000 n
14962
- 0000211052 00000 n
14963
- 0000211194 00000 n
14964
- 0000211328 00000 n
14965
- 0000211462 00000 n
14966
- 0000211598 00000 n
14967
- 0000211736 00000 n
14968
- 0000211878 00000 n
14969
- 0000212021 00000 n
14970
- 0000212147 00000 n
14971
- 0000212277 00000 n
14972
- 0000212410 00000 n
14973
- 0000212544 00000 n
14974
- 0000212670 00000 n
14975
- 0000212797 00000 n
14976
- 0000212919 00000 n
14977
- 0000213044 00000 n
14978
- 0000213170 00000 n
14979
- 0000213298 00000 n
14980
- 0000213445 00000 n
14981
- 0000213593 00000 n
14982
- 0000213733 00000 n
14983
- 0000213874 00000 n
14984
- 0000214025 00000 n
14985
- 0000214178 00000 n
14986
- 0000214310 00000 n
14987
- 0000214442 00000 n
14988
- 0000214571 00000 n
14989
- 0000214699 00000 n
14990
- 0000214825 00000 n
14991
- 0000214950 00000 n
14992
- 0000215080 00000 n
14993
- 0000215210 00000 n
14994
- 0000215349 00000 n
14995
- 0000215487 00000 n
14996
- 0000215565 00000 n
14997
- 0000215714 00000 n
14998
- 0000215905 00000 n
14999
- 0000216071 00000 n
15000
- 0000216267 00000 n
15001
- 0000216480 00000 n
15002
- 0000216694 00000 n
15003
- 0000216938 00000 n
15004
- 0000217132 00000 n
15005
- 0000217352 00000 n
15006
- 0000217569 00000 n
15007
- 0000217767 00000 n
15008
- 0000217999 00000 n
15009
- 0000218179 00000 n
15010
- 0000218361 00000 n
15011
- 0000218585 00000 n
15012
- 0000218741 00000 n
15013
- 0000218934 00000 n
15014
- 0000219172 00000 n
15015
- 0000219396 00000 n
15016
- 0000219654 00000 n
15017
- 0000219910 00000 n
15018
- 0000220174 00000 n
15019
- 0000220406 00000 n
15020
- 0000220666 00000 n
15021
- 0000220855 00000 n
15022
- 0000221139 00000 n
15023
- 0000221183 00000 n
15024
- 0000221457 00000 n
15025
- 0000221731 00000 n
15026
- 0000230932 00000 n
15027
- 0000231151 00000 n
15028
- 0000232506 00000 n
15029
- 0000233421 00000 n
15030
- 0000244134 00000 n
15031
- 0000244348 00000 n
15032
- 0000245703 00000 n
15033
- 0000246619 00000 n
15034
- 0000253184 00000 n
15035
- 0000253397 00000 n
15036
- 0000254752 00000 n
15037
- 0000255667 00000 n
15038
- 0000260575 00000 n
15039
- 0000260799 00000 n
15040
- 0000262154 00000 n
14919
+ 0000136359 00000 n
14920
+ 0000136750 00000 n
14921
+ 0000136794 00000 n
14922
+ 0000136998 00000 n
14923
+ 0000137199 00000 n
14924
+ 0000137243 00000 n
14925
+ 0000147185 00000 n
14926
+ 0000147515 00000 n
14927
+ 0000157458 00000 n
14928
+ 0000157829 00000 n
14929
+ 0000157873 00000 n
14930
+ 0000157998 00000 n
14931
+ 0000166634 00000 n
14932
+ 0000166993 00000 n
14933
+ 0000167121 00000 n
14934
+ 0000177663 00000 n
14935
+ 0000177993 00000 n
14936
+ 0000189307 00000 n
14937
+ 0000189679 00000 n
14938
+ 0000189723 00000 n
14939
+ 0000190155 00000 n
14940
+ 0000190492 00000 n
14941
+ 0000190727 00000 n
14942
+ 0000198579 00000 n
14943
+ 0000198911 00000 n
14944
+ 0000208467 00000 n
14945
+ 0000208836 00000 n
14946
+ 0000208882 00000 n
14947
+ 0000208928 00000 n
14948
+ 0000209053 00000 n
14949
+ 0000209181 00000 n
14950
+ 0000209317 00000 n
14951
+ 0000209453 00000 n
14952
+ 0000209582 00000 n
14953
+ 0000209715 00000 n
14954
+ 0000209856 00000 n
14955
+ 0000209998 00000 n
14956
+ 0000210142 00000 n
14957
+ 0000210288 00000 n
14958
+ 0000210423 00000 n
14959
+ 0000210610 00000 n
14960
+ 0000210748 00000 n
14961
+ 0000210885 00000 n
14962
+ 0000211025 00000 n
14963
+ 0000211167 00000 n
14964
+ 0000211301 00000 n
14965
+ 0000211435 00000 n
14966
+ 0000211571 00000 n
14967
+ 0000211709 00000 n
14968
+ 0000211851 00000 n
14969
+ 0000211994 00000 n
14970
+ 0000212120 00000 n
14971
+ 0000212250 00000 n
14972
+ 0000212383 00000 n
14973
+ 0000212517 00000 n
14974
+ 0000212643 00000 n
14975
+ 0000212770 00000 n
14976
+ 0000212892 00000 n
14977
+ 0000213017 00000 n
14978
+ 0000213143 00000 n
14979
+ 0000213271 00000 n
14980
+ 0000213418 00000 n
14981
+ 0000213566 00000 n
14982
+ 0000213706 00000 n
14983
+ 0000213847 00000 n
14984
+ 0000213998 00000 n
14985
+ 0000214151 00000 n
14986
+ 0000214283 00000 n
14987
+ 0000214415 00000 n
14988
+ 0000214544 00000 n
14989
+ 0000214672 00000 n
14990
+ 0000214798 00000 n
14991
+ 0000214923 00000 n
14992
+ 0000215053 00000 n
14993
+ 0000215183 00000 n
14994
+ 0000215322 00000 n
14995
+ 0000215460 00000 n
14996
+ 0000215538 00000 n
14997
+ 0000215687 00000 n
14998
+ 0000215878 00000 n
14999
+ 0000216044 00000 n
15000
+ 0000216240 00000 n
15001
+ 0000216453 00000 n
15002
+ 0000216667 00000 n
15003
+ 0000216911 00000 n
15004
+ 0000217105 00000 n
15005
+ 0000217325 00000 n
15006
+ 0000217542 00000 n
15007
+ 0000217740 00000 n
15008
+ 0000217972 00000 n
15009
+ 0000218152 00000 n
15010
+ 0000218334 00000 n
15011
+ 0000218558 00000 n
15012
+ 0000218714 00000 n
15013
+ 0000218907 00000 n
15014
+ 0000219145 00000 n
15015
+ 0000219369 00000 n
15016
+ 0000219627 00000 n
15017
+ 0000219883 00000 n
15018
+ 0000220147 00000 n
15019
+ 0000220379 00000 n
15020
+ 0000220639 00000 n
15021
+ 0000220828 00000 n
15022
+ 0000221112 00000 n
15023
+ 0000221156 00000 n
15024
+ 0000221430 00000 n
15025
+ 0000221704 00000 n
15026
+ 0000230905 00000 n
15027
+ 0000231124 00000 n
15028
+ 0000232479 00000 n
15029
+ 0000233394 00000 n
15030
+ 0000244107 00000 n
15031
+ 0000244321 00000 n
15032
+ 0000245676 00000 n
15033
+ 0000246592 00000 n
15034
+ 0000253157 00000 n
15035
+ 0000253370 00000 n
15036
+ 0000254725 00000 n
15037
+ 0000255640 00000 n
15038
+ 0000260548 00000 n
15039
+ 0000260772 00000 n
15040
+ 0000262127 00000 n
15041
15041
  trailer
15042
15042
  << /Size 202
15043
15043
  /Root 2 0 R
15044
15044
  /Info 1 0 R
15045
15045
  >>
15046
15046
  startxref
15047
- 263069
15047
+ 263042
15048
15048
  %%EOF
@@ -442,8 +442,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
442
442
  <div class="details">
443
443
  <span id="author" class="author">Ralph Seichter</span><br>
444
444
  <span id="email" class="email"><a href="mailto:fangfrisch@seichter.de">fangfrisch@seichter.de</a></span><br>
445
- <span id="revnumber">version 1.9.0.dev3,</span>
446
- <span id="revdate">2024-02-29</span>
445
+ <span id="revnumber">version 1.9.0.dev6,</span>
446
+ <span id="revdate">2024-03-01</span>
447
447
  </div>
448
448
  <div id="toc" class="toc2">
449
449
  <div id="toctitle">Table of Contents</div>
@@ -1082,10 +1082,10 @@ max_size = 10MB
1082
1082
  [fangfrischnews]
1083
1083
  interval = 12h
1084
1084
  local_directory = /tmp
1085
- max_size = 50KB
1086
- script = /path/to/script/fangfrisch-has-news.sh
1087
- on_update_exec = sh -c "[ ! -r ${script} ] || ${script} ${local_directory}"
1088
- prefix = http://mirror.sentries.org/fangfrisch/
1085
+ max_size = 100KB
1086
+ script = /path/to/fangfrisch-has-news.sh
1087
+ on_update_exec = [ ! -x ${script} ] || ${script} ${local_directory}
1088
+ prefix = https://www.seichter.de/fangfrisch/
1089
1089
  url_alerts = ${prefix}fangfrisch_alerts.txt
1090
1090
  url_news = ${prefix}fangfrisch_news.txt
1091
1091
 
@@ -1210,10 +1210,10 @@ on_update_timeout = 42
1210
1210
  [fangfrischnews]
1211
1211
  interval = 12h
1212
1212
  local_directory = /tmp
1213
- max_size = 50KB
1214
- script = /path/to/script/fangfrisch-has-news.sh
1215
- on_update_exec = sh -c "[ ! -r ${script} ] || ${script} ${local_directory}"
1216
- prefix = http://mirror.sentries.org/fangfrisch/
1213
+ max_size = 100KB
1214
+ script = /path/to/fangfrisch-has-news.sh
1215
+ on_update_exec = [ ! -x ${script} ] || ${script} ${local_directory}
1216
+ prefix = https://www.seichter.de/fangfrisch/
1217
1217
  url_alerts = ${prefix}fangfrisch_alerts.txt
1218
1218
  url_news = ${prefix}fangfrisch_news.txt
1219
1219
 
@@ -1344,7 +1344,7 @@ enabled = yes
1344
1344
  You will not need to read the content, nor will anything else happen, unless you modify the <code>script</code> option.
1345
1345
  Here is an example script which you could use to have downloaded news items mailed to you.
1346
1346
  It needs to be readable for the user account running Fangfrisch, and the sender/recipient addresses obviously have to be adapted.
1347
- For your convenience, the latest version of the script can be downloaded <a href="https://github.com/rseichter/fangfrisch/blob/master/contrib/process-news.sh">here</a>.</p>
1347
+ For your convenience, the latest version of the script can be downloaded <a href="https://raw.githubusercontent.com/rseichter/fangfrisch/master/contrib/fangfrisch-has-news.sh">here</a>.</p>
1348
1348
  </div>
1349
1349
  <div class="listingblock">
1350
1350
  <div class="content">
@@ -1394,7 +1394,7 @@ report_news() {
1394
1394
  (( counter+=1 ))
1395
1395
  echo -e "\n### $fn:\n" &gt;&gt;"$body"
1396
1396
  cat "$fn" &gt;&gt;"$body"
1397
- done &lt; &lt;(find "$dir" -type f -name "fangfrisch*.txt" -print0)
1397
+ done &lt; &lt;(find "$dir" -maxdepth 1 -type f -name "fangfrisch*.txt" -print0)
1398
1398
  done
1399
1399
  if [ $counter -gt 0 ]; then
1400
1400
  print_header
@@ -1450,8 +1450,8 @@ fangfrisch --conf /etc/fangfrisch.conf dumpmappings | awk '{print $3}' | xargs /
1450
1450
  </div>
1451
1451
  <div id="footer">
1452
1452
  <div id="footer-text">
1453
- Version 1.9.0.dev3<br>
1454
- Last updated 2024-02-29 17:14:36 +0100
1453
+ Version 1.9.0.dev6<br>
1454
+ Last updated 2024-03-01 20:55:03 +0100
1455
1455
  </div>
1456
1456
  </div>
1457
1457
  </body>
@@ -9,10 +9,10 @@ max_size = 10MB
9
9
  [fangfrischnews]
10
10
  interval = 12h
11
11
  local_directory = /tmp
12
- max_size = 50KB
13
- script = /path/to/script/fangfrisch-has-news.sh
14
- on_update_exec = sh -c "[ ! -r ${script} ] || ${script} ${local_directory}"
15
- prefix = http://mirror.sentries.org/fangfrisch/
12
+ max_size = 100KB
13
+ script = /path/to/fangfrisch-has-news.sh
14
+ on_update_exec = [ ! -x ${script} ] || ${script} ${local_directory}
15
+ prefix = https://www.seichter.de/fangfrisch/
16
16
  url_alerts = ${prefix}fangfrisch_alerts.txt
17
17
  url_news = ${prefix}fangfrisch_news.txt
18
18
 
@@ -16,11 +16,12 @@ GNU General Public License for more details.
16
16
  You should have received a copy of the GNU General Public License
17
17
  along with Fangfrisch. If not, see <https://www.gnu.org/licenses/>.
18
18
  """
19
- __version__ = '1.9.0.dev3'
19
+ __version__ = '1.9.0.dev6'
20
20
 
21
21
 
22
22
  class ClamavItem:
23
- def __init__(self, section, option, url, check, path, interval, max_size, on_update, connection_timeout) -> None:
23
+ def __init__(self, section, option, url, check, path, interval, max_size, on_update, connection_timeout,
24
+ stem) -> None:
24
25
  self.check = check
25
26
  self.connection_timeout = connection_timeout
26
27
  self.interval = interval
@@ -29,4 +30,5 @@ class ClamavItem:
29
30
  self.option = option
30
31
  self.path = path
31
32
  self.section = section
33
+ self.stem = stem
32
34
  self.url = url
@@ -26,10 +26,10 @@ fangfrischnews = {
26
26
  'fangfrischnews': {
27
27
  INTERVAL: '12h',
28
28
  LOCAL_DIR: '/tmp',
29
- MAX_SIZE: '50KB',
30
- 'script': '/path/to/script/fangfrisch-has-news.sh',
31
- ON_UPDATE_EXEC: f'sh -c "[ ! -r ${{script}} ] || ${{script}} ${{{LOCAL_DIR}}}"',
32
- PREFIX: r'http://mirror.sentries.org/fangfrisch/',
29
+ MAX_SIZE: '100KB',
30
+ 'script': '/path/to/fangfrisch-has-news.sh',
31
+ ON_UPDATE_EXEC: f'[ ! -x ${{script}} ] || ${{script}} ${{{LOCAL_DIR}}}',
32
+ PREFIX: r'https://www.seichter.de/fangfrisch/',
33
33
  'url_alerts': f'${{{PREFIX}}}fangfrisch_alerts.txt',
34
34
  'url_news': f'${{{PREFIX}}}fangfrisch_news.txt',
35
35
  }
@@ -18,6 +18,7 @@ along with Fangfrisch. If not, see <https://www.gnu.org/licenses/>.
18
18
  """
19
19
  import os
20
20
  from typing import List
21
+ from typing import Set
21
22
  from urllib.parse import urlparse
22
23
 
23
24
  from fangfrisch import ClamavItem
@@ -30,6 +31,8 @@ from fangfrisch.log import log_error
30
31
  from fangfrisch.log import log_exception
31
32
  from fangfrisch.log import log_info
32
33
  from fangfrisch.log import log_warning
34
+ from fangfrisch.task import Task
35
+ from fangfrisch.task import add_task
33
36
  from fangfrisch.util import check_integrity
34
37
  from fangfrisch.util import remove_if_exists
35
38
  from fangfrisch.util import run_command
@@ -68,15 +71,16 @@ def _clamav_items() -> List[ClamavItem]:
68
71
  if local_dir:
69
72
  filename = os.path.join(local_dir, filename)
70
73
  item_list.append(ClamavItem(
71
- section=section,
72
- option=option,
73
- url=url,
74
74
  check=config.integrity_check(section),
75
- path=filename,
75
+ connection_timeout=config.connection_timeout(),
76
76
  interval=config.interval(section),
77
77
  max_size=max_size,
78
78
  on_update=config.get(section, f'on_update_{stem}'),
79
- connection_timeout=config.connection_timeout()
79
+ option=option,
80
+ path=filename,
81
+ section=section,
82
+ stem=stem,
83
+ url=url,
80
84
  ))
81
85
  return item_list
82
86
 
@@ -138,16 +142,40 @@ class ClamavRefresh:
138
142
  return True
139
143
 
140
144
  def refresh_all(self) -> int:
141
- count = self.cleanup_providers()
145
+ steps = self.cleanup_providers()
146
+ trigger_sections: Set[str] = set()
142
147
  for ci in _clamav_items():
143
148
  if self.refresh(ci):
144
- command = ci.on_update
145
- if command:
146
- run_command(command, config.on_update_timeout(),
147
- log_info, log_error, log_exception, path=ci.path)
148
- count += 1
149
- command = config.on_update_exec(section=ci.section)
150
- if count > 0 and command:
151
- run_command(command, config.on_update_timeout(),
152
- log_info, log_error, log_exception)
153
- return count
149
+ if ci.on_update:
150
+ # Run individual command for the item, if defined.
151
+ log_debug(f'[{ci.section}] on_update_{ci.stem}: "{ci.on_update}"')
152
+ run_command(
153
+ command=ci.on_update,
154
+ timeout=config.on_update_timeout(section=ci.section),
155
+ callback_stdout=log_info,
156
+ callback_stderr=log_error,
157
+ callback_exception=log_exception,
158
+ path=ci.path
159
+ )
160
+ else:
161
+ # If no individual command is defined, remember the section name instead.
162
+ log_debug(f'[{ci.section}] caused updates')
163
+ trigger_sections.add(ci.section)
164
+ steps += 1
165
+
166
+ # Compose a task list
167
+ tasks: List[Task] = list()
168
+ for section in trigger_sections:
169
+ add_task(
170
+ tasks=tasks,
171
+ command=config.on_update_exec(section),
172
+ timeout=config.on_update_timeout(section)
173
+ )
174
+
175
+ # Process tasks
176
+ completed = 0
177
+ for task in tasks:
178
+ task.complete()
179
+ completed += 1
180
+
181
+ return steps, completed
@@ -0,0 +1,57 @@
1
+ """
2
+ Copyright © 2020-2024 Ralph Seichter
3
+
4
+ This file is part of "Fangfrisch".
5
+
6
+ Fangfrisch is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Fangfrisch is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with Fangfrisch. If not, see <https://www.gnu.org/licenses/>.
18
+ """
19
+ from typing import List
20
+ from typing import Optional
21
+
22
+ from fangfrisch.log import log_debug
23
+ from fangfrisch.log import log_error
24
+ from fangfrisch.log import log_exception
25
+ from fangfrisch.log import log_info
26
+ from fangfrisch.util import run_command
27
+
28
+
29
+ class Task:
30
+ def __init__(self, command: str, timeout: int) -> None:
31
+ self.command = command
32
+ self.timeout = timeout
33
+
34
+ def __str__(self): # pragma: no cover
35
+ return f'Task(command={{{self.command}}}, timeout={self.timeout})'
36
+
37
+ def complete(self) -> int:
38
+ rc = run_command(
39
+ command=self.command,
40
+ timeout=self.timeout,
41
+ callback_stdout=log_info,
42
+ callback_stderr=log_error,
43
+ callback_exception=log_exception
44
+ )
45
+ log_debug(f'{self} returned code {rc}')
46
+ return rc
47
+
48
+
49
+ def add_task(tasks: List[Task], command: str, timeout: int) -> Optional[Task]:
50
+ for task in tasks:
51
+ if task.command == command:
52
+ log_debug(f"Ignoring duplicate: {command}")
53
+ return None
54
+ task = Task(command=command, timeout=timeout)
55
+ tasks.append(task)
56
+ log_debug(f'{task} added')
57
+ return task
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fangfrisch
3
- Version: 1.9.0.dev3
3
+ Version: 1.9.0.dev6
4
4
  Summary: Update and verify unofficial Clam Anti-Virus signatures
5
5
  Home-page: https://github.com/rseichter/fangfrisch
6
6
  Author: Ralph Seichter
@@ -18,6 +18,7 @@ fangfrisch/download.py
18
18
  fangfrisch/dump.py
19
19
  fangfrisch/log.py
20
20
  fangfrisch/refresh.py
21
+ fangfrisch/task.py
21
22
  fangfrisch/util.py
22
23
  fangfrisch.egg-info/PKG-INFO
23
24
  fangfrisch.egg-info/SOURCES.txt
@@ -33,10 +34,14 @@ fangfrisch/config/malwarepatrol.py
33
34
  fangfrisch/config/sanesecurity.py
34
35
  fangfrisch/config/securiteinfo.py
35
36
  fangfrisch/config/urlhaus.py
37
+ tests/__init__.py
36
38
  tests/test_config.py
37
39
  tests/test_db.py
38
40
  tests/test_download.py
39
41
  tests/test_dump.py
40
42
  tests/test_log.py
41
43
  tests/test_refresh.py
42
- tests/test_util.py
44
+ tests/test_task.py
45
+ tests/test_util.py
46
+ tests/tests.conf
47
+ tests/tests.sql
@@ -24,21 +24,24 @@ project_urls =
24
24
  Source = https://github.com/rseichter/fangfrisch
25
25
  Tracker = https://github.com/rseichter/fangfrisch/issues
26
26
  url = https://github.com/rseichter/fangfrisch
27
- version = 1.9.0.dev3
27
+ version = 1.9.0.dev6
28
28
 
29
29
  [options]
30
30
  install_requires =
31
31
  requests>=2.22.0
32
32
  SQLAlchemy>=1.4.0
33
- packages =
34
- fangfrisch
35
- fangfrisch.config
33
+ packages = find:
36
34
  python_requires = >=3.7
37
35
 
38
36
  [options.entry_points]
39
37
  console_scripts =
40
38
  fangfrisch = fangfrisch.__main__:main
41
39
 
40
+ [options.package_data]
41
+ tests =
42
+ *.conf
43
+ *.sql
44
+
42
45
  [egg_info]
43
46
  tag_build =
44
47
  tag_date = 0
@@ -0,0 +1,80 @@
1
+ """
2
+ Copyright © 2020-2024 Ralph Seichter
3
+
4
+ This file is part of "Fangfrisch".
5
+
6
+ Fangfrisch is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Fangfrisch is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with Fangfrisch. If not, see <https://www.gnu.org/licenses/>.
18
+ """
19
+ import os
20
+ import unittest
21
+ import uuid
22
+
23
+ import fangfrisch.log
24
+ from fangfrisch import ClamavItem
25
+ from fangfrisch.config.config import config
26
+ from fangfrisch.db import DbMeta
27
+ from fangfrisch.log import LogHandlerType
28
+ from fangfrisch.log import init_logger
29
+
30
+ DIGEST_DUMMY = 'digest_dummy'
31
+ DIGEST_MD5 = '6087a61850f22a132f8522f35779c04d'
32
+ MAX_SIZE = 1024 * 1024
33
+ PATH_DUMMY = 'path_dummy'
34
+ URL_BAD_SHA256 = 'https://seichter.de/favicon.ico'
35
+ URL_MD5 = 'https://seichter.de/favicon-32x32.png'
36
+ URL_MISSING = 'https://seichter.de/index.html'
37
+ URL_SHA256 = 'https://seichter.de/favicon-16x16.png'
38
+
39
+
40
+ def env_var(name: str, default: object = None):
41
+ if name in os.environ:
42
+ return os.environ[name]
43
+ return default
44
+
45
+
46
+ NETWORK_TESTS = env_var('NETWORK_TESTS') == '1'
47
+
48
+
49
+ class _ClamavTestItem(ClamavItem):
50
+ def __init__(self, section, option, url, check=None, path=None, interval=0, max_size=MAX_SIZE,
51
+ on_update=None, connection_timeout=10, stem='test_item') -> None:
52
+ super().__init__(
53
+ check=check,
54
+ connection_timeout=connection_timeout,
55
+ interval=interval,
56
+ max_size=max_size,
57
+ on_update=on_update,
58
+ option=option,
59
+ path=path,
60
+ section=section,
61
+ stem=stem,
62
+ url=url,
63
+ )
64
+
65
+
66
+ class FangfrischTest(unittest.TestCase):
67
+ CONF = 'tests/tests.conf'
68
+ TMPDIR = '/tmp/fangfrisch/unittest'
69
+ UNITTEST = 'unittest'
70
+ UNKNOWN = uuid.uuid4().hex
71
+
72
+ @classmethod
73
+ def setUpClass(cls) -> None:
74
+ config.init(FangfrischTest.CONF)
75
+ os.makedirs(FangfrischTest.TMPDIR, exist_ok=True)
76
+ if fangfrisch.log._handler is not None:
77
+ fangfrisch.log._handler.close()
78
+ fangfrisch.log._handler = None
79
+ init_logger(LogHandlerType.CONSOLE, 'FATAL', '')
80
+ DbMeta.init(True)
@@ -84,7 +84,9 @@ class RefreshTests(FangfrischTest):
84
84
  @unittest.skipUnless(NETWORK_TESTS, 'network tests disabled')
85
85
  def test_refresh_force(self):
86
86
  cr = ClamavRefresh(Namespace(force=True))
87
- self.assertEqual(3, cr.refresh_all())
87
+ (n, t) = cr.refresh_all()
88
+ self.assertEqual(3, n)
89
+ self.assertEqual(2, t)
88
90
 
89
91
  @unittest.skipUnless(NETWORK_TESTS, 'network tests disabled')
90
92
  def test_refresh_age(self):
@@ -108,15 +110,17 @@ class RefreshTests(FangfrischTest):
108
110
  ci = _ClamavTestItem(self.UNITTEST, 'x', URL_MD5, 'md5', f'{self.TMPDIR}/x')
109
111
  self.s.add(RefreshLog(ci, DIGEST_DUMMY))
110
112
  self.s.commit()
111
- n = self.ref.refresh_all()
113
+ (n, t) = self.ref.refresh_all()
112
114
  self.assertEqual(3, n)
115
+ self.assertEqual(2, t)
113
116
 
114
117
  @unittest.skipUnless(NETWORK_TESTS, 'network tests disabled')
115
118
  def test_url_blank(self):
116
119
  ci = _ClamavTestItem('unittest4', 'url_blank', '', 'md5', f'{self.TMPDIR}/blank')
117
120
  self.s.add(RefreshLog(ci, DIGEST_DUMMY))
118
121
  self.s.commit()
119
- n = self.ref.refresh_all()
122
+ (n, t) = self.ref.refresh_all()
123
+ self.assertEqual(3, n)
120
124
  self.assertEqual(3, n)
121
125
 
122
126
  def test_url_disabled(self):
@@ -0,0 +1,53 @@
1
+ """
2
+ Copyright © 2020-2024 Ralph Seichter
3
+
4
+ This file is part of "Fangfrisch".
5
+
6
+ Fangfrisch is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Fangfrisch is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with Fangfrisch. If not, see <https://www.gnu.org/licenses/>.
18
+ """
19
+ import unittest
20
+ from typing import List
21
+
22
+ from fangfrisch.task import Task
23
+ from fangfrisch.task import add_task
24
+ from tests import FangfrischTest
25
+
26
+
27
+ class TaskTests(FangfrischTest):
28
+ FIRST_COMMAND = '/invalid/command/path'
29
+
30
+ def setUp(self) -> None:
31
+ super().setUpClass()
32
+ self.tasks: List[Task] = list()
33
+ self.tasks.append(Task(command=self.FIRST_COMMAND, timeout=1))
34
+
35
+ def test_add_task1(self):
36
+ t = add_task(self.tasks, 'c2', timeout=2)
37
+ self.assertTrue(isinstance(t, Task))
38
+
39
+ def test_add_task2(self):
40
+ t = add_task(tasks=self.tasks, command=self.FIRST_COMMAND, timeout=3)
41
+ self.assertIsNone(t)
42
+
43
+ def test_complete1(self):
44
+ for t in self.tasks:
45
+ self.assertNotEqual(0, t.complete())
46
+
47
+ def test_complete2(self):
48
+ t = add_task(self.tasks, 'echo', timeout=3)
49
+ self.assertEqual(0, t.complete())
50
+
51
+
52
+ if __name__ == '__main__':
53
+ unittest.main()
@@ -0,0 +1,39 @@
1
+ [DEFAULT]
2
+ connection_timeout = 9
3
+ db_url = sqlite:////tmp/fangfrisch/unittest/db.sqlite
4
+ local_directory = /tmp/fangfrisch/unittest
5
+ log_format = %(message)s
6
+ log_level = FATAL
7
+ log_target = unittest
8
+ on_update_exec = echo on_update_exec
9
+ on_update_timeout = 5
10
+
11
+ [unittest]
12
+ enabled = yes
13
+ integrity_check = sha256
14
+ max_age = 0m
15
+ prefix = https://seichter.de/
16
+ url_index = ${prefix}favicon-16x16.png
17
+
18
+ [unittest2]
19
+ enabled = yes
20
+ integrity_check = md5
21
+ max_age = 52560000
22
+ on_update_exec = echo overridden
23
+ on_update_timeout = 6
24
+ prefix = https://seichter.de/
25
+ url_index = ${prefix}favicon-32x32.png
26
+
27
+ [unittest3]
28
+ enabled = yes
29
+ integrity_check = disabled
30
+ max_age = 0m
31
+ prefix = https://seichter.de/
32
+ url_blank =
33
+ url_disabled = disabled
34
+ url_index = ${prefix}favicon-32x32.png
35
+ on_update_index = echo {path}
36
+
37
+ [unittest4]
38
+ enabled = yes
39
+ max_size = not_a_number
@@ -0,0 +1,16 @@
1
+ PRAGMA foreign_keys=OFF;
2
+ BEGIN TRANSACTION;
3
+ CREATE TABLE automx2 (
4
+ db_version INTEGER NOT NULL,
5
+ PRIMARY KEY (db_version)
6
+ );
7
+ INSERT INTO automx2 VALUES(2);
8
+ CREATE TABLE refreshlog (
9
+ url VARCHAR NOT NULL,
10
+ digest VARCHAR,
11
+ path VARCHAR NOT NULL,
12
+ provider VARCHAR,
13
+ updated DATETIME,
14
+ PRIMARY KEY (url)
15
+ );
16
+ COMMIT;
@@ -1,33 +0,0 @@
1
- # vim:ts=4:noet
2
-
3
- asciidoctor_opts = -o $@ -v
4
- ff = ../local/fangfrisch
5
- cf_combined = combined.conf
6
- cf_example = example.conf
7
- cf_internal = internal.conf
8
- out_html = index.html
9
- out_pdf = fangfrisch.pdf
10
- sources = fangfrisch.adoc $(cf_combined) $(cf_example) $(cf_internal) usage.txt
11
-
12
- .PHONY: all clean force
13
-
14
- all: $(out_html) $(out_pdf)
15
-
16
- $(cf_combined): $(cf_example)
17
- $(ff) -c $< dumpconf > $@
18
-
19
- $(cf_internal):
20
- $(ff) -c /dev/null dumpconf > $@
21
-
22
- $(out_html): $(sources)
23
- asciidoctor -a toc=right $(asciidoctor_opts) $<
24
-
25
- $(out_pdf): $(sources)
26
- asciidoctor-pdf -a toc=preamble $(asciidoctor_opts) $<
27
-
28
- clean:
29
- /bin/rm $(out_html) $(out_pdf) || true
30
-
31
- force:
32
- rm -f $(cf_combined) $(cf_internal)
33
- make
File without changes