Github messages for voidlinux
 help / color / mirror / Atom feed
From: jcgruenhage <jcgruenhage@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] WIP: clamav: update to 1.0.0.
Date: Thu, 22 Dec 2022 00:29:24 +0100	[thread overview]
Message-ID: <20221221232924.BB07Qkbq0NKzFEKmrrp-yrtu2v0_RAwZZ4ghRg9-SHQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41188@inbox.vuxu.org>

[-- 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}"

  parent reply	other threads:[~2022-12-21 23:29 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 18:17 [PR PATCH] " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221221232924.BB07Qkbq0NKzFEKmrrp-yrtu2v0_RAwZZ4ghRg9-SHQ@z \
    --to=jcgruenhage@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).