From patchwork Thu Nov 21 00:50:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Runciter X-Patchwork-Id: 70617 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4A0F027BBE2; Thu, 21 Nov 2024 00:51:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C3DD227BBEA for ; Thu, 21 Nov 2024 00:51:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDvPX-0004MJ-A2; Wed, 20 Nov 2024 19:51:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDvPU-0004LT-W0 for guix-patches@gnu.org; Wed, 20 Nov 2024 19:51:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDvPU-0006vw-M0 for guix-patches@gnu.org; Wed, 20 Nov 2024 19:51:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=o1fuGecQbM04OSgkUDhyZjq6I6YPNE0bmaH+q9XNUVk=; b=UIh3Kcn4dXdLJcv/5Xt8xpE3xl88W39iRWPgXl1z4n1KfnikE2X8zIt7fBQpGcjmla4UcKheeE8a2LYC0JUtghJEYHzD3OGpig0i+tOy3RRFhhJNV8GzS44PtumTXX6auTwBAMhRfjY+oslOO1VEzaO4NAwCUy5s9GV0XWMitbJjyhboTj0K+IyhsSBAK8MhH2Y2rZCfmpLVK+9LHWwnzW32+zCR3h7KZ0NDBZoirMuY5Xk/X3lTxEk8paEYf6wFrUOLrYFQHEZ81Pbd7pdcSMB+NatIjL0uRX0+SDenkb+aR1WJswi9rAKOiv0l288xIt04OpYEbm5b4hq3XlwwMA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDvPU-0001rw-GX for guix-patches@gnu.org; Wed, 20 Nov 2024 19:51:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74411] [PATCH v2 5/5] gnu: freedict-tools: Fix non-determinism of dictzip compressed file headers. Resent-From: Runciter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 00:51:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74411 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74411@debbugs.gnu.org Cc: Runciter Received: via spool by 74411-submit@debbugs.gnu.org id=B74411.17321502307111 (code B ref 74411); Thu, 21 Nov 2024 00:51:04 +0000 Received: (at 74411) by debbugs.gnu.org; 21 Nov 2024 00:50:30 +0000 Received: from localhost ([127.0.0.1]:48427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDvOv-0001qd-HV for submit@debbugs.gnu.org; Wed, 20 Nov 2024 19:50:29 -0500 Received: from mail-10627.protonmail.ch ([79.135.106.27]:23375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDvOt-0001qI-89 for 74411@debbugs.gnu.org; Wed, 20 Nov 2024 19:50:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whispers-vpn.org; s=protonmail; t=1732150220; x=1732409420; bh=o1fuGecQbM04OSgkUDhyZjq6I6YPNE0bmaH+q9XNUVk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=FwSVAnMVImy0GOLgiljQr+hVF7OlVEFVgu0enVNBadvwtW4iRGi6PFnx4i3fOSuCs BSRyGmdalfaXXDu0i6cgTAQH3ovynMfyYgZjDaFMxWLmV41vZYA8Zq78iDqf1zIdvA 8PoWapTKg3+2LfIPoo5LwU1ir6ReJ9tlIG8vDonc+Cqtz4mJxhAuAltvsQ3mTYajbA yX5sxxQ/mjQ1lgg8CjY6WYp7VRtjTyOH6Fz87Xmhi7kPxLM1MhewTA8hqgwN7SN1xr GQ75vmEJC2Zf4HGfgltVj3o6njQU+KPXiOUjauQ1JFxIs30xv5OhP0z7OVOf+y+194 lC94f0I1BdOqg== Date: Thu, 21 Nov 2024 00:50:17 +0000 Message-ID: In-Reply-To: References: Feedback-ID: 119317227:user:proton X-Pm-Message-ID: 06e5889d7cdcb3e3a95ea9adbd2cbd8d10c49031 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Runciter X-ACL-Warn: , Runciter via Guix-patches X-Patchwork-Original-From: Runciter via Guix-patches via From: Runciter Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Reset .dict file mtime to start of the epoch before compressing with dictzip. * gnu/packages/patches/freedict-tools-fix-determinism.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/dictionaries.scm (freedict-tools): Use it. Signed-off-by: Runciter --- gnu/local.mk | 1 + gnu/packages/dictionaries.scm | 3 ++- .../freedict-tools-fix-determinism.patch | 22 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/freedict-tools-fix-determinism.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7004d02547..f6b465441a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1291,6 +1291,7 @@ dist_patch_DATA = \ %D%/packages/patches/fpc-glibc-2.34-compat.patch \ %D%/packages/patches/fpm-newer-clamp-fix.patch \ %D%/packages/patches/freecad-vtk-9.3.patch \ + %D%/packages/patches/freedict-tools-fix-determinism.patch \ %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \ %D%/packages/patches/freeimage-libtiff-compat.patch \ %D%/packages/patches/freeimage-libraw-0.21-compat.patch \ diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm index 3e5d991890..a6daf209e3 100644 --- a/gnu/packages/dictionaries.scm +++ b/gnu/packages/dictionaries.scm @@ -483,7 +483,8 @@ (define-public freedict-tools-0.6.0 (url "https://github.com/freedict/tools") (commit "3596640e6e0582cc5fb76a342e5d8e7413aa4b34"))) (sha256 - (base32 "1raayynvn1j8x0ck8pnbbljl6zxnsyzzil7y54xz03dpj7k9w7mk")))) + (base32 "1raayynvn1j8x0ck8pnbbljl6zxnsyzzil7y54xz03dpj7k9w7mk")) + (patches (search-patches "freedict-tools-fix-determinism.patch")))) (inputs (list espeak-ng python perl diff --git a/gnu/packages/patches/freedict-tools-fix-determinism.patch b/gnu/packages/patches/freedict-tools-fix-determinism.patch new file mode 100644 index 0000000000..ad100bbba9 --- /dev/null +++ b/gnu/packages/patches/freedict-tools-fix-determinism.patch @@ -0,0 +1,22 @@ +The compression utility dictzip writes the compressed file's mtime in a header +of the compressed file. No command-line switch is documented to control or +suppress this behavior. This makes the build of packages relying on +freedict-tools such as freedict-dictionaries non-deterministic. + +This patch sets the mtime of the .dict file to be compressed by dictzip to the +start of the epoch on the Greenwich meridian, restoring build determinism. + +diff --git a/mk/dicts.mk b/mk/dicts.mk +index 08e8923..e671cf3 100644 +--- a/mk/dicts.mk ++++ b/mk/dicts.mk +@@ -265,7 +265,8 @@ $(BUILD_DICTD)/%.dict $(BUILD_DICTD)/%.index: $(BUILD_DICTD)/%.c5 query-dictd + dictfmt --without-time -t --headword-separator %%% $(DICTFMTFLAGS) $* < $(notdir $<) + + $(BUILD_DICTD)/%.dict.dz: $(BUILD_DICTD)/%.dict +- dictzip -k $< ++ touch -m -d "$$(date -u -R -d @0)" $< && \ ++ dictzip -k $< + + # prevent make from removing our precious file + .PRECIOUS: $(BUILD_DICTD)/$(dictname).dict