From owner-freebsd-questions@freebsd.org Mon Mar 1 15:36:41 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B166C561A9A for ; Mon, 1 Mar 2021 15:36:41 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq4B14cJcz4jTF; Mon, 1 Mar 2021 15:36:41 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "R3" (verified OK)) (Authenticated sender: matthew/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 7495234154; Mon, 1 Mar 2021 15:36:41 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from PD0786.local (unknown [IPv6:2001:8b0:151:1:85b2:e2ee:4d75:c7e6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 6E780F3D2; Mon, 1 Mar 2021 15:36:40 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/6E780F3D2; dkim=none; dkim-atps=neutral Subject: Re: installed ports library audit? To: freebsd@dreamchaser.org, FreeBSD Mailing List References: From: Matthew Seaman Message-ID: <97db8511-c5e0-26cc-5e56-4dfa976d7d12@FreeBSD.org> Date: Mon, 1 Mar 2021 15:36:40 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 15:36:41 -0000 On 01/03/2021 03:43, Gary Aitken wrote: > I just mostly recovered from a system crash where /usr was corrupted and > had to be recovered using fsck; couldn't completely recover using the > journal. > > I suspect the trashed files are in one of a few libraries.  I'm wondering > if there's an easy way to audit all files installed by given ports, > i.e. do an sha256 or something like that on each and compare with the known > good if it's available somewhere? pkg-check(8) -- specifically `pkg check -r -x .` will show you any file known to pkg(8) where the on-disk copy doesn't match the checksum in the pkgdb. Cheers, Matthew