From patchwork Tue Feb 14 08:15:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6518 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4PGDYd00zbz3xH0 for ; Tue, 14 Feb 2023 08:16:04 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PGDYY5VF3z2MF; Tue, 14 Feb 2023 08:16:01 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PGDYX4rW3z30HM; Tue, 14 Feb 2023 08:16:00 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4PGDYN3xwPz2yl8 for ; Tue, 14 Feb 2023 08:15:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4PGDYL2Qyhz1nQ; Tue, 14 Feb 2023 08:15:50 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1676362550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E1y8L4Wuhq9V1m79QG9Dies0smrVpORkexbASy4E9z4=; b=jHg+78BO3RrGFkA6wvulqnj6RrKzVooJ0pSrz2GR2RuMHvR+XhvzsmkghnXnMx3VsmhoDD irkm89B9IaZn+hBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1676362550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E1y8L4Wuhq9V1m79QG9Dies0smrVpORkexbASy4E9z4=; b=TDN4nS4Z1HdIAm/vHYV422HfsnQ8bALW+yHPcB8zT4TgWqjr9sNroNXZe9sPUEYyDl7bnh zyeh89f9mSXIm/1+OqHGcegTQ2y9KGF1OBuK3AMJZ9yA8oFgF4NoG9ahcs+1pPUqYBAXG3 AHT9Ln++ackxFcA2z6TGKjCx2uj75nFieYpqWwkly+inEsPndM7l80hLJjEtAo54SBtfy5 0TDDJGngMpjuxgs5RzVucV2HaGu3MDJFF/69kW+dbmdyn/hNif0ACnpS3UQa4K7jCXX7wz 02ut17KhB9NwDm6c6zKuyZKfELpkVJ4rf5AO5U2lXQqcy/gqtbmNfJkZ63riVQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 4/5] clamav-databases: New package Date: Tue, 14 Feb 2023 09:15:39 +0100 Message-Id: <20230214081540.125883-4-stefan.schantl@ipfire.org> In-Reply-To: <20230214081540.125883-1-stefan.schantl@ipfire.org> References: <20230214081540.125883-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This package just provide a base set of clamav virus databases to start. The database may be outdated very soon but automatically got updated by freshclam. This package only needs to be touched in case clamav got a new (incompatible) database file format. Signed-off-by: Stefan Schantl --- clamav-databases/clamav-databases.nm | 64 ++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 clamav-databases/clamav-databases.nm diff --git a/clamav-databases/clamav-databases.nm b/clamav-databases/clamav-databases.nm new file mode 100644 index 000000000..30a386c37 --- /dev/null +++ b/clamav-databases/clamav-databases.nm @@ -0,0 +1,64 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +name = clamav-databases +version = 1 +release = 1 +arch = noarch + +groups = System Environment/Daemons +url = https://www.clamav.net +license = GPLv2 +summary = Clamav Virus Databases + +description + This package contains an initial set of databases used by Clamav. +end + +# Using the clamav server is not permitted, so the files have to be +# downloaded manually and uploaded to our source server. +#source_dl = https://database.clamav.net/ +sources = \ + main.cvd \ + daily.cvd + +build + prepare + %{create_users} + end + + build = # Nothing to do + + install + # Create directory. + mkdir -pv %{BUILDROOT}%{sharedstatedir}/clamav + + # Install the databases. + cp -avf %{DIR_DL}/*.cvd %{BUILDROOT}%{sharedstatedir}/clamav/ + + # Own the database foler and files to this user/group. + chown -R clamav:clamav %{BUILDROOT}%{sharedstatedir}/clamav/ + end +end + +create_users + # Create user and group for clamav. + getent group clamav >/dev/null || groupadd -g 496 -r clamav || : + getent passwd clamav >/dev/null || useradd -u 496 -r -s /sbin/nologin \ + -d / -M -g clamav clamav || : +end + +packages + package %{name} + datafiles + %{sharedstatedir}/clamav/daily.cvd + %{sharedstatedir}/clamav/main.cvd + end + + script prein + %{create_users} + end + end +end