From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mGIKGW8o5GAoFAEAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 11:54:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cCepFG8o5GDTFQAAbx9fmQ (envelope-from ) for ; Tue, 06 Jul 2021 09:54:55 +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 C9F6F277AE for ; Tue, 6 Jul 2021 11:54:54 +0200 (CEST) Received: from localhost ([::1]:37482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0hn3-0008Hm-ER for larch@yhetil.org; Tue, 06 Jul 2021 05:54:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0hh4-00056D-FL for guix-devel@gnu.org; Tue, 06 Jul 2021 05:48:42 -0400 Received: from imta-35.everyone.net ([216.200.145.35]:33886 helo=imta-38.everyone.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0hh1-0002Md-W2 for guix-devel@gnu.org; Tue, 06 Jul 2021 05:48:41 -0400 Received: from pps.filterd (m0004961.ppops.net [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 1669mYRa008709; Tue, 6 Jul 2021 02:48:34 -0700 X-Eon-Originating-Account: rYiQ01qB1IRhwG5akoQkGDdDEJQPuvyuxWxhP6XPH50 X-Eon-Dm: m0116787.ppops.net Received: by m0116787.mta.everyone.net (EON-AUTHRELAY2 - 5a81cf73) id m0116787.60d3a85b.db703; Tue, 6 Jul 2021 02:48:33 -0700 X-Eon-Sig: AQMHrIJg5CbxGafVZgIAAAAC,954b9ff9db21075157b2d834d45559a8 X-Eip: VLpSK3mmQjE_k220BvhH8I_PAW4iSgi_t1KU8Rnm_fY Date: Tue, 6 Jul 2021 11:48:31 +0200 From: Bengt Richter To: Nathan Benedetto =?utf-8?Q?Proen=C3=A7a?= Subject: Re: Use of %texlive-revision and %texlive-tag in tex.scm Message-ID: <20210706094306.GA3432@LionPure> References: <87o8bgoo1p.fsf@archlinux.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87o8bgoo1p.fsf@archlinux.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-GUID: 59uA0U9v2PjGxSowumxgEJZY8yG_gd5y X-Proofpoint-ORIG-GUID: 59uA0U9v2PjGxSowumxgEJZY8yG_gd5y X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-06_04:2021-07-02, 2021-07-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 mlxlogscore=950 mlxscore=0 suspectscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 phishscore=0 adultscore=0 clxscore=1034 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107060048 Received-SPF: pass client-ip=216.200.145.35; envelope-from=bokr@oz.net; helo=imta-38.everyone.net X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bengt Richter Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625565294; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=bJzeaC/Nn2C1PInU6H4TST5LEL4HkpqOvk1gdPzox04=; b=KmiyUn0as/tvDg/v2PpoLAB0U0BKrETSO/+GhsxZneYxQ63Y3j5GQrevH3KN7RqorMUl8E +RzwTC8xsNkI/mJbg8Kly8JSOf/1fS056zA7qxzGHcJ/6D5v7VgsAlGqWggX1S8DFZor6G 8ZyR9BMeNjVNbB2AeYkils8VcIVTUBm/4F4gt8X1OB8bok8HWg3IRj68eAfxDqU7jgr4Ju SEnfYSbHRJbnoJ4wPaO7nBZN+B5x2JrqzlVEPWKS3sWlw/0wzCJSAqtflW1p9B027bg5z8 YYjni6QHr/cuxK7ErzHf7nZJz3+6G7yDHqFiQiBmM3phrmfSGEEQxn4qfAFZNw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625565294; a=rsa-sha256; cv=none; b=AQpbmXnD9kBmXgHo8EzKPhV7p0I+L7O+fQlkPU5iEyIJOUbypc+4JwUpvTVtaJcEDKJKiS 2xoySO3b1cKgcA2OXQhXODeAs1EdJn8WVM1WSjxSA5WXOJG0b8PXDejgLDJTp1mNLvx7jp SDbtWsPGnCZzPoiY28mbV9lGYToWPUw5dowJop3a2czyso4uigk13/m72/MqwCdjI8lXo2 zjT2H1CWaeGH30OHLle4K5BKpsQBOT7WgRsSj/VvO7Zlf5bQv3cuclLXlF4p08EXmOSPGA aG1uwMwuonS1MkKVW0nR4n+6DapsFQJzwCFFwgBxG1NDT99lfuHb1Ks4HeR6oQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: C9F6F277AE X-Spam-Score: -0.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: jU6KP/KPCAHP Hi Nathan, Nice writeup! On +2021-07-05 11:03:46 -0300, Nathan Benedetto Proença wrote: > Hello! > > I am trying to upgrade the package texlive, first for me, but hopefully > for a patch, and I have a question regarding Guix policies. > > As you can see on > > https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/texlive.scm?id=f7692617b624a01615cf412773c4dad9a2deeb68 > > the file guix/build-system/texlive.scm exposes two variables: > > (define %texlive-tag "texlive-2019.3") > (define %texlive-revision 51265) > > These variables are used throughout gnu/packages/tex.scm, as you can see > on > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/tex.scm?id=f7692617b624a01615cf412773c4dad9a2deeb68 > > An example is the following code: > > (define hyph-utf8-scripts > (origin > (method svn-fetch) > (uri (texlive-ref "generic" "hyph-utf8")) > (file-name (string-append "hyph-utf8-scripts-" > (number->string %texlive-revision) > "-checkout")) > (sha256 > (base32 > "0lk7shx768sxvgr85y8bnmmnj8x4bbkgpxrz3z8jp8avi33prw83")))) > > Grep tells me there are 290+ occurrences of `%texlive-revision`. > What is the purpose of these variables? > > You see, they give me the impression that Guix is really concerned about > upgrading *all* of texlive at once. > These variables tell me I should go to the file texlive.scm and bump the > tag and revision, and then handle all the broken hashes. > > Hence, it seems to me that any attempt to upgrade the texlive package > would have to be done in a separate branch, which would only be merged > into master when all the packages are upgraded. > > Is this the case? > And if so, why? > > I have the impression that if such "monolithic" upgrade is not a goal, > and "partial" our "per-package" upgrades are desirable, there may be > better solutions. > > For example, we could add keyword arguments to texlive-ref and > texlive-origin, so the code above becomes something like this > > (define hyph-utf8-scripts > (origin > (method svn-fetch) > (uri (texlive-ref "generic" "hyph-utf8" > #:texlive-tag "texlive-2019.3" > #:texlive-revision 51265)) > (file-name "hyph-utf8-scripts-51625-checkout") > (sha256 > (base32 > "0lk7shx768sxvgr85y8bnmmnj8x4bbkgpxrz3z8jp8avi33prw83")))) > > This would work right now, and we could eventually remove every use of > %texlive-revision and %texlive-tag, so they become implementation > details of the build-system texlive.scm; a fallback version. > And further down the road we may even decide to remove this fallback, > and make developers be explicit about their tags and revisions; this > could amount to a refactor which makes the keyword arguments into > required arguments, for example. > > I also like the second version of the code because the hash already > pinpoints the tag and revision: both texlive-ref and texlive-origin use > these variables to find the correct files to download. > This just makes this dependency explicit. > > In any case, as this may be a choice between shipping stable and > up-to-date packages, and as I am new to contributing to Guix, I found > fitting to ask. > > Thanks in advance! > Nathan > I am wondering about guaranteeing generic behaviour by guaranteeing program source and toolchain source hash equivalences vs ignoring sources and guaranteeing end results by testing results. I.e., if you want to print the sum of x and y passed as strings to a program, output as a string to stdout, it doesn't matter (other than optimization and debuggability) what language the program was written in, so long as it was compiled into a form that execve and co can launch and the end result is the same. As part of testing, maybe strace could be used to generate some kind of canonical kernel transaction trace that could be used to compare behaviours for equivalency of executing different-language programs? This would be a radical change in the approach to reproducibility, maybe dynamically selecting from a whitelist of trusted/tested substitutable executables with hash names in /gnu but not necessarily (though not excluding) binaries produced with guix source guarantees. Seems like guix is turing-complete enough to provide this kind of substitutable foreign functions already, so might this be a way to avoid mass recompilations? Or is this already available, but not so much used? I am not sure where to contibute thoughts like these, where they would be of interest rather than distracting. (Pls excuse the noise, if that's what this is to you). -- Regards, Bengt Richter