forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clamav.yaml
248 lines (221 loc) · 6.85 KB
/
clamav.yaml
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
package:
name: clamav
version: 1.4.1
epoch: 0
description: An anti-virus toolkit for UNIX eis-ng backport
copyright:
- license: GPL-2.0-only
environment:
contents:
packages:
- autoconf
- automake
- build-base
- busybox
- bzip2-dev
- ca-certificates-bundle
- check-dev
- cmake
- curl-dev
- json-c-dev
- libmilter-dev
- libmspack-dev
- libxml2-dev
- linux-headers
- ncurses-dev
- openssl-dev
- pcre2-dev
- python3
- rust
- samurai
- zlib-dev
# - clamav-scanner
# - clamav-daemon
pipeline:
- uses: fetch
with:
expected-sha256: a318e780ac39a6b3d6c46971382f96edde97ce48b8e361eb80e63415ed416ad8
uri: https://www.clamav.net/downloads/production/clamav-${{package.version}}.tar.gz
- uses: cmake/configure
with:
opts: |
-DAPP_CONFIG_DIRECTORY=/etc/clamav \
-DDATABASE_DIRECTORY=/var/lib/clamav \
-DENABLE_SYSTEMD=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_EXTERNAL_MSPACK=ON \
- uses: cmake/build
- uses: cmake/install
- uses: strip
- runs: |
# set proper defaults
sed -i -e "s:^\(Example\):\# \1:" \
-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
-e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \
-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamav/clamd.conf:" \
-e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
"${{targets.destdir}}"/etc/clamav/freshclam.conf.sample
# set proper defaults
sed -i -e "s:^\(Example\):\# \1:" \
-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:" \
-e "s:.*\(User\) .*:\1 clamav:" \
-e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
-e "s:^\#\(LogTime\).*:\1 yes:" \
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
"${{targets.destdir}}"/etc/clamav/clamd.conf.sample
subpackages:
- name: clamav-doc
pipeline:
- uses: split/manpages
description: clamav manpages
- name: clamav-dev
pipeline:
- uses: split/dev
dependencies:
runtime:
- clamav
- openssl-dev
- clamav-scanner
- clamav-daemon
description: clamav dev
test:
pipeline:
- runs: |
clamav-config --version
clamav-config --help
- uses: test/pkgconf
- name: clamav-libunrar
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib
mv "${{targets.destdir}}"/usr/lib/libclamunrar* "${{targets.subpkgdir}}"/usr/lib/
dependencies:
replaces:
- clamav
description: ClamAV unrar libraries
- name: clamav-daemon
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/etc/clamav
install -d -m 755 \
"${{targets.subpkgdir}}"/var/log/clamav \
"${{targets.subpkgdir}}"/var/lib/clamav
mkdir -p "${{targets.subpkgdir}}"/usr/bin
mkdir -p "${{targets.subpkgdir}}"/usr/sbin
mv "${{targets.destdir}}"/usr/bin/clamdtop "${{targets.subpkgdir}}"/usr/bin/
mv "${{targets.destdir}}"/usr/sbin/clamd "${{targets.subpkgdir}}"/usr/sbin/
mv "${{targets.destdir}}"/usr/bin/clamconf "${{targets.subpkgdir}}"/usr/bin/
mv "${{targets.destdir}}"/etc/clamav/clamd.conf.sample "${{targets.subpkgdir}}"/etc/clamav/clamd.conf
dependencies:
replaces:
- clamav
runtime:
- clamav-clamdscan
- freshclam
description: ClamAV daemon scanner
test:
pipeline:
- runs: |
clamconf --version
clamconf --help
clamdtop --version
clamdtop --help
clamd --version
clamd --help
- name: clamav-clamdscan
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
mv "${{targets.destdir}}"/usr/bin/clamdscan "${{targets.subpkgdir}}"/usr/bin/
description: ClamAV daemon client
test:
pipeline:
- runs: |
clamdscan --help
- name: c
- name: clamav-scanner
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
mv "${{targets.destdir}}"/usr/bin/clamscan "${{targets.subpkgdir}}"/usr/bin/
mv "${{targets.destdir}}"/usr/bin/sigtool "${{targets.subpkgdir}}"/usr/bin/
mv "${{targets.destdir}}"/usr/bin/clambc "${{targets.subpkgdir}}"/usr/bin/
dependencies:
replaces:
- clamav
runtime:
- freshclam
description: ClamAV command-line scanner and utils
test:
pipeline:
- runs: |
clambc --version
clambc --help
clamscan --version
clamscan --help
sigtool --version
sigtool --help
- name: clamav-db
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/var/lib/ \
"${{targets.subpkgdir}}"/usr/bin \
"${{targets.subpkgdir}}"/etc/clamav
install -d -m755 \
"${{targets.subpkgdir}}"/var/log/clamav \
"${{targets.subpkgdir}}"/var/lib/clamav
dependencies:
replaces:
- clamav
runtime:
- freshclam
description: ClamAV dummy package for compatibility
- name: freshclam
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/etc/clamav
mkdir -p "${{targets.subpkgdir}}"/usr/bin
mv "${{targets.destdir}}"/usr/bin/freshclam "${{targets.subpkgdir}}"/usr/bin/
mv "${{targets.destdir}}"/etc/clamav/freshclam.conf.sample \
"${{targets.subpkgdir}}"/etc/clamav/freshclam.conf
install -d -m755 \
"${{targets.subpkgdir}}"/var/log/clamav \
"${{targets.subpkgdir}}"/var/lib/clamav
dependencies:
replaces:
- clamav
- clamav-db
description: Auto-updater for the Clam Antivirus scanner data-files
test:
pipeline:
- runs: |
freshclam --version
freshclam --help
- name: clamav-milter
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/etc/clamav
mkdir -p "${{targets.subpkgdir}}"/usr/sbin
mv "${{targets.destdir}}"/usr/sbin/clamav-milter "${{targets.subpkgdir}}"/usr/sbin/
mv "${{targets.destdir}}"/etc/clamav/clamav-milter.conf.sample \
"${{targets.subpkgdir}}"/etc/clamav/clamav-milter.conf
description: ClamAV milter
test:
pipeline:
- runs: |
clamav-milter --version
clamav-milter --help
update:
enabled: true
github:
identifier: Cisco-Talos/clamav
strip-prefix: clamav-
test:
pipeline:
# AUTOGENERATED
- runs: |
clamsubmit --version
clamsubmit --help