From patchwork Mon Apr 7 12:53:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8603 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 (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZWTfm3JJKz3xD7 for ; Mon, 7 Apr 2025 12:53:52 +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 RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZWTfk3W19z5G0 for ; Mon, 7 Apr 2025 12:53:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZWTfk2mntz335f for ; Mon, 7 Apr 2025 12:53:50 +0000 (UTC) X-Original-To: development@lists.ipfire.org 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 (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZWTfg2rCkz32KR for ; Mon, 7 Apr 2025 12:53:47 +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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZWTfd6pbBzHP; Mon, 7 Apr 2025 12:53:45 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1744030426; 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; bh=s2oRRZIs3obExSgMi5BQ2SKs7i5w+XNqcQb0UkXLPFI=; b=SjkSE4HFbLMUlKAojtCmK5M7Tqz37o4d7Ks8HHSH23S6+vvRWVv0f9tMEpVKmwQPXC6SdG 9oUDzf8L2ltywmDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1744030426; 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; bh=s2oRRZIs3obExSgMi5BQ2SKs7i5w+XNqcQb0UkXLPFI=; b=VhRs9ZqWF7IxKGI2NG0IxewUUUrsNKFU3o0wcdWq23kqCKZ0evdkPeMdVbTqzX7c9yNRFm FmjkE083aUTLBnVUTuyntEA6i+CSz7Lv2d9BzHESGlYBLBV4ILPdX5istZ3ktNOqMkxpHp PLEH5HGlAnEPCk++LxI2yJf2Khks4yIg6aHjP+/cLyu/KVD0K3thERh5f0659+kKNZHYoQ wO8N3vvZdgLhCPkSZvGGbVSXJH3JzQxnz2jD9TF1/WCKuAfEADSE/mRtdjMxXZdZoTxII4 emIMXgFnYDsV5VNZVycZX+Zl6mI9bm0havcFVz/VjKsoij5esNPiXuq3lH5ZUg== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 1/2] smartmontools: Add update of drive database Date: Mon, 7 Apr 2025 14:53:40 +0200 Message-ID: <20250407125341.3240782-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - Existing install uses database provide with source tarball. The database is also updated on a periodic basis which can vary between a few weeks up to 6 months or so. - The last release was back in Aug 2023 so the database all users will have is quite old. - This patch adds a script into the monthly fcron directory that will run the update-smart-drivedb script from the smartmontools installation. This script downloads the database file via https and also checks the signature of the file to ensure that it has not been changed in any way. The script is run with the -q (quiet) option. The script checks if the downloaded database is corrupted ands will not install it if it is corrupted. It checks if the database has changed since the last version installed on the system. If not changed it does not replace the file. - Tested this out with my production IPFire system and I ended up with the latest database from 3 weeks ago. Signed-off-by: Adolf Belka --- config/rootfiles/common/smartmontools | 1 + config/smartmontools/fcron.monthly | 5 +++++ lfs/smartmontools | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 config/smartmontools/fcron.monthly diff --git a/config/rootfiles/common/smartmontools b/config/rootfiles/common/smartmontools index 6b3f923b1..0f72814f4 100644 --- a/config/rootfiles/common/smartmontools +++ b/config/rootfiles/common/smartmontools @@ -30,3 +30,4 @@ usr/sbin/update-smart-drivedb #usr/share/man/man8/update-smart-drivedb.8 #usr/share/smartmontools usr/share/smartmontools/drivedb.h +etc/fcron.monthly/smart-drivedb diff --git a/config/smartmontools/fcron.monthly b/config/smartmontools/fcron.monthly new file mode 100644 index 000000000..6561cd081 --- /dev/null +++ b/config/smartmontools/fcron.monthly @@ -0,0 +1,5 @@ +#!/bin/bash + +/usr/sbin/update-smart-drivedb -q + +exit 0 diff --git a/lfs/smartmontools b/lfs/smartmontools index 3e81181fc..61a5ea881 100644 --- a/lfs/smartmontools +++ b/lfs/smartmontools @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2023 IPFire Team # +# Copyright (C) 2007-2025 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -74,5 +74,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && ./configure --prefix=/usr cd $(DIR_APP) && make BUILD_INFO='"($(NAME) $(VERSION))"' $(MAKETUNING) cd $(DIR_APP) && make install + + # Install cron job. + install -m 754 -v $(DIR_CONF)/smartmontools/fcron.monthly \ + /etc/fcron.monthly/smart-drivedb + @rm -rf $(DIR_APP) @$(POSTBUILD) From patchwork Mon Apr 7 12:53:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8604 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 (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZWTfm3hMnz3xq5 for ; Mon, 7 Apr 2025 12:53:52 +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 RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZWTfk37x7z4pB for ; Mon, 7 Apr 2025 12:53:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZWTfk2NMcz32f2 for ; Mon, 7 Apr 2025 12:53:50 +0000 (UTC) X-Original-To: development@lists.ipfire.org 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 (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZWTfg2Mqcz2xMD for ; Mon, 7 Apr 2025 12:53:47 +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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZWTff4T4Kz1ZS; Mon, 7 Apr 2025 12:53:46 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1744030426; 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=M9OBliyXXi7Ve/V+T2xgttS2XuJ/aT3sxBywVrn9ZRM=; b=F/PRY8gcTWNCpJhqDC8vct8P2Kc5RNT+nNGkkLa6GA2hb0ST5dT4PJMw5wuHGkDCWX096f 61eL+ScOAvJIFdDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1744030426; 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=M9OBliyXXi7Ve/V+T2xgttS2XuJ/aT3sxBywVrn9ZRM=; b=sGrfvRTrkJcf0YZbJW6k+C5OsHhcQa9AN38037lPlMSdsbIfkKPm9EycwaQ13qLedw2ry4 EbcwsACAgzTI9GZE58pjDxz3qwfWwsjhL0+ZVz6d4Tf4OA9Y46kieoRs4JnsQMqLubJQgl 9hKf4HG68xKZDi47hlqh6wB8f2QHXJoV+DecPFJbRlLWskWeYzUohXswqnhHZ/Th2HqyTB VYGI3taIDQ9oeBq8MCp+dpqX8vunVr9tCCeAsKC9JaMACPdvqQP6WCRLc9OQWDR2g4z0jN ntzvGJcFqwU0XYqyGxl5Hpc3dV+fYrG2q1L5GOW80j64oFTHG86Y1HgRu1KFTw== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 2/2] core194: Ship smartmontools Date: Mon, 7 Apr 2025 14:53:41 +0200 Message-ID: <20250407125341.3240782-2-adolf.belka@ipfire.org> In-Reply-To: <20250407125341.3240782-1-adolf.belka@ipfire.org> References: <20250407125341.3240782-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Signed-off-by: Adolf Belka --- config/rootfiles/core/194/filelists/smartmontools | 1 + 1 file changed, 1 insertion(+) create mode 120000 config/rootfiles/core/194/filelists/smartmontools diff --git a/config/rootfiles/core/194/filelists/smartmontools b/config/rootfiles/core/194/filelists/smartmontools new file mode 120000 index 000000000..fb66dafef --- /dev/null +++ b/config/rootfiles/core/194/filelists/smartmontools @@ -0,0 +1 @@ +../../../common/smartmontools \ No newline at end of file