Compare commits
No commits in common. "rawhide" and "f32" have entirely different histories.
18 changed files with 466 additions and 890 deletions
|
|
@ -1,25 +1,37 @@
|
|||
## README.fedora.md (mainly clamav-milter)
|
||||
|
||||
|
||||
Please note for Fedora and EPEL 7+ we use only systemd.
|
||||
upstart and sysvinit only apply to EPEL 6.
|
||||
|
||||
A clamav-milter setup consists of the following three components:
|
||||
|
||||
### The clamav-milter itself
|
||||
* the clamav-milter itself
|
||||
|
||||
--> this is provided by the 'clamav-milter' package plus (alternatively)
|
||||
'clamav-milter-upstart' or 'clamav-milter-sysvinit'
|
||||
|
||||
The main configuration is in /etc/mail/clamav-milter.conf and MUST
|
||||
be changed before first use.
|
||||
|
||||
This can be enabled with: 'systemctl enable clamav-milter.service'
|
||||
|
||||
### A clamav scanner daemon
|
||||
The -sysvinit package is managed by the traditional tools, but
|
||||
-upstart requires modification of /etc/event.d/clamav-milter to
|
||||
enable automatic startup. See comments there for more details.
|
||||
|
||||
* a clamav scanner daemon
|
||||
|
||||
--> this is in the clamd package (or on EL6:
|
||||
'clamav-scanner-upstart' or 'clamav-scanner-sysvinit')
|
||||
|
||||
The daemon is configured by /etc/clamd.d/scan.conf (which MUST be
|
||||
edited before first use).
|
||||
|
||||
This can be enabled with: 'systemctl enable clamd@scan.service'
|
||||
|
||||
### The MTA (sendmail/postfix)
|
||||
The -sysvinit package is managed by the traditional tools, but
|
||||
-upstart requires modification of /etc/event.d/clamd.scan to enable
|
||||
automatic startup. See comments there for more details.
|
||||
|
||||
* the MTA (sendmail/postfix)
|
||||
|
||||
--> you should know how to install this...
|
||||
|
||||
|
|
@ -31,13 +43,6 @@ A clamav-milter setup consists of the following three components:
|
|||
|
||||
to your sendmail.mc.
|
||||
|
||||
### Changing permissions of directory /var/lib/clamav
|
||||
|
||||
- Whenever ClamAV is upgraded by dnf, the permissions for the /var/lib/clamav directory change to user clamupdate
|
||||
- If for some reason you need DatabaseOwner be another user, you may copy /usr/lib/systemd/system/clamav-freshclam.service to /etc/systemd/system/ and add ExecStartPre=+/usr/bin/chown youruser:yourgroup /var/lib/clamav and updates won't break your configuration ...
|
||||
- Please add comments to https://bugzilla.redhat.com/show_bug.cgi?id=2023371 if not work for you or if you have any suggestion.
|
||||
- Note: =+ on systemd.service (man 5 systemd.service, Special executable prefixes) If the executable path is prefixed with "+" then the process is executed with full privileges.
|
||||
|
||||
|
||||
EXAMPLE
|
||||
=======
|
||||
|
|
@ -8,17 +8,8 @@
|
|||
+Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
|
||||
diff -up clamav-1.0.0/clamav-config.in.private clamav-1.0.0/clamav-config.in
|
||||
--- clamav-1.0.0/clamav-config.in.private 2023-01-22 17:40:01.711757908 -0700
|
||||
+++ clamav-1.0.0/clamav-config.in 2023-01-22 18:01:06.188743168 -0700
|
||||
@@ -4,7 +4,6 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
includedir=@includedir@
|
||||
-libdir=@libdir@
|
||||
|
||||
usage()
|
||||
{
|
||||
--- clamav-0.99/clamav-config.in 2015-05-28 23:56:25.000000000 +0200
|
||||
+++ clamav-0.99/clamav-config.in.private 2015-12-02 01:31:34.933705763 +0100
|
||||
@@ -54,12 +54,8 @@
|
||||
usage 0
|
||||
;;
|
||||
12
clamav-check.patch
Normal file
12
clamav-check.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up clamav-0.103.0/unit_tests/check_jsnorm.c.check clamav-0.103.0/unit_tests/check_jsnorm.c
|
||||
--- clamav-0.103.0/unit_tests/check_jsnorm.c.check 2020-09-12 18:27:10.000000000 -0600
|
||||
+++ clamav-0.103.0/unit_tests/check_jsnorm.c 2020-09-17 22:15:26.199957518 -0600
|
||||
@@ -247,7 +247,7 @@ static void tokenizer_test(const char *i
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
jstest_teardown();
|
||||
- ck_assert_msg("failed to open output file: %s", filename);
|
||||
+ ck_assert_msg(0, "failed to open output file: %s", filename);
|
||||
}
|
||||
|
||||
diff_file_mem(fd, expected, len);
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
diff -up clamav-1.4.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service clamav-1.4.0/clamonacc/clamav-clamonacc.service.in
|
||||
--- clamav-1.4.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service 2024-08-15 20:12:56.950984705 -0600
|
||||
+++ clamav-1.4.0/clamonacc/clamav-clamonacc.service.in 2024-08-15 20:14:19.088770747 -0600
|
||||
diff -up clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service clamav-0.103.0/clamonacc/clamav-clamonacc.service.in
|
||||
--- clamav-0.103.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service 2020-09-12 18:27:09.000000000 -0600
|
||||
+++ clamav-0.103.0/clamonacc/clamav-clamonacc.service.in 2020-09-18 19:49:35.400152760 -0600
|
||||
@@ -4,14 +4,12 @@
|
||||
[Unit]
|
||||
Description=ClamAV On-Access Scanner
|
||||
Documentation=man:clamonacc(8) man:clamd.conf(5) https://docs.clamav.net/
|
||||
Documentation=man:clamonacc(8) man:clamd.conf(5) https://www.clamav.net/documents
|
||||
-Requires=clamav-daemon.service
|
||||
-After=clamav-daemon.service syslog.target network.target
|
||||
+After=clamd@scan.service syslog.target network.target
|
||||
|
|
@ -13,8 +13,8 @@ diff -up clamav-1.4.0/clamonacc/clamav-clamonacc.service.in.clamonacc-service cl
|
|||
Type=simple
|
||||
User=root
|
||||
-ExecStartPre=/bin/bash -c "while [ ! -S /run/clamav/clamd.ctl ]; do sleep 1; done"
|
||||
-ExecStart=@prefix@/sbin/clamonacc -F --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
||||
-ExecStart=@prefix@/sbin/clamonacc -F --config-file=@APP_CONFIG_DIRECTORY@/clamd.conf --log=/var/log/clamav/clamonacc.log --move=/root/quarantine
|
||||
+ExecStart=@prefix@/sbin/clamonacc -F --config-file=/etc/clamd.d/scan.conf
|
||||
ExecStop=/bin/kill -SIGKILL $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
|||
28
clamav-clean.sh
Executable file
28
clamav-clean.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
VERSION=0.103.2
|
||||
NAME=clamav
|
||||
TARBALL_CLEAN=${NAME}-${VERSION}-norar.tar.xz
|
||||
TARBALL=${NAME}-${VERSION}.tar.gz
|
||||
|
||||
wget https://www.clamav.net/downloads/production/${TARBALL}
|
||||
wget https://www.clamav.net/downloads/production/${TARBALL}.sig
|
||||
gpg --verify ${TARBALL}.sig ${TARBALL}
|
||||
zcat ${TARBALL} | tar --delete -f - '*/libclamunrar/*' | xz -c > ${TARBALL_CLEAN}
|
||||
|
||||
# WIP
|
||||
wget http://database.clamav.net/main.cvd
|
||||
wget http://database.clamav.net/daily.cvd
|
||||
wget http://database.clamav.net/bytecode.cvd
|
||||
|
||||
main_ver=$(file main.cvd | sed -e 's/.*version /main-/;s/,.*/.cvd/')
|
||||
daily_ver=$(file daily.cvd | sed -e 's/.*version /daily-/;s/,.*/.cvd/')
|
||||
bytecode_ver=$(file bytecode.cvd | sed -e 's/.*version /bytecode-/;s/,.*/.cvd/')
|
||||
|
||||
cp main.cvd $main_ver
|
||||
cp daily.cvd $daily_ver
|
||||
cp bytecode.cvd $bytecode_ver
|
||||
|
||||
sed -i "s|^Source10: .*|Source10: $main_ver|" clamav.spec
|
||||
sed -i "s|^Source11: .*|Source11: $daily_ver|" clamav.spec
|
||||
sed -i "s|^Source12: .*|Source12: $bytecode_ver|" clamav.spec
|
||||
|
||||
fedpkg new-sources ${TARBALL_CLEAN} $main_ver $daily_ver $bytecode_ver
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
diff -up clamav-0.104.3/clamconf/clamconf.c.default_confs clamav-0.104.3/clamconf/clamconf.c
|
||||
--- clamav-0.104.3/clamconf/clamconf.c.default_confs 2022-05-02 00:24:50.000000000 -0600
|
||||
+++ clamav-0.104.3/clamconf/clamconf.c 2022-05-12 22:04:42.883348923 -0600
|
||||
diff -up clamav-0.103.0/clamconf/clamconf.c.default_confs clamav-0.103.0/clamconf/clamconf.c
|
||||
--- clamav-0.103.0/clamconf/clamconf.c.default_confs 2020-09-12 18:27:09.000000000 -0600
|
||||
+++ clamav-0.103.0/clamconf/clamconf.c 2020-09-17 22:00:20.792879792 -0600
|
||||
@@ -63,9 +63,9 @@ static struct _cfgfile {
|
||||
const char *name;
|
||||
int tool;
|
||||
|
|
@ -13,66 +13,66 @@ diff -up clamav-0.104.3/clamconf/clamconf.c.default_confs clamav-0.104.3/clamcon
|
|||
{NULL, 0}};
|
||||
|
||||
static void printopts(struct optstruct *opts, int nondef)
|
||||
diff -up clamav-0.104.3/docs/man/clamav-milter.8.in.default_confs clamav-0.104.3/docs/man/clamav-milter.8.in
|
||||
--- clamav-0.104.3/docs/man/clamav-milter.8.in.default_confs 2022-05-12 22:04:42.885348940 -0600
|
||||
+++ clamav-0.104.3/docs/man/clamav-milter.8.in 2022-05-12 22:05:25.031719791 -0600
|
||||
diff -up clamav-0.103.0/docs/man/clamav-milter.8.in.default_confs clamav-0.103.0/docs/man/clamav-milter.8.in
|
||||
--- clamav-0.103.0/docs/man/clamav-milter.8.in.default_confs 2020-09-12 18:27:09.000000000 -0600
|
||||
+++ clamav-0.103.0/docs/man/clamav-milter.8.in 2020-09-17 22:00:20.793879800 -0600
|
||||
@@ -27,7 +27,7 @@ Print the version number and exit.
|
||||
Read configuration from FILE.
|
||||
.SH "FILES"
|
||||
.LP
|
||||
-@CONFDIR@/clamav-milter.conf
|
||||
+@CONFDIR@/mail/clamav-milter.conf
|
||||
.LP
|
||||
-@CFGDIR@/clamav-milter.conf
|
||||
+@CFGDIR@/mail/clamav-milter.conf
|
||||
.SH "AUTHOR"
|
||||
.LP
|
||||
.LP
|
||||
aCaB <acab@clamav.net>
|
||||
diff -up clamav-0.104.3/docs/man/clamav-milter.conf.5.in.default_confs clamav-0.104.3/docs/man/clamav-milter.conf.5.in
|
||||
--- clamav-0.104.3/docs/man/clamav-milter.conf.5.in.default_confs 2022-05-12 22:04:42.887348958 -0600
|
||||
+++ clamav-0.104.3/docs/man/clamav-milter.conf.5.in 2022-05-12 22:05:48.834929418 -0600
|
||||
diff -up clamav-0.103.0/docs/man/clamav-milter.conf.5.in.default_confs clamav-0.103.0/docs/man/clamav-milter.conf.5.in
|
||||
--- clamav-0.103.0/docs/man/clamav-milter.conf.5.in.default_confs 2020-09-12 18:27:09.000000000 -0600
|
||||
+++ clamav-0.103.0/docs/man/clamav-milter.conf.5.in 2020-09-17 22:00:20.794879808 -0600
|
||||
@@ -239,7 +239,7 @@ Default: no
|
||||
All options expressing a size are limited to max 4GB. Values in excess will be reset to the maximum.
|
||||
.SH "FILES"
|
||||
.LP
|
||||
-@CONFDIR@/clamav-milter.conf
|
||||
+@CONFDIR@/mail/clamav-milter.conf
|
||||
.LP
|
||||
-@CFGDIR@/clamav-milter.conf
|
||||
+@CFGDIR@/mail/clamav-milter.conf
|
||||
.SH "AUTHOR"
|
||||
.LP
|
||||
.LP
|
||||
aCaB <acab@clamav.net>
|
||||
diff -up clamav-0.104.3/docs/man/clamd.8.in.default_confs clamav-0.104.3/docs/man/clamd.8.in
|
||||
--- clamav-0.104.3/docs/man/clamd.8.in.default_confs 2022-05-12 22:04:42.888348967 -0600
|
||||
+++ clamav-0.104.3/docs/man/clamd.8.in 2022-05-12 22:07:01.657570942 -0600
|
||||
diff -up clamav-0.103.0/docs/man/clamd.8.in.default_confs clamav-0.103.0/docs/man/clamd.8.in
|
||||
--- clamav-0.103.0/docs/man/clamd.8.in.default_confs 2020-09-12 18:27:09.000000000 -0600
|
||||
+++ clamav-0.103.0/docs/man/clamd.8.in 2020-09-17 22:00:20.794879808 -0600
|
||||
@@ -7,7 +7,7 @@ clamd \- an anti\-virus daemon
|
||||
clamd [options]
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
-The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from @CONFDIR@/clamd.conf
|
||||
+The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from @CONFDIR@/clamd.d/scan.conf
|
||||
.LP
|
||||
-The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from @CFGDIR@/clamd.conf
|
||||
+The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from @CFGDIR@/clamd.d/scan.conf
|
||||
.SH "COMMANDS"
|
||||
.LP
|
||||
.LP
|
||||
It's recommended to prefix clamd commands with the letter \fBz\fR (eg. zSCAN) to indicate that the command will be delimited by a NULL character and that clamd should continue reading command data until a NULL character is read. The null delimiter assures that the complete command and its entire argument will be processed as a single command. Alternatively commands may be prefixed with the letter \fBn\fR (e.g. nSCAN) to use a newline character as the delimiter. Clamd replies will honour the requested terminator in turn.
|
||||
@@ -133,7 +133,7 @@ Reload the signature databases.
|
||||
@@ -125,7 +125,7 @@ Reload the signature databases.
|
||||
Perform a clean exit.
|
||||
.SH "FILES"
|
||||
.LP
|
||||
-@CONFDIR@/clamd.conf
|
||||
+@CONFDIR@/clamd.d/scan.conf
|
||||
.LP
|
||||
-@CFGDIR@/clamd.conf
|
||||
+@CFGDIR@/clamd.d/scan.conf
|
||||
.SH "CREDITS"
|
||||
Please check the full documentation for credits.
|
||||
.SH "AUTHOR"
|
||||
diff -up clamav-0.104.3/docs/man/clamd.conf.5.in.default_confs clamav-0.104.3/docs/man/clamd.conf.5.in
|
||||
--- clamav-0.104.3/docs/man/clamd.conf.5.in.default_confs 2022-05-12 22:04:42.889348976 -0600
|
||||
+++ clamav-0.104.3/docs/man/clamd.conf.5.in 2022-05-12 22:06:21.800219822 -0600
|
||||
@@ -765,7 +765,7 @@ Default: no
|
||||
diff -up clamav-0.103.0/docs/man/clamd.conf.5.in.default_confs clamav-0.103.0/docs/man/clamd.conf.5.in
|
||||
--- clamav-0.103.0/docs/man/clamd.conf.5.in.default_confs 2020-09-17 22:00:20.795879816 -0600
|
||||
+++ clamav-0.103.0/docs/man/clamd.conf.5.in 2020-09-17 22:01:21.414353121 -0600
|
||||
@@ -759,7 +759,7 @@ Default: no
|
||||
All options expressing a size are limited to max 4GB. Values in excess will be reset to the maximum.
|
||||
.SH "FILES"
|
||||
.LP
|
||||
-@CONFDIR@/clamd.conf
|
||||
+@CONFDIR@/clamd.d/scan.conf
|
||||
-@CFGDIR@/clamd.conf
|
||||
+@CFGDIR@/clamd.d/scan.conf
|
||||
.SH "AUTHORS"
|
||||
.LP
|
||||
Tomasz Kojm <tkojm@clamav.net>, Kevin Lin <klin@sourcefire.com>
|
||||
diff -up clamav-0.104.3/platform.h.in.default_confs clamav-0.104.3/platform.h.in
|
||||
--- clamav-0.104.3/platform.h.in.default_confs 2022-05-02 00:24:50.000000000 -0600
|
||||
+++ clamav-0.104.3/platform.h.in 2022-05-12 22:04:42.891348993 -0600
|
||||
diff -up clamav-0.103.0/platform.h.in.default_confs clamav-0.103.0/platform.h.in
|
||||
--- clamav-0.103.0/platform.h.in.default_confs 2020-09-17 22:00:20.796879824 -0600
|
||||
+++ clamav-0.103.0/platform.h.in 2020-09-17 22:01:56.842629739 -0600
|
||||
@@ -112,9 +112,9 @@ typedef unsigned int in_addr_t;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
diff -up clamav-0.104.3/freshclam/clamav-freshclam.service.in.freshclam-service clamav-0.104.3/freshclam/clamav-freshclam.service.in
|
||||
--- clamav-0.104.3/freshclam/clamav-freshclam.service.in.freshclam-service 2022-05-12 22:07:25.472780737 -0600
|
||||
+++ clamav-0.104.3/freshclam/clamav-freshclam.service.in 2022-05-12 22:08:06.280140224 -0600
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=ClamAV virus database updater
|
||||
Documentation=man:freshclam(1) man:freshclam.conf(5) https://docs.clamav.net/
|
||||
# If user wants it run from cron, don't start the daemon.
|
||||
-ConditionPathExists=!/etc/cron.d/clamav-freshclam
|
||||
+# ConditionPathExists=!/etc/cron.d/clamav-freshclam
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
--- ./freshclam/clamav-freshclam.service.in.orig 2021-02-01 20:49:25.000000000 +0000
|
||||
+++ ./freshclam/clamav-freshclam.service.in 2021-03-07 22:59:34.476455890 +0000
|
||||
@@ -8,7 +8,6 @@ After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@prefix@/bin/freshclam -d --foreground=true
|
||||
-StandardOutput=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
diff -Naur clamav-1.4.3-original/libclamav_rust/Cargo.toml clamav-1.4.3/libclamav_rust/Cargo.toml
|
||||
--- clamav-1.4.3-original/libclamav_rust/Cargo.toml 2025-12-04 10:01:33.233889863 +0000
|
||||
+++ clamav-1.4.3/libclamav_rust/Cargo.toml 2025-12-04 10:02:29.088468217 +0000
|
||||
@@ -12,7 +12,7 @@
|
||||
sha2 = "0.10"
|
||||
tempfile = "3"
|
||||
thiserror = "1"
|
||||
-image = "0.24"
|
||||
+image = ">=0.24, <0.26"
|
||||
rustdct = "0.7"
|
||||
transpose = "0.2"
|
||||
num-traits = "0.2"
|
||||
@@ -21,7 +21,7 @@
|
||||
unicode-segmentation = "1.10"
|
||||
bindgen = "0.69"
|
||||
onenote_parser = "0.3.1"
|
||||
-hex-literal = "0.4"
|
||||
+hex-literal = ">=0.4, <2.0"
|
||||
inflate = "0.4"
|
||||
bzip2-rs = "0.1"
|
||||
byteorder = "1.5"
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
diff -up clamav-1.0.2/cmake/FindRust.cmake.rustflags clamav-1.0.2/cmake/FindRust.cmake
|
||||
--- clamav-1.0.2/cmake/FindRust.cmake.rustflags 2023-08-15 16:24:07.000000000 -0600
|
||||
+++ clamav-1.0.2/cmake/FindRust.cmake 2023-08-17 21:17:03.957070383 -0600
|
||||
@@ -236,7 +236,7 @@ function(add_rust_executable)
|
||||
# Build the executable.
|
||||
add_custom_command(
|
||||
OUTPUT "${OUTPUT}"
|
||||
- COMMAND ${CMAKE_COMMAND} -E env "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" ${cargo_EXECUTABLE} ARGS ${MY_CARGO_ARGS}
|
||||
+ COMMAND ${CMAKE_COMMAND} -E env "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" ${cargo_EXECUTABLE} ${MY_CARGO_ARGS}
|
||||
WORKING_DIRECTORY "${ARGS_SOURCE_DIRECTORY}"
|
||||
DEPENDS ${EXE_SOURCES}
|
||||
COMMENT "Building ${ARGS_TARGET} in ${ARGS_BINARY_DIRECTORY} with:\n\t ${cargo_EXECUTABLE} ${MY_CARGO_ARGS_STRING}")
|
||||
@@ -287,8 +287,8 @@ function(add_rust_library)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(arm64;x86_64|x86_64;arm64)$")
|
||||
add_custom_command(
|
||||
OUTPUT "${OUTPUT}"
|
||||
- COMMAND ${CMAKE_COMMAND} -E env "CARGO_CMD=build" "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" "MAINTAINER_MODE=${MAINTAINER_MODE}" "RUSTFLAGS=\"${RUSTFLAGS}\"" ${cargo_EXECUTABLE} ARGS ${MY_CARGO_ARGS} --target=x86_64-apple-darwin
|
||||
- COMMAND ${CMAKE_COMMAND} -E env "CARGO_CMD=build" "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" "MAINTAINER_MODE=${MAINTAINER_MODE}" "RUSTFLAGS=\"${RUSTFLAGS}\"" ${cargo_EXECUTABLE} ARGS ${MY_CARGO_ARGS} --target=aarch64-apple-darwin
|
||||
+ COMMAND ${CMAKE_COMMAND} -E env "CARGO_CMD=build" "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" "MAINTAINER_MODE=${MAINTAINER_MODE}" "RUSTFLAGS=${RUSTFLAGS}" ${cargo_EXECUTABLE} ARGS ${MY_CARGO_ARGS} --target=x86_64-apple-darwin
|
||||
+ COMMAND ${CMAKE_COMMAND} -E env "CARGO_CMD=build" "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" "MAINTAINER_MODE=${MAINTAINER_MODE}" "RUSTFLAGS=${RUSTFLAGS}" ${cargo_EXECUTABLE} ARGS ${MY_CARGO_ARGS} --target=aarch64-apple-darwin
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${ARGS_BINARY_DIRECTORY}/${RUST_COMPILER_TARGET}/${CARGO_BUILD_TYPE}"
|
||||
COMMAND lipo ARGS -create ${ARGS_BINARY_DIRECTORY}/x86_64-apple-darwin/${CARGO_BUILD_TYPE}/lib${ARGS_TARGET}.a ${ARGS_BINARY_DIRECTORY}/aarch64-apple-darwin/${CARGO_BUILD_TYPE}/lib${ARGS_TARGET}.a -output "${OUTPUT}"
|
||||
WORKING_DIRECTORY "${ARGS_SOURCE_DIRECTORY}"
|
||||
@@ -312,7 +312,7 @@ function(add_rust_library)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT "${OUTPUT}"
|
||||
- COMMAND ${CMAKE_COMMAND} -E env "CARGO_CMD=build" "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" "MAINTAINER_MODE=${MAINTAINER_MODE}" "RUSTFLAGS=\"${RUSTFLAGS}\"" ${cargo_EXECUTABLE} ARGS ${MY_CARGO_ARGS}
|
||||
+ COMMAND ${CMAKE_COMMAND} -E env "CARGO_CMD=build" "CARGO_TARGET_DIR=${ARGS_BINARY_DIRECTORY}" "MAINTAINER_MODE=${MAINTAINER_MODE}" "RUSTFLAGS=${RUSTFLAGS}" ${cargo_EXECUTABLE} ${MY_CARGO_ARGS}
|
||||
WORKING_DIRECTORY "${ARGS_SOURCE_DIRECTORY}"
|
||||
DEPENDS ${LIB_SOURCES}
|
||||
COMMENT "Building ${ARGS_TARGET} in ${ARGS_BINARY_DIRECTORY} with: ${cargo_EXECUTABLE} ${MY_CARGO_ARGS_STRING}")
|
||||
@@ -465,8 +465,6 @@ if(NOT "${RUST_COMPILER_TARGET}" MATCHES
|
||||
list(APPEND CARGO_ARGS "--target" ${RUST_COMPILER_TARGET})
|
||||
endif()
|
||||
|
||||
-set(RUSTFLAGS "")
|
||||
-
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CARGO_BUILD_TYPE "debug")
|
||||
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
|
||||
@@ -475,10 +473,11 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "Rel
|
||||
elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||
set(CARGO_BUILD_TYPE "release")
|
||||
list(APPEND CARGO_ARGS "--release")
|
||||
- set(RUSTFLAGS "-g")
|
||||
+ string(APPEND RUSTFLAGS " -g")
|
||||
else()
|
||||
set(CARGO_BUILD_TYPE "debug")
|
||||
endif()
|
||||
+string(STRIP "${RUSTFLAGS}" RUSTFLAGS)
|
||||
|
||||
find_package_handle_standard_args(Rust
|
||||
REQUIRED_VARS cargo_EXECUTABLE
|
||||
17
clamav-stats-deprecation.patch
Normal file
17
clamav-stats-deprecation.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff -up clamav-0.102.0/shared/optparser.c.stats-deprecation clamav-0.102.0/shared/optparser.c
|
||||
--- clamav-0.102.0/shared/optparser.c.stats-deprecation 2019-10-10 21:55:31.245995091 -0600
|
||||
+++ clamav-0.102.0/shared/optparser.c 2019-10-11 20:40:04.580067432 -0600
|
||||
@@ -524,6 +524,13 @@ const struct clam_option __clam_options[
|
||||
{"ArchiveLimitMemoryUsage", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
|
||||
{"MailFollowURLs", "mail-follow-urls", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", ""},
|
||||
{"AllowSupplementaryGroups", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER | OPT_DEPRECATED, "Initialize a supplementary group access (the process must be started by root).", "no"},
|
||||
+ {"StatsHostID", "stats-host-id", 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", "" },
|
||||
+ {"StatsEnabled", "enable-stats", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_CLAMSCAN | OPT_DEPRECATED, "", ""},
|
||||
+ {"StatsPEDisabled", "disable-pe-stats", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", ""},
|
||||
+ {"StatsTimeout", "stats-timeout", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_FRESHCLAM | OPT_DEPRECATED, "", ""},
|
||||
+ {"SubmitDetectionStats", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", ""},
|
||||
+ {"DetectionStatsCountry", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", ""},
|
||||
+ {"DetectionStatsHostID", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", ""},
|
||||
{"ScanOnAccess", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", ""},
|
||||
|
||||
/* Milter specific options */
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#ifndef CLAMAV_TYPES_H_MULTILIB
|
||||
#define CLAMAV_TYPES_H_MULTILIB
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
# include "clamav-types-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
# include "clamav-types-64.h"
|
||||
#else
|
||||
# error "unexpected value for __WORDSIZE macro"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
869
clamav.spec
869
clamav.spec
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,3 @@
|
|||
Update 2021: Log to syslog is obsolete, journalctl superseded it
|
||||
|
||||
By default, clamd provides a general "scan" service that requires minimal
|
||||
configuration. To configure, edit /etc/clamd/scan.conf and:
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
missingok
|
||||
|
||||
postrotate
|
||||
pkill -u <USER> -HUP -f "/usr/sbin/clamd -c /etc/clamd.d/<SERVICE>.conf" >/dev/null 2>&1 || :
|
||||
pkill -u <USER> -HUP -f '/usr/sbin/clamd -c /etc/clamd.d/<SERVICE>.conf >/dev/null 2>&1 || :
|
||||
endscript
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,73 +0,0 @@
|
|||
diff -up clamav-1.4.0/libclamav/pe.c.big-endian clamav-1.4.0/libclamav/pe.c
|
||||
--- clamav-1.4.0/libclamav/pe.c.big-endian 2024-08-13 14:24:46.000000000 -0600
|
||||
+++ clamav-1.4.0/libclamav/pe.c 2024-08-15 20:16:02.017730419 -0600
|
||||
@@ -2424,22 +2424,22 @@ static cl_error_t hash_imptbl(cli_ctx *c
|
||||
|
||||
/* If the PE doesn't have an import table then skip it. This is an
|
||||
* uncommon case but can happen. */
|
||||
- if (peinfo->dirs[1].VirtualAddress == 0 || peinfo->dirs[1].Size == 0) {
|
||||
+ if (EC32(peinfo->dirs[1].VirtualAddress) == 0 || EC32(peinfo->dirs[1].Size) == 0) {
|
||||
cli_dbgmsg("scan_pe: import table data dir does not exist (skipping .imp scanning)\n");
|
||||
status = CL_BREAK;
|
||||
goto done;
|
||||
}
|
||||
|
||||
// TODO Add EC32 wrappers
|
||||
- impoff = cli_rawaddr(peinfo->dirs[1].VirtualAddress, peinfo->sections, peinfo->nsections, &err, fsize, peinfo->hdr_size);
|
||||
- if (err || impoff + peinfo->dirs[1].Size > fsize) {
|
||||
+ impoff = cli_rawaddr(EC32(peinfo->dirs[1].VirtualAddress), peinfo->sections, peinfo->nsections, &err, fsize, peinfo->hdr_size);
|
||||
+ if (err || impoff + EC32(peinfo->dirs[1].Size) > fsize) {
|
||||
cli_dbgmsg("scan_pe: invalid rva for import table data\n");
|
||||
status = CL_BREAK;
|
||||
goto done;
|
||||
}
|
||||
|
||||
// TODO Add EC32 wrapper
|
||||
- impdes = (const struct pe_image_import_descriptor *)fmap_need_off(map, impoff, peinfo->dirs[1].Size);
|
||||
+ impdes = (const struct pe_image_import_descriptor *)fmap_need_off(map, impoff, EC32(peinfo->dirs[1].Size));
|
||||
if (impdes == NULL) {
|
||||
cli_dbgmsg("scan_pe: failed to acquire fmap buffer\n");
|
||||
status = CL_EREAD;
|
||||
@@ -2449,7 +2449,7 @@ static cl_error_t hash_imptbl(cli_ctx *c
|
||||
|
||||
/* Safety: We can trust peinfo->dirs[1].Size only because `fmap_need_off()` (above)
|
||||
* would have failed if the size exceeds the end of the fmap. */
|
||||
- left = peinfo->dirs[1].Size;
|
||||
+ left = EC32(peinfo->dirs[1].Size);
|
||||
|
||||
if (genhash[CLI_HASH_MD5]) {
|
||||
hashctx[CLI_HASH_MD5] = cl_hash_init("md5");
|
||||
@@ -2556,7 +2556,7 @@ static cl_error_t hash_imptbl(cli_ctx *c
|
||||
|
||||
done:
|
||||
if (needed_impoff) {
|
||||
- fmap_unneed_off(map, impoff, peinfo->dirs[1].Size);
|
||||
+ fmap_unneed_off(map, impoff, EC32(peinfo->dirs[1].Size));
|
||||
}
|
||||
|
||||
for (type = CLI_HASH_MD5; type < CLI_HASH_AVAIL_TYPES; type++) {
|
||||
@@ -3241,7 +3241,7 @@ int cli_scanpe(cli_ctx *ctx)
|
||||
|
||||
/* Trojan.Swizzor.Gen */
|
||||
if (SCAN_HEURISTICS && (DCONF & PE_CONF_SWIZZOR) && peinfo->nsections > 1 && fsize > 64 * 1024 && fsize < 4 * 1024 * 1024) {
|
||||
- if (peinfo->dirs[2].Size) {
|
||||
+ if (EC32(peinfo->dirs[2].Size)) {
|
||||
struct swizz_stats *stats = calloc(1, sizeof(*stats));
|
||||
unsigned int m = 1000;
|
||||
ret = CL_CLEAN;
|
||||
@@ -5250,13 +5250,13 @@ cl_error_t cli_peheader(fmap_t *map, str
|
||||
cli_dbgmsg("EntryPoint offset: 0x%x (%d)\n", peinfo->ep, peinfo->ep);
|
||||
}
|
||||
|
||||
- if (is_dll || peinfo->ndatadirs < 3 || !peinfo->dirs[2].Size)
|
||||
+ if (is_dll || peinfo->ndatadirs < 3 || !EC32(peinfo->dirs[2].Size))
|
||||
peinfo->res_addr = 0;
|
||||
else
|
||||
peinfo->res_addr = peinfo->dirs[2].VirtualAddress;
|
||||
|
||||
while (opts & CLI_PEHEADER_OPT_EXTRACT_VINFO &&
|
||||
- peinfo->ndatadirs >= 3 && peinfo->dirs[2].Size) {
|
||||
+ peinfo->ndatadirs >= 3 && EC32(peinfo->dirs[2].Size)) {
|
||||
struct vinfo_list vlist;
|
||||
const uint8_t *vptr, *baseptr;
|
||||
uint32_t rva, res_sz;
|
||||
8
sources
8
sources
|
|
@ -1,4 +1,4 @@
|
|||
SHA512 (clamav-1.4.3-norar.tar.xz) = d9e6835b88e4934a36b037d28cf01e627b7843e52ef9fc6858f59000acf26120f3534e7a6b262d3ad66a2668557f3a1d0a93fb676711c91f64c8b97fa36fe191
|
||||
SHA512 (main-62.cvd) = b52e5d9ecacbd9b11c3b0cc460388746fccb353a7520522ed15ee25f645a432bed5be7e6b38512f134f085eb9be76a1e26c19de8b09491d4ec46da8c5afc318e
|
||||
SHA512 (daily-27673.cvd) = e0447f80ef2cc8981b0e1ea430a7006a1027de0b989f5a3256766804f74a50aac52f577ef929c8e1789b9353d1a4cf18d289a27b1f7e609098e11ad81bb62226
|
||||
SHA512 (bytecode-336.cvd) = 62a7f8b62da2a2476d3f66851d71e84f055f84543112b18f14e86484b02370d4daff0cb3e2b9ec77acf4a179327619a8b9950122e7882003074a9a0bf4a7ebab
|
||||
SHA512 (clamav-0.103.2-norar.tar.xz) = 3a2d67eadfe49adee0b7dbea63e22b220db8841ebf5293af3d7debd829ffe0988fbff73e797c1d71d52e1a9447a1eac1d6aaff540a5dd56cd04874d0730ea92f
|
||||
SHA512 (main-59.cvd) = c01792bdb9e07889af04ead91ba49f440cd4510b81b1c83bdfb10c65f099cf29416699f5485cc13b07c4d24195c81abc0b1c4439f5ba6d5d391b7406ba9fe26c
|
||||
SHA512 (daily-26133.cvd) = d22185a19c6c4d5b0315b57572035fd38c3562ecba7ff811854f29bf508c0f10e60a6df6fb7049a302359b5a469b7d7274cffd1b44b3cbb5246a8ec6ed8ddcfb
|
||||
SHA512 (bytecode-333.cvd) = 895c41266b9bc332f3a00c9267907251ad32abe3a5bff7584285e087430fe0dd7343e4ac0245308f3734d971d6ecb5656fd9ce6caf0fa24f9da7a41a96bc4d07
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
VERSION=1.4.3
|
||||
REPOS="n"
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
stage=0
|
||||
else
|
||||
stage=$1
|
||||
fi
|
||||
|
||||
NAME=clamav
|
||||
TARBALL_CLEAN=${NAME}-${VERSION}-norar.tar.xz
|
||||
TARBALL=${NAME}-${VERSION}.tar.gz
|
||||
|
||||
echo "Usage: $0 stage"
|
||||
echo "stage 0: prepare sources"
|
||||
echo "stage 1: get cvd using cvdupdate https://pypi.org/project/cvdupdate/"
|
||||
echo "stage 2: ask for scratch build and upload sources"
|
||||
echo "stage 3: push and build on rawhide"
|
||||
echo "stage 4: build on others branches"
|
||||
echo ""
|
||||
|
||||
if test $stage -le 0
|
||||
then
|
||||
echo STAGE 0
|
||||
echo Press enter to prepare sources and bump version or n to skip ; read dummy;
|
||||
if [[ "$dummy" != "n" ]]; then
|
||||
wget -c https://www.clamav.net/downloads/production/${TARBALL}
|
||||
wget -c https://www.clamav.net/downloads/production/${TARBALL}.sig
|
||||
gpg --verify ${TARBALL}.sig ${TARBALL}
|
||||
zcat ${TARBALL} | tar --delete -f - '*/libclamunrar/*' | xz -c > ${TARBALL_CLEAN}
|
||||
git checkout rawhide
|
||||
git pull
|
||||
rpmdev-bumpspec -n $VERSION -c "Update to $VERSION" clamav.spec
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $stage -le 1
|
||||
then
|
||||
echo STAGE 1
|
||||
echo Press enter convert cvd into spec or n to skip ; read dummy;
|
||||
if [[ "$dummy" != "n" ]]; then
|
||||
./update_clamav_data.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $stage -le 2
|
||||
then
|
||||
echo STAGE 2
|
||||
echo Press enter scratch-build or n to skip ; read dummy;
|
||||
if [[ "$dummy" != "n" ]]; then
|
||||
#fkinit -u sergiomb
|
||||
fedpkg scratch-build --srpm
|
||||
fi
|
||||
echo Press enter to upload sources and commit or n to skip; read dummy;
|
||||
if [[ "$dummy" != "n" ]]; then
|
||||
echo fedpkg new-sources ${TARBALL_CLEAN} $main_ver $daily_ver $bytecode_ver
|
||||
fedpkg new-sources ${TARBALL_CLEAN} $(spectool -l clamav.spec | grep -P "Source10|Source11|Source12" | sed 's/.* //')
|
||||
fedpkg ci -c && git show
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $stage -le 3
|
||||
then
|
||||
echo STAGE 3
|
||||
echo Press enter to build rawhide or n to skip; read dummy;
|
||||
if [[ "$dummy" != "n" ]]; then
|
||||
git push && fedpkg build --nowait
|
||||
fi
|
||||
fi
|
||||
|
||||
echo STAGE 4
|
||||
for repo in $REPOS ; do
|
||||
echo Press enter to build on branch $repo or n to skip; read dummy;
|
||||
if [[ "$dummy" != "n" ]]; then
|
||||
git checkout $repo && git merge rawhide && fedpkg push && fedpkg build --nowait; git checkout rawhide
|
||||
fi
|
||||
done
|
||||
|
||||
exit
|
||||
# not finished yet
|
||||
/usr/bin/bodhi updates new --autokarma --autotime --type bugfix --severity medium --notes "https://blog.clamav.net/2021/06/clamav-01033-patch-release.html" --bugs 1974601 --request testing clamav-0.103.3-1.fc34
|
||||
/usr/bin/bodhi updates new --autokarma --autotime --type bugfix --severity medium --notes "https://blog.clamav.net/2021/06/clamav-01033-patch-release.html" --bugs 1974601 --request testing clamav-0.103.3-1.fc33
|
||||
/usr/bin/bodhi updates new --autokarma --autotime --type bugfix --severity medium --notes "https://blog.clamav.net/2021/06/clamav-01033-patch-release.html" --bugs 1974601 --request testing clamav-0.103.3-1.el8
|
||||
|
||||
sha512sum --tag ${TARBALL_CLEAN} $main_ver $daily_ver $bytecode_ver > sources
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# dnf install python3-cvdupdate
|
||||
# python -m cvdupdate.cvdupdate --help
|
||||
cvd config set --dbdir my_dbs
|
||||
cvdupdate list
|
||||
cvdupdate update
|
||||
pushd my_dbs
|
||||
main_ver=$(file main.cvd | sed -e 's/.*version /main-/;s/,.*/.cvd/')
|
||||
daily_ver=$(file daily.cvd | sed -e 's/.*version /daily-/;s/,.*/.cvd/')
|
||||
bytecode_ver=$(file bytecode.cvd | sed -e 's/.*version /bytecode-/;s/,.*/.cvd/')
|
||||
popd
|
||||
|
||||
pushd my_dbs
|
||||
cp -f main.cvd ../$main_ver
|
||||
cp -f daily.cvd ../$daily_ver
|
||||
cp -f bytecode.cvd ../$bytecode_ver
|
||||
popd
|
||||
|
||||
sed -i "s|^Source10: .*|Source10: $main_ver|" clamav.spec
|
||||
sed -i "s|^Source11: .*|Source11: $daily_ver|" clamav.spec
|
||||
sed -i "s|^Source12: .*|Source12: $bytecode_ver|" clamav.spec
|
||||
Loading…
Add table
Add a link
Reference in a new issue