From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uMf4CeuWT1/3XgAA0tVLHw (envelope-from ) for ; Wed, 02 Sep 2020 12:58:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ENCrBeuWT199QAAAbx9fmQ (envelope-from ) for ; Wed, 02 Sep 2020 12:58:19 +0000 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 BF2DC940414 for ; Wed, 2 Sep 2020 12:58:18 +0000 (UTC) Received: from localhost ([::1]:42068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDSLB-0004Lw-LN for larch@yhetil.org; Wed, 02 Sep 2020 08:58:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDSKx-0003wu-Lh for guix-patches@gnu.org; Wed, 02 Sep 2020 08:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDSKx-0006sz-By for guix-patches@gnu.org; Wed, 02 Sep 2020 08:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kDSKx-0005hW-Bi for guix-patches@gnu.org; Wed, 02 Sep 2020 08:58:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43160] [PATCH v2 4/4] gnu: linux-libre: Compare generated sources against Linux-libre releases. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Sep 2020 12:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43160 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43160@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 43160-submit@debbugs.gnu.org id=B43160.159905145621862 (code B ref 43160); Wed, 02 Sep 2020 12:58:03 +0000 Received: (at 43160) by debbugs.gnu.org; 2 Sep 2020 12:57:36 +0000 Received: from localhost ([127.0.0.1]:58632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDSKW-0005gX-Bl for submit@debbugs.gnu.org; Wed, 02 Sep 2020 08:57:36 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:45726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kDSKU-0005fj-7T for 43160@debbugs.gnu.org; Wed, 02 Sep 2020 08:57:34 -0400 Received: by mail-qk1-f196.google.com with SMTP id o5so4159315qke.12 for <43160@debbugs.gnu.org>; Wed, 02 Sep 2020 05:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dgOGVMxgG3sYhr5w+yMcGGVaP1v70ZAUL/3C9ZrYKhI=; b=hP8lFua4ojpBwvBi9aI3/CIeh4JuFzyIwA9R3TlnoeZ2K4n2zp2/miFemjBvdHyipD uH6D8W7GVp6MGrrUXFvg2WvGLsy/kAWRRy2Q/fZk3XCwInPRvkVjRQ5X878dn13IkckL LwCn1p8Jx+sCvXY5sQMqDud8XDeu3uQKGjemYyB0Ri+PyBtKWqSlRxKfeLIiqN/WuNmX bCIuCQgjKPGFJ+8TktZzS6suPhoCiYdvOUw8FEJewlGQvPTv+Jrivy34gjjqOhrOgeEV Vc62oxXPPAP2sPx+p12P7DpXVWTEt/GXz59RfFwiFn+XSwvQPPdwwr5PrPqpWwhpT5zP lcmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dgOGVMxgG3sYhr5w+yMcGGVaP1v70ZAUL/3C9ZrYKhI=; b=Ir0NlJyIZDPQZwSFOTJaNoT+mXluJYiOSD/fqw02N6LJHn1ZGhcD7lgxDDN/cR2zh1 4RU0H16Y3EmBjBu2pCHIa7l9bcKEuoaIpP6V0MXe/IYIvretHYdMN1xui3yD6Bb+8wjO v/vzRvXIDyoNPwKuwTEnwNKfjPvVcEEBceJy7JsII/CAMWq4LHWb6dBqJqHTN/3JEXY3 MtCgo3pEt8vC0uZdAAGEFZR/Qq8RDZvPdShVQvxUbTYgXNgq7XwgEGEq10ShfGQlDjsI z+6u39BMbtIbbdNFR9EMAwq7TGF5Zt92AeRI3wd1xkze13nIJ/DrQMTR3iXBVxDy7EsV PV+g== X-Gm-Message-State: AOAM532hkDX1Z1zz/J5bEXVulmkF02DFkNL1AIe4pMjR3ivQVTYHOBp2 S4VCarHKqH8Z2i6uEkx/p0/YWgwOXs8ueg== X-Google-Smtp-Source: ABdhPJw3sLm6dB1oXje8zU1cyfz8kkwweTgLabUf7AAdnBcgC3YhpyH7kuaSw4tVHgWgsd/NaI2bGA== X-Received: by 2002:a05:620a:134e:: with SMTP id c14mr718763qkl.223.1599051448376; Wed, 02 Sep 2020 05:57:28 -0700 (PDT) Received: from localhost.localdomain (dsl-10-133-254.b2b2c.ca. [72.10.133.254]) by smtp.gmail.com with ESMTPSA id x6sm4712553qke.54.2020.09.02.05.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 05:57:27 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 2 Sep 2020 08:56:43 -0400 Message-Id: <20200902125643.27201-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200902125643.27201-1-maxim.cournoyer@gmail.com> References: <20200902125643.27201-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=hP8lFua4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 4.09 X-TUID: QdQNWrXnO96D * gnu/packages/linux.scm (make-linux-libre-source): Rename the UPSTREAM-SOURCE parameter to LINUX-UPSTREAM-SOURCE. Add a new LINUX-LIBRE-UPSTREAM-SOURCE parameter. Update doc. Adjust variable names. Capitalize "Linux" in the user messages. Remove empty directories from the generated sources, then invoke diff between these sources and those of the corresponding Linux-libre release. (%upstream-linux-source): Convert the hash as base32 inside the definition, to simplify its use. (%upstream-linux-libre-source): New procedure. (linux-libre-5.8-pristine-source): Add a LIBRE-HASH binding and use it with %UPSTREAM-LINUX-LIBRE-SOURCE to provide the Linux-libre release origin to the make-linux-libre-source procedure call. (linux-libre-5.4-pristine-source): Likewise. (linux-libre-4.19-pristine-source): Likewise. (linux-libre-4.14-pristine-source): Likewise. (linux-libre-4.9-pristine-source): Likewise. (linux-libre-4.4-pristine-source): Likewise. --- gnu/packages/linux.scm | 63 ++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index e177386312..020eb1670c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -258,10 +258,14 @@ from forcing GEXP-PROMISE." #:guile-for-build guile))) (define (make-linux-libre-source version - upstream-source + linux-upstream-source + linux-libre-upstream-source deblob-scripts) "Return a 'computed' origin that generates a Linux-libre tarball from the -corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." +corresponding LINUX-UPSTREAM-SOURCE (an origin), using the given +DEBLOB-SCRIPTS. The generated Linux-libre source is compared against the +corresponding LINUX-LIBRE-UPSTREAM-SOURCE upstream release (an origin), to +ensure correctness." (match deblob-scripts ((deblob-version (? origin? deblob) (? origin? deblob-check)) (unless (string=? deblob-version (version-major+minor version)) @@ -318,14 +322,14 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (("/bin/sed") (which "sed")) (("/usr/bin/python") (which "python")))) - (if (file-is-directory? #+upstream-source) + (if (file-is-directory? #+linux-upstream-source) (begin - (format #t "Copying upstream linux source...~%") - (invoke "cp" "--archive" #+upstream-source dir) + (format #t "Copying upstream Linux source...~%") + (invoke "cp" "--archive" #+linux-upstream-source dir) (invoke "chmod" "--recursive" "u+w" dir)) (begin - (format #t "Unpacking upstream linux tarball...~%") - (invoke "tar" "xf" #$upstream-source) + (format #t "Unpacking upstream Linux tarball...~%") + (invoke "tar" "xf" #$linux-upstream-source) (match (scandir "." (lambda (name) (and (not (member name '("." ".."))) @@ -352,7 +356,16 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (format #t "~%Scanning the generated tarball for blobs...~%") (invoke "/tmp/bin/deblob-check" "--use-awk" "--list-blobs" - #$output)))))))))) + #$output) + + (format #t "~%Comparing with the upstream Linux-libre \ +release...~%") + ;; Git doesn't track empty directories, so remove them from + ;; our local tree for the sake of comparison. + (invoke "find" dir "-type" "d" "-empty" "-delete") + (invoke "diff" "-ur" + dir + #+linux-libre-upstream-source)))))))))) ;;; @@ -381,55 +394,75 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." (uri (string-append "mirror://kernel.org" "/linux/kernel/v" (version-major version) ".x/" "linux-" version ".tar.xz")) - (sha256 hash))) + (sha256 (base32 hash)))) +(define (%upstream-linux-libre-source version hash) + (origin + (method git-fetch) + (uri (git-reference + (url "git://linux-libre.fsfla.org/releases.git") + (commit (string-append "sources/v" version "-gnu")))) + (file-name (git-file-name "linux-libre-source" version)) + (sha256 (base32 hash)))) (define-public linux-libre-5.8-version "5.8.5") (define-public linux-libre-5.8-pristine-source (let ((version linux-libre-5.8-version) - (hash (base32 "0zwl0nk3x6fxwsbnmpx1drh7v0116yhgamisb1pghd472mmw6klx"))) + (hash "0zwl0nk3x6fxwsbnmpx1drh7v0116yhgamisb1pghd472mmw6klx") + (libre-hash "0blgkbfvl5p6y6fj0xkdnd0dk2qla02pc37gj7dc3ha0asxv4mp8")) (make-linux-libre-source version (%upstream-linux-source version hash) + (%upstream-linux-libre-source version libre-hash) deblob-scripts-5.8))) (define-public linux-libre-5.4-version "5.4.61") (define-public linux-libre-5.4-pristine-source (let ((version linux-libre-5.4-version) - (hash (base32 "197y2yb60m1k8i7mig4pa9wsrklfxq81ba3zfahwb2b31w2kvwc6"))) + (hash "197y2yb60m1k8i7mig4pa9wsrklfxq81ba3zfahwb2b31w2kvwc6") + (libre-hash "1ycbalnlmgbaq3yh7yc7l8gw7c8d2x4jbwildf04zgfq9g0lv78m")) (make-linux-libre-source version (%upstream-linux-source version hash) + (%upstream-linux-libre-source version libre-hash) deblob-scripts-5.4))) (define-public linux-libre-4.19-version "4.19.142") (define-public linux-libre-4.19-pristine-source (let ((version linux-libre-4.19-version) - (hash (base32 "19372sri4962dqf5rbr211lrfpckmj11kxsginfcwwid4hfdn4k9"))) + (hash "19372sri4962dqf5rbr211lrfpckmj11kxsginfcwwid4hfdn4k9") + (libre-hash "1281d0rx17yiy9723ig381jq3bww59xqggisbxhdrxvfbxv0vvp4")) (make-linux-libre-source version (%upstream-linux-source version hash) + (%upstream-linux-libre-source version libre-hash) deblob-scripts-4.19))) (define-public linux-libre-4.14-version "4.14.195") (define-public linux-libre-4.14-pristine-source (let ((version linux-libre-4.14-version) - (hash (base32 "08d08la3h48fbdlr3h8zbvdghydx3x9cwb4yrnm0n93hhrwjhkrr"))) + (hash "08d08la3h48fbdlr3h8zbvdghydx3x9cwb4yrnm0n93hhrwjhkrr") + (libre-hash "0vgfw8jv3mnn6d9pvccqvx4v143ck02inivnhmxylq0nqfxb7nj4")) (make-linux-libre-source version (%upstream-linux-source version hash) + (%upstream-linux-libre-source version libre-hash) deblob-scripts-4.14))) (define-public linux-libre-4.9-version "4.9.234") (define-public linux-libre-4.9-pristine-source (let ((version linux-libre-4.9-version) - (hash (base32 "1qw26x2qc29yr094c7scw68m9yz4j0b2c4f92rvi3s31s928avvm"))) + (hash "1qw26x2qc29yr094c7scw68m9yz4j0b2c4f92rvi3s31s928avvm") + (libre-hash "1p7dpsqad9vra22r00ha6vg2fap4jjplfkcaskz9fvih6m4m7wgp")) (make-linux-libre-source version (%upstream-linux-source version hash) + (%upstream-linux-libre-source version libre-hash) deblob-scripts-4.9))) (define-public linux-libre-4.4-version "4.4.234") (define-public linux-libre-4.4-pristine-source (let ((version linux-libre-4.4-version) - (hash (base32 "123354h05fip161rzlxc8h0cn5lh0d1gz06gc5b7zyz9i2lxv539"))) + (hash "123354h05fip161rzlxc8h0cn5lh0d1gz06gc5b7zyz9i2lxv539") + (libre-hash "07adliis6kln7531jwwl0h2v9wkzn2j3jn2zjlyashxd9p85kywm")) (make-linux-libre-source version (%upstream-linux-source version hash) + (%upstream-linux-libre-source version libre-hash) deblob-scripts-4.4))) (define %boot-logo-patch -- 2.27.0