From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5AC931382C5 for ; Wed, 24 Feb 2021 21:34:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A8694E07D7; Wed, 24 Feb 2021 21:34:00 +0000 (UTC) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 38A01E07D7 for ; Wed, 24 Feb 2021 21:33:59 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1614202437; cv=none; d=strato.com; s=strato-dkim-0002; b=VbnA7qePiETSETqUGqaXedJaCjYpSU1pv1zEFYj6SLDj02SvZzazykqCNb/g7gY0/u yDqUzoH2xZpQtstx+RdjMsbYclMdXG2PVOruT49DmR0S0Y1394zRuF6SbaewX2awacBN ah5Kk/We3Br9n2qj0phO/rQyP5H42QvfPirqBtMNfUkK2XWRsI/SEI1rmIeoP3QRGep3 NRvULouabtZrtqrsRPeRthbZ3dhQcW7Qp0CJtOuZkgxODbIGZJFDv4UtmSI/OOPELVKM O92jyfsaN9vXxdu/CvzAmSZ5Xnj1qk1qIFHyqbBdEnNaXGe1dy43YCNCfiPGPgL34akR 4lWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1614202437; s=strato-dkim-0002; d=strato.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=zajWdNx1pCzgA1BgwER+8deGO4+Ly215FRZVfRXXNp4=; b=ohLiLn4f06uPXrLidvLXKgdMMnAufIgZ3GuZgSymEFc6vPD8Ua/LJPfZk9kczf4xzo XYs4xmZ7vdVMjZ4kvOdKyn97f/tPCiqRnf44eE4zR2Tb7nW9j95RrDf6sTfsgcjpZzgP 5VaYtEfwtlZ3MQmNIWQ1O4yT3iTLOj85JB7OIC+DwO6h+0pZG9HMOpTx2uWpu2V4e/Oy u4a+6+wTmhKezDWOjGFDsf2cxUSvHIivTBVerBk3dHUgXuep7b2jyeu1djHfKM648PGw 52QdITz/IcTcrray3JTOuV6zHB+WsOwvDppyBOe8aLCkp281Ve5auQX1X/RebgHdgdw9 /APA== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1614202437; s=strato-dkim-0002; d=akhuettel.de; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=zajWdNx1pCzgA1BgwER+8deGO4+Ly215FRZVfRXXNp4=; b=klZ86u/O3tuDnlu5wRHjPcYHQHHx2YAhPVsfDTeWDYFMq1XE7gtIYymVRftEP00DHC Z02br5KK+UAjVdu7F0cQmpCrVSmZ00wN1fT0FmwectLyVWy12FrEoi0B5xku0ujrgE3f eZUC+cU5KyaLYSJEcI8G5z2L4ESCE8JvzebtCII1Dfhsjw8xhJ87qmAV1I2tOaSxFqjV cb04jZUcA3QBG4kOBk287QqXBMOc/82moX0LYKVkgtVt9an+e/X5D3Svb7EC3peqthU+ AIglA+aPO+YjE2tWEN65q1z+IJencJecGVRzZiB+9axGIKaWRvsYBeGQoT0LmgXN2PZf YNQQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":IW0NeWCpcPchHrcnS4ebzBgQnKHTmkWA4CWaQdKj7aNBUhwgYwgSTXPXaK8ExGySimiRpAol" X-RZG-CLASS-ID: mo00 Received: from pinacolada.akhuettel.de by smtp.strato.de (RZmta 47.19.0 AUTH) with ESMTPSA id 60965dx1OLXsEz0 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 24 Feb 2021 22:33:54 +0100 (CET) Received: by pinacolada.akhuettel.de (Postfix, from userid 1000) id D5D563012C6; Wed, 24 Feb 2021 22:30:38 +0100 (CET) From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= To: gentoo-catalyst@lists.gentoo.org Cc: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= Subject: [gentoo-catalyst] [PATCH] Add option to generate BSD-style tagged hashes (can be verified by modern coreutils) Date: Wed, 24 Feb 2021 22:30:26 +0100 Message-Id: <20210224213026.1031-1-dilfridge@gentoo.org> X-Mailer: git-send-email 2.30.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 573d706e-e703-4e67-bf0c-69cab84331b7 X-Archives-Hash: 968895e65b2cc479cdc10972869921f3 Signed-off-by: Andreas K. Hüttel --- catalyst/base/genbase.py | 6 +++++- catalyst/defaults.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py index c7dd87bc..52418877 100644 --- a/catalyst/base/genbase.py +++ b/catalyst/base/genbase.py @@ -24,7 +24,11 @@ class GenBase(): h.update(data) filename = os.path.split(filepath)[1] - return f'# {name.upper()} HASH\n{h.hexdigest()} {filename}\n' + + if self.settings['digest_format'] == 'bsd': + return f'# {name.upper()} HASH\n{name.upper()} ({filename}) = {h.hexdigest()}\n' + else: + return f'# {name.upper()} HASH\n{h.hexdigest()} {filename}\n' def gen_contents_file(self, path): c = self.settings['contents_map'] diff --git a/catalyst/defaults.py b/catalyst/defaults.py index ccb0a584..2cede562 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -11,6 +11,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, LIST_XATTRS_OPTIONS valid_config_file_values = frozenset([ "compression_mode", "digests", + "digest_format", "distcc_hosts", "distdir", "envscript", @@ -35,6 +36,7 @@ confdefaults = { "compressor_options": XATTRS_OPTIONS['linux'], "decomp_opt": DECOMPRESSOR_PROGRAM_OPTIONS['linux'], "decompressor_search_order": DECOMPRESSOR_SEARCH_ORDER, + "digest_format": 'linux', "distdir": portage.settings['DISTDIR'], "icecream": "/var/cache/icecream", 'list_xattrs_opt': LIST_XATTRS_OPTIONS['linux'], -- 2.30.1