Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] WIP: clamav: update to 1.0.0.
@ 2022-12-19 18:17 jcgruenhage
  2022-12-19 18:18 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (41 more replies)
  0 siblings, 42 replies; 43+ messages in thread
From: jcgruenhage @ 2022-12-19 18:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

There is a new pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [ ] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [ ] add services for at least clamav and freshclam

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 4904 bytes --]

From 962e5f060d8197a61a95c21ff02e6435a58af020 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.0.0.

---
 common/shlibs           |  6 ++--
 srcpkgs/clamav/template | 78 ++++++++++++++++++++++-------------------
 2 files changed, 44 insertions(+), 40 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index ba5c89ee3bad..90074be85e8a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2267,9 +2267,9 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
+libclamav.so.11 clamav-1.0.0_1
+libclamunrar.so.11 clamav-1.0.0_1
+libclamunrar_iface.so.11 clamav-1.0.0_1
 libfreshclam.so.2 clamav-0.103.1_2
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 6fbc98e326cf..01aed666a48f 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,25 +1,33 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.4
-revision=3
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.0.0
+revision=1
+build_style=cmake
+cmake_args="-DAPP_CONFIG_DIRECTORY=/etc/clamav
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=ON"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cmake ninja cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=def0ad15500fa6aff81d8e68b9f83aa75ee5b607a01335c1d26dbcc959932f85
+checksum=bda39bb856902e6dd6077ea313a3eb8beccd487e0082a95917877f2b299cd86e
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
@@ -34,31 +42,27 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	LDFLAGS="-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
+#do_configure() {
+#	# Disable detection of sys/cdefs.h (it's obsolete)
+#	sed -i configure -e 's; sys/cdefs\.h$;;'
+#	sed -i configure -e 's;3\.7;3.9;'
+#	# Enable IPv6 for cross builds
+#	if [ "$CROSS_BUILD" ]; then
+#		configure_args+=" have_cv_ipv6=yes"
+#	fi
+#	# Need to set PCRE_HOME to make --with-pcre=/usr work
+#	PCRE_HOME=/usr ./configure ${configure_args}
+#}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	mkdir ${PKGDESTDIR}/etc
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/usr/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s;^Example$;# Example;" \
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	done
 }
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.0.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
@ 2022-12-19 18:18 ` jcgruenhage
  2022-12-19 20:04 ` jcgruenhage
                   ` (40 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2022-12-19 18:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [ ] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [ ] add services for at least clamav and freshclam

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 4530 bytes --]

From 6a4bc95f785b058946149f3f372358608742bcf6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.0.0.

---
 common/shlibs           |  6 ++--
 srcpkgs/clamav/template | 67 ++++++++++++++++++-----------------------
 2 files changed, 33 insertions(+), 40 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index ba5c89ee3bad..90074be85e8a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2267,9 +2267,9 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
+libclamav.so.11 clamav-1.0.0_1
+libclamunrar.so.11 clamav-1.0.0_1
+libclamunrar_iface.so.11 clamav-1.0.0_1
 libfreshclam.so.2 clamav-0.103.1_2
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 6fbc98e326cf..90b60798e6de 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,25 +1,33 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.4
-revision=3
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.0.0
+revision=1
+build_style=cmake
+cmake_args="-DAPP_CONFIG_DIRECTORY=/etc/clamav
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=ON"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cmake ninja cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=def0ad15500fa6aff81d8e68b9f83aa75ee5b607a01335c1d26dbcc959932f85
+checksum=bda39bb856902e6dd6077ea313a3eb8beccd487e0082a95917877f2b299cd86e
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
@@ -34,31 +42,16 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	LDFLAGS="-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	mkdir ${PKGDESTDIR}/etc
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/usr/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s;^Example$;# Example;" \
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	done
 }
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.0.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
  2022-12-19 18:18 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-12-19 20:04 ` jcgruenhage
  2022-12-19 20:07 ` jcgruenhage
                   ` (39 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2022-12-19 20:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [x] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [ ] add services for at least clamav and freshclam

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 6368 bytes --]

From 2479c2f6f159bc1b6ae857099436247a8f4bde6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.0.0.

---
 common/shlibs                          |  6 +--
 srcpkgs/clamav/files/clamd/log/run     |  1 +
 srcpkgs/clamav/files/clamd/run         |  2 +
 srcpkgs/clamav/files/freshclam/log/run |  1 +
 srcpkgs/clamav/files/freshclam/run     |  2 +
 srcpkgs/clamav/template                | 73 +++++++++++++-------------
 6 files changed, 46 insertions(+), 39 deletions(-)
 create mode 120000 srcpkgs/clamav/files/clamd/log/run
 create mode 100755 srcpkgs/clamav/files/clamd/run
 create mode 120000 srcpkgs/clamav/files/freshclam/log/run
 create mode 100755 srcpkgs/clamav/files/freshclam/run

diff --git a/common/shlibs b/common/shlibs
index ba5c89ee3bad..90074be85e8a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2267,9 +2267,9 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
+libclamav.so.11 clamav-1.0.0_1
+libclamunrar.so.11 clamav-1.0.0_1
+libclamunrar_iface.so.11 clamav-1.0.0_1
 libfreshclam.so.2 clamav-0.103.1_2
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
diff --git a/srcpkgs/clamav/files/clamd/log/run b/srcpkgs/clamav/files/clamd/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 000000000000..2a7a08f3b80f
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/log/run b/srcpkgs/clamav/files/freshclam/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 000000000000..36331f68e632
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 6fbc98e326cf..1c1757e4e09f 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,29 +1,38 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.4
-revision=3
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.0.0
+revision=1
+build_style=cmake
+configure_args="-DAPP_CONFIG_DIRECTORY=/etc
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=ON"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cmake ninja cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=def0ad15500fa6aff81d8e68b9f83aa75ee5b607a01335c1d26dbcc959932f85
+checksum=bda39bb856902e6dd6077ea313a3eb8beccd487e0082a95917877f2b299cd86e
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
 make_check=ci-skip
+make_dirs="/run/clamav 0755 _clamav _clamav"
 
 CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
@@ -34,31 +43,23 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	LDFLAGS="-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
+	vsv clamd
+	vsv freshclam
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s:^\(Example\)$:# \1:" \
+			-e "s:#DatabaseDirectory.*:DatabaseDirectory /var/lib/_${pkgname}:"
+	done
 	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
+		-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:"
+	sed -i ${PKGDESTDIR}/etc/clamd.conf \
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
+		-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:"
 }
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.0.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
  2022-12-19 18:18 ` [PR PATCH] [Updated] " jcgruenhage
  2022-12-19 20:04 ` jcgruenhage
@ 2022-12-19 20:07 ` jcgruenhage
  2022-12-21 23:29 ` jcgruenhage
                   ` (38 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2022-12-19 20:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [x] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [x] add services for at least clamav and freshclam
 - [ ] fix cross compilation
 - [ ] fix musl

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 6531 bytes --]

From 2321547b33ddc892ca9a040deadd23e07877e93c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.0.0.

---
 common/shlibs                          |  6 +-
 srcpkgs/clamav/files/clamd/log/run     |  1 +
 srcpkgs/clamav/files/clamd/run         |  2 +
 srcpkgs/clamav/files/freshclam/log/run |  1 +
 srcpkgs/clamav/files/freshclam/run     |  2 +
 srcpkgs/clamav/template                | 78 +++++++++++++-------------
 6 files changed, 48 insertions(+), 42 deletions(-)
 create mode 120000 srcpkgs/clamav/files/clamd/log/run
 create mode 100755 srcpkgs/clamav/files/clamd/run
 create mode 120000 srcpkgs/clamav/files/freshclam/log/run
 create mode 100755 srcpkgs/clamav/files/freshclam/run

diff --git a/common/shlibs b/common/shlibs
index ba5c89ee3bad..90074be85e8a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2267,9 +2267,9 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
+libclamav.so.11 clamav-1.0.0_1
+libclamunrar.so.11 clamav-1.0.0_1
+libclamunrar_iface.so.11 clamav-1.0.0_1
 libfreshclam.so.2 clamav-0.103.1_2
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
diff --git a/srcpkgs/clamav/files/clamd/log/run b/srcpkgs/clamav/files/clamd/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 000000000000..2a7a08f3b80f
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/log/run b/srcpkgs/clamav/files/freshclam/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 000000000000..36331f68e632
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 6fbc98e326cf..bd978fe16b4c 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,64 +1,64 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.4
-revision=3
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.0.0
+revision=1
+build_style=cmake
+configure_args="-DAPP_CONFIG_DIRECTORY=/etc
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=ON"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cmake ninja cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel"
 short_desc="Clam Anti-Virus scanner"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=def0ad15500fa6aff81d8e68b9f83aa75ee5b607a01335c1d26dbcc959932f85
+checksum=bda39bb856902e6dd6077ea313a3eb8beccd487e0082a95917877f2b299cd86e
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
-make_check=ci-skip
+make_dirs="/run/clamav 0755 _clamav _clamav"
 
 CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	configure_args+=" -DDISABLE_MPOOL 1"
 fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
 	LDFLAGS="-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
+	vsv clamd
+	vsv freshclam
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s:^\(Example\)$:# \1:" \
+			-e "s:#DatabaseDirectory.*:DatabaseDirectory /var/lib/_${pkgname}:"
+	done
 	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
+		-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:"
+	sed -i ${PKGDESTDIR}/etc/clamd.conf \
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
+		-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:"
 }
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.0.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (2 preceding siblings ...)
  2022-12-19 20:07 ` jcgruenhage
@ 2022-12-21 23:29 ` jcgruenhage
  2023-04-01  1:52 ` github-actions
                   ` (37 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2022-12-21 23:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [x] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [x] add services for at least clamav and freshclam
 - [ ] fix cross compilation
 - [ ] fix musl

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 6601 bytes --]

From 5992f079293ab2c0f05c1f84ac89ba40196ac428 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.0.0.

---
 common/shlibs                          |  6 +-
 srcpkgs/clamav/files/clamd/log/run     |  1 +
 srcpkgs/clamav/files/clamd/run         |  4 ++
 srcpkgs/clamav/files/freshclam/log/run |  1 +
 srcpkgs/clamav/files/freshclam/run     |  4 ++
 srcpkgs/clamav/template                | 77 +++++++++++++-------------
 6 files changed, 51 insertions(+), 42 deletions(-)
 create mode 120000 srcpkgs/clamav/files/clamd/log/run
 create mode 100755 srcpkgs/clamav/files/clamd/run
 create mode 120000 srcpkgs/clamav/files/freshclam/log/run
 create mode 100755 srcpkgs/clamav/files/freshclam/run

diff --git a/common/shlibs b/common/shlibs
index ba5c89ee3bad..90074be85e8a 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2267,9 +2267,9 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
+libclamav.so.11 clamav-1.0.0_1
+libclamunrar.so.11 clamav-1.0.0_1
+libclamunrar_iface.so.11 clamav-1.0.0_1
 libfreshclam.so.2 clamav-0.103.1_2
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
diff --git a/srcpkgs/clamav/files/clamd/log/run b/srcpkgs/clamav/files/clamd/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 000000000000..ae2b1f0f5da6
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/log/run b/srcpkgs/clamav/files/freshclam/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 000000000000..d42df2fb5db7
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 6fbc98e326cf..43baa0e59d11 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,64 +1,63 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.4
-revision=3
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.0.0
+revision=1
+build_style=cmake
+configure_args="-DAPP_CONFIG_DIRECTORY=/etc
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=ON"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cmake ninja cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel"
 short_desc="Clam Anti-Virus scanner"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=def0ad15500fa6aff81d8e68b9f83aa75ee5b607a01335c1d26dbcc959932f85
+checksum=bda39bb856902e6dd6077ea313a3eb8beccd487e0082a95917877f2b299cd86e
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
-make_check=ci-skip
 
 CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	configure_args+=" -DDISABLE_MPOOL=1"
 fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
 	LDFLAGS="-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
+	vsv clamd
+	vsv freshclam
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s:^\(Example\)$:# \1:" \
+			-e "s:#DatabaseDirectory.*:DatabaseDirectory /var/lib/_${pkgname}:"
+	done
 	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
+		-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:"
+	sed -i ${PKGDESTDIR}/etc/clamd.conf \
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
+		-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:"
 }
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.0.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (3 preceding siblings ...)
  2022-12-21 23:29 ` jcgruenhage
@ 2023-04-01  1:52 ` github-actions
  2023-04-02  9:37 ` [PR PATCH] [Updated] WIP: clamav: update to 1.0.1 jcgruenhage
                   ` (36 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: github-actions @ 2023-04-01  1:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1492785713

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (4 preceding siblings ...)
  2023-04-01  1:52 ` github-actions
@ 2023-04-02  9:37 ` jcgruenhage
  2023-04-02  9:38 ` jcgruenhage
                   ` (35 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2023-04-02  9:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [x] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [x] add services for at least clamav and freshclam
 - [ ] fix cross compilation
 - [ ] fix musl

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 6590 bytes --]

From 60415c68adfdf182938eff69238b877b4e287f37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.0.0.

---
 common/shlibs                          |  6 +--
 srcpkgs/clamav/files/clamd/log/run     |  1 +
 srcpkgs/clamav/files/clamd/run         |  4 ++
 srcpkgs/clamav/files/freshclam/log/run |  1 +
 srcpkgs/clamav/files/freshclam/run     |  4 ++
 srcpkgs/clamav/template                | 75 +++++++++++++-------------
 6 files changed, 50 insertions(+), 41 deletions(-)
 create mode 120000 srcpkgs/clamav/files/clamd/log/run
 create mode 100755 srcpkgs/clamav/files/clamd/run
 create mode 120000 srcpkgs/clamav/files/freshclam/log/run
 create mode 100755 srcpkgs/clamav/files/freshclam/run

diff --git a/common/shlibs b/common/shlibs
index ddd0a3266a36..64c82592cc54 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2276,9 +2276,9 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
+libclamav.so.11 clamav-1.0.0_1
+libclamunrar.so.11 clamav-1.0.0_1
+libclamunrar_iface.so.11 clamav-1.0.0_1
 libfreshclam.so.2 clamav-0.103.1_2
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
diff --git a/srcpkgs/clamav/files/clamd/log/run b/srcpkgs/clamav/files/clamd/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 000000000000..ae2b1f0f5da6
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/log/run b/srcpkgs/clamav/files/freshclam/log/run
new file mode 120000
index 000000000000..3a5b4a586051
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 000000000000..d42df2fb5db7
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 98dcf3750ad2..32c5ed3c3ea5 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,64 +1,63 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
+version=1.0.1
 revision=1
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+build_style=cmake
+configure_args="-DAPP_CONFIG_DIRECTORY=/etc
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=ON"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cmake ninja cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel"
 short_desc="Clam Anti-Virus scanner"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
+checksum=0872dc1b82ff4cd7e8e4323faf5ee41a1f66ae80865d05429085b946355d86ee
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
-make_check=ci-skip
 
 CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	configure_args+=" -DDISABLE_MPOOL=1"
 fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
 	LDFLAGS="-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
+	vsv clamd
+	vsv freshclam
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s:^\(Example\)$:# \1:" \
+			-e "s:#DatabaseDirectory.*:DatabaseDirectory /var/lib/_${pkgname}:"
+	done
 	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
+		-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:"
+	sed -i ${PKGDESTDIR}/etc/clamd.conf \
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
+		-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:"
 }
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (5 preceding siblings ...)
  2023-04-02  9:37 ` [PR PATCH] [Updated] WIP: clamav: update to 1.0.1 jcgruenhage
@ 2023-04-02  9:38 ` jcgruenhage
  2023-05-23 21:46 ` r-ricci
                   ` (34 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2023-04-02  9:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1493280061

Comment:
Definitely not stale, just didn't get to progressing on the TODOs yet, and might need some help there as well.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (6 preceding siblings ...)
  2023-04-02  9:38 ` jcgruenhage
@ 2023-05-23 21:46 ` r-ricci
  2023-05-25 22:21 ` r-ricci
                   ` (33 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: r-ricci @ 2023-05-23 21:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1560168000

Comment:
- For musl, Alpine has this patch:

```diff
diff --git a/clamonacc/CMakeLists.txt b/clamonacc/CMakeLists.txt
index e95e6d0..928b60a 100644
--- a/clamonacc/CMakeLists.txt
+++ b/clamonacc/CMakeLists.txt
@@ -47,6 +47,7 @@ set_target_properties( clamonacc PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" )
 
 target_link_libraries( clamonacc
     PRIVATE
+        fts
         ClamAV::libclamav
         ClamAV::common
         CURL::libcurl )
```

and `-DHAVE_SYSTEM_LFS_FTS=ON` must be passed to cmake.

- Version 1.1.0 is out.

- There's a changelog at <https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md>, if you want to add it.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (7 preceding siblings ...)
  2023-05-23 21:46 ` r-ricci
@ 2023-05-25 22:21 ` r-ricci
  2023-05-26 21:41 ` r-ricci
                   ` (32 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: r-ricci @ 2023-05-25 22:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1560168000

Comment:
- For musl, Alpine has this patch:

```diff
diff --git a/clamonacc/CMakeLists.txt b/clamonacc/CMakeLists.txt
index e95e6d0..928b60a 100644
--- a/clamonacc/CMakeLists.txt
+++ b/clamonacc/CMakeLists.txt
@@ -47,6 +47,7 @@ set_target_properties( clamonacc PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" )
 
 target_link_libraries( clamonacc
     PRIVATE
+        fts
         ClamAV::libclamav
         ClamAV::common
         CURL::libcurl )
```

and `-DHAVE_SYSTEM_LFS_FTS=ON` must be passed to cmake.

- Version 1.1.0 is out.

- There's a changelog at <https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md>, if you want to add it.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (8 preceding siblings ...)
  2023-05-25 22:21 ` r-ricci
@ 2023-05-26 21:41 ` r-ricci
  2023-05-31 20:55 ` r-ricci
                   ` (31 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: r-ricci @ 2023-05-26 21:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 3348 bytes --]

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1564990586

Comment:
I made some changes (r-ricci@e2a7b5e6d35fce78859286aaad9d15d2d63770ab) on my branch:

```diff
diff --git a/common/shlibs b/common/shlibs
index d56441a56b..96cb0a43e7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2283,10 +2283,10 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.11 clamav-1.0.0_1
-libclamunrar.so.11 clamav-1.0.0_1
-libclamunrar_iface.so.11 clamav-1.0.0_1
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.1.0_1
+libclamunrar.so.12 clamav-1.1.0_1
+libclamunrar_iface.so.12 clamav-1.1.0_1
+libfreshclam.so.3 clamav-1.1.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/files/link-fts.patch b/srcpkgs/clamav/files/link-fts.patch
new file mode 100644
index 0000000000..fe88e99c01
--- /dev/null
+++ b/srcpkgs/clamav/files/link-fts.patch
@@ -0,0 +1,12 @@
+diff --git a/clamonacc/CMakeLists.txt b/clamonacc/CMakeLists.txt
+index e95e6d0..928b60a 100644
+--- a/clamonacc/CMakeLists.txt
++++ b/clamonacc/CMakeLists.txt
+@@ -47,6 +47,7 @@ set_target_properties( clamonacc PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" )
+ 
+ target_link_libraries( clamonacc
+     PRIVATE
++        fts
+         ClamAV::libclamav
+         ClamAV::common
+         CURL::libcurl )
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 32c5ed3c3e..00a381d508 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,8 +1,9 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=1.0.1
+version=1.1.0
 revision=1
 build_style=cmake
+build_helper="qemu"
 configure_args="-DAPP_CONFIG_DIRECTORY=/etc
  -DDATABASE_DIRECTORY=/var/lib/_clamav
  -DENABLE_JSON_SHARED=ON
@@ -26,21 +27,30 @@ short_desc="Clam Anti-Virus scanner"
 maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=0872dc1b82ff4cd7e8e4323faf5ee41a1f66ae80865d05429085b946355d86ee
+checksum=a30020d99cd467fa5ea0efbd6f4f182efebf62a9fc62fc4a3a7b2cc3f55e6b74
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -DDISABLE_MPOOL=1"
 fi
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -DHAVE_SYSTEM_LFS_FTS=ON"
 fi
 
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+		# for some reason CFLAGS="-lfts" doesn't work
+		# and we can't use a regular patch because
+		# it won't build on glibc
+		patch -Np1 < "${FILESDIR}/link-fts.patch"
+	fi
+}
+
 post_install() {
 	vsv clamd
 	vsv freshclam
```

Now it builds on both glibc and musl.

`build_helper="qemu"` makes cmake happy when cross-compiling, but then I get a link-time error which I don't know how to fix.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (9 preceding siblings ...)
  2023-05-26 21:41 ` r-ricci
@ 2023-05-31 20:55 ` r-ricci
  2023-08-30  1:44 ` github-actions
                   ` (30 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: r-ricci @ 2023-05-31 20:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 9043 bytes --]

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1570941191

Comment:
@jcgruenhage I made some other changes and cleanups on top of your work.
Now it builds on musl and cross-compiles.
I disabled rar support because its code is source-available but [proprietary](https://github.com/Cisco-Talos/clamav/blob/clamav-1.1.0/libclamunrar/license.txt).
I also enabled optimization for rust code.

This is the diff compared to current master:

```diff
diff --git a/common/shlibs b/common/shlibs
index df0384d3b2..0a7dfac162 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2283,10 +2283,10 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.1.0_1
+libclamunrar.so.12 clamav-1.1.0_1
+libclamunrar_iface.so.12 clamav-1.1.0_1
+libfreshclam.so.3 clamav-1.1.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/files/clamd/log/run b/srcpkgs/clamav/files/clamd/log/run
new file mode 120000
index 0000000000..3a5b4a5860
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 0000000000..ae2b1f0f5d
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/log/run b/srcpkgs/clamav/files/freshclam/log/run
new file mode 120000
index 0000000000..3a5b4a5860
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 0000000000..d42df2fb5d
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/files/link-fts.patch b/srcpkgs/clamav/files/link-fts.patch
new file mode 100644
index 0000000000..fe88e99c01
--- /dev/null
+++ b/srcpkgs/clamav/files/link-fts.patch
@@ -0,0 +1,12 @@
+diff --git a/clamonacc/CMakeLists.txt b/clamonacc/CMakeLists.txt
+index e95e6d0..928b60a 100644
+--- a/clamonacc/CMakeLists.txt
++++ b/clamonacc/CMakeLists.txt
+@@ -47,6 +47,7 @@ set_target_properties( clamonacc PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" )
+ 
+ target_link_libraries( clamonacc
+     PRIVATE
++        fts
+         ClamAV::libclamav
+         ClamAV::common
+         CURL::libcurl )
diff --git a/srcpkgs/clamav/patches/rust-optimize.patch b/srcpkgs/clamav/patches/rust-optimize.patch
new file mode 100644
index 0000000000..1c54b7da92
--- /dev/null
+++ b/srcpkgs/clamav/patches/rust-optimize.patch
@@ -0,0 +1,31 @@
+--- a/cmake/FindRust.cmake
++++ b/cmake/FindRust.cmake
+@@ -339,9 +339,7 @@
+         list(APPEND MY_CARGO_ARGS "--target" ${RUST_COMPILER_TARGET})
+     endif()
+ 
+-    if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+         list(APPEND MY_CARGO_ARGS "--release")
+-    endif()
+ 
+     list(APPEND MY_CARGO_ARGS "--target-dir" ${ARGS_BINARY_DIRECTORY})
+     list(JOIN MY_CARGO_ARGS " " MY_CARGO_ARGS_STRING)
+@@ -443,18 +441,8 @@
+     list(APPEND CARGO_ARGS "--target" ${RUST_COMPILER_TARGET})
+ endif()
+ 
+-if(NOT CMAKE_BUILD_TYPE)
+-    set(CARGO_BUILD_TYPE "debug")
+-elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
+-    set(CARGO_BUILD_TYPE "release")
+-    list(APPEND CARGO_ARGS "--release")
+-elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
+     set(CARGO_BUILD_TYPE "release")
+     list(APPEND CARGO_ARGS "--release")
+-    string(APPEND RUSTFLAGS " -g")
+-else()
+-    set(CARGO_BUILD_TYPE "debug")
+-endif()
+ string(STRIP "${RUSTFLAGS}" RUSTFLAGS)
+ 
+ find_package_handle_standard_args(Rust
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 65237deb14..32b956270d 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,65 +1,76 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=2
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.1.0
+revision=1
+build_style=cmake
+build_helper="qemu"
+configure_args="-DAPP_CONFIG_DIRECTORY=/etc
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=OFF"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel rust-std"
 short_desc="Clam Anti-Virus scanner"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
+checksum=a30020d99cd467fa5ea0efbd6f4f182efebf62a9fc62fc4a3a7b2cc3f55e6b74
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
-make_check=ci-skip
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	configure_args+=" -DRUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
+	configure_args+=" -DRUST_COMPILER_TARGET=${XBPS_CROSS_RUST_TARGET}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -DHAVE_SYSTEM_LFS_FTS=ON"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+		# CFLAGS="-lfts" doesn't work and we can't use
+		# a regular patch because it won't build on glibc
+		patch -Np1 < "${FILESDIR}/link-fts.patch"
 	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
 }
-post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
+post_install() {
+	vsv clamd
+	vsv freshclam
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s:^\(Example\)$:# \1:" \
+			-e "s:#DatabaseDirectory.*:DatabaseDirectory /var/lib/_${pkgname}:"
+	done
 	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
+		-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:"
+	sed -i ${PKGDESTDIR}/etc/clamd.conf \
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
+		-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (10 preceding siblings ...)
  2023-05-31 20:55 ` r-ricci
@ 2023-08-30  1:44 ` github-actions
  2023-09-04  9:57 ` jcgruenhage
                   ` (29 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: github-actions @ 2023-08-30  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1698367690

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (11 preceding siblings ...)
  2023-08-30  1:44 ` github-actions
@ 2023-09-04  9:57 ` jcgruenhage
  2023-09-04 10:02 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (28 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2023-09-04  9:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1704970758

Comment:
Hey there @r-ricci. Thanks for looking into this! I've applied your patches locally and have updated clamav to 1.2.0, and am currently testing it locally. If this all works as expected, I'll update the PR as well.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (12 preceding siblings ...)
  2023-09-04  9:57 ` jcgruenhage
@ 2023-09-04 10:02 ` jcgruenhage
  2023-09-05 20:24 ` [PR REVIEW] " r-ricci
                   ` (27 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2023-09-04 10:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages clamav-1.0.0_1
https://github.com/void-linux/void-packages/pull/41188

WIP: clamav: update to 1.0.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [x] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [x] add services for at least clamav and freshclam
 - [ ] fix cross compilation
 - [ ] fix musl

A patch file from https://github.com/void-linux/void-packages/pull/41188.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-clamav-1.0.0_1-41188.patch --]
[-- Type: text/x-diff, Size: 9403 bytes --]

From cc38e3de3850d9f3d59d0b788aecd9cf170cdb0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Mon, 19 Dec 2022 19:14:24 +0100
Subject: [PATCH] clamav: update to 1.2.0.

---
 common/shlibs                              |  8 +-
 srcpkgs/clamav/files/clamd/log/run         |  1 +
 srcpkgs/clamav/files/clamd/run             |  4 +
 srcpkgs/clamav/files/freshclam/log/run     |  1 +
 srcpkgs/clamav/files/freshclam/run         |  4 +
 srcpkgs/clamav/files/link-fts.patch        | 12 +++
 srcpkgs/clamav/patches/rust-optimize.patch | 31 ++++++++
 srcpkgs/clamav/template                    | 89 ++++++++++++----------
 8 files changed, 107 insertions(+), 43 deletions(-)
 create mode 120000 srcpkgs/clamav/files/clamd/log/run
 create mode 100755 srcpkgs/clamav/files/clamd/run
 create mode 120000 srcpkgs/clamav/files/freshclam/log/run
 create mode 100755 srcpkgs/clamav/files/freshclam/run
 create mode 100644 srcpkgs/clamav/files/link-fts.patch
 create mode 100644 srcpkgs/clamav/patches/rust-optimize.patch

diff --git a/common/shlibs b/common/shlibs
index bde3b73b96676..6485331919bbe 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2256,10 +2256,10 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.2.0_1
+libclamunrar.so.12 clamav-1.2.0_1
+libclamunrar_iface.so.12 clamav-1.2.0_1
+libfreshclam.so.3 clamav-1.2.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/files/clamd/log/run b/srcpkgs/clamav/files/clamd/log/run
new file mode 120000
index 0000000000000..3a5b4a586051d
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 0000000000000..ae2b1f0f5da66
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/log/run b/srcpkgs/clamav/files/freshclam/log/run
new file mode 120000
index 0000000000000..3a5b4a586051d
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/log/run
@@ -0,0 +1 @@
+/usr/bin/vlogger
\ No newline at end of file
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 0000000000000..d42df2fb5db76
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+mkdir -p /run/clamav
+chown _clamav:_clamav /run/clamav
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/files/link-fts.patch b/srcpkgs/clamav/files/link-fts.patch
new file mode 100644
index 0000000000000..fe88e99c01952
--- /dev/null
+++ b/srcpkgs/clamav/files/link-fts.patch
@@ -0,0 +1,12 @@
+diff --git a/clamonacc/CMakeLists.txt b/clamonacc/CMakeLists.txt
+index e95e6d0..928b60a 100644
+--- a/clamonacc/CMakeLists.txt
++++ b/clamonacc/CMakeLists.txt
+@@ -47,6 +47,7 @@ set_target_properties( clamonacc PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" )
+ 
+ target_link_libraries( clamonacc
+     PRIVATE
++        fts
+         ClamAV::libclamav
+         ClamAV::common
+         CURL::libcurl )
diff --git a/srcpkgs/clamav/patches/rust-optimize.patch b/srcpkgs/clamav/patches/rust-optimize.patch
new file mode 100644
index 0000000000000..1c54b7da9260b
--- /dev/null
+++ b/srcpkgs/clamav/patches/rust-optimize.patch
@@ -0,0 +1,31 @@
+--- a/cmake/FindRust.cmake
++++ b/cmake/FindRust.cmake
+@@ -339,9 +339,7 @@
+         list(APPEND MY_CARGO_ARGS "--target" ${RUST_COMPILER_TARGET})
+     endif()
+ 
+-    if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+         list(APPEND MY_CARGO_ARGS "--release")
+-    endif()
+ 
+     list(APPEND MY_CARGO_ARGS "--target-dir" ${ARGS_BINARY_DIRECTORY})
+     list(JOIN MY_CARGO_ARGS " " MY_CARGO_ARGS_STRING)
+@@ -443,18 +441,8 @@
+     list(APPEND CARGO_ARGS "--target" ${RUST_COMPILER_TARGET})
+ endif()
+ 
+-if(NOT CMAKE_BUILD_TYPE)
+-    set(CARGO_BUILD_TYPE "debug")
+-elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
+-    set(CARGO_BUILD_TYPE "release")
+-    list(APPEND CARGO_ARGS "--release")
+-elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
+     set(CARGO_BUILD_TYPE "release")
+     list(APPEND CARGO_ARGS "--release")
+-    string(APPEND RUSTFLAGS " -g")
+-else()
+-    set(CARGO_BUILD_TYPE "debug")
+-endif()
+ string(STRIP "${RUSTFLAGS}" RUSTFLAGS)
+ 
+ find_package_handle_standard_args(Rust
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 34fca27bca1db..2f7b6e2acb77c 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,65 +1,76 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=4
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
+version=1.2.0
+revision=1
+build_style=cmake
+build_helper="qemu"
+configure_args="-DAPP_CONFIG_DIRECTORY=/etc
+ -DDATABASE_DIRECTORY=/var/lib/_clamav
+ -DENABLE_JSON_SHARED=ON
+ -DCLAMAV_USER=_clamav
+ -DCLAMAV_GROUP=_clamav
+ -DENABLE_APP=ON
+ -DENABLE_MILTER=ON
+ -DENABLE_CLAMONACC=ON
+ -DENABLE_MAN_PAGES=ON
+ -DENABLE_DOXYGEN=OFF
+ -DENABLE_EXAMPLES=ON
+ -DENABLE_TESTS=ON
+ -DENABLE_SHARED_LIB=ON
+ -DENABLE_SYSTEMD=OFF
+ -DENABLE_UNRAR=OFF"
 conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
+hostmakedepends="flex pkg-config zip cargo python3"
 makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+ ncurses-devel pcre2-devel tcl-devel check-devel libmilter-devel rust-std"
 short_desc="Clam Anti-Virus scanner"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
 _clamav_homedir="/var/lib/_${pkgname}"
 _clamav_descr="ClamAV user"
 system_accounts="_clamav"
-make_check=ci-skip
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	configure_args+=" -DRUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
+	configure_args+=" -DRUST_COMPILER_TARGET=${XBPS_CROSS_RUST_TARGET}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -DHAVE_SYSTEM_LFS_FTS=ON"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
+post_patch() {
+	if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+		# CFLAGS="-lfts" doesn't work and we can't use
+		# a regular patch because it won't build on glibc
+		patch -Np1 < "${FILESDIR}/link-fts.patch"
 	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
 }
-post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
+post_install() {
+	vsv clamd
+	vsv freshclam
+	for service in clamd clamav-milter freshclam; do
+		# Enable and patch service configuration
+		mv -v ${PKGDESTDIR}/etc/${service}.conf.sample ${PKGDESTDIR}/etc/${service}.conf
+		vsconf etc/${service}.conf.sample
+		sed -i ${PKGDESTDIR}/etc/${service}.conf \
+			-e "s:^\(Example\)$:# \1:" \
+			-e "s:#DatabaseDirectory.*:DatabaseDirectory /var/lib/_${pkgname}:"
+	done
 	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/freshclam.pid:" \
+		-e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:"
+	sed -i ${PKGDESTDIR}/etc/clamd.conf \
+		-e "s:.*\(PidFile\) .*:\1 /run/clamav/clamd.pid:" \
+		-e "s:.*\(LocalSocket\) .*:\1 /run/clamav/clamd.sock:"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR REVIEW] WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (13 preceding siblings ...)
  2023-09-04 10:02 ` [PR PATCH] [Updated] " jcgruenhage
@ 2023-09-05 20:24 ` r-ricci
  2023-09-06 23:48 ` r-ricci
                   ` (26 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: r-ricci @ 2023-09-05 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

New review comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#discussion_r1316370175

Comment:
Log services are created automatically by `vsv`.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (14 preceding siblings ...)
  2023-09-05 20:24 ` [PR REVIEW] " r-ricci
@ 2023-09-06 23:48 ` r-ricci
  2023-09-19  7:20 ` nsudsgaard
                   ` (25 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: r-ricci @ 2023-09-06 23:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1709267033

Comment:
The test suite doesn't fail locally for me.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (15 preceding siblings ...)
  2023-09-06 23:48 ` r-ricci
@ 2023-09-19  7:20 ` nsudsgaard
  2023-09-19  7:43 ` nsudsgaard
                   ` (24 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-19  7:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 12544 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1724960407

Comment:
I have made some large changes to the code.

- Cleaned up the template.
- Removed the unnecessary patches (whether `CMAKE_BUILD_TYPE` will cause issues is unknown to me).
- Migrated directories `/etc` -> `/etc/clamav` and `/var/lib/_clamav` -> `/var/lib/clamav`.
- Added a message about the migration.
- Patched the configuration to be more Void Linux like.

What I have tested:

- Builds locally on x86_64 (though I highy suspect this would build on musl or different architectures).
- Briefly tested x86_64 (ran `freshclam` and `clamscan`).
- Files properly migrate

NOTE: This code only works if you are updating using a custom repository (not by `xi`), as I "bootstrap" the package by
reinstalling during the post phase of `INSTALL`.
I am not sure if this is the best idea so I will let people more knowledgeable than me decide on that.

This is a patch against the **upstream version.**
```patch
diff --git a/common/shlibs b/common/shlibs
index d2791c238e..89f9e73b08 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2257,10 +2257,11 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.2.0_1
+libclamunrar.so.12 clamav-1.2.0_1
+libclamunrar_iface.so.12 clamav-1.2.0_1
+libfreshclam.so.3 clamav-1.2.0_1
+libclammspack.so.0 clamav-1.2.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/INSTALL b/srcpkgs/clamav/INSTALL
index 4b8adfa4a3..7ea5300a7a 100644
--- a/srcpkgs/clamav/INSTALL
+++ b/srcpkgs/clamav/INSTALL
@@ -1,20 +1,84 @@
 # INSTALL
+
+readonly old_configdir=/etc
+readonly configdir=/etc/clamav
+readonly old_config_files="
+    ${old_configdir}/clamd.conf
+    ${old_configdir}/freshclam.conf"
+readonly config_files="
+    ${configdir}/clamav-milter.conf
+    ${configdir}/clamd.conf
+    ${configdir}/freshclam.conf"
+readonly old_databasedir=/var/lib/_clamav
+readonly databasedir=/var/lib/clamav
+
+version="$(xbps-query clamav | grep pkgver)"
+version=${version#pkgver: clamav-}
+
+check_mv() {
+	[ -f "${1}" ] && mv "${1}" "${2}"
+}
+
+# The following functions are to used automatically to migrate the config files
+# from /etc (0.x versions) to /etc/clamav (1.x versions) safely.
+save_conflicting_config_files() {
+	[ ! -d ${configdir} ] && mkdir -p ${configdir}
+	for file in ${config_files}; do
+		check_mv "${file}" "${file}".custom
+	done
+	# Saves the previous version to use in the post action.
+	printf '%s' "${version}" > ${configdir}/.migrate
+}
+
+# This is done as moving the old config files into /etc/clamav in the preinstall
+# phase would end in xbps overwriting them with the new config files (not making
+# xxx.new-${VERSION}).
+# An alternative to this would be by renaming the new config files into the
+# xxx.new-${VERSION} format before moving the old config files into /etc/clamav
+# in the postinstall phase. However, it is usually not a good idea to emulate
+# program behavior as it may cause issues in the future (in this case if the
+# format changes).
+bootstrap_pkg() {
+	printf '%s\n' "${PKGNAME}-${VERSION}: bootstrapping ..."
+	xbps-remove -y clamav > /dev/null 2>&1
+	xbps-install -y clamav > /dev/null 2>&1
+}
+
+migrate_config_files() {
+	for file in ${old_config_files}; do
+		for match in "${file}"*; do
+			name=${match#"${old_configdir}"/}
+			check_mv "${match}" ${configdir}/"${name}"
+		done
+	done
+	bootstrap_pkg
+	rm ${configdir}/.migrate
+}
+
 case "$ACTION" in
+pre)
+	if [ "$UPDATE" = "yes" ]; then
+		case "${version}" in
+		0.*) save_conflicting_config_files ;;
+		esac
+	fi
+	;;
 post)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Create the database directory
-		mkdir -p var/lib/_clamav
-		# The clamav user owns it
-		chown -R _clamav:_clamav var/lib/_clamav
-		# Let group members write to it
-		chmod g+w var/lib/_clamav
+		mkdir -p ${databasedir}
 	else
-		if [ -d "var/lib/clamav" ]; then
-			mv var/lib/clamav var/lib/_clamav
-			chown -R _clamav:_clamav var/lib/_clamav
-		fi
+		prev_version="$(cat ${configdir}/.migrate 2> /dev/null)"
+
+		case "${prev_version}" in
+		0.*)
+			# This should come first or else the old database
+			# directory will be moved to /var/lib/clamav/_clamav.
+			[ -d ${old_databasedir} ] && mv ${old_databasedir} ${databasedir}
+			migrate_config_files
+			;;
+		esac
 	fi
+	chown -R _clamav:_clamav ${databasedir}
+	chmod g+w ${databasedir}
 	;;
 esac
-
diff --git a/srcpkgs/clamav/INSTALL.msg b/srcpkgs/clamav/INSTALL.msg
new file mode 100644
index 0000000000..325ec6002c
--- /dev/null
+++ b/srcpkgs/clamav/INSTALL.msg
@@ -0,0 +1,12 @@
+The directories used by clamav have changed in versions >=1.2.0_1. This change
+was made to keep the system clean and consistent with other packages.
+
+Changes:
+ - All the configuration files are now located in /etc/clamav
+ - The database directory is now /lib/var/clamav
+
+This change should be done automatically for most users and should require no
+user interference.
+
+For users already using the /etc/clamav directory for custom clamav installs,
+a '.custom' extension was added to those configuration files.
diff --git a/srcpkgs/clamav/REMOVE b/srcpkgs/clamav/REMOVE
index 1edffaba78..bc2171087b 100644
--- a/srcpkgs/clamav/REMOVE
+++ b/srcpkgs/clamav/REMOVE
@@ -1,10 +1,14 @@
 # REMOVE
+
+readonly configdir=/etc/clamav
+readonly databasedir=/var/lib/clamav
+
 case "$ACTION" in
 pre)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Remove the clamav database directory and contents
-		rm -rf var/lib/_clamav
+		# Do not delete while bootstrapping.
+		[ -f ${configdir}/.migrate ] && exit 0
+		rm -rf ${databasedir}
 	fi
 	;;
 esac
diff --git a/srcpkgs/clamav/patches/10-voidlinux-config.patch b/srcpkgs/clamav/patches/10-voidlinux-config.patch
new file mode 100644
index 0000000000..b59cb1689e
--- /dev/null
+++ b/srcpkgs/clamav/patches/10-voidlinux-config.patch
@@ -0,0 +1,44 @@
+--- a/etc/clamav-milter.conf.sample	2023-09-15 09:11:43.813492975 +0900
++++ b/etc/clamav-milter.conf.sample	2023-09-15 09:13:25.618493838 +0900
+@@ -38,7 +38,7 @@
+ # to work)
+ #
+ # Default: unset (don't drop privileges)
+-#User clamav
++#User _clamav
+ 
+ # Waiting for data from clamd will timeout after this time (seconds).
+ # Value of 0 disables the timeout.
+--- a/etc/clamd.conf.sample	2023-09-15 09:01:18.780487677 +0900
++++ b/etc/clamd.conf.sample	2023-09-15 09:06:04.215490096 +0900
+@@ -224,7 +224,7 @@
+ 
+ # Run as another user (clamd must be started by root for this option to work)
+ # Default: don't drop privileges
+-#User clamav
++#User _clamav
+ 
+ # Stop daemon when libclamav reports out of memory condition.
+ #ExitOnOOM yes
+@@ -766,7 +766,7 @@
+ # It has the same potential race condition limitations of the
+ # OnAccessExcludeUID option.
+ # Default: disabled
+-#OnAccessExcludeUname clamav
++#OnAccessExcludeUname _clamav
+ 
+ # Number of times the OnAccess client will retry a failed scan due to
+ # connection problems (or other issues).
+--- a/etc/freshclam.conf.sample	2023-09-15 09:10:07.028492154 +0900
++++ a/etc/freshclam.conf.sample	2023-09-15 09:08:02.132491096 +0900
+@@ -56,8 +56,8 @@
+ 
+ # By default when started freshclam drops privileges and switches to the
+ # "clamav" user. This directive allows you to change the database owner.
+-# Default: clamav (may depend on installation options)
+-#DatabaseOwner clamav
++# Default: _clamav (may depend on installtion options)
++#DatabaseOwner _clamav
+ 
+ # Use DNS to verify virus database version. FreshClam uses DNS TXT records
+ # to verify database and software versions. With this directive you can change
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 3574b7baee..efe52dd88e 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,66 +1,66 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=4
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
-conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
-makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+version=1.2.0
+revision=1
+
+_configdir=/etc/clamav
+_databasedir=/var/lib/clamav
+
+build_style=cmake
+cmake_builddir=build
+# Setting ENABLE_JSON_SHARED=OFF is preferred, as libclamav.so may crash if you
+# use a different JSON library.
+configure_args="
+ -D CMAKE_BUILD_TYPE=Release
+ -D CMAKE_INSTALL_PREFIX=/usr
+ -D APP_CONFIG_DIRECTORY=${_configdir}
+ -D DATABASE_DIRECTORY=${_databasedir}
+ -D CLAMAV_USER=_clamav
+ -D CLAMAV_GROUP=_clamav
+ -D ENABLE_JSON_SHARED=OFF"
+hostmakedepends="rust cargo python3"
+makedepends="bzip2-devel check-devel libcurl-devel json-c-devel libmilter-devel
+ libxml2-devel ncurses-devel openssl-devel pcre2-devel zlib-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
-_clamav_descr="ClamAV user"
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
 system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir=${_databasedir}
+conf_files="
+ ${_configdir}/clamav-milter.conf
+ ${_configdir}/clamd.conf
+ ${_configdir}/freshclam.conf"
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	build_helper="qemu"
+	makedepends+=" rust-std"
+	configure_args+="
+	 -D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}
+	 -D RUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -D CMAKE_EXE_LINKER_FLAGS=-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	vmkdir ${_configdir}
+	for path in ${conf_files}; do
+		name=${path#"${_configdir}"/}
+
+		mv -v "${PKGDESTDIR}"/"${path}".sample "${PKGDESTDIR}"/"${path}"
+		vsconf "${PKGDESTDIR}"/"${path}" "${name}".sample
+		sed -i "${PKGDESTDIR}"/"${path}" -e "s;^Example$;# Example;"
+	done
+	vdoc "${FILESDIR}"/README.voidlinux
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-	vdoc "${FILESDIR}/README.voidlinux"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (16 preceding siblings ...)
  2023-09-19  7:20 ` nsudsgaard
@ 2023-09-19  7:43 ` nsudsgaard
  2023-09-19  7:56 ` nsudsgaard
                   ` (23 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-19  7:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 12604 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1724960407

Comment:
I have made some large changes to the code.

- Cleaned up the template.
- Removed the unnecessary patches (whether `CMAKE_BUILD_TYPE` will cause issues is unknown to me).
- Migrated directories `/etc` -> `/etc/clamav` and `/var/lib/_clamav` -> `/var/lib/clamav`.
- Added a message about the migration.
- Patched the configuration to be more Void Linux like.

What I have tested:

- Builds locally on x86_64 (though I highy suspect this would build on musl or different architectures).
- Briefly tested x86_64 (ran `freshclam` and `clamscan`).
- Files properly migrate

NOTE: This code only works if you are updating using a [custom repository](https://docs.voidlinux.org/xbps/repositories/custom.html) (not by `xi`), as I "bootstrap" the package by
reinstalling during the post phase of `INSTALL`.
I am not sure if this is the best idea so I will let people more knowledgeable than me decide on that.

This is a patch against the **upstream version.**
```patch
diff --git a/common/shlibs b/common/shlibs
index d2791c238e..89f9e73b08 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2257,10 +2257,11 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.2.0_1
+libclamunrar.so.12 clamav-1.2.0_1
+libclamunrar_iface.so.12 clamav-1.2.0_1
+libfreshclam.so.3 clamav-1.2.0_1
+libclammspack.so.0 clamav-1.2.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/INSTALL b/srcpkgs/clamav/INSTALL
index 4b8adfa4a3..7ea5300a7a 100644
--- a/srcpkgs/clamav/INSTALL
+++ b/srcpkgs/clamav/INSTALL
@@ -1,20 +1,84 @@
 # INSTALL
+
+readonly old_configdir=/etc
+readonly configdir=/etc/clamav
+readonly old_config_files="
+    ${old_configdir}/clamd.conf
+    ${old_configdir}/freshclam.conf"
+readonly config_files="
+    ${configdir}/clamav-milter.conf
+    ${configdir}/clamd.conf
+    ${configdir}/freshclam.conf"
+readonly old_databasedir=/var/lib/_clamav
+readonly databasedir=/var/lib/clamav
+
+version="$(xbps-query clamav | grep pkgver)"
+version=${version#pkgver: clamav-}
+
+check_mv() {
+	[ -f "${1}" ] && mv "${1}" "${2}"
+}
+
+# The following functions are to used automatically to migrate the config files
+# from /etc (0.x versions) to /etc/clamav (1.x versions) safely.
+save_conflicting_config_files() {
+	[ ! -d ${configdir} ] && mkdir -p ${configdir}
+	for file in ${config_files}; do
+		check_mv "${file}" "${file}".custom
+	done
+	# Saves the previous version to use in the post action.
+	printf '%s' "${version}" > ${configdir}/.migrate
+}
+
+# This is done as moving the old config files into /etc/clamav in the preinstall
+# phase would end in xbps overwriting them with the new config files (not making
+# xxx.new-${VERSION}).
+# An alternative to this would be by renaming the new config files into the
+# xxx.new-${VERSION} format before moving the old config files into /etc/clamav
+# in the postinstall phase. However, it is usually not a good idea to emulate
+# program behavior as it may cause issues in the future (in this case if the
+# format changes).
+bootstrap_pkg() {
+	printf '%s\n' "${PKGNAME}-${VERSION}: bootstrapping ..."
+	xbps-remove -y clamav > /dev/null 2>&1
+	xbps-install -y clamav > /dev/null 2>&1
+}
+
+migrate_config_files() {
+	for file in ${old_config_files}; do
+		for match in "${file}"*; do
+			name=${match#"${old_configdir}"/}
+			check_mv "${match}" ${configdir}/"${name}"
+		done
+	done
+	bootstrap_pkg
+	rm ${configdir}/.migrate
+}
+
 case "$ACTION" in
+pre)
+	if [ "$UPDATE" = "yes" ]; then
+		case "${version}" in
+		0.*) save_conflicting_config_files ;;
+		esac
+	fi
+	;;
 post)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Create the database directory
-		mkdir -p var/lib/_clamav
-		# The clamav user owns it
-		chown -R _clamav:_clamav var/lib/_clamav
-		# Let group members write to it
-		chmod g+w var/lib/_clamav
+		mkdir -p ${databasedir}
 	else
-		if [ -d "var/lib/clamav" ]; then
-			mv var/lib/clamav var/lib/_clamav
-			chown -R _clamav:_clamav var/lib/_clamav
-		fi
+		prev_version="$(cat ${configdir}/.migrate 2> /dev/null)"
+
+		case "${prev_version}" in
+		0.*)
+			# This should come first or else the old database
+			# directory will be moved to /var/lib/clamav/_clamav.
+			[ -d ${old_databasedir} ] && mv ${old_databasedir} ${databasedir}
+			migrate_config_files
+			;;
+		esac
 	fi
+	chown -R _clamav:_clamav ${databasedir}
+	chmod g+w ${databasedir}
 	;;
 esac
-
diff --git a/srcpkgs/clamav/INSTALL.msg b/srcpkgs/clamav/INSTALL.msg
new file mode 100644
index 0000000000..325ec6002c
--- /dev/null
+++ b/srcpkgs/clamav/INSTALL.msg
@@ -0,0 +1,12 @@
+The directories used by clamav have changed in versions >=1.2.0_1. This change
+was made to keep the system clean and consistent with other packages.
+
+Changes:
+ - All the configuration files are now located in /etc/clamav
+ - The database directory is now /lib/var/clamav
+
+This change should be done automatically for most users and should require no
+user interference.
+
+For users already using the /etc/clamav directory for custom clamav installs,
+a '.custom' extension was added to those configuration files.
diff --git a/srcpkgs/clamav/REMOVE b/srcpkgs/clamav/REMOVE
index 1edffaba78..bc2171087b 100644
--- a/srcpkgs/clamav/REMOVE
+++ b/srcpkgs/clamav/REMOVE
@@ -1,10 +1,14 @@
 # REMOVE
+
+readonly configdir=/etc/clamav
+readonly databasedir=/var/lib/clamav
+
 case "$ACTION" in
 pre)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Remove the clamav database directory and contents
-		rm -rf var/lib/_clamav
+		# Do not delete while bootstrapping.
+		[ -f ${configdir}/.migrate ] && exit 0
+		rm -rf ${databasedir}
 	fi
 	;;
 esac
diff --git a/srcpkgs/clamav/patches/10-voidlinux-config.patch b/srcpkgs/clamav/patches/10-voidlinux-config.patch
new file mode 100644
index 0000000000..b59cb1689e
--- /dev/null
+++ b/srcpkgs/clamav/patches/10-voidlinux-config.patch
@@ -0,0 +1,44 @@
+--- a/etc/clamav-milter.conf.sample	2023-09-15 09:11:43.813492975 +0900
++++ b/etc/clamav-milter.conf.sample	2023-09-15 09:13:25.618493838 +0900
+@@ -38,7 +38,7 @@
+ # to work)
+ #
+ # Default: unset (don't drop privileges)
+-#User clamav
++#User _clamav
+ 
+ # Waiting for data from clamd will timeout after this time (seconds).
+ # Value of 0 disables the timeout.
+--- a/etc/clamd.conf.sample	2023-09-15 09:01:18.780487677 +0900
++++ b/etc/clamd.conf.sample	2023-09-15 09:06:04.215490096 +0900
+@@ -224,7 +224,7 @@
+ 
+ # Run as another user (clamd must be started by root for this option to work)
+ # Default: don't drop privileges
+-#User clamav
++#User _clamav
+ 
+ # Stop daemon when libclamav reports out of memory condition.
+ #ExitOnOOM yes
+@@ -766,7 +766,7 @@
+ # It has the same potential race condition limitations of the
+ # OnAccessExcludeUID option.
+ # Default: disabled
+-#OnAccessExcludeUname clamav
++#OnAccessExcludeUname _clamav
+ 
+ # Number of times the OnAccess client will retry a failed scan due to
+ # connection problems (or other issues).
+--- a/etc/freshclam.conf.sample	2023-09-15 09:10:07.028492154 +0900
++++ a/etc/freshclam.conf.sample	2023-09-15 09:08:02.132491096 +0900
+@@ -56,8 +56,8 @@
+ 
+ # By default when started freshclam drops privileges and switches to the
+ # "clamav" user. This directive allows you to change the database owner.
+-# Default: clamav (may depend on installation options)
+-#DatabaseOwner clamav
++# Default: _clamav (may depend on installtion options)
++#DatabaseOwner _clamav
+ 
+ # Use DNS to verify virus database version. FreshClam uses DNS TXT records
+ # to verify database and software versions. With this directive you can change
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 3574b7baee..efe52dd88e 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,66 +1,66 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=4
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
-conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
-makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+version=1.2.0
+revision=1
+
+_configdir=/etc/clamav
+_databasedir=/var/lib/clamav
+
+build_style=cmake
+cmake_builddir=build
+# Setting ENABLE_JSON_SHARED=OFF is preferred, as libclamav.so may crash if you
+# use a different JSON library.
+configure_args="
+ -D CMAKE_BUILD_TYPE=Release
+ -D CMAKE_INSTALL_PREFIX=/usr
+ -D APP_CONFIG_DIRECTORY=${_configdir}
+ -D DATABASE_DIRECTORY=${_databasedir}
+ -D CLAMAV_USER=_clamav
+ -D CLAMAV_GROUP=_clamav
+ -D ENABLE_JSON_SHARED=OFF"
+hostmakedepends="rust cargo python3"
+makedepends="bzip2-devel check-devel libcurl-devel json-c-devel libmilter-devel
+ libxml2-devel ncurses-devel openssl-devel pcre2-devel zlib-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
-_clamav_descr="ClamAV user"
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
 system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir=${_databasedir}
+conf_files="
+ ${_configdir}/clamav-milter.conf
+ ${_configdir}/clamd.conf
+ ${_configdir}/freshclam.conf"
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	build_helper="qemu"
+	makedepends+=" rust-std"
+	configure_args+="
+	 -D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}
+	 -D RUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -D CMAKE_EXE_LINKER_FLAGS=-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	vmkdir ${_configdir}
+	for path in ${conf_files}; do
+		name=${path#"${_configdir}"/}
+
+		mv -v "${PKGDESTDIR}"/"${path}".sample "${PKGDESTDIR}"/"${path}"
+		vsconf "${PKGDESTDIR}"/"${path}" "${name}".sample
+		sed -i "${PKGDESTDIR}"/"${path}" -e "s;^Example$;# Example;"
+	done
+	vdoc "${FILESDIR}"/README.voidlinux
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-	vdoc "${FILESDIR}/README.voidlinux"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (17 preceding siblings ...)
  2023-09-19  7:43 ` nsudsgaard
@ 2023-09-19  7:56 ` nsudsgaard
  2023-09-19  7:57 ` nsudsgaard
                   ` (22 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-19  7:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 13603 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1724960407

Comment:
I have made some large changes to the code.

- Cleaned up the template.
- Removed the unnecessary patches (whether `CMAKE_BUILD_TYPE` will cause issues is unknown to me).
- Migrated directories `/etc` -> `/etc/clamav` and `/var/lib/_clamav` -> `/var/lib/clamav`.
- Added a message about the migration.
- Patched the configuration to be more Void Linux like.

What I have tested:

- Builds locally on x86_64 (though I highy suspect this would build on musl or different architectures).
- Briefly tested x86_64 (ran `freshclam` and `clamscan`).
- Files properly migrate

NOTE: This code only works if you are updating using a [custom repository](https://docs.voidlinux.org/xbps/repositories/custom.html) (not by `xi`), as I "bootstrap" the package by
reinstalling during the post phase of `INSTALL`.
I am not sure if this is the best idea so I will let people more knowledgeable than me decide on that.

This is a patch against the **upstream version.**
```patch
diff --git a/common/shlibs b/common/shlibs
index d2791c238e..89f9e73b08 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2257,10 +2257,11 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.2.0_1
+libclamunrar.so.12 clamav-1.2.0_1
+libclamunrar_iface.so.12 clamav-1.2.0_1
+libfreshclam.so.3 clamav-1.2.0_1
+libclammspack.so.0 clamav-1.2.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/INSTALL b/srcpkgs/clamav/INSTALL
index 4b8adfa4a3..7ea5300a7a 100644
--- a/srcpkgs/clamav/INSTALL
+++ b/srcpkgs/clamav/INSTALL
@@ -1,20 +1,84 @@
 # INSTALL
+
+readonly old_configdir=/etc
+readonly configdir=/etc/clamav
+readonly old_config_files="
+    ${old_configdir}/clamd.conf
+    ${old_configdir}/freshclam.conf"
+readonly config_files="
+    ${configdir}/clamav-milter.conf
+    ${configdir}/clamd.conf
+    ${configdir}/freshclam.conf"
+readonly old_databasedir=/var/lib/_clamav
+readonly databasedir=/var/lib/clamav
+
+version="$(xbps-query clamav | grep pkgver)"
+version=${version#pkgver: clamav-}
+
+check_mv() {
+	[ -f "${1}" ] && mv "${1}" "${2}"
+}
+
+# The following functions are to used automatically to migrate the config files
+# from /etc (0.x versions) to /etc/clamav (1.x versions) safely.
+save_conflicting_config_files() {
+	[ ! -d ${configdir} ] && mkdir -p ${configdir}
+	for file in ${config_files}; do
+		check_mv "${file}" "${file}".custom
+	done
+	# Saves the previous version to use in the post action.
+	printf '%s' "${version}" > ${configdir}/.migrate
+}
+
+# This is done as moving the old config files into /etc/clamav in the preinstall
+# phase would end in xbps overwriting them with the new config files (not making
+# xxx.new-${VERSION}).
+# An alternative to this would be by renaming the new config files into the
+# xxx.new-${VERSION} format before moving the old config files into /etc/clamav
+# in the postinstall phase. However, it is usually not a good idea to emulate
+# program behavior as it may cause issues in the future (in this case if the
+# format changes).
+bootstrap_pkg() {
+	printf '%s\n' "${PKGNAME}-${VERSION}: bootstrapping ..."
+	xbps-remove -y clamav > /dev/null 2>&1
+	xbps-install -y clamav > /dev/null 2>&1
+}
+
+migrate_config_files() {
+	for file in ${old_config_files}; do
+		for match in "${file}"*; do
+			name=${match#"${old_configdir}"/}
+			check_mv "${match}" ${configdir}/"${name}"
+		done
+	done
+	bootstrap_pkg
+	rm ${configdir}/.migrate
+}
+
 case "$ACTION" in
+pre)
+	if [ "$UPDATE" = "yes" ]; then
+		case "${version}" in
+		0.*) save_conflicting_config_files ;;
+		esac
+	fi
+	;;
 post)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Create the database directory
-		mkdir -p var/lib/_clamav
-		# The clamav user owns it
-		chown -R _clamav:_clamav var/lib/_clamav
-		# Let group members write to it
-		chmod g+w var/lib/_clamav
+		mkdir -p ${databasedir}
 	else
-		if [ -d "var/lib/clamav" ]; then
-			mv var/lib/clamav var/lib/_clamav
-			chown -R _clamav:_clamav var/lib/_clamav
-		fi
+		prev_version="$(cat ${configdir}/.migrate 2> /dev/null)"
+
+		case "${prev_version}" in
+		0.*)
+			# This should come first or else the old database
+			# directory will be moved to /var/lib/clamav/_clamav.
+			[ -d ${old_databasedir} ] && mv ${old_databasedir} ${databasedir}
+			migrate_config_files
+			;;
+		esac
 	fi
+	chown -R _clamav:_clamav ${databasedir}
+	chmod g+w ${databasedir}
 	;;
 esac
-
diff --git a/srcpkgs/clamav/INSTALL.msg b/srcpkgs/clamav/INSTALL.msg
new file mode 100644
index 0000000000..325ec6002c
--- /dev/null
+++ b/srcpkgs/clamav/INSTALL.msg
@@ -0,0 +1,12 @@
+The directories used by clamav have changed in versions >=1.2.0_1. This change
+was made to keep the system clean and consistent with other packages.
+
+Changes:
+ - All the configuration files are now located in /etc/clamav
+ - The database directory is now /lib/var/clamav
+
+This change should be done automatically for most users and should require no
+user interference.
+
+For users already using the /etc/clamav directory for custom clamav installs,
+a '.custom' extension was added to those configuration files.
diff --git a/srcpkgs/clamav/REMOVE b/srcpkgs/clamav/REMOVE
index 1edffaba78..bc2171087b 100644
--- a/srcpkgs/clamav/REMOVE
+++ b/srcpkgs/clamav/REMOVE
@@ -1,10 +1,14 @@
 # REMOVE
+
+readonly configdir=/etc/clamav
+readonly databasedir=/var/lib/clamav
+
 case "$ACTION" in
 pre)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Remove the clamav database directory and contents
-		rm -rf var/lib/_clamav
+		# Do not delete while bootstrapping.
+		[ -f ${configdir}/.migrate ] && exit 0
+		rm -rf ${databasedir}
 	fi
 	;;
 esac
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 0000000000..155ded0a57
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+readonly runtimedir=/run/clamav
+
+[ ! -d "${runtime_dir}" ] && install -m755 -o _clamav -g _clamav -d "${runtimedir}"
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/clamonacc/run b/srcpkgs/clamav/files/clamonacc/run
new file mode 100755
index 0000000000..bee5f4fb75
--- /dev/null
+++ b/srcpkgs/clamav/files/clamonacc/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec clamonacc --foreground --fdpass 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 0000000000..69c2b54c22
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/patches/10-voidlinux-config.patch b/srcpkgs/clamav/patches/10-voidlinux-config.patch
new file mode 100644
index 0000000000..b59cb1689e
--- /dev/null
+++ b/srcpkgs/clamav/patches/10-voidlinux-config.patch
@@ -0,0 +1,44 @@
+--- a/etc/clamav-milter.conf.sample	2023-09-15 09:11:43.813492975 +0900
++++ b/etc/clamav-milter.conf.sample	2023-09-15 09:13:25.618493838 +0900
+@@ -38,7 +38,7 @@
+ # to work)
+ #
+ # Default: unset (don't drop privileges)
+-#User clamav
++#User _clamav
+ 
+ # Waiting for data from clamd will timeout after this time (seconds).
+ # Value of 0 disables the timeout.
+--- a/etc/clamd.conf.sample	2023-09-15 09:01:18.780487677 +0900
++++ b/etc/clamd.conf.sample	2023-09-15 09:06:04.215490096 +0900
+@@ -224,7 +224,7 @@
+ 
+ # Run as another user (clamd must be started by root for this option to work)
+ # Default: don't drop privileges
+-#User clamav
++#User _clamav
+ 
+ # Stop daemon when libclamav reports out of memory condition.
+ #ExitOnOOM yes
+@@ -766,7 +766,7 @@
+ # It has the same potential race condition limitations of the
+ # OnAccessExcludeUID option.
+ # Default: disabled
+-#OnAccessExcludeUname clamav
++#OnAccessExcludeUname _clamav
+ 
+ # Number of times the OnAccess client will retry a failed scan due to
+ # connection problems (or other issues).
+--- a/etc/freshclam.conf.sample	2023-09-15 09:10:07.028492154 +0900
++++ a/etc/freshclam.conf.sample	2023-09-15 09:08:02.132491096 +0900
+@@ -56,8 +56,8 @@
+ 
+ # By default when started freshclam drops privileges and switches to the
+ # "clamav" user. This directive allows you to change the database owner.
+-# Default: clamav (may depend on installation options)
+-#DatabaseOwner clamav
++# Default: _clamav (may depend on installtion options)
++#DatabaseOwner _clamav
+ 
+ # Use DNS to verify virus database version. FreshClam uses DNS TXT records
+ # to verify database and software versions. With this directive you can change
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 3574b7baee..eacaba9302 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,66 +1,68 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=4
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
-conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
-makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+version=1.2.0
+revision=1
+
+_configdir=/etc/clamav
+_databasedir=/var/lib/clamav
+
+build_style=cmake
+cmake_builddir=build
+# Setting ENABLE_JSON_SHARED=OFF is preferred, as libclamav.so may crash if you
+# use a different JSON library.
+configure_args="
+ -D CMAKE_BUILD_TYPE=Release
+ -D CMAKE_INSTALL_PREFIX=/usr
+ -D APP_CONFIG_DIRECTORY=${_configdir}
+ -D DATABASE_DIRECTORY=${_databasedir}
+ -D CLAMAV_USER=_clamav
+ -D CLAMAV_GROUP=_clamav
+ -D ENABLE_JSON_SHARED=OFF"
+hostmakedepends="rust cargo python3"
+makedepends="bzip2-devel check-devel libcurl-devel json-c-devel libmilter-devel
+ libxml2-devel ncurses-devel openssl-devel pcre2-devel zlib-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
-_clamav_descr="ClamAV user"
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
 system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir=${_databasedir}
+conf_files="
+ ${_configdir}/clamav-milter.conf
+ ${_configdir}/clamd.conf
+ ${_configdir}/freshclam.conf"
+_sv_files="clamd clamonacc freshclam"
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	build_helper="qemu"
+	makedepends+=" rust-std"
+	configure_args+="
+	 -D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}
+	 -D RUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -D CMAKE_EXE_LINKER_FLAGS=-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	vmkdir ${_configdir}
+	for sv in ${_sv_files}; do vsv "${sv}"; done
+	for path in ${conf_files}; do
+		name=${path#"${_configdir}"/}
+
+		mv -v "${PKGDESTDIR}"/"${path}".sample "${PKGDESTDIR}"/"${path}"
+		vsconf "${PKGDESTDIR}"/"${path}" "${name}".sample
+		sed -i "${PKGDESTDIR}"/"${path}" -e "s;^Example$;# Example;"
+	done
+	vdoc "${FILESDIR}"/README.voidlinux
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-	vdoc "${FILESDIR}/README.voidlinux"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (18 preceding siblings ...)
  2023-09-19  7:56 ` nsudsgaard
@ 2023-09-19  7:57 ` nsudsgaard
  2023-09-19  8:00 ` nsudsgaard
                   ` (21 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-19  7:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 13604 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1724960407

Comment:
I have made some large changes to the code.

- Cleaned up the template.
- Removed the unnecessary patches (whether `CMAKE_BUILD_TYPE` will cause issues is unknown to me).
- Migrated directories `/etc` -> `/etc/clamav` and `/var/lib/_clamav` -> `/var/lib/clamav`.
- Added a message about the migration.
- Patched the configuration to be more Void Linux like.

What I have tested:

- Builds locally on x86_64 (though I highy suspect this would build on musl or different architectures).
- Briefly tested x86_64 (ran `freshclam` and `clamscan`).
- Files properly migrate

NOTE: This code only works if you are updating using a [custom repository](https://docs.voidlinux.org/xbps/repositories/custom.html) (not by `xi`), as I "bootstrap" the package by
reinstalling during the post phase of `INSTALL`.
I am not sure if this is the best idea so I will let people more knowledgeable than me decide on that.

This is a patch against the **upstream version.**
```patch
diff --git a/common/shlibs b/common/shlibs
index d2791c238e..89f9e73b08 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2257,10 +2257,11 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.2.0_1
+libclamunrar.so.12 clamav-1.2.0_1
+libclamunrar_iface.so.12 clamav-1.2.0_1
+libfreshclam.so.3 clamav-1.2.0_1
+libclammspack.so.0 clamav-1.2.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/INSTALL b/srcpkgs/clamav/INSTALL
index 4b8adfa4a3..7ea5300a7a 100644
--- a/srcpkgs/clamav/INSTALL
+++ b/srcpkgs/clamav/INSTALL
@@ -1,20 +1,84 @@
 # INSTALL
+
+readonly old_configdir=/etc
+readonly configdir=/etc/clamav
+readonly old_config_files="
+    ${old_configdir}/clamd.conf
+    ${old_configdir}/freshclam.conf"
+readonly config_files="
+    ${configdir}/clamav-milter.conf
+    ${configdir}/clamd.conf
+    ${configdir}/freshclam.conf"
+readonly old_databasedir=/var/lib/_clamav
+readonly databasedir=/var/lib/clamav
+
+version="$(xbps-query clamav | grep pkgver)"
+version=${version#pkgver: clamav-}
+
+check_mv() {
+	[ -f "${1}" ] && mv "${1}" "${2}"
+}
+
+# The following functions are to used automatically to migrate the config files
+# from /etc (0.x versions) to /etc/clamav (1.x versions) safely.
+save_conflicting_config_files() {
+	[ ! -d ${configdir} ] && mkdir -p ${configdir}
+	for file in ${config_files}; do
+		check_mv "${file}" "${file}".custom
+	done
+	# Saves the previous version to use in the post action.
+	printf '%s' "${version}" > ${configdir}/.migrate
+}
+
+# This is done as moving the old config files into /etc/clamav in the preinstall
+# phase would end in xbps overwriting them with the new config files (not making
+# xxx.new-${VERSION}).
+# An alternative to this would be by renaming the new config files into the
+# xxx.new-${VERSION} format before moving the old config files into /etc/clamav
+# in the postinstall phase. However, it is usually not a good idea to emulate
+# program behavior as it may cause issues in the future (in this case if the
+# format changes).
+bootstrap_pkg() {
+	printf '%s\n' "${PKGNAME}-${VERSION}: bootstrapping ..."
+	xbps-remove -y clamav > /dev/null 2>&1
+	xbps-install -y clamav > /dev/null 2>&1
+}
+
+migrate_config_files() {
+	for file in ${old_config_files}; do
+		for match in "${file}"*; do
+			name=${match#"${old_configdir}"/}
+			check_mv "${match}" ${configdir}/"${name}"
+		done
+	done
+	bootstrap_pkg
+	rm ${configdir}/.migrate
+}
+
 case "$ACTION" in
+pre)
+	if [ "$UPDATE" = "yes" ]; then
+		case "${version}" in
+		0.*) save_conflicting_config_files ;;
+		esac
+	fi
+	;;
 post)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Create the database directory
-		mkdir -p var/lib/_clamav
-		# The clamav user owns it
-		chown -R _clamav:_clamav var/lib/_clamav
-		# Let group members write to it
-		chmod g+w var/lib/_clamav
+		mkdir -p ${databasedir}
 	else
-		if [ -d "var/lib/clamav" ]; then
-			mv var/lib/clamav var/lib/_clamav
-			chown -R _clamav:_clamav var/lib/_clamav
-		fi
+		prev_version="$(cat ${configdir}/.migrate 2> /dev/null)"
+
+		case "${prev_version}" in
+		0.*)
+			# This should come first or else the old database
+			# directory will be moved to /var/lib/clamav/_clamav.
+			[ -d ${old_databasedir} ] && mv ${old_databasedir} ${databasedir}
+			migrate_config_files
+			;;
+		esac
 	fi
+	chown -R _clamav:_clamav ${databasedir}
+	chmod g+w ${databasedir}
 	;;
 esac
-
diff --git a/srcpkgs/clamav/INSTALL.msg b/srcpkgs/clamav/INSTALL.msg
new file mode 100644
index 0000000000..325ec6002c
--- /dev/null
+++ b/srcpkgs/clamav/INSTALL.msg
@@ -0,0 +1,12 @@
+The directories used by clamav have changed in versions >=1.2.0_1. This change
+was made to keep the system clean and consistent with other packages.
+
+Changes:
+ - All the configuration files are now located in /etc/clamav
+ - The database directory is now /lib/var/clamav
+
+This change should be done automatically for most users and should require no
+user interference.
+
+For users already using the /etc/clamav directory for custom clamav installs,
+a '.custom' extension was added to those configuration files.
diff --git a/srcpkgs/clamav/REMOVE b/srcpkgs/clamav/REMOVE
index 1edffaba78..bc2171087b 100644
--- a/srcpkgs/clamav/REMOVE
+++ b/srcpkgs/clamav/REMOVE
@@ -1,10 +1,14 @@
 # REMOVE
+
+readonly configdir=/etc/clamav
+readonly databasedir=/var/lib/clamav
+
 case "$ACTION" in
 pre)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Remove the clamav database directory and contents
-		rm -rf var/lib/_clamav
+		# Do not delete while bootstrapping.
+		[ -f ${configdir}/.migrate ] && exit 0
+		rm -rf ${databasedir}
 	fi
 	;;
 esac
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 0000000000..155ded0a57
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+readonly runtimedir=/run/clamav
+
+[ ! -d "${runtime_dir}" ] && install -m 755 -o _clamav -g _clamav -d "${runtimedir}"
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/clamonacc/run b/srcpkgs/clamav/files/clamonacc/run
new file mode 100755
index 0000000000..bee5f4fb75
--- /dev/null
+++ b/srcpkgs/clamav/files/clamonacc/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec clamonacc --foreground --fdpass 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 0000000000..69c2b54c22
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/patches/10-voidlinux-config.patch b/srcpkgs/clamav/patches/10-voidlinux-config.patch
new file mode 100644
index 0000000000..b59cb1689e
--- /dev/null
+++ b/srcpkgs/clamav/patches/10-voidlinux-config.patch
@@ -0,0 +1,44 @@
+--- a/etc/clamav-milter.conf.sample	2023-09-15 09:11:43.813492975 +0900
++++ b/etc/clamav-milter.conf.sample	2023-09-15 09:13:25.618493838 +0900
+@@ -38,7 +38,7 @@
+ # to work)
+ #
+ # Default: unset (don't drop privileges)
+-#User clamav
++#User _clamav
+ 
+ # Waiting for data from clamd will timeout after this time (seconds).
+ # Value of 0 disables the timeout.
+--- a/etc/clamd.conf.sample	2023-09-15 09:01:18.780487677 +0900
++++ b/etc/clamd.conf.sample	2023-09-15 09:06:04.215490096 +0900
+@@ -224,7 +224,7 @@
+ 
+ # Run as another user (clamd must be started by root for this option to work)
+ # Default: don't drop privileges
+-#User clamav
++#User _clamav
+ 
+ # Stop daemon when libclamav reports out of memory condition.
+ #ExitOnOOM yes
+@@ -766,7 +766,7 @@
+ # It has the same potential race condition limitations of the
+ # OnAccessExcludeUID option.
+ # Default: disabled
+-#OnAccessExcludeUname clamav
++#OnAccessExcludeUname _clamav
+ 
+ # Number of times the OnAccess client will retry a failed scan due to
+ # connection problems (or other issues).
+--- a/etc/freshclam.conf.sample	2023-09-15 09:10:07.028492154 +0900
++++ a/etc/freshclam.conf.sample	2023-09-15 09:08:02.132491096 +0900
+@@ -56,8 +56,8 @@
+ 
+ # By default when started freshclam drops privileges and switches to the
+ # "clamav" user. This directive allows you to change the database owner.
+-# Default: clamav (may depend on installation options)
+-#DatabaseOwner clamav
++# Default: _clamav (may depend on installtion options)
++#DatabaseOwner _clamav
+ 
+ # Use DNS to verify virus database version. FreshClam uses DNS TXT records
+ # to verify database and software versions. With this directive you can change
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 3574b7baee..eacaba9302 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,66 +1,68 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=4
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
-conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
-makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+version=1.2.0
+revision=1
+
+_configdir=/etc/clamav
+_databasedir=/var/lib/clamav
+
+build_style=cmake
+cmake_builddir=build
+# Setting ENABLE_JSON_SHARED=OFF is preferred, as libclamav.so may crash if you
+# use a different JSON library.
+configure_args="
+ -D CMAKE_BUILD_TYPE=Release
+ -D CMAKE_INSTALL_PREFIX=/usr
+ -D APP_CONFIG_DIRECTORY=${_configdir}
+ -D DATABASE_DIRECTORY=${_databasedir}
+ -D CLAMAV_USER=_clamav
+ -D CLAMAV_GROUP=_clamav
+ -D ENABLE_JSON_SHARED=OFF"
+hostmakedepends="rust cargo python3"
+makedepends="bzip2-devel check-devel libcurl-devel json-c-devel libmilter-devel
+ libxml2-devel ncurses-devel openssl-devel pcre2-devel zlib-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
-_clamav_descr="ClamAV user"
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
 system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir=${_databasedir}
+conf_files="
+ ${_configdir}/clamav-milter.conf
+ ${_configdir}/clamd.conf
+ ${_configdir}/freshclam.conf"
+_sv_files="clamd clamonacc freshclam"
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	build_helper="qemu"
+	makedepends+=" rust-std"
+	configure_args+="
+	 -D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}
+	 -D RUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -D CMAKE_EXE_LINKER_FLAGS=-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	vmkdir ${_configdir}
+	for sv in ${_sv_files}; do vsv "${sv}"; done
+	for path in ${conf_files}; do
+		name=${path#"${_configdir}"/}
+
+		mv -v "${PKGDESTDIR}"/"${path}".sample "${PKGDESTDIR}"/"${path}"
+		vsconf "${PKGDESTDIR}"/"${path}" "${name}".sample
+		sed -i "${PKGDESTDIR}"/"${path}" -e "s;^Example$;# Example;"
+	done
+	vdoc "${FILESDIR}"/README.voidlinux
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-	vdoc "${FILESDIR}/README.voidlinux"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (19 preceding siblings ...)
  2023-09-19  7:57 ` nsudsgaard
@ 2023-09-19  8:00 ` nsudsgaard
  2023-09-19  8:01 ` nsudsgaard
                   ` (20 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-19  8:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (20 preceding siblings ...)
  2023-09-19  8:00 ` nsudsgaard
@ 2023-09-19  8:01 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (19 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-19  8:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 13687 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1724960407

Comment:
I have made some large changes to the code.

- Cleaned up the template.
- Removed the unnecessary patches (whether `CMAKE_BUILD_TYPE` will cause issues is unknown to me).
- Migrated directories `/etc` -> `/etc/clamav` and `/var/lib/_clamav` -> `/var/lib/clamav`.
- Added a message about the migration.
- Patched the configuration to be more Void Linux like.
- Include service files for `clamd`, `clamonacc` and `freshclam` (**untested**). 

What I have tested:

- Builds locally on x86_64 (though I highy suspect this would build on musl or different architectures).
- Briefly tested x86_64 (ran `freshclam` and `clamscan`).
- Files properly migrate

NOTE: This code only works if you are updating using a [custom repository](https://docs.voidlinux.org/xbps/repositories/custom.html) (not by `xi`), as I "bootstrap" the package by
reinstalling during the post phase of `INSTALL`.
I am not sure if this is the best idea so I will let people more knowledgeable than me decide on that.

This is a patch against the **upstream version.**
```patch
diff --git a/common/shlibs b/common/shlibs
index d2791c238e..89f9e73b08 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2257,10 +2257,11 @@ libsfml-system.so.2.5 SFML-2.5.0_1
 libsfml-window.so.2.5 SFML-2.5.0_1
 libsfml-audio.so.2.5 SFML-2.5.0_1
 libsfml-graphics.so.2.5 SFML-2.5.0_1
-libclamav.so.9 clamav-0.103.1_2
-libclamunrar.so.9 clamav-0.103.1_2
-libclamunrar_iface.so.9 clamav-0.103.1_2
-libfreshclam.so.2 clamav-0.103.1_2
+libclamav.so.12 clamav-1.2.0_1
+libclamunrar.so.12 clamav-1.2.0_1
+libclamunrar_iface.so.12 clamav-1.2.0_1
+libfreshclam.so.3 clamav-1.2.0_1
+libclammspack.so.0 clamav-1.2.0_1
 libqca-qt5.so.2 qca-qt5-2.1.3_1
 libqt5keychain.so.1 qtkeychain-qt5-0.7.0_1
 libphonon4qt5.so.4 phonon-qt5-4.8.3_1
diff --git a/srcpkgs/clamav/INSTALL b/srcpkgs/clamav/INSTALL
index 4b8adfa4a3..7ea5300a7a 100644
--- a/srcpkgs/clamav/INSTALL
+++ b/srcpkgs/clamav/INSTALL
@@ -1,20 +1,84 @@
 # INSTALL
+
+readonly old_configdir=/etc
+readonly configdir=/etc/clamav
+readonly old_config_files="
+    ${old_configdir}/clamd.conf
+    ${old_configdir}/freshclam.conf"
+readonly config_files="
+    ${configdir}/clamav-milter.conf
+    ${configdir}/clamd.conf
+    ${configdir}/freshclam.conf"
+readonly old_databasedir=/var/lib/_clamav
+readonly databasedir=/var/lib/clamav
+
+version="$(xbps-query clamav | grep pkgver)"
+version=${version#pkgver: clamav-}
+
+check_mv() {
+	[ -f "${1}" ] && mv "${1}" "${2}"
+}
+
+# The following functions are to used automatically to migrate the config files
+# from /etc (0.x versions) to /etc/clamav (1.x versions) safely.
+save_conflicting_config_files() {
+	[ ! -d ${configdir} ] && mkdir -p ${configdir}
+	for file in ${config_files}; do
+		check_mv "${file}" "${file}".custom
+	done
+	# Saves the previous version to use in the post action.
+	printf '%s' "${version}" > ${configdir}/.migrate
+}
+
+# This is done as moving the old config files into /etc/clamav in the preinstall
+# phase would end in xbps overwriting them with the new config files (not making
+# xxx.new-${VERSION}).
+# An alternative to this would be by renaming the new config files into the
+# xxx.new-${VERSION} format before moving the old config files into /etc/clamav
+# in the postinstall phase. However, it is usually not a good idea to emulate
+# program behavior as it may cause issues in the future (in this case if the
+# format changes).
+bootstrap_pkg() {
+	printf '%s\n' "${PKGNAME}-${VERSION}: bootstrapping ..."
+	xbps-remove -y clamav > /dev/null 2>&1
+	xbps-install -y clamav > /dev/null 2>&1
+}
+
+migrate_config_files() {
+	for file in ${old_config_files}; do
+		for match in "${file}"*; do
+			name=${match#"${old_configdir}"/}
+			check_mv "${match}" ${configdir}/"${name}"
+		done
+	done
+	bootstrap_pkg
+	rm ${configdir}/.migrate
+}
+
 case "$ACTION" in
+pre)
+	if [ "$UPDATE" = "yes" ]; then
+		case "${version}" in
+		0.*) save_conflicting_config_files ;;
+		esac
+	fi
+	;;
 post)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Create the database directory
-		mkdir -p var/lib/_clamav
-		# The clamav user owns it
-		chown -R _clamav:_clamav var/lib/_clamav
-		# Let group members write to it
-		chmod g+w var/lib/_clamav
+		mkdir -p ${databasedir}
 	else
-		if [ -d "var/lib/clamav" ]; then
-			mv var/lib/clamav var/lib/_clamav
-			chown -R _clamav:_clamav var/lib/_clamav
-		fi
+		prev_version="$(cat ${configdir}/.migrate 2> /dev/null)"
+
+		case "${prev_version}" in
+		0.*)
+			# This should come first or else the old database
+			# directory will be moved to /var/lib/clamav/_clamav.
+			[ -d ${old_databasedir} ] && mv ${old_databasedir} ${databasedir}
+			migrate_config_files
+			;;
+		esac
 	fi
+	chown -R _clamav:_clamav ${databasedir}
+	chmod g+w ${databasedir}
 	;;
 esac
-
diff --git a/srcpkgs/clamav/INSTALL.msg b/srcpkgs/clamav/INSTALL.msg
new file mode 100644
index 0000000000..325ec6002c
--- /dev/null
+++ b/srcpkgs/clamav/INSTALL.msg
@@ -0,0 +1,12 @@
+The directories used by clamav have changed in versions >=1.2.0_1. This change
+was made to keep the system clean and consistent with other packages.
+
+Changes:
+ - All the configuration files are now located in /etc/clamav
+ - The database directory is now /lib/var/clamav
+
+This change should be done automatically for most users and should require no
+user interference.
+
+For users already using the /etc/clamav directory for custom clamav installs,
+a '.custom' extension was added to those configuration files.
diff --git a/srcpkgs/clamav/REMOVE b/srcpkgs/clamav/REMOVE
index 1edffaba78..bc2171087b 100644
--- a/srcpkgs/clamav/REMOVE
+++ b/srcpkgs/clamav/REMOVE
@@ -1,10 +1,14 @@
 # REMOVE
+
+readonly configdir=/etc/clamav
+readonly databasedir=/var/lib/clamav
+
 case "$ACTION" in
 pre)
-	# Only if not updating
 	if [ "$UPDATE" != "yes" ]; then
-		# Remove the clamav database directory and contents
-		rm -rf var/lib/_clamav
+		# Do not delete while bootstrapping.
+		[ -f ${configdir}/.migrate ] && exit 0
+		rm -rf ${databasedir}
 	fi
 	;;
 esac
diff --git a/srcpkgs/clamav/files/clamd/run b/srcpkgs/clamav/files/clamd/run
new file mode 100755
index 0000000000..155ded0a57
--- /dev/null
+++ b/srcpkgs/clamav/files/clamd/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+readonly runtimedir=/run/clamav
+
+[ ! -d "${runtime_dir}" ] && install -m 755 -o _clamav -g _clamav -d "${runtimedir}"
+exec clamd --foreground 2>&1
diff --git a/srcpkgs/clamav/files/clamonacc/run b/srcpkgs/clamav/files/clamonacc/run
new file mode 100755
index 0000000000..bee5f4fb75
--- /dev/null
+++ b/srcpkgs/clamav/files/clamonacc/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec clamonacc --foreground --fdpass 2>&1
diff --git a/srcpkgs/clamav/files/freshclam/run b/srcpkgs/clamav/files/freshclam/run
new file mode 100755
index 0000000000..69c2b54c22
--- /dev/null
+++ b/srcpkgs/clamav/files/freshclam/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec freshclam --daemon --foreground 2>&1
diff --git a/srcpkgs/clamav/patches/10-voidlinux-config.patch b/srcpkgs/clamav/patches/10-voidlinux-config.patch
new file mode 100644
index 0000000000..b59cb1689e
--- /dev/null
+++ b/srcpkgs/clamav/patches/10-voidlinux-config.patch
@@ -0,0 +1,44 @@
+--- a/etc/clamav-milter.conf.sample	2023-09-15 09:11:43.813492975 +0900
++++ b/etc/clamav-milter.conf.sample	2023-09-15 09:13:25.618493838 +0900
+@@ -38,7 +38,7 @@
+ # to work)
+ #
+ # Default: unset (don't drop privileges)
+-#User clamav
++#User _clamav
+ 
+ # Waiting for data from clamd will timeout after this time (seconds).
+ # Value of 0 disables the timeout.
+--- a/etc/clamd.conf.sample	2023-09-15 09:01:18.780487677 +0900
++++ b/etc/clamd.conf.sample	2023-09-15 09:06:04.215490096 +0900
+@@ -224,7 +224,7 @@
+ 
+ # Run as another user (clamd must be started by root for this option to work)
+ # Default: don't drop privileges
+-#User clamav
++#User _clamav
+ 
+ # Stop daemon when libclamav reports out of memory condition.
+ #ExitOnOOM yes
+@@ -766,7 +766,7 @@
+ # It has the same potential race condition limitations of the
+ # OnAccessExcludeUID option.
+ # Default: disabled
+-#OnAccessExcludeUname clamav
++#OnAccessExcludeUname _clamav
+ 
+ # Number of times the OnAccess client will retry a failed scan due to
+ # connection problems (or other issues).
+--- a/etc/freshclam.conf.sample	2023-09-15 09:10:07.028492154 +0900
++++ a/etc/freshclam.conf.sample	2023-09-15 09:08:02.132491096 +0900
+@@ -56,8 +56,8 @@
+ 
+ # By default when started freshclam drops privileges and switches to the
+ # "clamav" user. This directive allows you to change the database owner.
+-# Default: clamav (may depend on installation options)
+-#DatabaseOwner clamav
++# Default: _clamav (may depend on installtion options)
++#DatabaseOwner _clamav
+ 
+ # Use DNS to verify virus database version. FreshClam uses DNS TXT records
+ # to verify database and software versions. With this directive you can change
diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index 3574b7baee..eacaba9302 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -1,66 +1,68 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=0.103.8
-revision=4
-build_style=gnu-configure
-# XXX: system llvm is too new (< 3.7 required)
-# Shipped llvm does not build with gcc>=6
-configure_args="--sbindir=/usr/bin --libdir=/usr/lib
- --with-openssl=${XBPS_CROSS_BASE}/usr --with-pcre=${XBPS_CROSS_BASE}/usr
- --with-zlib=${XBPS_CROSS_BASE}/usr --with-libbz2-prefix=${XBPS_CROSS_BASE}/usr
- --with-system-libmspack=${XBPS_CROSS_BASE}/usr --with-libcurl=${XBPS_CROSS_BASE}/usr
- --enable-ipv6 --with-user=_clamav --with-group=_clamav"
-conf_files="/etc/clamd.conf /etc/freshclam.conf"
-hostmakedepends="flex pkg-config zip"
-makedepends="json-c-devel libcurl-devel libmspack-devel libxml2-devel
- ncurses-devel pcre-devel tcl-devel"
+version=1.2.0
+revision=1
+
+_configdir=/etc/clamav
+_databasedir=/var/lib/clamav
+
+build_style=cmake
+cmake_builddir=build
+# Setting ENABLE_JSON_SHARED=OFF is preferred, as libclamav.so may crash if you
+# use a different JSON library.
+configure_args="
+ -D CMAKE_BUILD_TYPE=Release
+ -D CMAKE_INSTALL_PREFIX=/usr
+ -D APP_CONFIG_DIRECTORY=${_configdir}
+ -D DATABASE_DIRECTORY=${_databasedir}
+ -D CLAMAV_USER=_clamav
+ -D CLAMAV_GROUP=_clamav
+ -D ENABLE_JSON_SHARED=OFF"
+hostmakedepends="rust cargo python3"
+makedepends="bzip2-devel check-devel libcurl-devel json-c-devel libmilter-devel
+ libxml2-devel ncurses-devel openssl-devel pcre2-devel zlib-devel"
 short_desc="Clam Anti-Virus scanner"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
+changelog="https://raw.githubusercontent.com/Cisco-Talos/clamav/main/NEWS.md"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
-_clamav_descr="ClamAV user"
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
 system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir=${_databasedir}
+conf_files="
+ ${_configdir}/clamav-milter.conf
+ ${_configdir}/clamd.conf
+ ${_configdir}/freshclam.conf"
+_sv_files="clamd clamonacc freshclam"
 
-CPPFLAGS="-Wno-unused-local-typedefs"
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" --disable-mempool"
+	build_helper="qemu"
+	makedepends+=" rust-std"
+	configure_args+="
+	 -D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}
+	 -D RUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
 fi
+
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-fts-devel"
-	LDFLAGS="-lfts"
+	configure_args+=" -D CMAKE_EXE_LINKER_FLAGS=-lfts"
 fi
 
-do_configure() {
-	# Disable detection of sys/cdefs.h (it's obsolete)
-	sed -i configure -e 's; sys/cdefs\.h$;;'
-	sed -i configure -e 's;3\.7;3.9;'
-	# Enable IPv6 for cross builds
-	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
-	fi
-	# Need to set PCRE_HOME to make --with-pcre=/usr work
-	PCRE_HOME=/usr ./configure ${configure_args}
-}
 post_install() {
-	# Enable and patch clamd configuration
-	mv -v ${PKGDESTDIR}/etc/clamd.conf.sample ${PKGDESTDIR}/etc/clamd.conf
-	vsconf etc/clamd.conf.sample
-	sed -i ${PKGDESTDIR}/etc/clamd.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	vmkdir ${_configdir}
+	for sv in ${_sv_files}; do vsv "${sv}"; done
+	for path in ${conf_files}; do
+		name=${path#"${_configdir}"/}
+
+		mv -v "${PKGDESTDIR}"/"${path}".sample "${PKGDESTDIR}"/"${path}"
+		vsconf "${PKGDESTDIR}"/"${path}" "${name}".sample
+		sed -i "${PKGDESTDIR}"/"${path}" -e "s;^Example$;# Example;"
+	done
+	vdoc "${FILESDIR}"/README.voidlinux
 
-	# Enable and patch freshclam configuration
-	mv -v ${PKGDESTDIR}/etc/freshclam.conf.sample ${PKGDESTDIR}/etc/freshclam.conf
-	vsconf etc/freshclam.conf.sample
-	sed -i ${PKGDESTDIR}/etc/freshclam.conf \
-		-e "s;^Example$;# Example;" \
-		-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
-	vdoc "${FILESDIR}/README.voidlinux"
 }
+
 clamav-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"

```

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (21 preceding siblings ...)
  2023-09-19  8:01 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (18 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [ ] Builds locally on x86_64-musl
- [ ] Builds locally on x86_64
- [ ] Builds locally on i686
- [ ] Builds locally on aarch64-musl
- [ ] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [ ] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (22 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (17 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [ ] Builds locally on x86_64
- [ ] Builds locally on i686
- [ ] Builds locally on aarch64-musl
- [ ] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [ ] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (23 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (16 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [ ] Builds locally on aarch64-musl
- [ ] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [ ] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (24 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (15 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [ ] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [ ] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (25 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (14 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [ ] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (26 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (13 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [ ] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [ ] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (27 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-22 12:00 ` nsudsgaard
                   ` (12 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [ ] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [ ] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (28 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-22 12:00 ` nsudsgaard
  2023-09-23  1:44 ` nsudsgaard
                   ` (11 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-22 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [ ] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (29 preceding siblings ...)
  2023-09-22 12:00 ` nsudsgaard
@ 2023-09-23  1:44 ` nsudsgaard
  2023-09-23  2:45 ` nsudsgaard
                   ` (10 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-23  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [ ] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (30 preceding siblings ...)
  2023-09-23  1:44 ` nsudsgaard
@ 2023-09-23  2:45 ` nsudsgaard
  2023-09-23  3:30 ` nsudsgaard
                   ` (9 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-23  2:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [ ] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (31 preceding siblings ...)
  2023-09-23  2:45 ` nsudsgaard
@ 2023-09-23  3:30 ` nsudsgaard
  2023-09-23  5:51 ` nsudsgaard
                   ` (8 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-23  3:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (32 preceding siblings ...)
  2023-09-23  3:30 ` nsudsgaard
@ 2023-09-23  5:51 ` nsudsgaard
  2023-12-12  5:12 ` nsudsgaard
                   ` (7 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-09-23  5:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [x] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (33 preceding siblings ...)
  2023-09-23  5:51 ` nsudsgaard
@ 2023-12-12  5:12 ` nsudsgaard
  2023-12-12  5:12 ` nsudsgaard
                   ` (6 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-12-12  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [x] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [x] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (34 preceding siblings ...)
  2023-12-12  5:12 ` nsudsgaard
@ 2023-12-12  5:12 ` nsudsgaard
  2023-12-12  5:12 ` nsudsgaard
                   ` (5 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-12-12  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [x] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [x] Test on x86_64-musl
- [x] Test on x86_64
- [ ] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (35 preceding siblings ...)
  2023-12-12  5:12 ` nsudsgaard
@ 2023-12-12  5:12 ` nsudsgaard
  2023-12-12  5:12 ` nsudsgaard
                   ` (4 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-12-12  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [x] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [x] Test on x86_64-musl
- [x] Test on x86_64
- [x] Test clamd
- [ ] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (36 preceding siblings ...)
  2023-12-12  5:12 ` nsudsgaard
@ 2023-12-12  5:12 ` nsudsgaard
  2023-12-12  5:12 ` nsudsgaard
                   ` (3 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-12-12  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [x] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [x] Test on x86_64-musl
- [x] Test on x86_64
- [x] Test clamd
- [x] Test clamonacc
- [ ] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (37 preceding siblings ...)
  2023-12-12  5:12 ` nsudsgaard
@ 2023-12-12  5:12 ` nsudsgaard
  2024-03-12  1:44 ` github-actions
                   ` (2 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: nsudsgaard @ 2023-12-12  5:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1725014546

Comment:
I have updated the above patch to include service files for `clamd`, `clamonacc` and `freshclam`. However, I have not tested it except that it installs.

TODO:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [x] Builds locally on i686
- [x] Builds locally on aarch64-musl
- [x] Builds locally on aarch64
- [x] Builds locally on armv7l-musl
- [x] Builds locally on armv7l
- [x] Builds locally on armv6l-musl
- [x] Builds locally on armv6l
- [x] Test on x86_64-musl
- [x] Test on x86_64
- [x] Test clamd
- [x] Test clamonacc
- [x] Test freshclam

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (38 preceding siblings ...)
  2023-12-12  5:12 ` nsudsgaard
@ 2024-03-12  1:44 ` github-actions
  2024-03-14 11:46 ` [PR PATCH] [Closed]: " jcgruenhage
  2024-03-14 11:46 ` jcgruenhage
  41 siblings, 0 replies; 43+ messages in thread
From: github-actions @ 2024-03-12  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1989764089

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PR PATCH] [Closed]: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (39 preceding siblings ...)
  2024-03-12  1:44 ` github-actions
@ 2024-03-14 11:46 ` jcgruenhage
  2024-03-14 11:46 ` jcgruenhage
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2024-03-14 11:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

There's a closed pull request on the void-packages repository

WIP: clamav: update to 1.0.1.
https://github.com/void-linux/void-packages/pull/41188

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->

### Things still to do:

 - [ ] Verify that this still works as before and I didn't accidentally change any options
 - [x] Tell cmake to put stuff where it belongs (conf dir -> `/etc` and database dir -> `/var/lib/_clamav`)
 - [x] add services for at least clamav and freshclam
 - [ ] fix cross compilation
 - [ ] fix musl

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: WIP: clamav: update to 1.0.1.
  2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
                   ` (40 preceding siblings ...)
  2024-03-14 11:46 ` [PR PATCH] [Closed]: " jcgruenhage
@ 2024-03-14 11:46 ` jcgruenhage
  41 siblings, 0 replies; 43+ messages in thread
From: jcgruenhage @ 2024-03-14 11:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/41188#issuecomment-1997262514

Comment:
See #49286

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2024-03-14 11:46 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 18:17 [PR PATCH] WIP: clamav: update to 1.0.0 jcgruenhage
2022-12-19 18:18 ` [PR PATCH] [Updated] " jcgruenhage
2022-12-19 20:04 ` jcgruenhage
2022-12-19 20:07 ` jcgruenhage
2022-12-21 23:29 ` jcgruenhage
2023-04-01  1:52 ` github-actions
2023-04-02  9:37 ` [PR PATCH] [Updated] WIP: clamav: update to 1.0.1 jcgruenhage
2023-04-02  9:38 ` jcgruenhage
2023-05-23 21:46 ` r-ricci
2023-05-25 22:21 ` r-ricci
2023-05-26 21:41 ` r-ricci
2023-05-31 20:55 ` r-ricci
2023-08-30  1:44 ` github-actions
2023-09-04  9:57 ` jcgruenhage
2023-09-04 10:02 ` [PR PATCH] [Updated] " jcgruenhage
2023-09-05 20:24 ` [PR REVIEW] " r-ricci
2023-09-06 23:48 ` r-ricci
2023-09-19  7:20 ` nsudsgaard
2023-09-19  7:43 ` nsudsgaard
2023-09-19  7:56 ` nsudsgaard
2023-09-19  7:57 ` nsudsgaard
2023-09-19  8:00 ` nsudsgaard
2023-09-19  8:01 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-22 12:00 ` nsudsgaard
2023-09-23  1:44 ` nsudsgaard
2023-09-23  2:45 ` nsudsgaard
2023-09-23  3:30 ` nsudsgaard
2023-09-23  5:51 ` nsudsgaard
2023-12-12  5:12 ` nsudsgaard
2023-12-12  5:12 ` nsudsgaard
2023-12-12  5:12 ` nsudsgaard
2023-12-12  5:12 ` nsudsgaard
2023-12-12  5:12 ` nsudsgaard
2024-03-12  1:44 ` github-actions
2024-03-14 11:46 ` [PR PATCH] [Closed]: " jcgruenhage
2024-03-14 11:46 ` jcgruenhage

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).