Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] clamav: update to 1.0.3, adopt.
@ 2023-09-13  9:39 nsudsgaard
  2023-09-13  9:42 ` [PR PATCH] [Updated] " nsudsgaard
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-13  9:39 UTC (permalink / raw)
  To: ml

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

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

https://github.com/nsudsgaard/void-packages master
https://github.com/void-linux/void-packages/pull/46041

clamav: update to 1.0.3, adopt.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** (native architecture only)

<!--
#### 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, (x86_64-musl, x86_64)
- I built this PR locally for these architectures:
  - i686
  - aarch64 _crossbuild_
  - aarch64-musl _crossbuild_
  - armv7l _crossbuild_
  - armv7l-musl _crossbuild_
  - armv6l _crossbuild_
  - armv6l-musl _crossbuild_


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-46041.patch --]
[-- Type: text/x-diff, Size: 5358 bytes --]

From a36956cfa45eef2f66d87c18c79fd70c5f66368a Mon Sep 17 00:00:00 2001
From: Nicholas Sudsgaard <devel@nsudsgaard.com>
Date: Wed, 13 Sep 2023 16:45:13 +0900
Subject: [PATCH] clamav: update to 1.0.3, adopt.

---
 common/shlibs           |  7 ++--
 srcpkgs/clamav/template | 88 +++++++++++++++++++++--------------------
 2 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index c407ffde9b8fd..730ee8f6b2159 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2256,9 +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
+libclamav.so.11 clamav-1.0.3_1
+libclamunrar.so.11 clamav-1.0.3_1
+libclamunrar_iface.so.11 clamav-1.0.3_1
+libclammspack.so.0 clamav-1.0.3_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 3574b7baeed09..df48421dda465 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.0.3
+revision=1
+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=/etc
+ -D DATABASE_DIRECTORY=/var/lib/_${pkgname}
+ -D CLAMAV_USER=_${pkgname}
+ -D CLAMAV_GROUP=_${pkgname}
+ -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>"
+maintainer="Nicholas Sudsgaard <devel@nsudsgaard.com>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
+checksum=8779458dc31fdee1232eb8986f092d25568b39f5d337c0cbcd9c1abb5dc2886b
+system_accounts="_${pkgname}"
 _clamav_descr="ClamAV user"
-system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir="/var/lib/_${pkgname}"
+conf_files="/etc/clamd.conf /etc/freshclam.conf /etc/clamav-milter.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}"
 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
+pre_configure() {
 	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
+		path=${XBPS_CROSS_BASE}/lib/rustlib/${XBPS_CROSS_RUST_TARGET}/lib
+
+		sed -i cmake/FindRust.cmake \
+		    -e "s:^set(RUSTFLAGS \"\")$:set(RUSTFLAGS \"-L${path}\"):g"
 	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 /etc 755
+	for path in ${conf_files}; do
+		name=${path#/etc}
+
+		mv -v ${PKGDESTDIR}//${path}.sample ${PKGDESTDIR}/${path}
+		vsconf ${PKGDESTDIR}/${path} ${name}.sample
+		sed -i ${PKGDESTDIR}/${path}        \
+			-e "s;^Example$;# Example;" \
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	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] 16+ messages in thread

* Re: [PR PATCH] [Updated] clamav: update to 1.0.3, adopt.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
@ 2023-09-13  9:42 ` nsudsgaard
  2023-09-13 20:54 ` r-ricci
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-13  9:42 UTC (permalink / raw)
  To: ml

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

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

https://github.com/nsudsgaard/void-packages master
https://github.com/void-linux/void-packages/pull/46041

clamav: update to 1.0.3, adopt.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** (native architecture only)

<!--
#### 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, (x86_64-musl, x86_64)
- I built this PR locally for these architectures:
  - i686
  - aarch64 _crossbuild_
  - aarch64-musl _crossbuild_
  - armv7l _crossbuild_
  - armv7l-musl _crossbuild_
  - armv6l _crossbuild_
  - armv6l-musl _crossbuild_


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-46041.patch --]
[-- Type: text/x-diff, Size: 5358 bytes --]

From a36956cfa45eef2f66d87c18c79fd70c5f66368a Mon Sep 17 00:00:00 2001
From: Nicholas Sudsgaard <devel@nsudsgaard.com>
Date: Wed, 13 Sep 2023 16:45:13 +0900
Subject: [PATCH] clamav: update to 1.0.3, adopt.

---
 common/shlibs           |  7 ++--
 srcpkgs/clamav/template | 88 +++++++++++++++++++++--------------------
 2 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index c407ffde9b8fd..730ee8f6b2159 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2256,9 +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
+libclamav.so.11 clamav-1.0.3_1
+libclamunrar.so.11 clamav-1.0.3_1
+libclamunrar_iface.so.11 clamav-1.0.3_1
+libclammspack.so.0 clamav-1.0.3_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 3574b7baeed09..df48421dda465 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.0.3
+revision=1
+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=/etc
+ -D DATABASE_DIRECTORY=/var/lib/_${pkgname}
+ -D CLAMAV_USER=_${pkgname}
+ -D CLAMAV_GROUP=_${pkgname}
+ -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>"
+maintainer="Nicholas Sudsgaard <devel@nsudsgaard.com>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
+checksum=8779458dc31fdee1232eb8986f092d25568b39f5d337c0cbcd9c1abb5dc2886b
+system_accounts="_${pkgname}"
 _clamav_descr="ClamAV user"
-system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir="/var/lib/_${pkgname}"
+conf_files="/etc/clamd.conf /etc/freshclam.conf /etc/clamav-milter.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}"
 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
+pre_configure() {
 	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
+		path=${XBPS_CROSS_BASE}/lib/rustlib/${XBPS_CROSS_RUST_TARGET}/lib
+
+		sed -i cmake/FindRust.cmake \
+		    -e "s:^set(RUSTFLAGS \"\")$:set(RUSTFLAGS \"-L${path}\"):g"
 	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 /etc 755
+	for path in ${conf_files}; do
+		name=${path#/etc}
+
+		mv -v ${PKGDESTDIR}//${path}.sample ${PKGDESTDIR}/${path}
+		vsconf ${PKGDESTDIR}/${path} ${name}.sample
+		sed -i ${PKGDESTDIR}/${path}        \
+			-e "s;^Example$;# Example;" \
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	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] 16+ messages in thread

* Re: clamav: update to 1.0.3, adopt.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
  2023-09-13  9:42 ` [PR PATCH] [Updated] " nsudsgaard
@ 2023-09-13 20:54 ` r-ricci
  2023-09-14  2:26 ` nsudsgaard
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: r-ricci @ 2023-09-13 20:54 UTC (permalink / raw)
  To: ml

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

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718304052

Comment:
There's #41188.

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

* Re: clamav: update to 1.0.3, adopt.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
  2023-09-13  9:42 ` [PR PATCH] [Updated] " nsudsgaard
  2023-09-13 20:54 ` r-ricci
@ 2023-09-14  2:26 ` nsudsgaard
  2023-09-14  3:47 ` classabbyamp
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-14  2:26 UTC (permalink / raw)
  To: ml

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

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718654025

Comment:
> There's #41188.

I had a look at the PR, and the patches seem quite unnecessary, especially `rust-optimize.patch`, which can be done by simply setting `CMAKE_BUILD_TYPE=Release`.

I was also thinking about adding service files, but I chose to just focus on updating on this PR.

Also, the PR you mentioned is updating to the latest version (1.2.0). I chose to go with the most recent LTS version (1.0.3). I suppose it's better to update to the latest-and-greatest rather than an LTS version on Void Linux?

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

* Re: clamav: update to 1.0.3, adopt.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (2 preceding siblings ...)
  2023-09-14  2:26 ` nsudsgaard
@ 2023-09-14  3:47 ` classabbyamp
  2023-09-14  3:53 ` [PR PATCH] [Updated] " nsudsgaard
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2023-09-14  3:47 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718721890

Comment:
we'd prefer if you had a [few more contributions before adopting](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#adopting-a-template) a template

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

* Re: [PR PATCH] [Updated] clamav: update to 1.0.3, adopt.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (3 preceding siblings ...)
  2023-09-14  3:47 ` classabbyamp
@ 2023-09-14  3:53 ` nsudsgaard
  2023-09-14  3:54 ` clamav: update to 1.0.3 nsudsgaard
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-14  3:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/nsudsgaard/void-packages master
https://github.com/void-linux/void-packages/pull/46041

clamav: update to 1.0.3, adopt.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** (native architecture only)

<!--
#### 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, (x86_64-musl, x86_64)
- I built this PR locally for these architectures:
  - i686
  - aarch64 _crossbuild_
  - aarch64-musl _crossbuild_
  - armv7l _crossbuild_
  - armv7l-musl _crossbuild_
  - armv6l _crossbuild_
  - armv6l-musl _crossbuild_


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-46041.patch --]
[-- Type: text/x-diff, Size: 6320 bytes --]

From a36956cfa45eef2f66d87c18c79fd70c5f66368a Mon Sep 17 00:00:00 2001
From: Nicholas Sudsgaard <devel@nsudsgaard.com>
Date: Wed, 13 Sep 2023 16:45:13 +0900
Subject: [PATCH 1/2] clamav: update to 1.0.3, adopt.

---
 common/shlibs           |  7 ++--
 srcpkgs/clamav/template | 88 +++++++++++++++++++++--------------------
 2 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index c407ffde9b8fd..730ee8f6b2159 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2256,9 +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
+libclamav.so.11 clamav-1.0.3_1
+libclamunrar.so.11 clamav-1.0.3_1
+libclamunrar_iface.so.11 clamav-1.0.3_1
+libclammspack.so.0 clamav-1.0.3_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 3574b7baeed09..df48421dda465 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.0.3
+revision=1
+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=/etc
+ -D DATABASE_DIRECTORY=/var/lib/_${pkgname}
+ -D CLAMAV_USER=_${pkgname}
+ -D CLAMAV_GROUP=_${pkgname}
+ -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>"
+maintainer="Nicholas Sudsgaard <devel@nsudsgaard.com>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
+checksum=8779458dc31fdee1232eb8986f092d25568b39f5d337c0cbcd9c1abb5dc2886b
+system_accounts="_${pkgname}"
 _clamav_descr="ClamAV user"
-system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir="/var/lib/_${pkgname}"
+conf_files="/etc/clamd.conf /etc/freshclam.conf /etc/clamav-milter.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}"
 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
+pre_configure() {
 	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
+		path=${XBPS_CROSS_BASE}/lib/rustlib/${XBPS_CROSS_RUST_TARGET}/lib
+
+		sed -i cmake/FindRust.cmake \
+		    -e "s:^set(RUSTFLAGS \"\")$:set(RUSTFLAGS \"-L${path}\"):g"
 	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 /etc 755
+	for path in ${conf_files}; do
+		name=${path#/etc}
+
+		mv -v ${PKGDESTDIR}//${path}.sample ${PKGDESTDIR}/${path}
+		vsconf ${PKGDESTDIR}/${path} ${name}.sample
+		sed -i ${PKGDESTDIR}/${path}        \
+			-e "s;^Example$;# Example;" \
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	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"

From bb2ef58edd1075c85c6f6bf1bace5879f3705d32 Mon Sep 17 00:00:00 2001
From: Nicholas Sudsgaard <144646475+nsudsgaard@users.noreply.github.com>
Date: Thu, 14 Sep 2023 03:53:24 +0000
Subject: [PATCH 2/2] Renounce adoption

---
 srcpkgs/clamav/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index df48421dda465..51e05b8ab73b9 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -18,7 +18,7 @@ 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="Nicholas Sudsgaard <devel@nsudsgaard.com>"
+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"

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

* Re: clamav: update to 1.0.3.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (4 preceding siblings ...)
  2023-09-14  3:53 ` [PR PATCH] [Updated] " nsudsgaard
@ 2023-09-14  3:54 ` nsudsgaard
  2023-09-14  7:02 ` r-ricci
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-14  3:54 UTC (permalink / raw)
  To: ml

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

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718725743

Comment:
> we'd prefer if you had a [few more contributions before adopting](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#adopting-a-template) a template

Fair enough.

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

* Re: clamav: update to 1.0.3.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (5 preceding siblings ...)
  2023-09-14  3:54 ` clamav: update to 1.0.3 nsudsgaard
@ 2023-09-14  7:02 ` r-ricci
  2023-09-14  7:04 ` r-ricci
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: r-ricci @ 2023-09-14  7:02 UTC (permalink / raw)
  To: ml

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

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718875583

Comment:
> I had a look at the PR, and the patches seem quite unnecessary, especially `rust-optimize.patch`, which can be done by simply setting `CMAKE_BUILD_TYPE=Release`.

Usually void templates use the implicit `-DCMAKE_BUILD_TYPE=None` because this allows to use the flags set by xbps. But using Release is easier than adding a patch. I don't know which is better.

> I suppose it's better to update to the latest-and-greatest rather than an LTS version on Void Linux?

Latest stable is generally preferred.


I see your PR adds some useful improvements/cleanup, while lacking other things. Having to PRs creates confusion, I think one should be closed.


@jcgruenhage

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

* Re: clamav: update to 1.0.3.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (6 preceding siblings ...)
  2023-09-14  7:02 ` r-ricci
@ 2023-09-14  7:04 ` r-ricci
  2023-09-14  7:05 ` r-ricci
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: r-ricci @ 2023-09-14  7:04 UTC (permalink / raw)
  To: ml

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

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718875583

Comment:
> I had a look at the PR, and the patches seem quite unnecessary, especially `rust-optimize.patch`, which can be done by simply setting `CMAKE_BUILD_TYPE=Release`.

Usually void templates use the implicit `-DCMAKE_BUILD_TYPE=None` because this allows to use the flags set by xbps. But using Release is easier than adding a patch. I don't know which is better.

> I suppose it's better to update to the latest-and-greatest rather than an LTS version on Void Linux?

Latest stable is generally preferred.


I see your PR adds some useful improvements/cleanup, while lacking other things. Having two PRs creates confusion, I think one should be closed.


@jcgruenhage

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

* Re: clamav: update to 1.0.3.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (7 preceding siblings ...)
  2023-09-14  7:04 ` r-ricci
@ 2023-09-14  7:05 ` r-ricci
  2023-09-14 10:55 ` nsudsgaard
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: r-ricci @ 2023-09-14  7:05 UTC (permalink / raw)
  To: ml

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

New comment by r-ricci on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1718875583

Comment:
> I had a look at the PR, and the patches seem quite unnecessary, especially `rust-optimize.patch`, which can be done by simply setting `CMAKE_BUILD_TYPE=Release`.

Usually void templates use the implicit `-DCMAKE_BUILD_TYPE=None` because this allows to use the flags set by xbps. But using Release is easier than adding a patch. I don't know which is better.

> I suppose it's better to update to the latest-and-greatest rather than an LTS version on Void Linux?

Latest stable is generally preferred.


I see your PR adds some useful improvements/cleanups, while lacking other things. Having two PRs creates confusion, I think one should be closed.


@jcgruenhage

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

* Re: clamav: update to 1.0.3.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (8 preceding siblings ...)
  2023-09-14  7:05 ` r-ricci
@ 2023-09-14 10:55 ` nsudsgaard
  2023-09-14 14:46 ` WIP: clamav: update to 1.2.0 nsudsgaard
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-14 10:55 UTC (permalink / raw)
  To: ml

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

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1719227033

Comment:
> Latest stable is generally preferred.

I will start testing 1.2.0 then.

> Having two PRs creates confusion, I think one should be closed.

I will leave this decision to the contributors/members. I will contribute my work to the one that remains open.

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

* Re: WIP: clamav: update to 1.2.0.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (9 preceding siblings ...)
  2023-09-14 10:55 ` nsudsgaard
@ 2023-09-14 14:46 ` nsudsgaard
  2023-09-17  6:22 ` [PR PATCH] [Updated] " nsudsgaard
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-14 14:46 UTC (permalink / raw)
  To: ml

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

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1719601295

Comment:
WIP: 1.2.0 patch

```patch
--- a/common/shlibs	2023-09-14 14:00:08.268535424 +0900
+++ b/common/shlibs	2023-09-14 21:32:26.745618939 +0900
@@ -2256,11 +2256,11 @@
 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.3_1
-libclamunrar.so.11 clamav-1.0.3_1
-libclamunrar_iface.so.11 clamav-1.0.3_1
-libclammspack.so.0 clamav-1.0.3_1
-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
+libclammspack.so.0 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
--- a/srcpkgs/clamav/template	2023-09-14 23:44:26.619590292 +0900
+++ b/srcpkgs/clamav/template	2023-09-14 22:15:10.006635765 +0900
@@ -1,6 +1,6 @@
 # Template file for 'clamav'
 pkgname=clamav
-version=1.0.3
+version=1.2.0
 revision=1
 build_style=cmake
 cmake_builddir=build
@@ -10,9 +10,9 @@
  -D CMAKE_BUILD_TYPE=Release
  -D CMAKE_INSTALL_PREFIX=/usr
  -D APP_CONFIG_DIRECTORY=/etc
- -D DATABASE_DIRECTORY=/var/lib/_${pkgname}
- -D CLAMAV_USER=_${pkgname}
- -D CLAMAV_GROUP=_${pkgname}
+ -D DATABASE_DIRECTORY=/var/lib/_clamav
+ -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
@@ -21,17 +21,19 @@
 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=8779458dc31fdee1232eb8986f092d25568b39f5d337c0cbcd9c1abb5dc2886b
-system_accounts="_${pkgname}"
-_clamav_descr="ClamAV user"
-_clamav_homedir="/var/lib/_${pkgname}"
+checksum=97a192dffe141480b56cabf1063d79a9fc55cd59203241fa41bfc7a98a548020
+system_accounts="_clamav"
+_clamav_homedir="/var/lib/_clamav"
 conf_files="/etc/clamd.conf /etc/freshclam.conf /etc/clamav-milter.conf"
 
 if [ "$CROSS_BUILD" ]; then
 	build_helper="qemu"
 	makedepends+=" rust-std"
-	configure_args+=" -D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}"
+	configure_args+="
+	-D RUST_COMPILER_TARGET:STRING=${XBPS_CROSS_RUST_TARGET}
+	-D RUSTFLAGS=${XBPS_CROSS_RUSTFLAGS}"
 fi
 
 if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
@@ -39,15 +41,6 @@
 	configure_args+=" -D CMAKE_EXE_LINKER_FLAGS=-lfts"
 fi
 
-pre_configure() {
-	if [ "$CROSS_BUILD" ]; then
-		path=${XBPS_CROSS_BASE}/lib/rustlib/${XBPS_CROSS_RUST_TARGET}/lib
-
-		sed -i cmake/FindRust.cmake \
-		   -e "s:^set(RUSTFLAGS \"\")$:set(RUSTFLAGS \"-L${path}\"):g"
-	fi
-}
-
 post_install() {
 	vmkdir /etc 755
 	for path in ${conf_files}; do
@@ -57,7 +50,7 @@
 		vsconf ${PKGDESTDIR}/${path} ${name}.sample
 		sed -i ${PKGDESTDIR}/${path}        \
 			-e "s;^Example$;# Example;" \
-			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_clamav;"
 	done
 	vdoc ${FILESDIR}/README.voidlinux
 
```

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

* Re: [PR PATCH] [Updated] WIP: clamav: update to 1.2.0.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (10 preceding siblings ...)
  2023-09-14 14:46 ` WIP: clamav: update to 1.2.0 nsudsgaard
@ 2023-09-17  6:22 ` nsudsgaard
  2023-09-17  6:25 ` [PR PATCH] [Merged]: " Johnnynator
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-17  6:22 UTC (permalink / raw)
  To: ml

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

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

https://github.com/nsudsgaard/void-packages master
https://github.com/void-linux/void-packages/pull/46041

WIP: clamav: update to 1.2.0.
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl _crossbuild_
- [x] Builds locally on aarch64 _crossbuild_
- [ ] Builds locally on armv7l-musl _crossbuild_
- [ ] Builds locally on armv7l  _crossbuild_
- [ ] Builds locally on armv6l-musl _crossbuild_
- [ ] Builds locally on armv6l _crossbuild_
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Cleanup/patch the configuration files
- [ ] Add service files


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-46041.patch --]
[-- Type: text/x-diff, Size: 6320 bytes --]

From a36956cfa45eef2f66d87c18c79fd70c5f66368a Mon Sep 17 00:00:00 2001
From: Nicholas Sudsgaard <devel@nsudsgaard.com>
Date: Wed, 13 Sep 2023 16:45:13 +0900
Subject: [PATCH 1/2] clamav: update to 1.0.3, adopt.

---
 common/shlibs           |  7 ++--
 srcpkgs/clamav/template | 88 +++++++++++++++++++++--------------------
 2 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index c407ffde9b8fd..730ee8f6b2159 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2256,9 +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
+libclamav.so.11 clamav-1.0.3_1
+libclamunrar.so.11 clamav-1.0.3_1
+libclamunrar_iface.so.11 clamav-1.0.3_1
+libclammspack.so.0 clamav-1.0.3_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 3574b7baeed09..df48421dda465 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.0.3
+revision=1
+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=/etc
+ -D DATABASE_DIRECTORY=/var/lib/_${pkgname}
+ -D CLAMAV_USER=_${pkgname}
+ -D CLAMAV_GROUP=_${pkgname}
+ -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>"
+maintainer="Nicholas Sudsgaard <devel@nsudsgaard.com>"
 license="GPL-2.0-only"
 homepage="https://www.clamav.net/"
 distfiles="https://www.clamav.net/downloads/production/clamav-${version}.tar.gz"
-checksum=6f49da6ee927936de13d359e559d3944248e3a257d40b80b6c99ebe6fe8c8c3f
-_clamav_homedir="/var/lib/_${pkgname}"
+checksum=8779458dc31fdee1232eb8986f092d25568b39f5d337c0cbcd9c1abb5dc2886b
+system_accounts="_${pkgname}"
 _clamav_descr="ClamAV user"
-system_accounts="_clamav"
-make_check=ci-skip
+_clamav_homedir="/var/lib/_${pkgname}"
+conf_files="/etc/clamd.conf /etc/freshclam.conf /etc/clamav-milter.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}"
 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
+pre_configure() {
 	if [ "$CROSS_BUILD" ]; then
-		configure_args+=" have_cv_ipv6=yes"
+		path=${XBPS_CROSS_BASE}/lib/rustlib/${XBPS_CROSS_RUST_TARGET}/lib
+
+		sed -i cmake/FindRust.cmake \
+		    -e "s:^set(RUSTFLAGS \"\")$:set(RUSTFLAGS \"-L${path}\"):g"
 	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 /etc 755
+	for path in ${conf_files}; do
+		name=${path#/etc}
+
+		mv -v ${PKGDESTDIR}//${path}.sample ${PKGDESTDIR}/${path}
+		vsconf ${PKGDESTDIR}/${path} ${name}.sample
+		sed -i ${PKGDESTDIR}/${path}        \
+			-e "s;^Example$;# Example;" \
+			-e "s;#DatabaseDirectory.*;DatabaseDirectory /var/lib/_${pkgname};"
+	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"

From bb2ef58edd1075c85c6f6bf1bace5879f3705d32 Mon Sep 17 00:00:00 2001
From: Nicholas Sudsgaard <144646475+nsudsgaard@users.noreply.github.com>
Date: Thu, 14 Sep 2023 03:53:24 +0000
Subject: [PATCH 2/2] Renounce adoption

---
 srcpkgs/clamav/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/clamav/template b/srcpkgs/clamav/template
index df48421dda465..51e05b8ab73b9 100644
--- a/srcpkgs/clamav/template
+++ b/srcpkgs/clamav/template
@@ -18,7 +18,7 @@ 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="Nicholas Sudsgaard <devel@nsudsgaard.com>"
+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"

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

* Re: [PR PATCH] [Merged]: WIP: clamav: update to 1.2.0.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (11 preceding siblings ...)
  2023-09-17  6:22 ` [PR PATCH] [Updated] " nsudsgaard
@ 2023-09-17  6:25 ` Johnnynator
  2023-09-18  9:20 ` jcgruenhage
  2023-09-18 12:39 ` nsudsgaard
  14 siblings, 0 replies; 16+ messages in thread
From: Johnnynator @ 2023-09-17  6:25 UTC (permalink / raw)
  To: ml

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

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

WIP: clamav: update to 1.2.0.
https://github.com/void-linux/void-packages/pull/46041

Description:
- [x] Builds locally on x86_64-musl
- [x] Builds locally on x86_64
- [ ] Builds locally on i686
- [x] Builds locally on aarch64-musl _crossbuild_
- [x] Builds locally on aarch64 _crossbuild_
- [ ] Builds locally on armv7l-musl _crossbuild_
- [ ] Builds locally on armv7l  _crossbuild_
- [ ] Builds locally on armv6l-musl _crossbuild_
- [ ] Builds locally on armv6l _crossbuild_
- [ ] Test on x86_64-musl
- [ ] Test on x86_64
- [ ] Cleanup/patch the configuration files
- [ ] Add service files


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

* Re: WIP: clamav: update to 1.2.0.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (12 preceding siblings ...)
  2023-09-17  6:25 ` [PR PATCH] [Merged]: " Johnnynator
@ 2023-09-18  9:20 ` jcgruenhage
  2023-09-18 12:39 ` nsudsgaard
  14 siblings, 0 replies; 16+ messages in thread
From: jcgruenhage @ 2023-09-18  9:20 UTC (permalink / raw)
  To: ml

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

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1723039456

Comment:
It looks like something went wrong here. With regard to which of the two PRs should remain open: I don't really care. I need clamav for work, and since the packaged clamav doesn't have a service at the moment, my primary goal was adding that an updating clamav while I'm at it. As long as that is done at some point, I don't have a strong preference otherwise.

I agree that combining the efforts into a single PR probably makes sense though.

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

* Re: WIP: clamav: update to 1.2.0.
  2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
                   ` (13 preceding siblings ...)
  2023-09-18  9:20 ` jcgruenhage
@ 2023-09-18 12:39 ` nsudsgaard
  14 siblings, 0 replies; 16+ messages in thread
From: nsudsgaard @ 2023-09-18 12:39 UTC (permalink / raw)
  To: ml

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

New comment by nsudsgaard on void-packages repository

https://github.com/void-linux/void-packages/pull/46041#issuecomment-1723325095

Comment:
> It looks like something went wrong here.

Yeah... I suck at using Git/GitHub. :/

> With regard to which of the two PRs should remain open: I don't really care. I need clamav for work, and since the packaged clamav doesn't have a service at the moment, my primary goal was adding that an updating clamav while I'm at it. As long as that is done at some point, I don't have a strong preference otherwise.

Implementing service files is something I want to get done in this update as well. However, I am currently struggling to put the configuration files into /etc/clamav instead of dumping them all into /etc (putting them in the directory is easy, getting xbps to recognize them is not).

> I agree that combining the efforts into a single PR probably makes sense though.

I already nuked my PR. I am considering just contributing to yours once I get the issue above resolved.




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

end of thread, other threads:[~2023-09-18 12:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-13  9:39 [PR PATCH] clamav: update to 1.0.3, adopt nsudsgaard
2023-09-13  9:42 ` [PR PATCH] [Updated] " nsudsgaard
2023-09-13 20:54 ` r-ricci
2023-09-14  2:26 ` nsudsgaard
2023-09-14  3:47 ` classabbyamp
2023-09-14  3:53 ` [PR PATCH] [Updated] " nsudsgaard
2023-09-14  3:54 ` clamav: update to 1.0.3 nsudsgaard
2023-09-14  7:02 ` r-ricci
2023-09-14  7:04 ` r-ricci
2023-09-14  7:05 ` r-ricci
2023-09-14 10:55 ` nsudsgaard
2023-09-14 14:46 ` WIP: clamav: update to 1.2.0 nsudsgaard
2023-09-17  6:22 ` [PR PATCH] [Updated] " nsudsgaard
2023-09-17  6:25 ` [PR PATCH] [Merged]: " Johnnynator
2023-09-18  9:20 ` jcgruenhage
2023-09-18 12:39 ` nsudsgaard

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).