From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cK/yC4J572MQHQEAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 13:56:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oJfLC4J572PHeAAAauVa8A (envelope-from ) for ; Fri, 17 Feb 2023 13:56:34 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E6026160A1 for ; Fri, 17 Feb 2023 13:56:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT0Hb-0001zd-G5; Fri, 17 Feb 2023 07:56:11 -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 1pT0HU-0001sj-Dq for bug-guix@gnu.org; Fri, 17 Feb 2023 07:56:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT0HU-0007ei-4m for bug-guix@gnu.org; Fri, 17 Feb 2023 07:56:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT0HU-0001qP-0C for bug-guix@gnu.org; Fri, 17 Feb 2023 07:56:04 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH v3 04/11] gnu: icecat: Make language packs reproducible. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Feb 2023 12:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32026 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 32026@debbugs.gnu.org Cc: mhw@netris.org, ludo@gnu.org, Jonathan Brielmaier , Maxim Cournoyer Received: via spool by 32026-submit@debbugs.gnu.org id=B32026.16766385637071 (code B ref 32026); Fri, 17 Feb 2023 12:56:03 +0000 Received: (at 32026) by debbugs.gnu.org; 17 Feb 2023 12:56:03 +0000 Received: from localhost ([127.0.0.1]:38772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT0HS-0001pj-6c for submit@debbugs.gnu.org; Fri, 17 Feb 2023 07:56:02 -0500 Received: from mail-qt1-f170.google.com ([209.85.160.170]:37626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT0HO-0001oa-5e for 32026@debbugs.gnu.org; Fri, 17 Feb 2023 07:55:58 -0500 Received: by mail-qt1-f170.google.com with SMTP id a27so711908qto.4 for <32026@debbugs.gnu.org>; Fri, 17 Feb 2023 04:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rv6V7stAe7RIxPDWzth94H0AanpP1lBv2wbdAs9LaZ4=; b=ckEjWZYC9hDiKASXlr5zJ7fcfQ70IIHwIWhZORsU1W8As436SIjwpRO76fSNjBVlyz tN/5EVW8JGUBTQxIVV5diOVXIpGrUll/qRFRWRL2ENPeUWWXvxGjO7Q5Gdi5srLXfkeC kMCpDf6KqRprUTDkRB93oRKOPJXUGuGCTCancqAgwegEeiy+krlFKT6F4zXGlqeQ1pPz WMtiqYzfqRaE5mENAvGRqnFqG0qkD29jMfz4rvbT7kJ8xTeySBwweWOOoPMTcDCZNlPL PfahbXL8gPjSJS5kwHS5BrOHZrZ/c6g31vAC+OlG+kyq/rsFe3yI9zPfdWductoBNjK1 dA2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rv6V7stAe7RIxPDWzth94H0AanpP1lBv2wbdAs9LaZ4=; b=OoDz9qpVu/htHA3QU3LY5dOkSCLSjDA+uSmHZ4FVmL3SFyktC3Lg/SOpkuVf8WG5Bh t6nkRgo1VwD+wUL/PDbIfmgEMk/w8UBlCSfaJrsTymfaB9Z7St2moVKunbgxXjQwZ3bk ttzkcA8U/kUFNJ3NcrGXFE4Oj8DVRKCPGgaE4VvI+xV3yS8bPkNgPIJgeFO/zv60uMmJ KxonrdbwHiML2xoIIJx4KgYEdHb+bJuOQ0XQFHGhT7Y2TwJfBefR8RQA3G/hqSDiFH5A AR02dSArpyDGQzVk0XY85erT6mXn0UlwZRizcFKG9+PPi0qazP4VbnQVbNV78RpYrTRc cE0g== X-Gm-Message-State: AO0yUKXj2rRz3g2+cqhF6nUyAyEvXLkbQC46rUN1b2KKiT8BWqFEOBui 40hEH0gzGetk+E+IvWlN/7XlNoLa8jC28Mw/ X-Google-Smtp-Source: AK7set+du/5xW6iVIwBf9OawRLfllpn/uhuzqPyL5s+Ar9zYL+oV31q/ACBACzAGZtwtu4hndHOQ0Q== X-Received: by 2002:a05:622a:190a:b0:3bd:155c:3ac8 with SMTP id w10-20020a05622a190a00b003bd155c3ac8mr6297243qtc.67.1676638552571; Fri, 17 Feb 2023 04:55:52 -0800 (PST) Received: from localhost.localdomain (dsl-157-123.b2b2c.ca. [66.158.157.123]) by smtp.gmail.com with ESMTPSA id f17-20020ac80691000000b003b9b48cdbe8sm3176026qth.58.2023.02.17.04.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 04:55:52 -0800 (PST) From: Maxim Cournoyer Date: Fri, 17 Feb 2023 07:55:31 -0500 Message-Id: <20230217125539.24467-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230217125539.24467-1-maxim.cournoyer@gmail.com> References: <20230217125539.24467-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676638594; a=rsa-sha256; cv=none; b=ZFKtQEC5hcfJDjUMaSRuKsC3eXuAUYaqkix3zdr5/QpqmMDSRo3GT+7PY49OAesEUbDTAu sMCv9eoq6BPdXTNruivlp2y3teMVhZb9c3PHA8hDI7HPN16QXufji7Kv+rVRD83T0uOYIn caqKXEf2bnAVionVlEQMx+lyutNYKhAhJN2lMalp5pmIQ/XXe9d6AX4rd/O9+HDsz87NF1 k1dCoKHNUf8OqasvHjFVnrX7u94qOVkX9V/X/xhkEA97EslP5LHQg7ASZDg3oyALW8CATw K/te0QiCfdEPPKV53FuIoY5/2Wo2lBqoe4r1BBO5JUabE11QlwYjuWtc0En6Og== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ckEjWZYC; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676638594; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rv6V7stAe7RIxPDWzth94H0AanpP1lBv2wbdAs9LaZ4=; b=QgS+q2J/QRIWjA6wDAVQLhpc41ccqqFkmhwh3HBtJnqQQiZySFWZ7sYgZVHYnPbLl0cxoT LDXkxhQf1u21Wr3/Yzkj/5U09Gc960kjgxlmfAOmnx3KN7lubAEnEVbj4PRz5ZCzAwVPsA I1Jv92+5vvdDmOIKbbOrrjAreU7F5sK+fRFm4pn3eKEinclnBwbx4kQdv0Or2vzHrU/sBb oUBw7iEvc38dtEDGvZE+MdS4ZNcCZ05bM39wchuft+GSjFnJ4+I1lkP2lZBOHEc/dFbbGI rfOm3ZpENsLT1u+MSmIgaH/U3AOCEzmICvFopu40ysa+LcRIG5y5jv8JfqCaRw== X-Migadu-Spam-Score: -0.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ckEjWZYC; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E6026160A1 X-Migadu-Scanner: scn1.migadu.com X-Spam-Score: -0.03 X-TUID: driBvHFx4A7n * gnu/packages/patches/icecat-reproducible-langpacks.patch: New file. * gnu/local.mk (dist_patch_DATA): Register. it. * gnu/packages/gnuzilla.scm (icecat-source): Apply it. --- (no changes since v1) gnu/local.mk | 1 + gnu/packages/gnuzilla.scm | 1 + .../icecat-reproducible-langpacks.patch | 45 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/icecat-reproducible-langpacks.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5fcbdd4586..ddc5796ca8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1327,6 +1327,7 @@ dist_patch_DATA = \ %D%/packages/patches/i7z-gcc-10.patch \ %D%/packages/patches/icecat-makeicecat.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ + %D%/packages/patches/icecat-reproducible-langpacks.patch \ %D%/packages/patches/icecat-use-system-graphite2+harfbuzz.patch \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch\ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 1bafa92377..17edb9fa7e 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -554,6 +554,7 @@ (define icecat-source (method computed-origin-method) (file-name (string-append "icecat-" %icecat-version ".tar.xz")) (sha256 #f) + (patches (search-patches "icecat-reproducible-langpacks.patch")) (uri (delay (with-imported-modules '((guix build utils)) diff --git a/gnu/packages/patches/icecat-reproducible-langpacks.patch b/gnu/packages/patches/icecat-reproducible-langpacks.patch new file mode 100644 index 0000000000..b36a770cc6 --- /dev/null +++ b/gnu/packages/patches/icecat-reproducible-langpacks.patch @@ -0,0 +1,45 @@ +Prevent the extension manifests from embedding the current date. + +This is inspired by the Debian +"Use-build-id-as-langpack-version-for-reproducibility.patch" maintained for +their Firefox package as well as reproducible-builds.org guidelines from +https://reproducible-builds.org/docs/source-date-epoch/. + +Upstream status: https://phabricator.services.mozilla.com/D169979 + +--- ./python/mozbuild/mozbuild/action/langpack_manifest.py.old 2023-02-13 11:01:21.051537347 -0500 ++++ ./python/mozbuild/mozbuild/action/langpack_manifest.py 2023-02-13 11:04:33.141817330 -0500 +@@ -36,6 +36,15 @@ + pushlog_api_url = "{0}/json-rev/{1}" + + ++import os ++import time ++import datetime ++ ++def get_build_date(): ++ """Honor SOURCE_DATE_EPOCH for reproducibility.""" ++ return datetime.datetime.utcfromtimestamp( ++ int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) ++ + ### + # Retrievers a UTC datetime of the push for the current commit + # from a mercurial clone directory. +@@ -54,7 +63,7 @@ + with mozversioncontrol.get_repository_object(path=path) as repo: + phase = repo._run("log", "-r", ".", "-T" "{phase}") + if phase.strip() != "public": +- return datetime.datetime.utcnow() ++ return get_build_date() + repo_url = repo._run("paths", "default") + repo_url = repo_url.strip().replace("ssh://", "https://") + repo_url = repo_url.replace("hg://", "https://") +@@ -105,7 +114,7 @@ + dt = get_dt_from_hg(path) + + if dt is None: +- dt = datetime.datetime.utcnow() ++ dt = get_build_date() + + dt = dt.replace(microsecond=0) + return dt.strftime("%Y%m%d%H%M%S") -- 2.39.1